|
|||||||||
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.GreaterOrEqualXYC
public class GreaterOrEqualXYC
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 | |
---|---|
GreaterOrEqualXYC(IntDomainVar x0,
IntDomainVar x1,
int c)
Constructs the constraint with the specified variables and constant. |
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)
Propagation when a value x of variable is removed. |
void |
awakeOnSup(int idx)
Propagation when a maximal bound of a variable was modified. |
void |
awakeOnVar(int idx)
Default propagation on variable revision: full constraint re-propagation. |
java.lang.Object |
clone()
returns a copy of the constraint. |
int |
getVarIdxInOpposite(int i)
computes the index of the i-th variable in the counter-opposite 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 propagation on constraint awake events. |
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, 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 GreaterOrEqualXYC(IntDomainVar x0, IntDomainVar x1, int c)
x0
- Should be greater than x0+c
.x1
- Should be less than x0-c
.c
- The search constant used in the inequality.Method Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Constraint
clone
in interface Constraint
clone
in class AbstractConstraint
java.lang.CloneNotSupportedException
public void propagate() throws ContradictionException
propagate
in interface Propagator
propagate
in class AbstractBinIntConstraint
ContradictionException
public void awakeOnInf(int idx) throws ContradictionException
awakeOnInf
in interface IntVarEventListener
awakeOnInf
in class AbstractIntConstraint
idx
- The index of the variable.
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
awakeOnSup
in interface IntVarEventListener
awakeOnSup
in class AbstractIntConstraint
idx
- The index of the variable.
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
awakeOnInst
in interface IntVarEventListener
awakeOnInst
in class AbstractIntConstraint
idx
- The index of the variable.
ContradictionException
public void awakeOnRem(int idx, int x) throws ContradictionException
x
of variable is removed.
Not implemented yet.
awakeOnRem
in interface IntVarEventListener
awakeOnRem
in class AbstractIntConstraint
idx
- The index of the variable.
ContradictionException
public void awakeOnVar(int idx) throws ContradictionException
AbstractConstraint
awakeOnVar
in interface VarEventListener
awakeOnVar
in interface Propagator
awakeOnVar
in class AbstractConstraint
ContradictionException
public java.lang.Boolean isEntailed()
isEntailed
in interface Propagator
isEntailed
in class AbstractConstraint
public boolean isSatisfied()
public boolean isConsistent()
isConsistent
in interface Propagator
isConsistent
in class AbstractIntConstraint
public AbstractConstraint opposite()
Constraint
opposite
in interface Constraint
opposite
in class AbstractConstraint
public int getVarIdxInOpposite(int i)
Constraint
getVarIdxInOpposite
in interface Constraint
getVarIdxInOpposite
in class AbstractConstraint
i
- the index of the variable in the current constraint (this)
public final boolean isEquivalentTo(Constraint compareTo)
Constraint
isEquivalentTo
in interface Constraint
isEquivalentTo
in class AbstractConstraint
compareTo
- the constraint to be compared to
public java.lang.String pretty()
Entity
pretty
in interface Entity
pretty
in class AbstractEntity
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |