choco.global
Class BoundAllDiff
java.lang.Object
choco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractLargeIntConstraint
choco.global.BoundAllDiff
- All Implemented Interfaces:
- Constraint, Entity, IntConstraint, IntVarEventListener, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener
public class BoundAllDiff
- extends AbstractLargeIntConstraint
Method Summary |
void |
awakeOnInf(int i)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnInst(int i)
Default propagation on instantiation: full constraint re-propagation. |
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 i)
Default propagation on improved upper bound: propagation on domain revision. |
protected void |
filterLower()
|
protected void |
filterUpper()
|
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. |
protected int |
pathmax(int[] tab,
int i)
|
protected int |
pathmin(int[] tab,
int i)
|
protected void |
pathset(int[] tab,
int start,
int end,
int to)
|
void |
propagate()
Propagates the constraint awake events. |
protected void |
sortIt()
|
protected void |
sortmax()
|
protected void |
sortmin()
|
Methods inherited from class choco.AbstractConstraint |
addListener, awake, awakeOnVar, 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 |
PROPAGATE_ON_INSTANTIATIONS
public boolean PROPAGATE_ON_INSTANTIATIONS
PROPAGATE_ON_BOUNDS
public boolean PROPAGATE_ON_BOUNDS
BoundAllDiff
public BoundAllDiff(IntDomainVar[] vars,
boolean global)
sortmin
protected void sortmin()
sortmax
protected void sortmax()
sortIt
protected void sortIt()
pathset
protected void pathset(int[] tab,
int start,
int end,
int to)
pathmin
protected int pathmin(int[] tab,
int i)
pathmax
protected int pathmax(int[] tab,
int i)
filterLower
protected void filterLower()
throws ContradictionException
- Throws:
ContradictionException
filterUpper
protected void filterUpper()
throws ContradictionException
- Throws:
ContradictionException
propagate
public void propagate()
throws ContradictionException
- Description copied from class:
AbstractLargeIntConstraint
- Propagates the constraint awake events.
- Specified by:
propagate
in interface Propagator
- Overrides:
propagate
in class AbstractLargeIntConstraint
- Throws:
ContradictionException
awakeOnInf
public void awakeOnInf(int i)
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 i)
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
awakeOnInst
public void awakeOnInst(int i)
throws ContradictionException
- Description copied from class:
AbstractIntConstraint
- Default propagation on instantiation: full constraint re-propagation.
- Specified by:
awakeOnInst
in interface IntVarEventListener
- Overrides:
awakeOnInst
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
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.
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