Package org.apache.commons.math3.ode
Class ParameterizedWrapper
java.lang.Object
org.apache.commons.math3.ode.ParameterizedWrapper
- All Implemented Interfaces:
Parameterizable
,ParameterizedODE
Wrapper class enabling
basic simple
ODE instances to be used when processing JacobianMatrices
.- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FirstOrderDifferentialEquations
Basic FODE without parameter. -
Constructor Summary
ConstructorsConstructorDescriptionSimple constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
computeDerivatives
(double t, double[] y, double[] yDot) Get the current time derivative of the state vector of the underlying FODE.int
Get the dimension of the underlying FODE.double
getParameter
(String name) Get parameter value from its name.Get the names of the supported parameters.boolean
isSupported
(String name) Check if a parameter is supported.void
setParameter
(String name, double value) Set the value for a given parameter.
-
Field Details
-
fode
Basic FODE without parameter.
-
-
Constructor Details
-
ParameterizedWrapper
ParameterizedWrapper(FirstOrderDifferentialEquations ode) Simple constructor.- Parameters:
ode
- original first order differential equations
-
-
Method Details
-
getDimension
public int getDimension()Get the dimension of the underlying FODE.- Returns:
- dimension of the underlying FODE
-
computeDerivatives
public void computeDerivatives(double t, double[] y, double[] yDot) throws MaxCountExceededException, DimensionMismatchException Get the current time derivative of the state vector of the underlying FODE.- Parameters:
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- Throws:
MaxCountExceededException
- if the number of functions evaluations is exceededDimensionMismatchException
- if arrays dimensions do not match equations settings
-
getParametersNames
Get the names of the supported parameters.- Specified by:
getParametersNames
in interfaceParameterizable
- Returns:
- parameters names
- See Also:
-
isSupported
Check if a parameter is supported.Supported parameters are those listed by
Parameterizable.getParametersNames()
.- Specified by:
isSupported
in interfaceParameterizable
- Parameters:
name
- parameter name to check- Returns:
- true if the parameter is supported
- See Also:
-
getParameter
Get parameter value from its name.- Specified by:
getParameter
in interfaceParameterizedODE
- Parameters:
name
- parameter name- Returns:
- parameter value
- Throws:
UnknownParameterException
- if parameter is not supported
-
setParameter
Set the value for a given parameter.- Specified by:
setParameter
in interfaceParameterizedODE
- Parameters:
name
- parameter namevalue
- parameter value
-