Package org.orekit.utils
Class FieldSortedListTrimmer
java.lang.Object
org.orekit.utils.FieldSortedListTrimmer
A trimmer for externally stored chronologically sorted lists.
- Since:
- 12.1
- Author:
- Evan Ward, Vincent Cucchietti
-
Constructor Summary
ConstructorsConstructorDescriptionFieldSortedListTrimmer(int neighborsSize) Create a new cache with the given neighbors size and data. -
Method Summary
Modifier and TypeMethodDescriptionintGet size of the list returned fromgetNeighborsSubList(FieldAbsoluteDate, List).<T extends FieldTimeStamped<K>,K extends CalculusFieldElement<K>>
List<T> getNeighborsSubList(FieldAbsoluteDate<K> central, List<T> data) Get the entries surrounding a central date.
-
Constructor Details
-
FieldSortedListTrimmer
public FieldSortedListTrimmer(int neighborsSize) Create a new cache with the given neighbors size and data.- Parameters:
neighborsSize- size of the list returned fromgetNeighborsSubList(FieldAbsoluteDate, List).
-
-
Method Details
-
getNeighborsSize
public int getNeighborsSize()Get size of the list returned fromgetNeighborsSubList(FieldAbsoluteDate, List).- Returns:
- size of the list returned from
getNeighborsSubList(FieldAbsoluteDate, List)
-
getNeighborsSubList
public <T extends FieldTimeStamped<K>,K extends CalculusFieldElement<K>> List<T> getNeighborsSubList(FieldAbsoluteDate<K> central, List<T> data) Get the entries surrounding a central date.If the central date is well within covered range, the returned array will be balanced with half the points before central date and half the points after it (depending on n parity, of course). If the central date is near the boundary, then the returned array will be unbalanced and will contain only the n earliest (or latest) entries. A typical example of the later case is leap seconds cache, since the number of leap seconds cannot be arbitrarily increased.
- Type Parameters:
T- the type of dataK- the type of the field elements- Parameters:
central- central datedata- complete list of entries (must be chronologically sorted)- Returns:
- entries surrounding the specified date (sublist of
data)
-