|
|||||||||
| 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.AbstractBinIntConstraint
choco.palm.integer.AbstractPalmBinIntConstraint
choco.palm.integer.constraints.PalmElt
public class PalmElt
Created by IntelliJ IDEA. User: Hadrien Date: 18 janv. 2004 Time: 19:22:28 To change this template use Options | File Templates.
| Field Summary | |
|---|---|
protected int |
cste
uses the cste slot: l[i + cste] = x (ex: cste = 1 allows to use and index from 0 to length(l) - 1 |
protected int[] |
lvals
|
| Fields inherited from class choco.integer.constraints.AbstractBinIntConstraint |
|---|
cIdx0, cIdx1, v0, v1 |
| 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 | |
|---|---|
PalmElt(IntDomainVar v0,
IntDomainVar v1,
int cste,
int[] lvals)
Element constraint (accessing the ith element in a list of values, where i is a variable) the slot v0 represents the index and the slot v1 represents the value propagation with complete arc consistency from values to indices (v1 to v0) propagation with interval approximation from indices to values (v0 to v1) |
|
| 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()
Propagates on the constraint awake events. |
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.AbstractPalmBinIntConstraint |
|---|
awakeOnInst, awakeOnRestoreVal, getIntVar, takeIntoAccountStatusChange, updateDataStructuresOnConstraint, updateDataStructuresOnRestoreConstraint |
| Methods inherited from class choco.integer.constraints.AbstractBinIntConstraint |
|---|
assignIndices, getConstraintIdx, 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 final int cste
protected int[] lvals
| Constructor Detail |
|---|
public PalmElt(IntDomainVar v0,
IntDomainVar v1,
int cste,
int[] lvals)
v0 - v1 - cste - lvals - | Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Constraint
clone in interface Constraintclone in class AbstractConstraintjava.lang.CloneNotSupportedException
public void updateValueFromIndex()
throws ContradictionException
ContradictionException
public void updateIndexFromValue()
throws ContradictionException
ContradictionException
public void propagate()
throws ContradictionException
AbstractBinIntConstraint
propagate in interface Propagatorpropagate in class AbstractBinIntConstraintContradictionException
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 awakeOnRem(int idx,
int val)
throws ContradictionException
AbstractIntConstraint
awakeOnRem in interface IntVarEventListenerawakeOnRem in class AbstractIntConstraintContradictionException
public void awakeOnRestore(int idx)
throws ContradictionException
ContradictionException
public void awakeOnRestoreInf(int idx)
throws ContradictionException
PalmIntVarListeneridx
awakeOnRestoreInf in interface PalmIntVarListenerawakeOnRestoreInf in class AbstractPalmBinIntConstraintidx - Variable involved.
ContradictionException
public void awakeOnRestoreSup(int idx)
throws ContradictionException
PalmIntVarListeneridx
awakeOnRestoreSup in interface PalmIntVarListenerawakeOnRestoreSup in class AbstractPalmBinIntConstraintidx - Variable involved.
ContradictionException
public void awakeOnRestoreVal(int idx,
int val)
throws ContradictionException
PalmIntVarListeneridx
idx - Variable involved.
ContradictionExceptionpublic java.lang.Boolean isEntailed()
Propagator
isEntailed in interface PropagatorisEntailed in class AbstractConstraintpublic 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 | ||||||||