choco.palm.dbt.integer
Class PalmIntVar
java.lang.Object
choco.AbstractEntity
choco.AbstractVar
choco.integer.var.IntDomainVarImpl
choco.palm.dbt.integer.PalmIntVar
- All Implemented Interfaces:
- Entity, IntDomainVar, IntExp, IntVar, PalmVar, ExplainedVar, ExplainedIntVar, Var
public class PalmIntVar
- extends IntDomainVarImpl
- implements PalmVar, ExplainedIntVar
Method Summary |
int[] |
getAllValues()
|
Constraint |
getDecisionConstraint(int val)
Returns the decision constraint for the ith branch on the current domain. |
Constraint |
getNegDecisionConstraint(int val)
|
boolean |
instantiate(int value,
int idx,
Explanation e)
|
boolean |
removeVal(int value,
int idx,
Explanation e)
|
void |
resetExplanationOnInf()
|
void |
resetExplanationOnSup()
|
void |
resetExplanationOnVal(int value)
|
void |
restoreInf(int newValue)
|
void |
restoreSup(int newValue)
|
void |
restoreVal(int val)
|
void |
self_explain(int select,
Explanation expl)
|
void |
self_explain(int select,
int x,
Explanation expl)
|
boolean |
updateInf(int x,
int idx,
Explanation e)
|
boolean |
updateSup(int x,
int idx,
Explanation e)
|
Methods inherited from class choco.integer.var.IntDomainVarImpl |
canBeEqualTo, canBeInstantiatedIn, canBeInstantiatedTo, fail, getDomain, getDomainSize, getInf, getNextDomainValue, getPrevDomainValue, getRandomDomainValue, getSup, getVal, getValue, hasEnumeratedDomain, instantiate, isInstantiated, isInstantiatedTo, pretty, removeInterval, removeVal, remVal, setInf, setMax, setMin, setSup, setVal, toString, updateInf, updateSup, wipeOut |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface choco.integer.IntDomainVar |
canBeEqualTo, canBeInstantiatedIn, canBeInstantiatedTo, getDomain, getDomainSize, getInf, getNextDomainValue, getPrevDomainValue, getProblem, getRandomDomainValue, getSup, getVal, getValue, hasEnumeratedDomain, instantiate, isInstantiatedTo, removeInterval, removeVal, remVal, setInf, setMax, setMin, setSup, setVal, updateInf, updateSup, wipeOut |
PalmIntVar
public PalmIntVar(AbstractProblem pb,
java.lang.String name,
int domainType,
int inf,
int sup)
PalmIntVar
public PalmIntVar(AbstractProblem pb,
java.lang.String name,
int[] sortedValues)
PalmIntVar
public PalmIntVar(AbstractProblem pb,
int domainType,
int inf,
int sup)
getDecisionConstraint
public Constraint getDecisionConstraint(int val)
- Description copied from interface:
PalmVar
- Returns the decision constraint for the ith branch on the current domain.
- Specified by:
getDecisionConstraint
in interface PalmVar
getNegDecisionConstraint
public Constraint getNegDecisionConstraint(int val)
resetExplanationOnInf
public void resetExplanationOnInf()
resetExplanationOnSup
public void resetExplanationOnSup()
resetExplanationOnVal
public void resetExplanationOnVal(int value)
self_explain
public void self_explain(int select,
Explanation expl)
- Specified by:
self_explain
in interface ExplainedVar
self_explain
public void self_explain(int select,
int x,
Explanation expl)
- Specified by:
self_explain
in interface ExplainedIntVar
restoreInf
public void restoreInf(int newValue)
restoreSup
public void restoreSup(int newValue)
restoreVal
public void restoreVal(int val)
updateInf
public boolean updateInf(int x,
int idx,
Explanation e)
throws ContradictionException
- Specified by:
updateInf
in interface ExplainedIntVar
- Throws:
ContradictionException
updateSup
public boolean updateSup(int x,
int idx,
Explanation e)
throws ContradictionException
- Specified by:
updateSup
in interface ExplainedIntVar
- Throws:
ContradictionException
removeVal
public boolean removeVal(int value,
int idx,
Explanation e)
throws ContradictionException
- Specified by:
removeVal
in interface ExplainedIntVar
- Throws:
ContradictionException
getAllValues
public int[] getAllValues()
- Specified by:
getAllValues
in interface ExplainedIntVar
instantiate
public boolean instantiate(int value,
int idx,
Explanation e)
throws ContradictionException
- Specified by:
instantiate
in interface ExplainedIntVar
- Throws:
ContradictionException