Interface SortedDoubles
-
- All Superinterfaces:
Doubles
- All Known Subinterfaces:
SortedDoublesModifiable
- All Known Implementing Classes:
SortedDoublesArithmetic,SortedDoublesArray
public interface SortedDoubles extends Doubles
- Author:
- hogye
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContinuousIndexcontinuousIndexOf(double x)The continuous index at which x falls in this sequence.voidcontinuousIndexOf(double x, ContinuousIndex result)The continuous index at which x falls in this sequence.ContinuousIndexArraycontinuousIndicesOf(Doubles xs)For each x in xs, the continuous index at which x falls in this sequence.voidcontinuousIndicesOf(Doubles xs, ContinuousIndexArray result)For each x in xs, the continuous index at which x falls in this sequence.ContinuousIndexArraycontinuousIndicesOf(SortedDoubles xs)For each x in xs, the continuous index at which x falls in this sequence.voidcontinuousIndicesOf(SortedDoubles xs, ContinuousIndexArray result)For each x in xs, the continuous index at which x falls in this sequence.SortedDoublescopy()intindexAfter(double x)Smallest index whose value is greater than xintindexAtOrAfter(double x)Smallest index whose value is greater than or equal to xintindexAtOrBefore(double x)Largest index whose value is less than or equal to xintindexBefore(double x)Largest index whose value is less than xintindexNearest(double x)Index of the value closest to x.intindexOf(double x)Follows the convention ofArrays.binarySearch(double[], double): Ifxis contained in this sequence, returns the index ofxOtherwise, returns (-insertionPoint - 1)
-
-
-
Method Detail
-
indexOf
int indexOf(double x)
Follows the convention ofArrays.binarySearch(double[], double):- If
xis contained in this sequence, returns the index ofx - Otherwise, returns (-insertionPoint - 1)
- See Also:
Arrays.binarySearch(double[], double)
- If
-
indexNearest
int indexNearest(double x)
Index of the value closest to x. If the two closest values are x-C and x+C, returns the index of x+C. If doubles is empty, returns -1.
-
indexBefore
int indexBefore(double x)
Largest index whose value is less than x
-
indexAfter
int indexAfter(double x)
Smallest index whose value is greater than x
-
indexAtOrBefore
int indexAtOrBefore(double x)
Largest index whose value is less than or equal to x
-
indexAtOrAfter
int indexAtOrAfter(double x)
Smallest index whose value is greater than or equal to x
-
continuousIndexOf
void continuousIndexOf(double x, ContinuousIndex result)The continuous index at which x falls in this sequence.- See Also:
ContinuousIndex
-
continuousIndexOf
ContinuousIndex continuousIndexOf(double x)
The continuous index at which x falls in this sequence.- See Also:
ContinuousIndex
-
continuousIndicesOf
void continuousIndicesOf(Doubles xs, ContinuousIndexArray result)
For each x in xs, the continuous index at which x falls in this sequence.- See Also:
ContinuousIndexArray
-
continuousIndicesOf
ContinuousIndexArray continuousIndicesOf(Doubles xs)
For each x in xs, the continuous index at which x falls in this sequence.- See Also:
com.metsci.tracks.ContinuousIndexArray
-
continuousIndicesOf
void continuousIndicesOf(SortedDoubles xs, ContinuousIndexArray result)
For each x in xs, the continuous index at which x falls in this sequence. Since xs is sorted, this method may be faster thancontinuousIndicesOf(Doubles, ContinuousIndexArray)in some implementations.- See Also:
ContinuousIndexArray
-
continuousIndicesOf
ContinuousIndexArray continuousIndicesOf(SortedDoubles xs)
For each x in xs, the continuous index at which x falls in this sequence. Since xs is sorted, this method may be faster thancontinuousIndicesOf(Doubles)in some implementations.- See Also:
ContinuousIndexArray
-
copy
SortedDoubles copy()
-
-