|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchoco.AbstractEntity
choco.real.var.RealDomainImpl
choco.palm.real.PalmRealDomainImpl
public class PalmRealDomainImpl
Default implementation of PaLM real domain.
| Field Summary | |
|---|---|
protected PalmExplanation |
decisionConstraints
All active decision constraints on this variable (except the last one). |
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 Constraint |
lastDC
Last decision constraint. |
protected double |
originalInf
Original lower bound. |
protected double |
originalSup
Original upper bound. |
protected boolean |
silent
States if modfication should be quiet, that is no PaLM must be created when the bounds are modified. |
| Fields inherited from class choco.real.var.RealDomainImpl |
|---|
currentInfPropagated, currentSupPropagated, inf, sup, variable |
| Fields inherited from class choco.AbstractEntity |
|---|
hook, problem |
| Fields inherited from interface choco.palm.real.PalmRealInterval |
|---|
DOM, INF, SUP |
| Constructor Summary | |
|---|---|
PalmRealDomainImpl(RealVar v,
double a,
double b)
Creates a real domain for the specified variable. |
|
| Method Summary | |
|---|---|
void |
addDecisionConstraint(AbstractConstraint cst)
Adds a new decision constraint on this variable. |
ConstraintCollection |
getDecisionConstraints()
Returns all decision constraints. |
double |
getOriginalInf()
Returns the original lower bound. |
double |
getOriginalSup()
Returns the original upper bound. |
void |
intersect(RealInterval interval,
int index)
Makes this domain be included in the specified interval. |
void |
resetExplanationOnInf()
Reset lower bound explanatioins: not up-to-date explanations are removed. |
void |
resetExplanationOnSup()
Reset upper bound explanatioins: not up-to-date explanations are removed. |
void |
restoreInf(double newValue)
Restores lower bound to the specified value. |
void |
restoreSup(double newValue)
Restores upper bound to the specified value. |
void |
self_explain(int select,
Explanation e)
Explains the state of this domain |
void |
silentlyAssign(RealInterval i)
Quietly assign this domain to the values of the specified interval. |
void |
updateDecisionConstraints()
Updates decision constraints by removing not up-to-date ones. |
| Methods inherited from class choco.real.var.RealDomainImpl |
|---|
clearDeltaDomain, freezeDeltaDomain, getInf, getReleasedDeltaDomain, getSup, intersect, pretty, releaseDeltaDomain |
| 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.real.var.RealDomain |
|---|
clearDeltaDomain, freezeDeltaDomain, getReleasedDeltaDomain, releaseDeltaDomain |
| Methods inherited from interface choco.Entity |
|---|
getProblem, pretty |
| Methods inherited from interface choco.real.RealInterval |
|---|
getInf, getSup, intersect |
| Methods inherited from interface choco.real.RealInterval |
|---|
getInf, getSup, intersect |
| Field Detail |
|---|
protected final java.util.LinkedList explanationOnInf
protected final java.util.LinkedList explanationOnSup
protected final double originalInf
protected final double originalSup
protected PalmExplanation decisionConstraints
protected Constraint lastDC
protected boolean silent
| Constructor Detail |
|---|
public PalmRealDomainImpl(RealVar v,
double a,
double b)
| Method Detail |
|---|
public ConstraintCollection getDecisionConstraints()
getDecisionConstraints in interface PalmRealDomainpublic void addDecisionConstraint(AbstractConstraint cst)
addDecisionConstraint in interface PalmRealDomainpublic double getOriginalInf()
public double getOriginalSup()
public void intersect(RealInterval interval,
int index)
throws ContradictionException
intersect in interface RealIntervalintersect in class RealDomainImplindex - of the constraint responsible to this withdraw
ContradictionExceptionpublic void silentlyAssign(RealInterval i)
silentlyAssign in interface RealDomainsilentlyAssign in class RealDomainImpl
public void self_explain(int select,
Explanation e)
self_explain in interface PalmRealIntervalselect - The part of the domain that should be explainede - Constraint collection this explanation must be added to.public void restoreInf(double newValue)
restoreInf in interface PalmRealDomainpublic void restoreSup(double newValue)
restoreSup in interface PalmRealDomainpublic void resetExplanationOnInf()
resetExplanationOnInf in interface PalmRealDomainpublic void resetExplanationOnSup()
resetExplanationOnSup in interface PalmRealDomainpublic void updateDecisionConstraints()
updateDecisionConstraints in interface PalmRealDomain
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||