choco.real.var
Class RealDomainImpl
java.lang.Object
choco.AbstractEntity
choco.real.var.RealDomainImpl
- All Implemented Interfaces:
- Entity, RealInterval, RealDomain
- Direct Known Subclasses:
- PalmRealDomainImpl
public class RealDomainImpl
- extends AbstractEntity
- implements RealDomain
An implmentation of real variable domains using two stored floats for storing bounds.
|
Field Summary |
protected double |
currentInfPropagated
for the delta domain: current value of the inf (domain lower bound) when the bound started beeing propagated
(just to check that it does not change during the propagation phase) |
protected double |
currentSupPropagated
for the delta domain: current value of the sup (domain upper bound) when the bound started beeing propagated
(just to check that it does not change during the propagation phase) |
protected StoredFloat |
inf
|
protected StoredFloat |
sup
|
protected RealVar |
variable
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentInfPropagated
protected double currentInfPropagated
- for the delta domain: current value of the inf (domain lower bound) when the bound started beeing propagated
(just to check that it does not change during the propagation phase)
currentSupPropagated
protected double currentSupPropagated
- for the delta domain: current value of the sup (domain upper bound) when the bound started beeing propagated
(just to check that it does not change during the propagation phase)
inf
protected StoredFloat inf
sup
protected StoredFloat sup
variable
protected RealVar variable
RealDomainImpl
public RealDomainImpl(RealVar v,
double a,
double b)
pretty
public java.lang.String pretty()
- Description copied from interface:
Entity
- pretty printing of the object. This String is not constant and may depend on the context.
- Specified by:
pretty in interface Entity- Overrides:
pretty in class AbstractEntity
- Returns:
- a readable string representation of the object
getInf
public double getInf()
- Specified by:
getInf in interface RealInterval
- Returns:
- the lower bound.
getSup
public double getSup()
- Specified by:
getSup in interface RealInterval
- Returns:
- the upper bound.
intersect
public void intersect(RealInterval interval)
throws ContradictionException
- Description copied from interface:
RealInterval
- Modifies the bounds for intersecting with the specified interval.
- Specified by:
intersect in interface RealInterval
- Throws:
ContradictionException
intersect
public void intersect(RealInterval interval,
int index)
throws ContradictionException
- Description copied from interface:
RealInterval
- Modifies the bounds for intersecting with the specified interval.
- Specified by:
intersect in interface RealInterval
index - of the constraint responsible to this withdraw
- Throws:
ContradictionException
clearDeltaDomain
public void clearDeltaDomain()
- Specified by:
clearDeltaDomain in interface RealDomain
releaseDeltaDomain
public boolean releaseDeltaDomain()
- Specified by:
releaseDeltaDomain in interface RealDomain
freezeDeltaDomain
public void freezeDeltaDomain()
- Specified by:
freezeDeltaDomain in interface RealDomain
getReleasedDeltaDomain
public boolean getReleasedDeltaDomain()
- Specified by:
getReleasedDeltaDomain in interface RealDomain
silentlyAssign
public void silentlyAssign(RealInterval i)
- Specified by:
silentlyAssign in interface RealDomain