|
|||||||||
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.AbstractLargeIntConstraint
choco.integer.constraints.ElementV
public class ElementV
A class implementing the constraint A[I] == X, with I and X being IntVars and A an array of IntVars
Field Summary | |
---|---|
protected StoredBool |
indexUpdateNeeded
|
protected StoredBool |
valueUpdateNeeded
|
Fields inherited from class choco.integer.constraints.AbstractLargeIntConstraint |
---|
cIndices, cste, vars |
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 | |
---|---|
ElementV(IntDomainVar[] vars,
int offset)
|
Method Summary | |
---|---|
void |
awake()
Default initial propagation: full constraint re-propagation. |
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. |
protected void |
equalityBehaviour()
|
protected IntDomainVar |
getIndexVar()
|
protected IntDomainVar |
getValueVar()
|
java.lang.Boolean |
isEntailed()
Checks whether the constraint is definitely satisfied, no matter what further restrictions occur to the domain of its variables. |
boolean |
isSatisfied()
Semantic: Testing if the constraint is satisfied. |
java.lang.String |
pretty()
pretty printing of the object. |
void |
propagate()
Propagates the constraint awake events. |
java.lang.String |
toString()
|
protected void |
updateIndexFromValue()
|
protected void |
updateValueFromIndex()
|
Methods inherited from class choco.integer.constraints.AbstractLargeIntConstraint |
---|
assignIndices, getConstraintIdx, getIntVar, getNbVars, getVar, isCompletelyInstantiated, setConstraintIndex, setVar |
Methods inherited from class choco.integer.constraints.AbstractIntConstraint |
---|
awakeOnBounds, awakeOnRemovals, getSelfIndex, isConsistent |
Methods inherited from class choco.AbstractConstraint |
---|
addListener, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface choco.Propagator |
---|
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 StoredBool valueUpdateNeeded
protected StoredBool indexUpdateNeeded
Constructor Detail |
---|
public ElementV(IntDomainVar[] vars, int offset)
Method Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Constraint
clone
in interface Constraint
clone
in class AbstractLargeIntConstraint
java.lang.CloneNotSupportedException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String pretty()
Entity
pretty
in interface Entity
pretty
in class AbstractEntity
protected IntDomainVar getIndexVar()
protected IntDomainVar getValueVar()
public boolean isSatisfied()
Constraint
protected void updateValueFromIndex() throws ContradictionException
ContradictionException
protected void updateIndexFromValue() throws ContradictionException
ContradictionException
protected void equalityBehaviour() throws ContradictionException
ContradictionException
public void awake() throws ContradictionException
AbstractConstraint
awake
in interface Propagator
awake
in class AbstractConstraint
ContradictionException
public void propagate() throws ContradictionException
AbstractLargeIntConstraint
propagate
in interface Propagator
propagate
in class AbstractLargeIntConstraint
ContradictionException
public void awakeOnInf(int idx) throws ContradictionException
AbstractIntConstraint
awakeOnInf
in interface IntVarEventListener
awakeOnInf
in class AbstractIntConstraint
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
AbstractIntConstraint
awakeOnSup
in interface IntVarEventListener
awakeOnSup
in class AbstractIntConstraint
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
AbstractIntConstraint
awakeOnInst
in interface IntVarEventListener
awakeOnInst
in class AbstractIntConstraint
ContradictionException
public void awakeOnRem(int idx, int x) throws ContradictionException
AbstractIntConstraint
awakeOnRem
in interface IntVarEventListener
awakeOnRem
in class AbstractIntConstraint
ContradictionException
public void awakeOnVar(int idx) throws ContradictionException
AbstractConstraint
awakeOnVar
in interface VarEventListener
awakeOnVar
in interface Propagator
awakeOnVar
in class AbstractConstraint
ContradictionException
public java.lang.Boolean isEntailed()
Propagator
isEntailed
in interface Propagator
isEntailed
in class AbstractConstraint
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |