choco.palm.integer.constraints
Class PalmEqualXC
java.lang.Object
choco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractUnIntConstraint
choco.palm.integer.AbstractPalmUnIntConstraint
choco.palm.integer.constraints.PalmEqualXC
- All Implemented Interfaces:
- Constraint, Entity, IntConstraint, IntVarEventListener, PalmIntVarListener, PalmConstraint, PalmVarListener, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener
- Direct Known Subclasses:
- PalmAssignment
public class PalmEqualXC
- extends AbstractPalmUnIntConstraint
Created by IntelliJ IDEA.
User: grochart
Date: 26 ao?t 2003
Time: 10:05:27
To change this template use Options | File Templates.
Field Summary |
protected int |
cste
|
Method Summary |
void |
awakeOnInf()
|
void |
awakeOnRem()
|
void |
awakeOnRestoreVal(int idx,
int val)
Handles a val restoration on the constraint idx |
void |
awakeOnSup()
|
java.lang.Boolean |
isEntailed()
Checks whether the constraint is definitely satisfied, no matter what further restrictions
occur to the domain of its variables. |
boolean |
isSatisfied()
Semantic:
Testing if the constraint is satisfied. |
void |
propagate()
Propagation on the constraint awake var. |
java.lang.String |
toString()
|
java.util.Set |
whyIsFalse()
When all variables are instantiated, explains why the wonstraint is false. |
java.util.Set |
whyIsTrue()
When all variables are instantiated, explains why the wonstraint is true. |
Methods inherited from class choco.AbstractConstraint |
addListener, awake, awakeOnVar, clone, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
cste
protected final int cste
PalmEqualXC
public PalmEqualXC(IntDomainVar v0,
int cste)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
propagate
public void propagate()
throws ContradictionException
- Description copied from class:
AbstractUnIntConstraint
- Propagation on the constraint awake var.
- Specified by:
propagate
in interface Propagator
- Overrides:
propagate
in class AbstractUnIntConstraint
- Throws:
ContradictionException
awakeOnInf
public void awakeOnInf()
awakeOnSup
public void awakeOnSup()
awakeOnRem
public void awakeOnRem()
awakeOnRestoreVal
public void awakeOnRestoreVal(int idx,
int val)
throws ContradictionException
- Description copied from interface:
PalmIntVarListener
- Handles a val restoration on the constraint
idx
- Parameters:
idx
- Variable involved.
- Throws:
ContradictionException
isEntailed
public java.lang.Boolean isEntailed()
- Description copied from interface:
Propagator
- Checks whether the constraint is definitely satisfied, no matter what further restrictions
occur to the domain of its variables.
- Specified by:
isEntailed
in interface Propagator
- Overrides:
isEntailed
in class AbstractConstraint
isSatisfied
public boolean isSatisfied()
- Description copied from interface:
Constraint
- Semantic:
Testing if the constraint is satisfied.
Note that all variables involved in the constraint must be
instantiated when this method is called.
whyIsTrue
public java.util.Set whyIsTrue()
- Description copied from interface:
PalmIntVarListener
- When all variables are instantiated, explains why the wonstraint is true.
- Returns:
- A set of constraint justifying that the constraint is satisfied.
whyIsFalse
public java.util.Set whyIsFalse()
- Description copied from interface:
PalmIntVarListener
- When all variables are instantiated, explains why the wonstraint is false.
- Returns:
- A set of constraint justifying that the constraint is not satisfied.