|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.AbstractEntity
choco.integer.var.AbstractIntDomain
choco.integer.var.IntervalIntDomain
choco.palm.dbt.integer.PalmIntervalIntDomain
public class PalmIntervalIntDomain
Nested Class Summary |
---|
Nested classes/interfaces inherited from class choco.integer.var.AbstractIntDomain |
---|
AbstractIntDomain.IntDomainIterator |
Field Summary | |
---|---|
protected java.util.Hashtable |
decisionConstraints
Decision constraints on the variable for branching purpose. |
protected java.util.LinkedList |
explanationOnInf
A stack of explanations for lower bound modifications. |
protected java.util.LinkedList |
explanationOnSup
A stack of explanations for upper bound modifications. |
protected java.util.Hashtable |
negDecisionConstraints
Negation of decision constraints on the variable for branching purpose. |
protected int |
originalInf
Original lower bound. |
protected int |
originalSup
Original upper bound. |
Fields inherited from class choco.integer.var.IntervalIntDomain |
---|
inf, random, sup |
Fields inherited from class choco.integer.var.AbstractIntDomain |
---|
currentInfPropagated, currentSupPropagated, logger, variable |
Fields inherited from class choco.AbstractEntity |
---|
hook, problem |
Fields inherited from interface choco.palm.dbt.integer.PalmIntDomain |
---|
DOM, INF, SUP, VAL |
Constructor Summary | |
---|---|
PalmIntervalIntDomain(IntDomainVarImpl v,
int a,
int b)
Builds a interval domain for the specified variable. |
Method Summary | |
---|---|
int[] |
getAllValues()
Returns all the value currently in the domain. |
Constraint |
getDecisionConstraint(int val)
Returns the decision constraint assigning the domain to the specified value. |
Constraint |
getNegDecisionConstraint(int val)
Returns the negated decision constraint. |
int |
getOriginalInf()
Returns the original lower bound. |
int |
getOriginalSup()
Returns the original upper bound. |
boolean |
removeVal(int value,
int idx,
Explanation e)
Removes a value and posts the event. |
void |
resetExplanationOnInf()
When a lower bound is restored, it deletes the explanation associated to the value removal. |
void |
resetExplanationOnSup()
When an upper bound is restored, it deletes the explanation associated to the value removal. |
void |
resetExplanationOnVal(int val)
When a value is restored, it deletes the explanation associated to the value removal. |
void |
restoreInf(int newValue)
Restores a lower bound and posts the event. |
void |
restoreSup(int newValue)
Restores an upper bound and posts the event. |
void |
restoreVal(int val)
Restores a value and posts the event. |
void |
self_explain(int select,
Explanation expl)
Allows to get an explanation for the domain or a bound of the variable. |
void |
self_explain(int select,
int x,
Explanation expl)
Allows to get an explanation for a value removal from the variable. |
protected boolean |
updateInf(int x,
Explanation e)
|
boolean |
updateInf(int x,
int idx,
Explanation e)
Updates the lower bound and posts the event. |
protected boolean |
updateSup(int x,
Explanation e)
|
boolean |
updateSup(int x,
int idx,
Explanation e)
Updates the upper bound and posts the event. |
Methods inherited from class choco.integer.var.IntervalIntDomain |
---|
_removeVal, contains, getDeltaIterator, getInf, getIterator, getNextValue, getPrevValue, getRandomValue, getSize, getSup, hasNextValue, hasPrevValue, isEnumerated, pretty, remove, restrict, updateInf, updateSup |
Methods inherited from class choco.integer.var.AbstractIntDomain |
---|
_instantiate, _updateInf, _updateSup, clearDeltaDomain, freezeDeltaDomain, getReleasedDeltaDomain, instantiate, releaseDeltaDomain, removeInterval, removeVal, updateInf, updateSup |
Methods inherited from class choco.AbstractEntity |
---|
getProblem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface choco.integer.var.IntDomain |
---|
clearDeltaDomain, contains, freezeDeltaDomain, getDeltaIterator, getInf, getIterator, getNextValue, getPrevValue, getRandomValue, getReleasedDeltaDomain, getSize, getSup, hasNextValue, hasPrevValue, isEnumerated, releaseDeltaDomain, remove, restrict, updateInf, updateSup |
Methods inherited from interface choco.Entity |
---|
getProblem, pretty |
Field Detail |
---|
protected final java.util.LinkedList explanationOnInf
protected final java.util.LinkedList explanationOnSup
protected final java.util.Hashtable decisionConstraints
protected final java.util.Hashtable negDecisionConstraints
protected final int originalInf
protected final int originalSup
Constructor Detail |
---|
public PalmIntervalIntDomain(IntDomainVarImpl v, int a, int b)
v
- Involved variable.a
- Lower bound.b
- Upper bound.Method Detail |
---|
public int getOriginalInf()
getOriginalInf
in interface ExplainedDomain
public int getOriginalSup()
getOriginalSup
in interface ExplainedDomain
public int[] getAllValues()
getAllValues
in interface ExplainedIntDomain
public Constraint getDecisionConstraint(int val)
getDecisionConstraint
in interface PalmIntDomain
public Constraint getNegDecisionConstraint(int val)
getNegDecisionConstraint
in interface PalmIntDomain
public boolean updateSup(int x, int idx, Explanation e) throws ContradictionException
updateSup
in interface PalmIntDomain
updateSup
in interface ExplainedIntDomain
ContradictionException
public boolean updateInf(int x, int idx, Explanation e) throws ContradictionException
updateInf
in interface PalmIntDomain
updateInf
in interface ExplainedIntDomain
ContradictionException
public boolean removeVal(int value, int idx, Explanation e) throws ContradictionException
removeVal
in interface PalmIntDomain
removeVal
in interface ExplainedIntDomain
ContradictionException
public void restoreInf(int newValue)
restoreInf
in interface PalmIntDomain
public void restoreSup(int newValue)
restoreSup
in interface PalmIntDomain
public void restoreVal(int val)
restoreVal
in interface PalmIntDomain
public void self_explain(int select, Explanation expl)
self_explain
in interface PalmIntDomain
self_explain
in interface ExplainedDomain
select
- Should be PalmIntDomain.INF
, PalmIntDomain.SUP
, or PalmIntDomain.DOM
public void self_explain(int select, int x, Explanation expl)
self_explain
in interface PalmIntDomain
self_explain
in interface ExplainedIntDomain
select
- Should be PalmIntDomain.VAL
public void resetExplanationOnVal(int val)
resetExplanationOnVal
in interface PalmIntDomain
public void resetExplanationOnInf()
resetExplanationOnInf
in interface PalmIntDomain
public void resetExplanationOnSup()
resetExplanationOnSup
in interface PalmIntDomain
protected boolean updateSup(int x, Explanation e)
protected boolean updateInf(int x, Explanation e)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |