|
|||||||||
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.AbstractTernIntConstraint
choco.palm.integer.AbstractPalmTernIntConstraint
choco.palm.integer.constraints.PalmElt2D
public class PalmElt2D
Created by IntelliJ IDEA. User: Administrateur Date: 30 janv. 2004 Time: 11:04:19 To change this template use Options | File Templates.
Field Summary | |
---|---|
protected int[][] |
lvals
uses the cste slot: l[i + cste] = x (ex: cste = 1 allows to use and index from 0 to length(l) - 1 |
Fields inherited from class choco.integer.constraints.AbstractTernIntConstraint |
---|
cIdx0, cIdx1, cIdx2, v0, v1, v2 |
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 | |
---|---|
PalmElt2D(IntDomainVar v0,
IntDomainVar v1,
IntDomainVar v2,
int[][] lvals,
int dim1,
int dim2)
2D Element constraint |
Method Summary | |
---|---|
void |
awakeOnInf(int idx)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnRem(int idx,
int val)
Default propagation on one value removal: propagation on domain revision. |
void |
awakeOnRestore(int idx)
|
void |
awakeOnRestoreInf(int idx)
Handles an inf bound restoration on the constraint idx |
void |
awakeOnRestoreSup(int idx)
Handles a sup bound restoration on the constraint idx |
void |
awakeOnRestoreVal(int idx,
int val)
Handles a val restoration on the constraint idx |
void |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
java.lang.Object |
clone()
returns a copy of the constraint. |
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. |
void |
propagate()
Propagation for the constraint awake var. |
boolean |
testValueVarV0(int idx)
|
boolean |
testValueVarV1(int idx)
|
void |
updateIndexFromValue()
|
void |
updateValueFromIndex()
|
java.util.Set |
whyIsFalse()
When all variables are instantiated, explains why the wonstraint is false. |
java.util.Set |
whyIsTrue()
When all variables are instantiated, explains why the wonstraint is true. |
Methods inherited from class choco.palm.integer.AbstractPalmTernIntConstraint |
---|
awakeOnInst, awakeOnRestoreVal, takeIntoAccountStatusChange, updateDataStructuresOnConstraint, updateDataStructuresOnRestoreConstraint |
Methods inherited from class choco.integer.constraints.AbstractTernIntConstraint |
---|
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, awake, awakeOnVar, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class choco.AbstractEntity |
---|
pretty |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface choco.palm.PalmVarListener |
---|
getConstraintIdx, setConstraintIndex |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Methods inherited from interface choco.integer.var.IntVarEventListener |
---|
getConstraintIdx, setConstraintIndex |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Methods inherited from interface choco.Propagator |
---|
assignIndices, awake, awakeOnVar, constAwake, delete, getEvent, getPlugIn, getPriority, isCompletelyInstantiated, isConsistent |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Methods inherited from interface choco.Constraint |
---|
getConstraintIdx, getNbVars, getVar, getVarIdxInOpposite, isEquivalentTo, opposite, setConstraintIndex, setVar |
Methods inherited from interface choco.Entity |
---|
getProblem, pretty |
Methods inherited from interface choco.palm.PalmVarListener |
---|
getConstraintIdx, setConstraintIndex |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Field Detail |
---|
protected int[][] lvals
Constructor Detail |
---|
public PalmElt2D(IntDomainVar v0, IntDomainVar v1, IntDomainVar v2, int[][] lvals, int dim1, int dim2)
v0
- index1v1
- index2v2
- valeurlvals
- Method Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Constraint
clone
in interface Constraint
clone
in class AbstractConstraint
java.lang.CloneNotSupportedException
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
AbstractTernIntConstraint
propagate
in interface Propagator
propagate
in class AbstractTernIntConstraint
ContradictionException
- if a domain becomes empty or the
filtering algorithm infers a contradictionpublic 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 awakeOnRem(int idx, int val) throws ContradictionException
AbstractIntConstraint
awakeOnRem
in interface IntVarEventListener
awakeOnRem
in class AbstractIntConstraint
ContradictionException
public void awakeOnRestore(int idx) throws ContradictionException
ContradictionException
public void awakeOnRestoreInf(int idx) throws ContradictionException
PalmIntVarListener
idx
awakeOnRestoreInf
in interface PalmIntVarListener
awakeOnRestoreInf
in class AbstractPalmTernIntConstraint
idx
- Variable involved.
ContradictionException
public void awakeOnRestoreSup(int idx) throws ContradictionException
PalmIntVarListener
idx
awakeOnRestoreSup
in interface PalmIntVarListener
awakeOnRestoreSup
in class AbstractPalmTernIntConstraint
idx
- Variable involved.
ContradictionException
public void awakeOnRestoreVal(int idx, int val) throws ContradictionException
PalmIntVarListener
idx
idx
- Variable involved.
ContradictionException
public java.lang.Boolean isEntailed()
Propagator
isEntailed
in interface Propagator
isEntailed
in class AbstractConstraint
public boolean isSatisfied()
Constraint
public java.util.Set whyIsTrue()
PalmIntVarListener
public java.util.Set whyIsFalse()
PalmIntVarListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |