|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.ode.jacobians.FirstOrderIntegratorWithJacobians.FiniteDifferencesWrapper
private class FirstOrderIntegratorWithJacobians.FiniteDifferencesWrapper
Wrapper class to compute jacobians by finite differences for ODE which do not compute them themselves.
Field Summary | |
---|---|
private double[] |
hP
Step sizes to use for computing the jacobian df/dp. |
private double[] |
hY
Step sizes to use for computing the jacobian df/dy. |
private ParameterizedODE |
ode
Raw ODE without jacobians computation. |
private double[] |
p
Parameters array (may be null if parameters dimension from original problem is zero) |
private double[] |
tmpDot
Temporary array for state derivatives used to compute jacobians. |
Constructor Summary | |
---|---|
FirstOrderIntegratorWithJacobians.FiniteDifferencesWrapper(ParameterizedODE ode,
double[] p,
double[] hY,
double[] hP)
Simple constructor. |
Method Summary | |
---|---|
void |
computeDerivatives(double t,
double[] y,
double[] yDot)
Get the current time derivative of the state vector. |
void |
computeJacobians(double t,
double[] y,
double[] yDot,
double[][] dFdY,
double[][] dFdP)
Compute the partial derivatives of ODE with respect to state. |
int |
getDimension()
Get the dimension of the problem. |
int |
getParametersDimension()
Get the number of parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final ParameterizedODE ode
private final double[] p
private final double[] hY
private final double[] hP
private final double[] tmpDot
Constructor Detail |
---|
public FirstOrderIntegratorWithJacobians.FiniteDifferencesWrapper(ParameterizedODE ode, double[] p, double[] hY, double[] hP)
ode
- original ODE problem, without jacobians computationsp
- parameters array (may be null if parameters dimension from original problem is zero)hY
- step sizes to use for computing the jacobian df/dyhP
- step sizes to use for computing the jacobian df/dpMethod Detail |
---|
public int getDimension()
getDimension
in interface FirstOrderDifferentialEquations
public void computeDerivatives(double t, double[] y, double[] yDot) throws DerivativeException
computeDerivatives
in interface FirstOrderDifferentialEquations
t
- current value of the independent time variabley
- array containing the current value of the state vectoryDot
- placeholder array where to put the time derivative of the state vector
DerivativeException
- this exception is propagated to the caller if the
underlying user function triggers onepublic int getParametersDimension()
getParametersDimension
in interface ODEWithJacobians
public void computeJacobians(double t, double[] y, double[] yDot, double[][] dFdY, double[][] dFdP) throws DerivativeException
computeJacobians
in interface ODEWithJacobians
t
- current value of the independent time variabley
- array containing the current value of the state vectoryDot
- array containing the current value of the time derivative of the state vectordFdY
- placeholder array where to put the jacobian of the ODE with respect to the state vectordFdP
- placeholder array where to put the jacobian of the ODE with respect to the parameters
DerivativeException
- this exception is propagated to the caller if the
underlying user function triggers one
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |