public class RecordSegmentSearchIndex extends AbstractSearchIndex
ISearchIndex.SearchIndexIntervalConvention
convention, iMax, iMin, tab
Constructor and Description |
---|
RecordSegmentSearchIndex(ISearchIndex searchAlgorithm2)
Constructor of search index class with memorization of the last found index in order to optimize
the search and find the index quickly if it belongs to a close neighborhood of the last one (+/- 2 points).
|
Modifier and Type | Method and Description |
---|---|
int |
getIndex(double x)
Returns the index of x in a tab depending on the convention used.
|
int |
getIndex(double x,
int min,
int max)
Returns the index of x in the extracted tab [tab[iMin], tab[iMax]]
depending on the convention used.
|
int |
getIndexClosedOpen(double x)
Returns the index of x in a tab depending on the convention used.
|
int |
getIndexOpenClosed(double x)
Returns the index of x in a tab depending on the convention used.
|
void |
updateStencil()
The search algorithm is based on a four-point stencil.
|
getConvention, getTab
public RecordSegmentSearchIndex(ISearchIndex searchAlgorithm2)
searchAlgorithm2
- : the choice of algorithm is made directly through an instance of
a class that implements ISearchIndexpublic void updateStencil()
public int getIndexClosedOpen(double x)
x
- : the value to search.public int getIndexOpenClosed(double x)
x
- : the value to search.public int getIndex(double x)
x
- : the value to search.public int getIndex(double x, int min, int max)
x
- : the value to search.min
- : defines the lower bound of the tab for the search.max
- : defines the upper bound of the tab for the search.Copyright © 2023 CNES. All rights reserved.