|
|||||||||
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.global.Occurrence
choco.palm.global.matching.PalmOccurence
public class PalmOccurence
Field Summary |
---|
Fields inherited from class choco.global.Occurrence |
---|
constrainOnInfNumber, constrainOnSupNumber, isPossible, isSure, nbPossible, nbSure |
Fields inherited from class choco.integer.constraints.AbstractLargeIntConstraint |
---|
cIndices, cste, vars |
Fields inherited from class choco.AbstractConstraint |
---|
active, constAwakeEvent, hook, priority |
Fields inherited from class choco.AbstractEntity |
---|
problem |
Constructor Summary | |
---|---|
PalmOccurence(IntDomainVar[] lvars,
int occval,
boolean onInf,
boolean onSup)
|
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 |
awakeOnRem(int idx,
int x)
Default propagation on one value removal: propagation on domain revision. |
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 |
awakeOnRestoreVal(int idx,
IntIterator it)
Handles a val restoration on the constraint idx |
void |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
void |
checkNbPossible()
|
void |
checkNbSure()
|
java.lang.Object |
clone()
returns a copy of the constraint. |
void |
takeIntoAccountStatusChange(int index)
Informs constraints that one of their children has a modified status (due to value restoration). |
void |
updateDataStructuresOnConstraint(int idx,
int select,
int newValue,
int oldValue)
Method called when one of the variables is modified. |
void |
updateDataStructuresOnRestoreConstraint(int idx,
int select,
int newValue,
int oldValue)
Method called when one of the variables has a restored value. |
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.global.Occurrence |
---|
awakeOnInst, filter, init, isSatisfied, pretty, propagate |
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, awakeOnVar, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEntailed, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface choco.Propagator |
---|
assignIndices, awakeOnVar, constAwake, delete, getEvent, getPlugIn, getPriority, isCompletelyInstantiated, isConsistent, isEntailed, propagate |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Methods inherited from interface choco.Constraint |
---|
getConstraintIdx, getNbVars, getVar, getVarIdxInOpposite, isEquivalentTo, isSatisfied, 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 |
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 |
---|
awakeOnInst, getConstraintIdx, setConstraintIndex |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Constructor Detail |
---|
public PalmOccurence(IntDomainVar[] lvars, int occval, boolean onInf, boolean onSup)
Method Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Constraint
clone
in interface Constraint
clone
in class Occurrence
java.lang.CloneNotSupportedException
public void checkNbPossible() throws ContradictionException
checkNbPossible
in class Occurrence
ContradictionException
public void checkNbSure() throws ContradictionException
checkNbSure
in class Occurrence
ContradictionException
public void updateDataStructuresOnConstraint(int idx, int select, int newValue, int oldValue)
PalmVarListener
updateDataStructuresOnConstraint
in interface PalmVarListener
idx
- Index of the variable.select
- Type of modification (PalmIntVar.INF
, PalmIntVar.SUP
,
PalmIntVar.VAL
).newValue
- New value (or modified value).oldValue
- Old value (or 0 if this a value removal).public void updateDataStructuresOnRestoreConstraint(int idx, int select, int newValue, int oldValue)
PalmVarListener
updateDataStructuresOnRestoreConstraint
in interface PalmVarListener
idx
- Index of the variable.select
- Type of modification.newValue
- New value (or modified value).oldValue
- Old value (or 0 if this a value removal).public void awakeOnInf(int idx) throws ContradictionException
AbstractIntConstraint
awakeOnInf
in interface IntVarEventListener
awakeOnInf
in class Occurrence
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
AbstractIntConstraint
awakeOnSup
in interface IntVarEventListener
awakeOnSup
in class Occurrence
ContradictionException
public void awakeOnRem(int idx, int x) throws ContradictionException
AbstractIntConstraint
awakeOnRem
in interface IntVarEventListener
awakeOnRem
in class Occurrence
ContradictionException
public void awakeOnRestoreInf(int idx) throws ContradictionException
PalmIntVarListener
idx
awakeOnRestoreInf
in interface PalmIntVarListener
idx
- Variable involved.
ContradictionException
public void awakeOnRestoreSup(int idx) throws ContradictionException
PalmIntVarListener
idx
awakeOnRestoreSup
in interface PalmIntVarListener
idx
- Variable involved.
ContradictionException
public void awakeOnRestoreVal(int idx, int val) throws ContradictionException
PalmIntVarListener
idx
awakeOnRestoreVal
in interface PalmIntVarListener
idx
- Variable involved.
ContradictionException
public void awakeOnRestoreVal(int idx, IntIterator it) throws ContradictionException
PalmIntVarListener
idx
awakeOnRestoreVal
in interface PalmIntVarListener
idx
- Variable involved.
ContradictionException
public void awake() throws ContradictionException
AbstractConstraint
awake
in interface Propagator
awake
in class Occurrence
ContradictionException
public java.util.Set whyIsTrue()
PalmIntVarListener
whyIsTrue
in interface PalmIntVarListener
public java.util.Set whyIsFalse()
PalmIntVarListener
whyIsFalse
in interface PalmIntVarListener
public void takeIntoAccountStatusChange(int index)
PalmConstraint
takeIntoAccountStatusChange
in interface PalmConstraint
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |