choco.palm.integer
Class AbstractPalmLargeIntConstraint
java.lang.Object
choco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractLargeIntConstraint
choco.palm.integer.AbstractPalmLargeIntConstraint
- All Implemented Interfaces:
- Constraint, Entity, IntConstraint, IntVarEventListener, PalmIntVarListener, PalmConstraint, PalmVarListener, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener
- Direct Known Subclasses:
- NogoodConstraint
public abstract class AbstractPalmLargeIntConstraint
- extends AbstractLargeIntConstraint
- implements PalmIntVarListener, PalmConstraint
Created by IntelliJ IDEA.
User: Administrateur
Date: 27 janv. 2004
Time: 15:26:56
To change this template use Options | File Templates.
| Methods inherited from class choco.AbstractConstraint |
addListener, awake, awakeOnVar, 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 |
AbstractPalmLargeIntConstraint
public AbstractPalmLargeIntConstraint(IntDomainVar[] vars)
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Description copied from interface:
Constraint
- returns a copy of the constraint. This copy is a new object, may be a recursive copy in case
of composite constraints. The original and the copy share the same variables & plugins
- Specified by:
clone in interface Constraint- Overrides:
clone in class AbstractLargeIntConstraint
- Returns:
-
- Throws:
java.lang.CloneNotSupportedException
getIntVar
public IntDomainVar getIntVar(int i)
- Description copied from class:
AbstractLargeIntConstraint
- Gets the
ith search valued variable.
- Specified by:
getIntVar in interface IntConstraint- Overrides:
getIntVar in class AbstractLargeIntConstraint
- Parameters:
i - index of the variable among all search variables in the constraint. Numbering start from 0 on.
- Returns:
- the variable, or null when no such variable is found
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).