jopt.csp.solution
Class FloatSolution

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

public class FloatSolution
extends java.lang.Object
implements VariableSolution

Solution to an float variable


Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 float getMax()
          Retrieves maximum value of solution
 float getMin()
          Retrieves minimum value of solution
 float 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(float max)
          Sets maximum value of solution
 void setMin(float min)
          Sets minimum value of solution
 void setValue(float 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 float getMin()
Retrieves minimum value of solution


getMax

public float getMax()
Retrieves maximum value of solution


setMin

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


setMax

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


setValue

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


getValue

public float 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)