SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.differentiation.multivariate
Class JacobianFunction

java.lang.Object
  extended by com.numericalmethod.suanshu.analysis.differentiation.multivariate.JacobianFunction
All Implemented Interfaces:
Function, RntoMatrix

public class JacobianFunction
extends java.lang.Object
implements RntoMatrix

Compute the Jacobian function, J(x), for a real vector-valued function f(x).

The Jacobian function evaluates the Jacobian matrix at a point using a numerical method, e.g., finite difference. J(x) has the same domain as f(x).


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.analysis.function.Function
Function.EvaluationException
 
Field Summary
 RealVectorFunction f
          the real vector function to compute the Jacobian for
 
Constructor Summary
JacobianFunction(RealVectorFunction f)
          Construct a JacobianFunction to compute the Jacobian numerically.
 
Method Summary
 int dimension4Domain()
          Get the number of variables of the function.
 int dimension4Range()
          Get the dimension of the range space the function.
 Matrix evaluate(double... x)
          Compute J(x).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

f

public final RealVectorFunction f
the real vector function to compute the Jacobian for

Constructor Detail

JacobianFunction

public JacobianFunction(RealVectorFunction f)
Construct a JacobianFunction to compute the Jacobian numerically.

Parameters:
f - a real scalar function
Method Detail

evaluate

public Matrix evaluate(double... x)
Compute J(x). A RntoMatrix function, f, takes a double array double[],
{x0, x1, ..., xn}
and maps it to a Matrix,
M = f(x0, x1, ..., xn)

Specified by:
evaluate in interface RntoMatrix
Parameters:
x - a point x
Returns:
J(x)

dimension4Domain

public int dimension4Domain()
Description copied from interface: Function
Get the number of variables of the function.

For example, for a univariate function, the domain dimension is 1. For a bivariate function, the domain dimension is 2.

Specified by:
dimension4Domain in interface Function
Returns:
the number of variables

dimension4Range

public int dimension4Range()
Description copied from interface: Function
Get the dimension of the range space the function.

For example, for a Rn->Rm function, the dimension of the range is m.

Specified by:
dimension4Range in interface Function
Returns:
the dimension of the range

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.