|
|||||||||
| 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 Constraintclone in class AbstractLargeIntConstraintjava.lang.CloneNotSupportedExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String pretty()
Entity
pretty in interface Entitypretty in class AbstractEntityprotected 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 Propagatorawake in class AbstractConstraintContradictionException
public void propagate()
throws ContradictionException
AbstractLargeIntConstraint
propagate in interface Propagatorpropagate in class AbstractLargeIntConstraintContradictionException
public void awakeOnInf(int idx)
throws ContradictionException
AbstractIntConstraint
awakeOnInf in interface IntVarEventListenerawakeOnInf in class AbstractIntConstraintContradictionException
public void awakeOnSup(int idx)
throws ContradictionException
AbstractIntConstraint
awakeOnSup in interface IntVarEventListenerawakeOnSup in class AbstractIntConstraintContradictionException
public void awakeOnInst(int idx)
throws ContradictionException
AbstractIntConstraint
awakeOnInst in interface IntVarEventListenerawakeOnInst in class AbstractIntConstraintContradictionException
public void awakeOnRem(int idx,
int x)
throws ContradictionException
AbstractIntConstraint
awakeOnRem in interface IntVarEventListenerawakeOnRem in class AbstractIntConstraintContradictionException
public void awakeOnVar(int idx)
throws ContradictionException
AbstractConstraint
awakeOnVar in interface VarEventListenerawakeOnVar in interface PropagatorawakeOnVar in class AbstractConstraintContradictionExceptionpublic java.lang.Boolean isEntailed()
Propagator
isEntailed in interface PropagatorisEntailed in class AbstractConstraint
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||