|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Var
Interface for all implementations of domain variables.
Method Summary | |
---|---|
int |
addConstraint(Constraint c,
int varIdx,
boolean dynamicAddition)
Adds a new listener for the variable, that is a constraint which should be informed as soon as the variable domain is modified. |
void |
fail()
a constraint may fail during propagation, raising a contradiction |
Constraint |
getConstraint(int i)
Returns the i th constraint. |
java.util.Iterator |
getConstraintsIterator()
This methods should be used if one want to access the different constraints currently posted on this variable. |
PartiallyStoredVector |
getConstraintVector()
access the data structure storing constraints involving a given variable |
VarEvent |
getEvent()
returns the object used by the propagation engine to model a propagation event associated to the variable (an update to its domain) |
PartiallyStoredIntVector |
getIndexVector()
access the data structure storing indices associated to constraints involving a given variable |
int |
getNbConstraints()
Returns the number of listeners involving the variable. |
int |
getVarIndex(int constraintIndex)
returns the index of the variable in it i-th constraint |
boolean |
isInstantiated()
Public user API: Domains : testing whether a variable is instantiated or not. |
Methods inherited from interface choco.Entity |
---|
getProblem, pretty |
Method Detail |
---|
int getNbConstraints()
void fail() throws ContradictionException
ContradictionException
Constraint getConstraint(int i)
i
th constraint. i
should be more than or equal to 0, and less or equal to
the number of constraint minus 1.
int getVarIndex(int constraintIndex)
constraintIndex
- the index of the constraint (among all constraints linked to the variable)
PartiallyStoredVector getConstraintVector()
PartiallyStoredIntVector getIndexVector()
boolean isInstantiated()
int addConstraint(Constraint c, int varIdx, boolean dynamicAddition)
VarEvent getEvent()
java.util.Iterator getConstraintsIterator()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |