choco.integer.constraints.extension
Class GAC2001LargeConstraint
java.lang.Object
choco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractLargeIntConstraint
choco.integer.constraints.extension.CspLargeConstraint
choco.integer.constraints.extension.GAC2001LargeConstraint
- All Implemented Interfaces:
- Constraint, Entity, IntConstraint, IntVarEventListener, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener
public class GAC2001LargeConstraint
- extends CspLargeConstraint
Method Summary |
void |
awake()
Default initial propagation: full constraint re-propagation. |
void |
awakeOnBounds(int varIndex)
|
void |
awakeOnInf(int idx)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnInst(int idx)
Default propagation on instantiation: full constraint re-propagation. |
void |
awakeOnRem(int idx,
int x)
Default propagation on one value removal: 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. |
int[] |
getSupport(int indexVar,
int value)
|
boolean |
isValid(int[] tuple)
|
int[] |
lastSupport(int indexVar,
int value)
|
void |
propagate()
Propagates the constraint awake events. |
void |
reviseVar(int indexVar)
|
int[] |
seekNextSupport(int indexVar,
int value)
|
void |
setSupport(int indexVar,
int value,
int[] support)
|
Methods inherited from class choco.AbstractConstraint |
addListener, awakeOnVar, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEquivalentTo, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
supports
protected StoredInt[] supports
blocks
protected int[] blocks
size
protected int size
offsets
protected int[] offsets
GAC2001LargeConstraint
public GAC2001LargeConstraint(IntDomainVar[] vs,
LargeRelation relation)
reviseVar
public void reviseVar(int indexVar)
throws ContradictionException
- Throws:
ContradictionException
setSupport
public void setSupport(int indexVar,
int value,
int[] support)
getSupport
public int[] getSupport(int indexVar,
int value)
lastSupport
public int[] lastSupport(int indexVar,
int value)
isValid
public boolean isValid(int[] tuple)
seekNextSupport
public int[] seekNextSupport(int indexVar,
int value)
awake
public void awake()
throws ContradictionException
- Description copied from class:
AbstractConstraint
- Default initial propagation: full constraint re-propagation.
- Specified by:
awake
in interface Propagator
- Overrides:
awake
in class AbstractConstraint
- 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 CspLargeConstraint
- 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 CspLargeConstraint
- 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
awakeOnRem
public void awakeOnRem(int idx,
int x)
throws ContradictionException
- Description copied from class:
AbstractIntConstraint
- Default propagation on one value removal: propagation on domain revision.
- Specified by:
awakeOnRem
in interface IntVarEventListener
- Overrides:
awakeOnRem
in class AbstractIntConstraint
- Throws:
ContradictionException
awakeOnBounds
public void awakeOnBounds(int varIndex)
throws ContradictionException
- Specified by:
awakeOnBounds
in interface IntConstraint
- Overrides:
awakeOnBounds
in class CspLargeConstraint
- Throws:
ContradictionException
awakeOnInst
public void awakeOnInst(int idx)
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 CspLargeConstraint
- Throws:
ContradictionException