|
||||||||||
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.cp.solver.constraints.integer.ElementVG
public final class ElementVG
A class implementing the constraint A[I] == X, with I and X being IntVars and A an array of IntVars
Field Summary | |
---|---|
protected IStateInt[] |
lastInf
|
protected IStateInt[] |
lastSup
|
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 | |
---|---|
ElementVG(IntDomainVar[] vars,
int offset,
IEnvironment environment)
|
Method Summary | |
---|---|
void |
awake()
Propagation: Propagating the constraint for the very first time until local consistency is reached. |
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. |
Object |
clone()
Clone the constraint |
protected void |
equalityBehaviour()
|
protected IntDomainVar |
getIndexVar()
|
protected IntDomainVar |
getValueVar()
|
Boolean |
isEntailed()
Indicates if the constraint is entailed, from now on will be always satisfied |
boolean |
isSatisfied()
Default implementation of the isSatisfied by delegating to the isSatisfied(int[] tuple) |
String |
pretty()
pretty printing of the object. |
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
String |
toString()
|
protected void |
updateIndexFromValue()
|
protected void |
updateIndexFromValue(int v)
|
protected void |
updateValueFromIndex()
|
protected void |
updateValueFromIndex(int idx)
|
protected void |
updateVariable(int index,
int value)
|
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnBounds, awakeOnRemovals, getConstraintType, isConsistent, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, opposite, setConstraintIndex, setExtension, setVar |
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 IStateInt[] lastInf
protected IStateInt[] lastSup
Constructor Detail |
---|
public ElementVG(IntDomainVar[] vars, int offset, IEnvironment environment)
Method Detail |
---|
public Object clone() throws CloneNotSupportedException
AbstractSConstraint
clone
in class AbstractSConstraint<IntDomainVar>
CloneNotSupportedException
- Clone not supported exceptionpublic String toString()
toString
in class AbstractSConstraint<IntDomainVar>
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
protected IntDomainVar getIndexVar()
protected IntDomainVar getValueVar()
public boolean isSatisfied()
AbstractIntSConstraint
isSatisfied
in interface SConstraint<IntDomainVar>
isSatisfied
in class AbstractIntSConstraint
protected void updateValueFromIndex(int idx) throws ContradictionException
ContradictionException
protected void updateValueFromIndex() throws ContradictionException
ContradictionException
protected void updateIndexFromValue(int v) throws ContradictionException
ContradictionException
protected void updateIndexFromValue() throws ContradictionException
ContradictionException
protected void updateVariable(int index, int value) throws ContradictionException
ContradictionException
protected void equalityBehaviour() throws ContradictionException
ContradictionException
public void awake() throws ContradictionException
Propagator
awake
in class Propagator
ContradictionException
- contradiction exceptionpublic void awakeOnInf(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
ContradictionException
public void awakeOnRem(int idx, int x) throws ContradictionException
AbstractIntSConstraint
awakeOnRem
in interface IntPropagator
awakeOnRem
in class AbstractIntSConstraint
ContradictionException
public Boolean isEntailed()
AbstractSConstraint
isEntailed
in class AbstractSConstraint<IntDomainVar>
public void propagate() throws ContradictionException
Propagator
propagate
in class Propagator
ContradictionException
- contradiction exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |