choco.integer.constraints.extension
Class AC3BinConstraint
java.lang.Object
choco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractBinIntConstraint
choco.integer.constraints.extension.CspBinConstraint
choco.integer.constraints.extension.AC3BinConstraint
- All Implemented Interfaces:
- Constraint, Entity, IntConstraint, IntVarEventListener, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener
public class AC3BinConstraint
- extends CspBinConstraint
Method Summary |
void |
awakeOnInf(int idx)
Propagation when a minimal bound of a variable was modified. |
void |
awakeOnInst(int idx)
Propagation when a variable is instantiated. |
void |
awakeOnRem(int idx,
int x)
Default propagation on one value removal: propagation on domain revision. |
void |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
java.lang.Object |
clone()
returns a copy of the constraint. |
AbstractConstraint |
opposite()
computes the constraint modelling the counter-opposite condition of this |
void |
propagate()
Propagates on the constraint awake events. |
void |
reviseV0()
|
void |
reviseV1()
|
Methods inherited from class choco.AbstractConstraint |
addListener, awake, 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 |
AC3BinConstraint
public AC3BinConstraint(IntDomainVar x0,
IntDomainVar x1,
BinRelation rela)
clone
public java.lang.Object clone()
- 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 AbstractConstraint
- Returns:
reviseV1
public void reviseV1()
throws ContradictionException
- Throws:
ContradictionException
reviseV0
public void reviseV0()
throws ContradictionException
- Throws:
ContradictionException
propagate
public void propagate()
throws ContradictionException
- Description copied from class:
AbstractBinIntConstraint
- Propagates on the constraint awake events.
- Specified by:
propagate
in interface Propagator
- Overrides:
propagate
in class AbstractBinIntConstraint
- 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
awakeOnInf
public void awakeOnInf(int idx)
throws ContradictionException
- Propagation when a minimal bound of a variable was modified.
- Specified by:
awakeOnInf
in interface IntVarEventListener
- Overrides:
awakeOnInf
in class AbstractIntConstraint
- Parameters:
idx
- The index of the variable.
- 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
awakeOnInst
public void awakeOnInst(int idx)
throws ContradictionException
- Propagation when a variable is instantiated.
- Specified by:
awakeOnInst
in interface IntVarEventListener
- Overrides:
awakeOnInst
in class AbstractIntConstraint
- Parameters:
idx
- The index of the variable.
- Throws:
ContradictionException
opposite
public AbstractConstraint opposite()
- Description copied from interface:
Constraint
- computes the constraint modelling the counter-opposite condition of this
- Specified by:
opposite
in interface Constraint
- Overrides:
opposite
in class AbstractConstraint
- Returns:
- a new constraint (modelling the opposite condition)