|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchoco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractBinIntConstraint
choco.integer.constraints.EqualXYC
public class EqualXYC
Implements a constraint X == Y + C, with X and Y two variables and C a constant.
| Field Summary | |
|---|---|
protected int |
cste
The search constant of the constraint |
| Fields inherited from class choco.integer.constraints.AbstractBinIntConstraint |
|---|
cIdx0, cIdx1, v0, v1 |
| Fields inherited from class choco.integer.constraints.AbstractIntConstraint |
|---|
logger |
| Fields inherited from class choco.AbstractConstraint |
|---|
active, constAwakeEvent, hook, priority |
| Fields inherited from class choco.AbstractEntity |
|---|
problem |
| Constructor Summary | |
|---|---|
EqualXYC(IntDomainVar x0,
IntDomainVar x1,
int c)
Constructs the constraint with the specified variables and constant. |
|
| Method Summary | |
|---|---|
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 |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
void |
awakeOnVar(int idx)
Default propagation on variable revision: full constraint re-propagation. |
java.lang.Object |
clone()
returns a copy of the constraint. |
boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
java.lang.Boolean |
isEntailed()
Checks if the listeners must be checked or must fail. |
boolean |
isEquivalentTo(Constraint compareTo)
tests the equivalence (logical equality of the conditions) between two constraints. |
boolean |
isSatisfied()
Checks if the constraint is satisfied when the variables are instantiated. |
AbstractConstraint |
opposite()
computes the constraint modelling the counter-opposite condition of this |
java.lang.String |
pretty()
pretty printing of the object. |
void |
propagate()
The one and only propagation method, using foward checking |
| Methods inherited from class choco.integer.constraints.AbstractBinIntConstraint |
|---|
assignIndices, getConstraintIdx, getIntVar, getNbVars, getVar, isCompletelyInstantiated, setConstraintIndex, setVar |
| Methods inherited from class choco.integer.constraints.AbstractIntConstraint |
|---|
awakeOnBounds, awakeOnRemovals, getSelfIndex |
| Methods inherited from class choco.AbstractConstraint |
|---|
addListener, awake, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, 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 |
|---|
awake, constAwake, delete, getEvent, getPlugIn, getPriority |
| Methods inherited from interface choco.prop.VarEventListener |
|---|
addListener, isActive, setActive, setPassive |
| Methods inherited from interface choco.prop.VarEventListener |
|---|
addListener, isActive, setActive, setPassive |
| Field Detail |
|---|
protected final int cste
| Constructor Detail |
|---|
public EqualXYC(IntDomainVar x0,
IntDomainVar x1,
int c)
x0 - first IntDomainVarx1 - second IntDomainVarc - The search constant used in the disequality.| Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Constraint
clone in interface Constraintclone in class AbstractConstraintjava.lang.CloneNotSupportedException
public void propagate()
throws ContradictionException
propagate in interface Propagatorpropagate in class AbstractBinIntConstraintContradictionException
public void awakeOnInf(int idx)
throws ContradictionException
AbstractIntConstraint
awakeOnInf in interface IntVarEventListenerawakeOnInf in class AbstractIntConstraintContradictionException
public void awakeOnSup(int idx)
throws ContradictionException
AbstractIntConstraint
awakeOnSup in interface IntVarEventListenerawakeOnSup in class AbstractIntConstraintContradictionException
public void awakeOnInst(int idx)
throws ContradictionException
AbstractIntConstraint
awakeOnInst in interface IntVarEventListenerawakeOnInst in class AbstractIntConstraintContradictionException
public void awakeOnVar(int idx)
throws ContradictionException
AbstractConstraint
awakeOnVar in interface VarEventListenerawakeOnVar in interface PropagatorawakeOnVar in class AbstractConstraintContradictionException
public void awakeOnRem(int idx,
int x)
throws ContradictionException
AbstractIntConstraint
awakeOnRem in interface IntVarEventListenerawakeOnRem in class AbstractIntConstraintContradictionExceptionpublic java.lang.Boolean isEntailed()
isEntailed in interface PropagatorisEntailed in class AbstractConstraintpublic boolean isSatisfied()
public boolean isConsistent()
isConsistent in interface PropagatorisConsistent in class AbstractIntConstraintpublic AbstractConstraint opposite()
Constraint
opposite in interface Constraintopposite in class AbstractConstraintpublic final boolean isEquivalentTo(Constraint compareTo)
Constraint
isEquivalentTo in interface ConstraintisEquivalentTo in class AbstractConstraintcompareTo - the constraint to be compared to
public java.lang.String pretty()
Entity
pretty in interface Entitypretty in class AbstractEntity
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||