Top Description Fields Constructors Methods
org.apache.commons.math3.ode

public Class EquationsMapper

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, org.apache.commons.math3.exception.DimensionMismatchException

Class mapping the part of a complete state or derivative that pertains to a specific differential equation.

Instances of this class are guaranteed to be immutable.

Since
3.0
See Also
SecondaryEquations

Field Summary

Modifier and TypeField and Description
private final int
dimension

Dimension of the secondary state parameters.

private final int
firstIndex

Index of the first equation element in complete state arrays.

private static final long
serialVersionUID

Serializable UID.

Constructor Summary

AccessConstructor and Description
public
EquationsMapper(final int
index of the first equation element in complete state arrays
firstIndex
,
final int
dimension of the secondary state parameters
dimension
)

simple constructor.

Method Summary

Modifier and TypeMethod and Description
public void
extractEquationData(double[]
complete state or derivative array from which equation data should be retrieved
complete
,
double[]
placeholder where to put equation data
equationData
)

Extract equation data from a complete state or derivative array.

public int

Returns:

dimension of the secondary state parameters
getDimension
()

Get the dimension of the secondary state parameters.

public int

Returns:

index of the first equation element in complete state arrays
getFirstIndex
()

Get the index of the first equation element in complete state arrays.

public void
insertEquationData(double[]
equation data to be inserted into the complete array
equationData
,
double[]
placeholder where to put equation data (only the part corresponding to the equation will be overwritten)
complete
)

Insert equation data into a complete state or derivative array.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dimensionback to summary
private final int dimension

Dimension of the secondary state parameters.

firstIndexback to summary
private final int firstIndex

Index of the first equation element in complete state arrays.

serialVersionUIDback to summary
private static final long serialVersionUID

Serializable UID.

Constructor Detail

EquationsMapperback to summary
public EquationsMapper(final int firstIndex, final int dimension)

simple constructor.

Parameters
firstIndex:int

index of the first equation element in complete state arrays

dimension:int

dimension of the secondary state parameters

Method Detail

extractEquationDataback to summary
public void extractEquationData(double[] complete, double[] equationData) throws DimensionMismatchException

Extract equation data from a complete state or derivative array.

Parameters
complete:double[]

complete state or derivative array from which equation data should be retrieved

equationData:double[]

placeholder where to put equation data

Exceptions
DimensionMismatchException:
if the dimension of the equation data does not match the mapper dimension
getDimensionback to summary
public int getDimension()

Get the dimension of the secondary state parameters.

Returns:int

dimension of the secondary state parameters

getFirstIndexback to summary
public int getFirstIndex()

Get the index of the first equation element in complete state arrays.

Returns:int

index of the first equation element in complete state arrays

insertEquationDataback to summary
public void insertEquationData(double[] equationData, double[] complete) throws DimensionMismatchException

Insert equation data into a complete state or derivative array.

Parameters
equationData:double[]

equation data to be inserted into the complete array

complete:double[]

placeholder where to put equation data (only the part corresponding to the equation will be overwritten)

Exceptions
DimensionMismatchException:
if the dimension of the equation data does not match the mapper dimension