public class NumericalPropagationStateHistory extends Object
Constructor and Description |
---|
NumericalPropagationStateHistory(List<JulianDate> times,
List<double[]> states,
List<NumericalIntegrationInformation> integrationInfo,
PropagationStateConverter converter)
Initializes a new instance.
|
NumericalPropagationStateHistory(List<JulianDate> times,
List<double[]> states,
List<NumericalIntegrationInformation> integrationInfo,
PropagationStateConverter converter,
SortingFormat sortingFormat)
Initializes a new instance.
|
NumericalPropagationStateHistory(PropagationStateConverter converter,
boolean includeIntegrationInfo,
NumericalPropagationStateHistory... otherCollections)
Initializes a new instance.
|
NumericalPropagationStateHistory(PropagationStateConverter converter,
boolean includeIntegrationInfo,
SortingFormat sortingFormat,
NumericalPropagationStateHistory... otherCollections)
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
add(JulianDate time,
double[] state)
Add an entry to the end of the state history.
|
void |
add(JulianDate time,
double[] state,
NumericalIntegrationInformation info)
Add an entry to appropriate location in the state history.
|
int |
getCount()
Gets the number of entries in this collection.
|
<T> DateMotionCollection1<T> |
getDateMotionCollection(String id)
Gets a
DateMotionCollection1 of the given type based on a string identification
corresponding to either a PropagationStateElement or AuxiliaryStateElement . |
List<NumericalIntegrationInformation> |
getIntegrationInformation()
Gets the list of information about the integration process at each of the
Times (get ). |
SortingFormat |
getSortingFormat()
Gets the specifier for how the history is sorted.
|
List<double[]> |
getStates()
Gets the list of raw states.
|
List<JulianDate> |
getTimes()
Gets the list of times at which each set of data was recorded.
|
void |
remove(JulianDate time)
Removes entries associated with the specified time.
|
void |
removeAt(int index)
Remove entries at a given index.
|
public NumericalPropagationStateHistory(PropagationStateConverter converter, boolean includeIntegrationInfo, NumericalPropagationStateHistory... otherCollections)
converter
- A converter which contains the state and auxiliary output which can
convert the raw data.includeIntegrationInfo
- If this is true, the collection will contain a list of
information about the integration process at each step.otherCollections
- Other collections to combine into this one.public NumericalPropagationStateHistory(PropagationStateConverter converter, boolean includeIntegrationInfo, @Nonnull SortingFormat sortingFormat, NumericalPropagationStateHistory... otherCollections)
As duplicate entries are not allowed, in the event of a duplicate the entry from the latest
history in otherCollections
will take precedence.
converter
- A converter which contains the state and auxiliary output which can
convert the raw data.includeIntegrationInfo
- If this is true, the collection will contain a list of
information about the integration process at each step.sortingFormat
- The direction the parallel lists of Times
(get
) and
States
(get
) should be sorted.
The entries of the otherCollections
will be placed into this history object in that
order regardless of their own sorting format.otherCollections
- Other collections to combine into this one.public NumericalPropagationStateHistory(List<JulianDate> times, List<double[]> states, List<NumericalIntegrationInformation> integrationInfo, PropagationStateConverter converter)
SortingFormat
(get
) is set to
Forwards
.
For performance issues input validation is not done on construction. The times
and states
are assumed to be of the same length and sorted
forwards
.
times
- A list of times at which data was recorded.states
- A list of raw states recorded at each of the times
.integrationInfo
- A list of information about the integration process at each of the times
or null if no information was recorded.converter
- A converter which contains the state and auxiliary output which can
convert the raw data.public NumericalPropagationStateHistory(List<JulianDate> times, List<double[]> states, List<NumericalIntegrationInformation> integrationInfo, PropagationStateConverter converter, @Nonnull SortingFormat sortingFormat)
For performance issues input validation is not done on construction. The times
and states
are assumed to be of the same length and sorted as specified by
sortingFormat
.
times
- A list of times at which data was recorded.states
- A list of raw states recorded at each of the times
.integrationInfo
- A list of information about the integration process at each of the times
or null if no information was recorded.converter
- A converter which contains the state and auxiliary output which can
convert the raw data.sortingFormat
- The direction the parallel lists of times
and states
are sorted.public final List<JulianDate> getTimes()
public final List<double[]> getStates()
NumericalPropagationStateHistory.getDateMotionCollection(java.lang.String)
method.public final List<NumericalIntegrationInformation> getIntegrationInformation()
Times
(get
).@Nonnull public final SortingFormat getSortingFormat()
public final void add(@Nonnull JulianDate time, double[] state)
time
- The time of the data.state
- The raw state at the given time
.public final void add(@Nonnull JulianDate time, double[] state, NumericalIntegrationInformation info)
time
- The time of the data.state
- The raw state at the given time
.info
- The information about the integration process prior to the given time
.public final void remove(@Nonnull JulianDate time)
time
- The time to remove.public final void removeAt(int index)
index
- The index at which to remove entries.public final int getCount()
public final <T> DateMotionCollection1<T> getDateMotionCollection(String id)
DateMotionCollection1
of the given type based on a string identification
corresponding to either a PropagationStateElement
or AuxiliaryStateElement
.
The type must correspond to the type of the state element or it will throw an exception.T
- The type returned by the state element corresponding to the id
.id
- The string identifying the state element to use to convert the raw data.DateMotionCollection1
of the requested type from the requested state element.IllegalStateException
- Thrown if the type 'T' does not correspond to the
type returned by the requested state element.