|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.solver.propagation.Propagator
choco.kernel.solver.constraints.AbstractSConstraint<IntDomainVar>
choco.kernel.solver.constraints.integer.AbstractIntSConstraint
choco.kernel.solver.constraints.integer.AbstractBinIntSConstraint
choco.cp.solver.constraints.integer.LessOrEqualXY_C
public final class LessOrEqualXY_C
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.kernel.solver.constraints.integer.AbstractBinIntSConstraint |
---|
v0, v1 |
Fields inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
cIndices, constraintType, extensions, vars |
Fields inherited from class choco.kernel.solver.propagation.Propagator |
---|
active, constAwakeEvent, priority, propagationEngine |
Fields inherited from interface choco.kernel.solver.constraints.SConstraint |
---|
LOGGER |
Constructor Summary | |
---|---|
LessOrEqualXY_C(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 |
awakeOnSup(int idx)
Propagation when a maximal bound of a variable was modified. |
int |
getFilteredEventMask(int idx)
|
boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
Boolean |
isEntailed()
Checks if the listeners must be checked or must fail. |
boolean |
isSatisfied(int[] tuple)
Checks if the constraint is satisfied when the variables are instantiated. |
AbstractSConstraint<IntDomainVar> |
opposite(Solver solver)
Get the opposite constraint |
String |
pretty()
pretty printing of the object. |
void |
propagate()
The propagation on constraint awake events. |
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnBounds, awakeOnRem, awakeOnRemovals, getConstraintType, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, setConstraintIndex, setExtension, setVar, toString |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, awake, constAwake, fail, getEvent, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final int cste
Constructor Detail |
---|
public LessOrEqualXY_C(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 int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
public void propagate() throws ContradictionException
propagate
in class Propagator
ContradictionException
public void awakeOnInf(int idx) throws ContradictionException
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
idx
- The index of the variable.
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
idx
- The index of the variable.
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
idx
- The index of the variable.
ContradictionException
public Boolean isEntailed()
isEntailed
in class AbstractSConstraint<IntDomainVar>
public boolean isSatisfied(int[] tuple)
isSatisfied
in interface IntPropagator
isSatisfied
in class AbstractIntSConstraint
public boolean isConsistent()
isConsistent
in class AbstractIntSConstraint
public AbstractSConstraint<IntDomainVar> opposite(Solver solver)
AbstractSConstraint
opposite
in interface SConstraint<IntDomainVar>
opposite
in class AbstractSConstraint<IntDomainVar>
solver
- the current solver
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |