|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Constraint
Method Summary | |
---|---|
java.lang.Object |
clone()
returns a copy of the constraint. |
int |
getConstraintIdx(int idx)
Network management: Among all listeners linked to the idx-th variable of c, find the index of constraint c. |
int |
getNbVars()
Network management: Get the number of variables involved in the constraint. |
Var |
getVar(int i)
Network management: Accessing the ith variable of a constraint. |
int |
getVarIdxInOpposite(int i)
computes the index of the i-th variable in the counter-opposite of the constraint |
boolean |
isEquivalentTo(Constraint compareTo)
tests the equivalence (logical equality of the conditions) between two constraints. |
boolean |
isSatisfied()
Semantic: Testing if the constraint is satisfied. |
AbstractConstraint |
opposite()
computes the constraint modelling the counter-opposite condition of this |
void |
setConstraintIndex(int i,
int idx)
Network management: Storing that among all listeners linked to the i-th variable of c, this (the current constraint) is found at index idx. |
void |
setVar(int i,
Var v)
Network management: Setting (or overwriting) the ith variable of a constraint. |
Methods inherited from interface choco.Entity |
---|
getProblem, pretty |
Method Detail |
---|
int getNbVars()
Var getVar(int i)
i
- index of the variable in the constraintvoid setVar(int i, Var v)
i
- index of the variable in the constraintv
- the variable (may be an IntDomainVar, SetVar, RealVar, ...boolean isSatisfied()
AbstractConstraint opposite()
java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
boolean isEquivalentTo(Constraint compareTo)
compareTo
- the constraint to be compared to
int getVarIdxInOpposite(int i)
i
- the index of the variable in the current constraint (this)
void setConstraintIndex(int i, int idx)
i
- index of the variable in the constraintidx
- index of the constraint in the among all listeners linked to that variableint getConstraintIdx(int idx)
idx
- index of the variable in the constraint
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |