Top Description Fields Constructors Methods
org.apache.commons.math3.ode

pack-priv Class ParameterJacobianWrapper

extends Object
implements ParameterJacobianProvider
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.ode.ParameterJacobianProvider, org.apache.commons.math3.ode.Parameterizable
Imports
java.util.Arrays, .Collection, .HashMap, .Map, org.apache.commons.math3.exception.DimensionMismatchException, .MaxCountExceededException

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

Field Summary

Modifier and TypeField and Description
private final FirstOrderDifferentialEquations
fode

Main ODE set.

private final Map<String, Double>
hParam

Steps for finite difference computation of the Jacobian df/dp w.r.t. parameters.

private final ParameterizedODE
pode

Raw ODE without Jacobian computation skill to be wrapped into a ParameterJacobianProvider.

Constructor Summary

AccessConstructor and Description
pack-priv
ParameterJacobianWrapper(final FirstOrderDifferentialEquations
main first order differential equations set
fode
,
final ParameterizedODE
secondary problem, without parameter Jacobian computation skill
pode
,
final ParameterConfiguration[]
parameters and steps to compute the Jacobians df/dp
paramsAndSteps
)

Wrap a ParameterizedODE into a ParameterJacobianProvider.

Method Summary

Modifier and TypeMethod and Description
public void
computeParameterJacobian(double
current value of the independent time variable
t
,
double[]
array containing the current value of the main state vector
y
,
double[]
array containing the current value of the time derivative of the main state vector
yDot
,
String
name of the parameter to consider
paramName
,
double[]
placeholder array where to put the Jacobian matrix of the ODE with respect to the parameter
dFdP
)

Implements org.apache.commons.math3.ode.ParameterJacobianProvider.computeParameterJacobian.

Compute the Jacobian matrix of ODE with respect to one parameter.

public Collection<String>
getParametersNames()

Implements org.apache.commons.math3.ode.Parameterizable.getParametersNames.

Get the names of the supported parameters.

public boolean
isSupported(String
parameter name to check
name
)

Implements org.apache.commons.math3.ode.Parameterizable.isSupported.

Check if a parameter is supported.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fodeback to summary
private final FirstOrderDifferentialEquations fode

Main ODE set.

hParamback to summary
private final Map<String, Double> hParam

Steps for finite difference computation of the Jacobian df/dp w.r.t. parameters.

podeback to summary
private final ParameterizedODE pode

Raw ODE without Jacobian computation skill to be wrapped into a ParameterJacobianProvider.

Constructor Detail

ParameterJacobianWrapperback to summary
pack-priv ParameterJacobianWrapper(final FirstOrderDifferentialEquations fode, final ParameterizedODE pode, final ParameterConfiguration[] paramsAndSteps)

Wrap a ParameterizedODE into a ParameterJacobianProvider.

Parameters
fode:FirstOrderDifferentialEquations

main first order differential equations set

pode:ParameterizedODE

secondary problem, without parameter Jacobian computation skill

paramsAndSteps:ParameterConfiguration[]

parameters and steps to compute the Jacobians df/dp

See Also
JacobianMatrices#setParameterStep(String, double)

Method Detail

computeParameterJacobianback to summary
public void computeParameterJacobian(double t, double[] y, double[] yDot, String paramName, double[] dFdP) throws DimensionMismatchException, MaxCountExceededException

Implements org.apache.commons.math3.ode.ParameterJacobianProvider.computeParameterJacobian.

Doc from org.apache.commons.math3.ode.ParameterJacobianProvider.computeParameterJacobian.

Compute the Jacobian matrix of ODE with respect to one parameter.

If the parameter does not belong to the collection returned by getParametersNames(), the Jacobian will be set to 0, but no errors will be triggered.

Parameters
t:double

current value of the independent time variable

y:double[]

array containing the current value of the main state vector

yDot:double[]

array containing the current value of the time derivative of the main state vector

paramName:String

name of the parameter to consider

dFdP:double[]

placeholder array where to put the Jacobian matrix of the ODE with respect to the parameter

Exceptions
DimensionMismatchException:
if arrays dimensions do not match equations settings
MaxCountExceededException:
if the number of functions evaluations is exceeded
getParametersNamesback to summary
public Collection<String> getParametersNames()

Implements org.apache.commons.math3.ode.Parameterizable.getParametersNames.

Doc from org.apache.commons.math3.ode.Parameterizable.getParametersNames.

Get the names of the supported parameters.

Returns:Collection<String>

parameters names

isSupportedback to summary
public boolean isSupported(String name)

Implements org.apache.commons.math3.ode.Parameterizable.isSupported.

Doc from org.apache.commons.math3.ode.Parameterizable.isSupported.

Check if a parameter is supported.

Supported parameters are those listed by getParametersNames().

Parameters
name:String

parameter name to check

Returns:boolean

true if the parameter is supported