public class EquationsMapper extends Object implements Serializable
Instances of this class are guaranteed to be immutable.
SecondaryODE
,
Serialized FormModifier and Type | Method and Description |
---|---|
double[] |
extractEquationData(int index,
double[] complete)
Extract equation data from a complete state or derivative array.
|
int |
getNumberOfEquations()
Get the number of equations mapped.
|
int |
getTotalDimension()
Return the dimension of the complete set of equations.
|
void |
insertEquationData(int index,
double[] equationData,
double[] complete)
Insert equation data into a complete state or derivative array.
|
ODEStateAndDerivative |
mapStateAndDerivative(double t,
double[] y,
double[] yDot)
Map flat arrays to a state and derivative.
|
public int getNumberOfEquations()
public int getTotalDimension()
The complete set of equations correspond to the primary set plus all secondary sets.
public ODEStateAndDerivative mapStateAndDerivative(double t, double[] y, double[] yDot) throws MathIllegalArgumentException
t
- timey
- state array to map, including primary and secondary componentsyDot
- state derivative array to map, including primary and secondary componentsMathIllegalArgumentException
- if an array does not match total dimensionpublic double[] extractEquationData(int index, double[] complete) throws MathIllegalArgumentException
index
- index of the equation, must be between 0 included and
getNumberOfEquations()
(excluded)complete
- complete state or derivative array from which
equation data should be retrievedMathIllegalArgumentException
- if index is out of rangeMathIllegalArgumentException
- if complete state has not enough elementspublic void insertEquationData(int index, double[] equationData, double[] complete) throws MathIllegalArgumentException
index
- index of the equation, must be between 0 included and
getNumberOfEquations()
(excluded)equationData
- equation data to be inserted into the complete arraycomplete
- placeholder where to put equation data (only the
part corresponding to the equation will be overwritten)MathIllegalArgumentException
- if either array has not enough elementsCopyright © 2016–2020 Hipparchus.org. All rights reserved.