savi.alg.funcmin
Class StateFunction

java.lang.Object
  extended by savi.alg.funcmin.StateFunction
All Implemented Interfaces:
java.lang.Cloneable, StateSkeleton

public class StateFunction
extends java.lang.Object
implements StateSkeleton

State representing finding global minimum problem.


Field Summary
protected  double currentX
          current value x in graph
protected static double half
          half of pixel size
 
Constructor Summary
StateFunction()
          Creates a new instance of StateFunction
 
Method Summary
 java.lang.Object clone()
          Create new copy of StateFunction object.
 double fce(double x)
          implemented function
 void findInitialState(double temp)
          Initializes state.
 void findNextState(double temp)
          Called when algorithm need to find next state.
 double getActualCost()
          Count optimalization criterion.
 double getCurrentX()
          Used for taking current x value (that means state of function).
 java.lang.String[] getSubmission()
          Not implemented, Finding global minimum problem doesn't allow loading and saving submissions.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentX

protected double currentX
current value x in graph


half

protected static double half
half of pixel size

Constructor Detail

StateFunction

public StateFunction()
Creates a new instance of StateFunction

Method Detail

fce

public double fce(double x)
implemented function

Parameters:
x - value x of function
Returns:
value y

findInitialState

public void findInitialState(double temp)
Initializes state.

Specified by:
findInitialState in interface StateSkeleton
Parameters:
temp - Starting temperature

findNextState

public void findNextState(double temp)
Called when algorithm need to find next state.

Specified by:
findNextState in interface StateSkeleton
Parameters:
temp - actual temperature

getActualCost

public double getActualCost()
Count optimalization criterion.

Specified by:
getActualCost in interface StateSkeleton
Returns:
optimalization criterion for the state

getCurrentX

public double getCurrentX()
Used for taking current x value (that means state of function).

Returns:
x coordinate

clone

public java.lang.Object clone()
Create new copy of StateFunction object.

Specified by:
clone in interface StateSkeleton
Overrides:
clone in class java.lang.Object
Returns:
deep copy of StateFunction

getSubmission

public java.lang.String[] getSubmission()
Not implemented, Finding global minimum problem doesn't allow loading and saving submissions.

Specified by:
getSubmission in interface StateSkeleton
Returns:
null