Package org.hipparchus.ode
Class ODEState
java.lang.Object
org.hipparchus.ode.ODEState
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ODEStateAndDerivative
Container for time, main and secondary state vectors.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected double[][]
copy
(double[][] original) Copy a two-dimensions array.double[]
Get complete state at time.int
Return the dimension of the complete set of equations.int
Get the number of secondary states.double[]
Get primary state at time.int
Get primary state dimension.double[]
getSecondaryState
(int index) Get secondary state at time.int
getSecondaryStateDimension
(int index) Get secondary state dimension.double
getTime()
Get time.
-
Constructor Details
-
ODEState
public ODEState(double time, double[] primaryState) Simple constructor.Calling this constructor is equivalent to call
ODEState(time, state, null)
.- Parameters:
time
- timeprimaryState
- primary state at time
-
ODEState
public ODEState(double time, double[] primaryState, double[][] secondaryState) Simple constructor.- Parameters:
time
- timeprimaryState
- state at timesecondaryState
- primary state at time (may be null)
-
-
Method Details
-
copy
protected double[][] copy(double[][] original) Copy a two-dimensions array.- Parameters:
original
- original array (may be null)- Returns:
- copied array or null if original array was null
-
getTime
public double getTime()Get time.- Returns:
- time
-
getPrimaryStateDimension
public int getPrimaryStateDimension()Get primary state dimension.- Returns:
- primary state dimension
- See Also:
-
getPrimaryState
public double[] getPrimaryState()Get primary state at time.- Returns:
- primary state at time
- See Also:
-
getNumberOfSecondaryStates
public int getNumberOfSecondaryStates()Get the number of secondary states.- Returns:
- number of secondary states.
-
getSecondaryStateDimension
public int getSecondaryStateDimension(int index) Get secondary state dimension.- Parameters:
index
- index of the secondary set as returned byExpandableODE.addSecondaryEquations(SecondaryODE)
(beware index 0 corresponds to primary state, secondary states start at 1)- Returns:
- secondary state dimension
- See Also:
-
getSecondaryState
public double[] getSecondaryState(int index) Get secondary state at time.- Parameters:
index
- index of the secondary set as returned byExpandableODE.addSecondaryEquations(SecondaryODE)
(beware index 0 corresponds to primary state, secondary states start at 1)- Returns:
- secondary state at time
- See Also:
-
getCompleteStateDimension
public int getCompleteStateDimension()Return the dimension of the complete set of equations.The complete set of equations correspond to the primary set plus all secondary sets.
- Returns:
- dimension of the complete set of equations
- See Also:
-
getCompleteState
public double[] getCompleteState()Get complete state at time.- Returns:
- complete state at time, starting with
primary state
, followed by allsecondary states
in increasing index order - See Also:
-