Package org.hipparchus.ode
Class ODEStateAndDerivative
java.lang.Object
org.hipparchus.ode.ODEState
org.hipparchus.ode.ODEStateAndDerivative
- All Implemented Interfaces:
Serializable
Container for time, main and secondary state vectors as well as their derivatives.
-
Constructor Summary
ConstructorDescriptionODEStateAndDerivative
(double time, double[] primaryState, double[] primaryDerivative) Simple constructor.ODEStateAndDerivative
(double time, double[] primaryState, double[] primaryDerivative, double[][] secondaryState, double[][] secondaryDerivative) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Get complete derivative at time.double[]
Get derivative of the primary state at time.double[]
getSecondaryDerivative
(int index) Get derivative of the secondary state at time.Methods inherited from class org.hipparchus.ode.ODEState
copy, getCompleteState, getCompleteStateDimension, getNumberOfSecondaryStates, getPrimaryState, getPrimaryStateDimension, getSecondaryState, getSecondaryStateDimension, getTime
-
Constructor Details
-
ODEStateAndDerivative
public ODEStateAndDerivative(double time, double[] primaryState, double[] primaryDerivative) Simple constructor.Calling this constructor is equivalent to call
ODEStateAndDerivative(time, state, derivative, null, null)
.- Parameters:
time
- timeprimaryState
- primary state at timeprimaryDerivative
- derivative of the primary state at time
-
ODEStateAndDerivative
public ODEStateAndDerivative(double time, double[] primaryState, double[] primaryDerivative, double[][] secondaryState, double[][] secondaryDerivative) Simple constructor.- Parameters:
time
- timeprimaryState
- primary state at timeprimaryDerivative
- derivative of the primary state at timesecondaryState
- state at time (may be null)secondaryDerivative
- derivative of the state at time (may be null)
-
-
Method Details
-
getPrimaryDerivative
public double[] getPrimaryDerivative()Get derivative of the primary state at time.- Returns:
- derivative of the primary state at time
- See Also:
-
getSecondaryDerivative
public double[] getSecondaryDerivative(int index) Get derivative of the 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:
- derivative of the secondary state at time
- See Also:
-
getCompleteDerivative
public double[] getCompleteDerivative()Get complete derivative at time.- Returns:
- complete derivative at time, starting with
primary derivative
, followed by allsecondary derivatives
in increasing index order - See Also:
-