choco.integer.constraints.extension
Class CspBinConstraint
java.lang.Object
choco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractBinIntConstraint
choco.integer.constraints.extension.CspBinConstraint
- All Implemented Interfaces:
- Constraint, Entity, IntConstraint, IntVarEventListener, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener
- Direct Known Subclasses:
- AC2001BinConstraint, AC3BinConstraint, AC4BinConstraint
public abstract class CspBinConstraint
- extends AbstractBinIntConstraint
Method Summary |
void |
awakeOnVar(int idx)
Default propagation on variable revision: full constraint re-propagation. |
BinRelation |
getRelation()
|
java.lang.Boolean |
isEntailed()
Checks whether the constraint is definitely satisfied, no matter what further restrictions
occur to the domain of its variables. |
boolean |
isSatisfied()
Checks if the constraint is satisfied when the variables are instantiated. |
Methods inherited from class choco.AbstractConstraint |
addListener, awake, clone, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
relation
protected BinRelation relation
CspBinConstraint
protected CspBinConstraint(IntDomainVar x,
IntDomainVar y,
BinRelation relation)
isSatisfied
public boolean isSatisfied()
- Checks if the constraint is satisfied when the variables are instantiated.
- Returns:
- true if the constraint is satisfied
getRelation
public BinRelation getRelation()
awakeOnVar
public void awakeOnVar(int idx)
throws ContradictionException
- Description copied from class:
AbstractConstraint
- Default propagation on variable revision: full constraint re-propagation.
- Specified by:
awakeOnVar
in interface VarEventListener
- Specified by:
awakeOnVar
in interface Propagator
- Overrides:
awakeOnVar
in class AbstractConstraint
- Throws:
ContradictionException
isEntailed
public java.lang.Boolean isEntailed()
- Description copied from interface:
Propagator
- Checks whether the constraint is definitely satisfied, no matter what further restrictions
occur to the domain of its variables.
- Specified by:
isEntailed
in interface Propagator
- Overrides:
isEntailed
in class AbstractConstraint