|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.palm.cbj.explain.JumpExplanation
public class JumpExplanation
Field Summary | |
---|---|
protected java.util.BitSet |
decisionConstraints
|
protected java.util.BitSet |
originalConstraints
|
protected java.util.BitSet |
originalStaticConstraints
|
protected AbstractProblem |
pb
|
Constructor Summary | |
---|---|
JumpExplanation(AbstractProblem pb)
|
|
JumpExplanation(int level,
AbstractProblem pb)
|
Method Summary | |
---|---|
void |
add(int level)
|
void |
add(int from,
int to)
|
void |
add(Propagator constraint)
Adds a new constraint in the explain. |
void |
addAll(java.util.Collection collection)
Adds several constraints at a time |
void |
clear()
Deletes all indirect constraints. |
boolean |
contains(int level)
|
boolean |
contains(Propagator ct)
test if a constraint is in the collection |
boolean |
containsAll(ConstraintCollection collec)
test inclusion |
ConstraintCollection |
copy()
Clones the collection as a new one. |
void |
delete(int level)
|
void |
delete(Propagator constraint)
Deletes a constraint from the explain. |
void |
empties()
Removes all constraints from this explanation. |
Propagator |
getConstraint(int i)
return the i-th constraint of the explanation |
java.util.BitSet |
getDecisionBitSet()
|
int |
getLastLevel(int currentLevel)
|
SymbolicDecision[] |
getNogood()
return the nogood associated to the explanation |
java.util.BitSet |
getOriginalConstraintBitSet()
|
boolean |
isEmpty()
Checks if the explain is empty (that is wether the size of the set is null). |
boolean |
isValid()
|
void |
merge(ConstraintCollection collection)
Merges an explain with the current one. |
int |
nogoodSize()
|
int |
size()
return the size of the bitSet |
java.util.Set |
toSet()
Creates a set with all the constraints in the explain.. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.BitSet originalConstraints
protected java.util.BitSet originalStaticConstraints
protected java.util.BitSet decisionConstraints
protected AbstractProblem pb
Constructor Detail |
---|
public JumpExplanation(AbstractProblem pb)
public JumpExplanation(int level, AbstractProblem pb)
Method Detail |
---|
public void merge(ConstraintCollection collection)
ConstraintCollection
merge
in interface ConstraintCollection
collection
- The collection of constraints that must be added to thispublic ConstraintCollection copy()
ConstraintCollection
copy
in interface ConstraintCollection
public void add(Propagator constraint)
ConstraintCollection
add
in interface ConstraintCollection
constraint
- The constraint that should be added to the explain.
It must be a PalmConstraint
.public void add(int level)
public void add(int from, int to)
public void delete(Propagator constraint)
ConstraintCollection
delete
in interface ConstraintCollection
constraint
- The constraint that must be removed.public void delete(int level)
public void addAll(java.util.Collection collection)
ConstraintCollection
addAll
in interface ConstraintCollection
collection
- The set of constraintspublic boolean isEmpty()
ConstraintCollection
isEmpty
in interface ConstraintCollection
public int size()
ConstraintCollection
size
in interface ConstraintCollection
public void clear()
ConstraintCollection
clear
in interface ConstraintCollection
public boolean contains(Propagator ct)
ConstraintCollection
contains
in interface ConstraintCollection
public boolean contains(int level)
public int getLastLevel(int currentLevel)
public boolean containsAll(ConstraintCollection collec)
ConstraintCollection
containsAll
in interface ConstraintCollection
public java.util.Set toSet()
Explanation
toSet
in interface Explanation
public boolean isValid()
public void empties()
Explanation
empties
in interface Explanation
public int nogoodSize()
public java.util.BitSet getDecisionBitSet()
public java.util.BitSet getOriginalConstraintBitSet()
public Propagator getConstraint(int i)
Explanation
getConstraint
in interface Explanation
i
- : the number of the constraint to returnpublic SymbolicDecision[] getNogood()
Explanation
getNogood
in interface Explanation
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |