|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.math3.utils.AbstractSearchIndex
public abstract class AbstractSearchIndex
Abstract class for index search algorithm with a coupled dichotomy-BinarySearch algorithms.
IMPORTANT: the tab passed in the constructor has to be sorted by increasing order. Duplicates are allowed. If this tab is not sorting, no exception will be thrown, but the results can be totally wrong.
Each implementation of this class defines a convention of SearchIndexIntervalConvention.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.commons.math3.utils.ISearchIndex |
---|
ISearchIndex.SearchIndexIntervalConvention |
Field Summary | |
---|---|
protected ISearchIndex.SearchIndexIntervalConvention |
convention
The convention for the definition of intervals. |
protected int |
iMax
The upper bound of tab to consider for the search index algorithm. |
protected int |
iMin
The lower bound of tab to consider for the search index algorithm. |
protected double[] |
tab
The values in with the search algorithm will be executed. |
Constructor Summary | |
---|---|
AbstractSearchIndex(double[] tab2)
Default constructor with default CLOSED_OPEN convention. |
|
AbstractSearchIndex(double[] tab2,
ISearchIndex.SearchIndexIntervalConvention searchIndexConvention)
Constructor with defined interval convention. |
Method Summary | |
---|---|
ISearchIndex.SearchIndexIntervalConvention |
getConvention()
Returns the convention that can be applied to the interval during the search index algorithm. |
double[] |
getTab()
Returns the array of values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.math3.utils.ISearchIndex |
---|
getIndex, getIndex |
Field Detail |
---|
protected double[] tab
protected int iMin
protected int iMax
protected ISearchIndex.SearchIndexIntervalConvention convention
Constructor Detail |
---|
public AbstractSearchIndex(double[] tab2)
tab2
- : a double[] array sorted by increasing order. Duplicates are allowed.public AbstractSearchIndex(double[] tab2, ISearchIndex.SearchIndexIntervalConvention searchIndexConvention)
tab2
- : a sorted double[]searchIndexConvention
- interval conventionMethod Detail |
---|
public double[] getTab()
getTab
in interface ISearchIndex
public ISearchIndex.SearchIndexIntervalConvention getConvention()
getConvention
in interface ISearchIndex
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |