org.gersteinlab.regulation.model
Class Polynomial

java.lang.Object
  extended by org.gersteinlab.regulation.numeric.Function
      extended by org.gersteinlab.regulation.numeric.DifferentiableFunction
          extended by org.gersteinlab.regulation.numeric.DoublyDifferentiableFunction
              extended by org.gersteinlab.regulation.model.Polynomial

public class Polynomial
extends DoublyDifferentiableFunction

        A class that represents a polynomial.
        

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

Field Summary
protected  double[] coefs
           
protected  double[] d2Coefs
           
protected  double[] dCoefs
           
 
Fields inherited from class org.gersteinlab.regulation.numeric.Function
xStored
 
Constructor Summary
Polynomial(double[] coefsIn)
          Create a polynomial with a set of coefficients.
 
Method Summary
 double d2f(double x)
          Evaluate the second derivative of the function at a point.
 double df(double x)
          Evaluate the first derivative of the function at a point.
 double f(double x)
          Evaluate the value of the function at a point.
 
Methods inherited from class org.gersteinlab.regulation.numeric.DoublyDifferentiableFunction
d2f
 
Methods inherited from class org.gersteinlab.regulation.numeric.DifferentiableFunction
df
 
Methods inherited from class org.gersteinlab.regulation.numeric.Function
f, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coefs

protected double[] coefs

dCoefs

protected double[] dCoefs

d2Coefs

protected double[] d2Coefs
Constructor Detail

Polynomial

public Polynomial(double[] coefsIn)
Create a polynomial with a set of coefficients.

Parameters:
coefsIn - The coefficients
Method Detail

f

public double f(double x)
Description copied from class: Function
Evaluate the value of the function at a point.

Overrides:
f in class Function
Parameters:
x - The point
Returns:
The value of the function at the point
See Also:
Function.f(double)

df

public double df(double x)
Description copied from class: DifferentiableFunction
Evaluate the first derivative of the function at a point.

Overrides:
df in class DifferentiableFunction
Parameters:
x - The point
Returns:
The first derivative of the function at the point
See Also:
Function.f(double)

d2f

public double d2f(double x)
Description copied from class: DoublyDifferentiableFunction
Evaluate the second derivative of the function at a point.

Overrides:
d2f in class DoublyDifferentiableFunction
Parameters:
x - The point
Returns:
The second derivative of the function at the point
See Also:
Function.f(double)