choco.bool
Class AbstractCompositeConstraint
java.lang.Object
choco.AbstractEntity
choco.AbstractConstraint
choco.bool.AbstractCompositeConstraint
- All Implemented Interfaces:
- CompositeConstraint, Constraint, Entity, IntVarEventListener, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener
- Direct Known Subclasses:
- AbstractBinCompositeConstraint, AbstractLargeCompositeConstraint
public abstract class AbstractCompositeConstraint
- extends AbstractConstraint
- implements CompositeConstraint
An abstract class for all implementations of listeners over search variables.
Methods inherited from class choco.AbstractConstraint |
awake, awakeOnVar, clone, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEntailed, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractCompositeConstraint
public AbstractCompositeConstraint()
awakeOnBounds
public void awakeOnBounds(int varIndex)
throws ContradictionException
- Throws:
ContradictionException
awakeOnRemovals
public void awakeOnRemovals(int idx,
IntIterator deltaDomain)
throws ContradictionException
- Throws:
ContradictionException
getGlobalVarIndex
public int getGlobalVarIndex(Constraint subConstraint,
int localVarIdx)
- Description copied from interface:
CompositeConstraint
- returns the global index of a variable within a constraint
- Specified by:
getGlobalVarIndex
in interface CompositeConstraint
- Parameters:
subConstraint
- the subconstraint (a node in the composition tree)localVarIdx
- the index of the variable, local to the subconstraint
- Returns:
- the index of the variable in the global numbering associated to the composition (this)
addListener
public void addListener(boolean dynamicAddition)
- Description copied from class:
AbstractConstraint
- This function connects a constraint with its variables in several ways.
Note that it may only be called once the constraint
has been fully created and is being posted to a problem.
Note that it should be called only once per constraint.
This can be a dynamic addition (undone upon backtracking) or not
- Specified by:
addListener
in interface VarEventListener
- Overrides:
addListener
in class AbstractConstraint