|
|||||||||
| 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 Constraintclone in class AbstractConstraintjava.lang.CloneNotSupportedExceptionpublic java.lang.String pretty()
pretty in interface Entitypretty in class AbstractEntity
public void propagate()
throws ContradictionException
propagate in interface Propagatorpropagate in class AbstractUnIntConstraintContradictionException
public void awakeOnVar(int idx)
throws ContradictionException
AbstractConstraint
awakeOnVar in interface VarEventListenerawakeOnVar in interface PropagatorawakeOnVar in class AbstractConstraintContradictionException
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 awakeOnRem(int idx,
int x)
throws ContradictionException
AbstractIntConstraint
awakeOnRem in interface IntVarEventListenerawakeOnRem in class AbstractIntConstraintContradictionExceptionpublic 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 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||