|
||||||||||
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.AbstractTernIntSConstraint
choco.cp.solver.constraints.integer.Element2D
public final class Element2D
Ensure that lvals[v0][v1] = v2 where lvals is an int[][] User: hcambaza Date: 16-Jan-2007 Time: 18:54:33
Field Summary | |
---|---|
protected int |
cste
|
protected int |
dim1
|
protected int |
dim2
|
protected int[][] |
lvals
|
Fields inherited from class choco.kernel.solver.constraints.integer.AbstractTernIntSConstraint |
---|
v0, v1, v2 |
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 | |
---|---|
Element2D(IntDomainVar v0,
IntDomainVar v1,
IntDomainVar v2,
int[][] lvals)
2D Element constraint that lvals[v0][v1] = v2 where lvals is an int[][] |
Method Summary | |
---|---|
void |
awakeOnBounds(int idx)
|
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 |
awakeOnRemovals(int idx,
DisposableIntIterator deltaDomain)
The default implementation of propagation when a variable has been modified consists in iterating all values that have been removed (the delta domain) and propagate them one after another, incrementally. |
void |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
int |
getFilteredEventMask(int idx)
|
Boolean |
isEntailed()
Indicates if the constraint is entailed, from now on will be always satisfied |
boolean |
isSatisfied(int[] tuple)
TEMPORARY: if not overriden by the constraint, throws an error to avoid bug using reified constraints in constraints that have not been changed to fulfill this api yet ! |
String |
pretty()
pretty printing of the object. |
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
boolean |
testValueVarV0(int idx)
|
boolean |
testValueVarV1(int idx)
|
void |
updateIndexFromValue()
|
void |
updateValueFromIndex()
|
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnRem, getConstraintType, isConsistent, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, opposite, 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 int[][] lvals
protected int dim1
protected int dim2
protected int cste
Constructor Detail |
---|
public Element2D(IntDomainVar v0, IntDomainVar v1, IntDomainVar v2, int[][] lvals)
v0
- index1v1
- index2v2
- valeurlvals
- Method Detail |
---|
public int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
public void updateValueFromIndex() throws ContradictionException
ContradictionException
public boolean testValueVarV0(int idx)
public boolean testValueVarV1(int idx)
public void updateIndexFromValue() throws ContradictionException
ContradictionException
public void propagate() throws ContradictionException
Propagator
propagate
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 awakeOnBounds(int idx) throws ContradictionException
awakeOnBounds
in interface IntPropagator
awakeOnBounds
in class AbstractIntSConstraint
ContradictionException
public void awakeOnRemovals(int idx, DisposableIntIterator deltaDomain) throws ContradictionException
AbstractIntSConstraint
awakeOnRemovals
in interface IntPropagator
awakeOnRemovals
in class AbstractIntSConstraint
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
ContradictionException
public Boolean isEntailed()
AbstractSConstraint
isEntailed
in class AbstractSConstraint<IntDomainVar>
public boolean isSatisfied(int[] tuple)
AbstractIntSConstraint
isSatisfied
in interface IntPropagator
isSatisfied
in class AbstractIntSConstraint
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |