org.gersteinlab.regulation.model
Class PolynomialSqrDiff

java.lang.Object
  extended by org.gersteinlab.regulation.numeric.MultivariateFunction
      extended by org.gersteinlab.regulation.numeric.DifferentiableMultivariateFunction
          extended by org.gersteinlab.regulation.numeric.DoublyDifferentiableMultivariateFunction
              extended by org.gersteinlab.regulation.model.PolynomialSqrDiff

public class PolynomialSqrDiff
extends DoublyDifferentiableMultivariateFunction

        A function that equals the total squared difference between a polynomial
        and some target values at a set of points, treating the coefficients of
        the polynomial as the variables.
        

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

Field Summary
 
Fields inherited from class org.gersteinlab.regulation.numeric.MultivariateFunction
xStored
 
Constructor Summary
PolynomialSqrDiff(double[] tIn, double[] yIn)
          Create the function with the given set of points and target values.
 
Method Summary
 double f(double[] a)
          Evaluate the total squared difference at a point (i.e., a set of polynomial coefficients).
 double[] gf(double[] a)
          Evaluate the gradient of the function at a point (i.e., a set of polynomial coefficients).
 double[][] hf(double[] a)
          Evaluate the Hessian of the function at a point (i.e., a set of polynomial coefficients).
 
Methods inherited from class org.gersteinlab.regulation.numeric.DoublyDifferentiableMultivariateFunction
hf
 
Methods inherited from class org.gersteinlab.regulation.numeric.DifferentiableMultivariateFunction
gf
 
Methods inherited from class org.gersteinlab.regulation.numeric.MultivariateFunction
f, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolynomialSqrDiff

public PolynomialSqrDiff(double[] tIn,
                         double[] yIn)
Create the function with the given set of points and target values.

Parameters:
tIn - The points
yIn - The target values
Method Detail

f

public double f(double[] a)
Evaluate the total squared difference at a point (i.e., a set of polynomial coefficients).

Overrides:
f in class MultivariateFunction
Parameters:
a - The coefficients
Returns:
The squred difference

gf

public double[] gf(double[] a)
Evaluate the gradient of the function at a point (i.e., a set of polynomial coefficients).

Overrides:
gf in class DifferentiableMultivariateFunction
Parameters:
a - The point
Returns:
The gradient of the function at the point

hf

public double[][] hf(double[] a)
Evaluate the Hessian of the function at a point (i.e., a set of polynomial coefficients).

Overrides:
hf in class DoublyDifferentiableMultivariateFunction
Parameters:
a - The point
Returns:
The Hessian of the function at the point