|
||||||||||
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<Var>
choco.kernel.solver.constraints.real.AbstractMixedSRealIntSConstraint
choco.kernel.solver.constraints.real.AbstractBinRealIntSConstraint
choco.cp.solver.constraints.real.MixedCstElt
public final class MixedCstElt
Let x be an integer variable with n values and v be a real variable. Given n constant values a1 to an, this constraint ensures that:
x = i iff v = ai
a1... an sequence is supposed to be ordered (a1<a2<... an)
Field Summary | |
---|---|
protected double[] |
values
|
Fields inherited from class choco.kernel.solver.constraints.real.AbstractBinRealIntSConstraint |
---|
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 | |
---|---|
MixedCstElt(RealVar v0,
IntDomainVar v1,
double[] values)
|
Method Summary | |
---|---|
void |
awake()
Propagation: Propagating the constraint for the very first time until local consistency is reached. |
void |
awakeOnBounds(int idx)
|
void |
awakeOnInf(int idx)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnInst(int varIdx)
Default propagation on instantiation: full constraint re-propagation. |
void |
awakeOnRem(int varIdx,
int val)
Default propagation on one value removal: propagation on domain revision. |
void |
awakeOnRemovals(int varIdx,
DisposableIntIterator deltaDomain)
|
void |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
Object |
clone()
Clone the constraint |
boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
boolean |
isSatisfied()
Semantic: Testing if the constraint is satisfied. |
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
void |
updateIInf()
|
void |
updateISup()
|
void |
updateReal()
|
Methods inherited from class choco.kernel.solver.constraints.real.AbstractBinRealIntSConstraint |
---|
getConstraintType, getIntVar, getIntVarNb, getRealVar, getRealVarNb, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, pretty, setConstraintIndex, setExtension, setVar, toString |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, constAwake, fail, getEvent, getFilteredEventMask, 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 double[] values
Constructor Detail |
---|
public MixedCstElt(RealVar v0, IntDomainVar v1, double[] values)
Method Detail |
---|
public Object clone() throws CloneNotSupportedException
AbstractSConstraint
clone
in class AbstractBinRealIntSConstraint
CloneNotSupportedException
- Clone not supported exceptionpublic void awake() throws ContradictionException
Propagator
awake
in class Propagator
ContradictionException
- contradiction exceptionpublic void propagate() throws ContradictionException
Propagator
propagate
in class Propagator
ContradictionException
- contradiction exceptionpublic void awakeOnInf(int idx) throws ContradictionException
IntPropagator
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
IntPropagator
ContradictionException
public void awakeOnBounds(int idx) throws ContradictionException
ContradictionException
public void awakeOnInst(int varIdx) throws ContradictionException
IntPropagator
ContradictionException
public void awakeOnRem(int varIdx, int val) throws ContradictionException
IntPropagator
ContradictionException
public void awakeOnRemovals(int varIdx, DisposableIntIterator deltaDomain) throws ContradictionException
ContradictionException
public void updateIInf() throws ContradictionException
ContradictionException
public void updateISup() throws ContradictionException
ContradictionException
public void updateReal() throws ContradictionException
ContradictionException
public boolean isConsistent()
Propagator
isConsistent
in class Propagator
public boolean isSatisfied()
SConstraint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |