jopt.csp.solution
Class DoubleSolution

java.lang.Object
  extended byjopt.csp.solution.DoubleSolution
All Implemented Interfaces:
java.lang.Cloneable, VariableSolution

public class DoubleSolution
extends java.lang.Object
implements VariableSolution

Solution to an double variable


Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 double getMax()
          Retrieves maximum value of solution
 double getMin()
          Retrieves minimum value of solution
 double getValue()
          Returns the value of the solution.
 CspVariable getVariable()
          Returns variable solution is based upon
 int hashCode()
           
 boolean isBound()
          Returns true if variable is bound in solution
 void restore()
          Restores (certain) recorded information to the associated variable.
 void setMax(double max)
          Sets maximum value of solution
 void setMin(double min)
          Sets minimum value of solution
 void setValue(double val)
          Sets both the min / max value of solution to a single value
 void store()
          Causes variable solution to capture certain information about it's variable and store it locally so that it can be restored later.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getVariable

public CspVariable getVariable()
Description copied from interface: VariableSolution
Returns variable solution is based upon

Specified by:
getVariable in interface VariableSolution

isBound

public boolean isBound()
Description copied from interface: VariableSolution
Returns true if variable is bound in solution

Specified by:
isBound in interface VariableSolution

getMin

public double getMin()
Retrieves minimum value of solution


getMax

public double getMax()
Retrieves maximum value of solution


setMin

public void setMin(double min)
Sets minimum value of solution


setMax

public void setMax(double max)
Sets maximum value of solution


setValue

public void setValue(double val)
Sets both the min / max value of solution to a single value


getValue

public double getValue()
Returns the value of the solution. This function will throw an exception if the variable is not already bound.


store

public void store()
Description copied from interface: VariableSolution
Causes variable solution to capture certain information about it's variable and store it locally so that it can be restored later. History is not kept: calling this method overwrites any previous information captured from previous calls to this method.

Specified by:
store in interface VariableSolution

restore

public void restore()
             throws PropagationFailureException
Description copied from interface: VariableSolution
Restores (certain) recorded information to the associated variable. This is the information stored when the store() was most recently called.

Specified by:
restore in interface VariableSolution
Throws:
PropagationFailureException

toString

public java.lang.String toString()

clone

public java.lang.Object clone()
Specified by:
clone in interface VariableSolution

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object obj)