choco.integer.constraints
Class BooleanChanneling
java.lang.Object
choco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractBinIntConstraint
choco.integer.constraints.BooleanChanneling
- All Implemented Interfaces:
- Constraint, Entity, IntConstraint, IntVarEventListener, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener
public class BooleanChanneling
- extends AbstractBinIntConstraint
a simple channeling constraint :
y_ij = 1 si x_i = j
y_ij = 0 sinon
Field Summary |
protected int |
cste
|
Method Summary |
void |
awakeOnInf(int idx)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnRemovals(int idx,
IntIterator deltaDomain)
The default implementation of propagation when a variable has been modified
consists in iterating all values that have been removed (the delta domain)
and propagate them one after another, incrementally. |
void |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
void |
filterFromBtoX()
|
void |
filterFromXtoB()
|
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()
Semantic:
Testing if the constraint is satisfied. |
void |
propagate()
Propagates on the constraint awake events. |
Methods inherited from class choco.AbstractConstraint |
addListener, awake, awakeOnVar, 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 |
cste
protected int cste
BooleanChanneling
public BooleanChanneling(IntDomainVar yij,
IntDomainVar xi,
int j)
filterFromBtoX
public void filterFromBtoX()
throws ContradictionException
- Throws:
ContradictionException
filterFromXtoB
public void filterFromXtoB()
throws ContradictionException
- Throws:
ContradictionException
propagate
public void propagate()
throws ContradictionException
- Description copied from class:
AbstractBinIntConstraint
- Propagates on the constraint awake events.
- Specified by:
propagate
in interface Propagator
- Overrides:
propagate
in class AbstractBinIntConstraint
- Throws:
ContradictionException
awakeOnInf
public void awakeOnInf(int idx)
throws ContradictionException
- Description copied from class:
AbstractIntConstraint
- Default propagation on improved lower bound: propagation on domain revision.
- Specified by:
awakeOnInf
in interface IntVarEventListener
- Overrides:
awakeOnInf
in class AbstractIntConstraint
- Throws:
ContradictionException
awakeOnSup
public void awakeOnSup(int idx)
throws ContradictionException
- Description copied from class:
AbstractIntConstraint
- Default propagation on improved upper bound: propagation on domain revision.
- Specified by:
awakeOnSup
in interface IntVarEventListener
- Overrides:
awakeOnSup
in class AbstractIntConstraint
- Throws:
ContradictionException
awakeOnRemovals
public void awakeOnRemovals(int idx,
IntIterator deltaDomain)
throws ContradictionException
- Description copied from class:
AbstractIntConstraint
- The default implementation of propagation when a variable has been modified
consists in iterating all values that have been removed (the delta domain)
and propagate them one after another, incrementally.
- Specified by:
awakeOnRemovals
in interface IntConstraint
- Overrides:
awakeOnRemovals
in class AbstractIntConstraint
- 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
isSatisfied
public boolean isSatisfied()
- Description copied from interface:
Constraint
- Semantic:
Testing if the constraint is satisfied.
Note that all variables involved in the constraint must be
instantiated when this method is called.