choco.palm.integer
Class AbstractPalmTernIntConstraint
java.lang.Object
choco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractTernIntConstraint
choco.palm.integer.AbstractPalmTernIntConstraint
- All Implemented Interfaces:
- Constraint, Entity, IntConstraint, IntVarEventListener, PalmIntVarListener, PalmConstraint, PalmVarListener, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener
- Direct Known Subclasses:
- PalmElt2D
public abstract class AbstractPalmTernIntConstraint
- extends AbstractTernIntConstraint
- implements PalmIntVarListener, PalmConstraint
Created by IntelliJ IDEA.
User: Administrateur
Date: 30 janv. 2004
Time: 09:00:21
To change this template use Options | File Templates.
Methods inherited from class choco.AbstractConstraint |
addListener, 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 |
Methods inherited from interface choco.Propagator |
assignIndices, awake, awakeOnVar, constAwake, delete, getEvent, getPlugIn, getPriority, isCompletelyInstantiated, isConsistent, isEntailed, propagate |
AbstractPalmTernIntConstraint
public AbstractPalmTernIntConstraint(IntDomainVar x0,
IntDomainVar x1,
IntDomainVar x2)
takeIntoAccountStatusChange
public void takeIntoAccountStatusChange(int index)
- Description copied from interface:
PalmConstraint
- Informs constraints that one of their children has a modified status (due to value restoration).
- Specified by:
takeIntoAccountStatusChange
in interface PalmConstraint
awakeOnRestoreInf
public void awakeOnRestoreInf(int index)
throws ContradictionException
- Description copied from interface:
PalmIntVarListener
- Handles an inf bound restoration on the constraint
idx
- Specified by:
awakeOnRestoreInf
in interface PalmIntVarListener
- Parameters:
index
- Variable involved.
- Throws:
ContradictionException
awakeOnRestoreSup
public void awakeOnRestoreSup(int index)
throws ContradictionException
- Description copied from interface:
PalmIntVarListener
- Handles a sup bound restoration on the constraint
idx
- Specified by:
awakeOnRestoreSup
in interface PalmIntVarListener
- Parameters:
index
- Variable involved.
- Throws:
ContradictionException
awakeOnInst
public void awakeOnInst(int idx)
- Description copied from class:
AbstractIntConstraint
- Default propagation on instantiation: full constraint re-propagation.
- Specified by:
awakeOnInst
in interface IntVarEventListener
- Overrides:
awakeOnInst
in class AbstractIntConstraint
awakeOnRestoreVal
public void awakeOnRestoreVal(int idx,
IntIterator repairDomain)
throws ContradictionException
- Description copied from interface:
PalmIntVarListener
- Handles a val restoration on the constraint
idx
- Specified by:
awakeOnRestoreVal
in interface PalmIntVarListener
- Parameters:
idx
- Variable involved.
- Throws:
ContradictionException
updateDataStructuresOnConstraint
public void updateDataStructuresOnConstraint(int idx,
int select,
int newValue,
int oldValue)
- Description copied from interface:
PalmVarListener
- Method called when one of the variables is modified.
- Specified by:
updateDataStructuresOnConstraint
in interface PalmVarListener
- Parameters:
idx
- Index of the variable.select
- Type of modification (PalmIntVar.INF
, PalmIntVar.SUP
,
PalmIntVar.VAL
).newValue
- New value (or modified value).oldValue
- Old value (or 0 if this a value removal).
updateDataStructuresOnRestoreConstraint
public void updateDataStructuresOnRestoreConstraint(int idx,
int select,
int newValue,
int oldValue)
- Description copied from interface:
PalmVarListener
- Method called when one of the variables has a restored value.
- Specified by:
updateDataStructuresOnRestoreConstraint
in interface PalmVarListener
- Parameters:
idx
- Index of the variable.select
- Type of modification.newValue
- New value (or modified value).oldValue
- Old value (or 0 if this a value removal).