choco.cp.solver.variables.real
Class RealDomainImpl

java.lang.Object
  extended by choco.cp.solver.variables.real.RealDomainImpl
All Implemented Interfaces:
IPretty, Domain, RealDomain, RealInterval

public class RealDomainImpl
extends Object
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  IStateDouble inf
           
protected  IStateDouble sup
           
protected  RealVar variable
           
 
Constructor Summary
RealDomainImpl(RealVar v, double a, double b, Solver solver)
           
 
Method Summary
 void clearDeltaDomain()
           
 void freezeDeltaDomain()
           
 double getInf()
           
 boolean getReleasedDeltaDomain()
           
 double getSup()
           
 void intersect(RealInterval interval)
          Modifies the bounds for intersecting with the specified interval.
 String pretty()
          pretty printing of the object.
 boolean releaseDeltaDomain()
           
 void silentlyAssign(RealInterval i)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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 IStateDouble inf

sup

protected IStateDouble sup

variable

protected RealVar variable
Constructor Detail

RealDomainImpl

public RealDomainImpl(RealVar v,
                      double a,
                      double b,
                      Solver solver)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

pretty

public String pretty()
Description copied from interface: IPretty
pretty printing of the object. This String is not constant and may depend on the context.

Specified by:
pretty in interface IPretty
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

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


Copyright © 2012. All Rights Reserved.