T - the type of the field elementspublic class FieldEquationsMapper<T extends RealFieldElement<T>>
extends java.lang.Object
implements java.io.Serializable
Instances of this class are guaranteed to be immutable.
FieldExpandableODE,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID
Serializable UID.
|
private int[] |
start
Start indices of the components.
|
| Constructor and Description |
|---|
FieldEquationsMapper(FieldEquationsMapper<T> mapper,
int dimension)
Create a mapper by adding a new equation to another mapper.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
checkIndex(int index)
Check equation index.
|
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.
|
private static final long serialVersionUID
private final int[] start
FieldEquationsMapper(FieldEquationsMapper<T> mapper, int dimension)
The new equation will have index mapper.getNumberOfEquations(),
or 0 if mapper is null.
mapper - former mapper, with one equation less (null for first equation)dimension - dimension of the equation state vectorpublic 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 elementsprivate void checkIndex(int index)
throws MathIllegalArgumentException
index - index of the equation, must be between 0 included and
getNumberOfEquations() (excluded)MathIllegalArgumentException - if index is out of rangeCopyright (c) 2003-2017 Apache Software Foundation