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 FirstOrderDifferentialEquationsBasic FODE without parameter. -
Constructor Summary
ConstructorsConstructorDescriptionSimple constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidcomputeDerivatives(double t, double[] y, double[] yDot) Get the current time derivative of the state vector of the underlying FODE.intGet the dimension of the underlying FODE.doublegetParameter(String name) Get parameter value from its name.Get the names of the supported parameters.booleanisSupported(String name) Check if a parameter is supported.voidsetParameter(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:
getParametersNamesin interfaceParameterizable- Returns:
- parameters names
- See Also:
-
isSupported
Check if a parameter is supported.Supported parameters are those listed by
Parameterizable.getParametersNames().- Specified by:
isSupportedin 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:
getParameterin 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:
setParameterin interfaceParameterizedODE- Parameters:
name- parameter namevalue- parameter value
-