org.gersteinlab.regulation.numeric
Class Function

java.lang.Object
  extended by org.gersteinlab.regulation.numeric.Function
Direct Known Subclasses:
DifferentiableFunction

public abstract class Function
extends java.lang.Object

        A class that represents a univariate real function. Each inherited class
        should implement at least one of f(double) and f().
        

Version:
1.0 (August 29, 2008)
        Change History:
        1.0     - Initial version
        
Author:
Kevin Yuk-Lap Yip

Field Summary
protected  double xStored
           
 
Constructor Summary
Function()
           
 
Method Summary
 double f()
          Evaluate the value of the function at the last stored point.
 double f(double x)
          Evaluate the value of the function at a point.
 void set(double x)
          Store the next point to be evaluated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xStored

protected double xStored
Constructor Detail

Function

public Function()
Method Detail

f

public double f(double x)
Evaluate the value of the function at a point.

Parameters:
x - The point
Returns:
The value of the function at the point

set

public void set(double x)
Store the next point to be evaluated.

Parameters:
x - The point

f

public double f()
Evaluate the value of the function at the last stored point.

Returns:
The value of the function at the point