org.apache.commons.math3.ode

## Class EquationsMapper

• All Implemented Interfaces:
Serializable

public class EquationsMapper
extends Object
implements Serializable
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
Version:
$Id: EquationsMapper.java 1416643 2012-12-03 19:37:14Z tn$
SecondaryEquations, Serialized Form
• ### Constructor Summary

Constructors
Constructor and Description
EquationsMapper(int firstIndex, int dimension)
simple constructor.
• ### Method Summary

Methods
Modifier and Type Method and Description
void extractEquationData(double[] complete, double[] equationData)
Extract equation data from a complete state or derivative array.
int getDimension()
Get the dimension of the secondary state parameters.
int getFirstIndex()
Get the index of the first equation element in complete state arrays.
void insertEquationData(double[] equationData, double[] complete)
Insert equation data into a complete state or derivative array.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### EquationsMapper

public EquationsMapper(int firstIndex,
int dimension)
simple constructor.
Parameters:
firstIndex - index of the first equation element in complete state arrays
dimension - dimension of the secondary state parameters
• ### Method Detail

• #### getFirstIndex

public int getFirstIndex()
Get the index of the first equation element in complete state arrays.
Returns:
index of the first equation element in complete state arrays
• #### getDimension

public int getDimension()
Get the dimension of the secondary state parameters.
Returns:
dimension of the secondary state parameters
• #### extractEquationData

public void extractEquationData(double[] complete,
double[] equationData)
throws DimensionMismatchException
Extract equation data from a complete state or derivative array.
Parameters:
complete - complete state or derivative array from which equation data should be retrieved
equationData - placeholder where to put equation data
Throws:
DimensionMismatchException - if the dimension of the equation data does not match the mapper dimension
• #### insertEquationData

public void insertEquationData(double[] equationData,
double[] complete)
throws DimensionMismatchException
Insert equation data into a complete state or derivative array.
Parameters:
equationData - equation data to be inserted into the complete array
complete - placeholder where to put equation data (only the part corresponding to the equation will be overwritten)
Throws:
DimensionMismatchException - if the dimension of the equation data does not match the mapper dimension