|
|||||||||
| 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. |
protected int[] |
lvals
Values the variable should be equal to. |
| 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. |
|
| Method Summary | |
|---|---|
void |
awakeOnInf(int idx)
Propagation when a lower bound is increased. |
void |
awakeOnRem(int idx,
int val)
Propagation when a value is removed from a domain. |
void |
awakeOnRestore(int idx)
Propagation when a value is restored to a domain (for repairing a contradiction for instance). |
void |
awakeOnRestoreInf(int idx)
Propagation when values are restored to a domain (for repairing a contradiction for instance). |
void |
awakeOnRestoreSup(int idx)
Propagation when values are restored to a domain (for repairing a contradiction for instance). |
void |
awakeOnRestoreVal(int idx,
int val)
Propagation when a value is restored to a domain (for repairing a contradiction for instance). |
void |
awakeOnSup(int idx)
Propagation when an upper bound is decreased. |
java.lang.Boolean |
isEntailed()
Checks if the constraint is entailed (it can be proven that the constraint will be satisfied). |
boolean |
isSatisfied()
When variables are instantiated, checks that the constraint is satisfied. |
void |
propagate()
Generic propagation algorithm. |
java.util.Set |
whyIsFalse()
Determines why the constraints is not satified. |
java.util.Set |
whyIsTrue()
Determines why the constraints is satified. |
| 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, clone, 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 |
|---|
clone, 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 - The index variable.v1 - The value variable.cste - The offset for the index in the values array.lvals - Values among which the variable should be affected to.| Method Detail |
|---|
public void propagate()
throws ContradictionException
propagate in interface Propagatorpropagate in class AbstractBinIntConstraintContradictionException - if a contradiction occurs or a domain
becomes empty.
public void awakeOnInf(int idx)
throws ContradictionException
awakeOnInf in interface IntVarEventListenerawakeOnInf in class AbstractIntConstraintidx - the index of the modified variable
ContradictionException - if a contradiction occurs or a domain
becomes empty.
public void awakeOnSup(int idx)
throws ContradictionException
awakeOnSup in interface IntVarEventListenerawakeOnSup in class AbstractIntConstraintidx - the index of the modified variable
ContradictionException - if a contradiction occurs or a domain
becomes empty.
public void awakeOnRem(int idx,
int val)
throws ContradictionException
awakeOnRem in interface IntVarEventListenerawakeOnRem in class AbstractIntConstraintidx - the index of the modified variableval - the removed value
ContradictionException - if a contradiction occurs or a domain
becomes empty.
public void awakeOnRestore(int idx)
throws ContradictionException
idx - the index of the modified variable
ContradictionException - if a contradiction occurs or a domain
becomes empty.
public void awakeOnRestoreInf(int idx)
throws ContradictionException
awakeOnRestoreInf in interface PalmIntVarListenerawakeOnRestoreInf in class AbstractPalmBinIntConstraintidx - the index of the modified variable
ContradictionException - if a contradiction occurs or a domain
becomes empty.
public void awakeOnRestoreSup(int idx)
throws ContradictionException
awakeOnRestoreSup in interface PalmIntVarListenerawakeOnRestoreSup in class AbstractPalmBinIntConstraintidx - the index of the modified variable
ContradictionException - if a contradiction occurs or a domain
becomes empty.
public void awakeOnRestoreVal(int idx,
int val)
throws ContradictionException
idx - the index of the modified variableval - the restored value
ContradictionException - if a contradiction occurs or a domain
becomes empty.public java.lang.Boolean isEntailed()
isEntailed in interface PropagatorisEntailed in class AbstractConstraintpublic boolean isSatisfied()
public java.util.Set whyIsTrue()
public java.util.Set whyIsFalse()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||