|
|||||||||
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.AbstractUnIntConstraint
choco.integer.constraints.LessOrEqualXC
public class LessOrEqualXC
Implements a constraint X <= C, with X a variable and C a constant.
Field Summary | |
---|---|
protected int |
cste
The search constant of the constraint |
Fields inherited from class choco.integer.constraints.AbstractUnIntConstraint |
---|
cIdx0, v0 |
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 | |
---|---|
LessOrEqualXC(IntDomainVar x0,
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()
When the whole domain of v0 is below or above cste ,
we know for sure whether the constraint will be satisfied or not |
boolean |
isEquivalentTo(Constraint compareTo)
tests the equivalence (logical equality of the conditions) between two constraints. |
boolean |
isSatisfied()
tests 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 print of the constraint. |
void |
propagate()
The one and only propagation method. |
Methods inherited from class choco.integer.constraints.AbstractUnIntConstraint |
---|
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 LessOrEqualXC(IntDomainVar x0, int c)
x0
- the search valued domain variablec
- 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 java.lang.String pretty()
pretty
in interface Entity
pretty
in class AbstractEntity
public void propagate() throws ContradictionException
propagate
in interface Propagator
propagate
in class AbstractUnIntConstraint
ContradictionException
public void awakeOnVar(int idx) throws ContradictionException
AbstractConstraint
awakeOnVar
in interface VarEventListener
awakeOnVar
in interface Propagator
awakeOnVar
in class AbstractConstraint
ContradictionException
public void awakeOnInf(int idx) throws ContradictionException
AbstractIntConstraint
awakeOnInf
in interface IntVarEventListener
awakeOnInf
in class AbstractIntConstraint
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
AbstractIntConstraint
awakeOnSup
in interface IntVarEventListener
awakeOnSup
in class AbstractIntConstraint
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
AbstractIntConstraint
awakeOnInst
in interface IntVarEventListener
awakeOnInst
in class AbstractIntConstraint
ContradictionException
public void awakeOnRem(int idx, int x) throws ContradictionException
AbstractIntConstraint
awakeOnRem
in interface IntVarEventListener
awakeOnRem
in class AbstractIntConstraint
ContradictionException
public java.lang.Boolean isEntailed()
v0
is below or above cste
,
we know for sure whether the constraint will be satisfied or not
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 final boolean isEquivalentTo(Constraint compareTo)
Constraint
isEquivalentTo
in interface Constraint
isEquivalentTo
in class AbstractConstraint
compareTo
- the constraint to be compared to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |