T - the type of the field elementspublic class FieldEquationsMapper<T extends RealFieldElement<T>> extends Object implements Serializable
Instances of this class are guaranteed to be immutable.
FieldExpandableODE,
Serialized Form| Modifier and Type | Method and Description |
|---|---|
T[] |
extractEquationData(int index,
T[] 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,
T[] equationData,
T[] complete)
Insert equation data into a complete state or derivative array.
|
T[] |
mapDerivative(FieldODEStateAndDerivative<T> state)
Map a state derivative to a complete flat array.
|
T[] |
mapState(FieldODEState<T> state)
Map a state to a complete flat array.
|
FieldODEStateAndDerivative<T> |
mapStateAndDerivative(T t,
T[] y,
T[] 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 T[] mapState(FieldODEState<T> state)
state - state to mappublic T[] mapDerivative(FieldODEStateAndDerivative<T> state)
state - state to mappublic FieldODEStateAndDerivative<T> mapStateAndDerivative(T t, T[] y, T[] yDot) throws DimensionMismatchException
t - timey - state array to map, including primary and secondary componentsyDot - state derivative array to map, including primary and secondary componentsDimensionMismatchException - if an array does not match total dimensionpublic T[] extractEquationData(int index, T[] complete) throws MathIllegalArgumentException, DimensionMismatchException
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 rangeDimensionMismatchException - if complete state has not enough elementspublic void insertEquationData(int index,
T[] equationData,
T[] complete)
throws DimensionMismatchException
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)DimensionMismatchException - if either array has not enough elementsCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.