|
||||||||||
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.AbstractLargeIntSConstraint
choco.kernel.solver.constraints.integer.AbstractUnIntSConstraint
choco.cp.solver.constraints.integer.NotEqualXC
public final class NotEqualXC
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.kernel.solver.constraints.integer.AbstractUnIntSConstraint |
---|
v0 |
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 | |
---|---|
NotEqualXC(IntDomainVar x0,
int c)
Constructs the constraint with the specified variables and constant. |
Method Summary | |
---|---|
void |
awakeOnInf(int idx)
in case the bounds have changed and the domain is approximated by an interval, we need to re-propagate |
void |
awakeOnInst(int idx)
When the one and only variable of the constraint becomes instantiated Need to check that the value of the variable is not the value forbidden by the constraint |
void |
awakeOnRem(int idx,
int x)
When a value is removed from the domain of the one and only variable: Nothing to be propagated. |
void |
awakeOnSup(int idx)
in case the bounds have changed and the domain is approximated by an interval, we need to re-propagate |
Object |
clone()
Clone the constraint |
int |
getFilteredEventMask(int idx)
|
boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
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 |
isSatisfied(int[] tuple)
tests if the constraint is satisfied when the variables are instantiated. |
AbstractSConstraint<IntDomainVar> |
opposite(Solver solver)
Get the opposite constraint |
String |
pretty()
Pretty print of the constraint. |
void |
propagate()
The single propagation method. |
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnBounds, awakeOnRemovals, getConstraintType, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, 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 NotEqualXC(IntDomainVar x0, int c)
x0
- the search valued domain variablec
- the search constant used in the inequality.Method Detail |
---|
public int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
public Object clone() throws CloneNotSupportedException
AbstractSConstraint
clone
in class AbstractSConstraint<IntDomainVar>
CloneNotSupportedException
- Clone not supported exceptionpublic String pretty()
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
public void propagate() throws ContradictionException
propagate
in class Propagator
ContradictionException
- contradiction exceptionpublic void awakeOnInf(int idx) throws ContradictionException
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
idx
- index of the variable (always 0)
ContradictionException
public void awakeOnRem(int idx, int x) throws ContradictionException
awakeOnRem
in interface IntPropagator
awakeOnRem
in class AbstractIntSConstraint
idx
- index of the variable (always 0)x
- value that was removed
ContradictionException
public Boolean isEntailed()
v0
is below or above cste
,
we know for sure whether the constraint will be satisfied or not
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |