org.apache.commons.math3.ode
Class ParameterJacobianWrapper

java.lang.Object
  extended by org.apache.commons.math3.ode.ParameterJacobianWrapper
All Implemented Interfaces:
Parameterizable, ParameterJacobianProvider

 class ParameterJacobianWrapper
extends Object
implements ParameterJacobianProvider

Wrapper class to compute Jacobian matrices by finite differences for ODE which do not compute them by themselves.

Since:
3.0
Version:
$Id: ParameterJacobianWrapper.java 1244107 2012-02-14 16:17:55Z erans $

Field Summary
private  FirstOrderDifferentialEquations fode
          Main ODE set.
private  Map<String,Double> hParam
          Steps for finite difference computation of the Jacobian df/dp w.r.t.
private  ParameterizedODE pode
          Raw ODE without Jacobian computation skill to be wrapped into a ParameterJacobianProvider.
 
Constructor Summary
ParameterJacobianWrapper(FirstOrderDifferentialEquations fode, ParameterizedODE pode, ParameterConfiguration[] paramsAndSteps)
          Wrap a ParameterizedODE into a ParameterJacobianProvider.
 
Method Summary
 void computeParameterJacobian(double t, double[] y, double[] yDot, String paramName, double[] dFdP)
          Compute the Jacobian matrix of ODE with respect to one parameter.
 Collection<String> getParametersNames()
          Get the names of the supported parameters.
 boolean isSupported(String name)
          Check if a parameter is supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fode

private final FirstOrderDifferentialEquations fode
Main ODE set.


pode

private final ParameterizedODE pode
Raw ODE without Jacobian computation skill to be wrapped into a ParameterJacobianProvider.


hParam

private final Map<String,Double> hParam
Steps for finite difference computation of the Jacobian df/dp w.r.t. parameters.

Constructor Detail

ParameterJacobianWrapper

public ParameterJacobianWrapper(FirstOrderDifferentialEquations fode,
                                ParameterizedODE pode,
                                ParameterConfiguration[] paramsAndSteps)
Wrap a ParameterizedODE into a ParameterJacobianProvider.

Parameters:
fode - main first order differential equations set
pode - secondary problem, without parameter Jacobian computation skill
paramsAndSteps - parameters and steps to compute the Jacobians df/dp
See Also:
JacobianMatrices.setParameterStep(String, double)
Method Detail

getParametersNames

public Collection<String> getParametersNames()
Get the names of the supported parameters.

Specified by:
getParametersNames in interface Parameterizable
Returns:
parameters names
See Also:
Parameterizable.isSupported(String)

isSupported

public boolean isSupported(String name)
Check if a parameter is supported.

Supported parameters are those listed by Parameterizable.getParametersNames().

Specified by:
isSupported in interface Parameterizable
Parameters:
name - parameter name to check
Returns:
true if the parameter is supported
See Also:
Parameterizable.getParametersNames()

computeParameterJacobian

public void computeParameterJacobian(double t,
                                     double[] y,
                                     double[] yDot,
                                     String paramName,
                                     double[] dFdP)
Compute the Jacobian matrix of ODE with respect to one parameter.

The parameter must be one given by Parameterizable.getParametersNames().

Specified by:
computeParameterJacobian in interface ParameterJacobianProvider
Parameters:
t - current value of the independent time variable
y - array containing the current value of the main state vector
yDot - array containing the current value of the time derivative of the main state vector
paramName - name of the parameter to consider
dFdP - placeholder array where to put the Jacobian matrix of the ODE with respect to the parameter


Copyright (c) 2003-2013 Apache Software Foundation