com.metsci.glimpse.util.primitives.sorted

## Interface SortedDoubles

• ### Method Summary

All Methods
Modifier and Type Method and Description
`ContinuousIndex` `continuousIndexOf(double x)`
The continuous index at which x falls in this sequence.
`void` ```continuousIndexOf(double x, ContinuousIndex result)```
The continuous index at which x falls in this sequence.
`ContinuousIndexArray` `continuousIndicesOf(Doubles xs)`
For each x in xs, the continuous index at which x falls in this sequence.
`void` ```continuousIndicesOf(Doubles xs, ContinuousIndexArray result)```
For each x in xs, the continuous index at which x falls in this sequence.
`ContinuousIndexArray` `continuousIndicesOf(SortedDoubles xs)`
For each x in xs, the continuous index at which x falls in this sequence.
`void` ```continuousIndicesOf(SortedDoubles xs, ContinuousIndexArray result)```
For each x in xs, the continuous index at which x falls in this sequence.
`int` `indexAfter(double x)`
Smallest index whose value is greater than x
`int` `indexAtOrAfter(double x)`
Smallest index whose value is greater than or equal to x
`int` `indexAtOrBefore(double x)`
Largest index whose value is less than or equal to x
`int` `indexBefore(double x)`
Largest index whose value is less than x
`int` `indexNearest(double x)`
Index of the value closest to x.
`int` `indexOf(double x)`
Follows the convention of `Arrays.binarySearch(double[], double)`: If `x` is contained in this sequence, returns the index of `x` Otherwise, returns (-insertionPoint - 1)
• ### Methods inherited from interface com.metsci.glimpse.util.primitives.Doubles

`copyOf, copyOf, copyTo, copyTo, copyTo, first, isEmpty, last, n, v`
• ### Method Detail

• #### 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.
`ContinuousIndex`
• #### continuousIndexOf

`ContinuousIndex continuousIndexOf(double x)`
The continuous index at which x falls in this sequence.
`ContinuousIndex`
• #### continuousIndicesOf

```void continuousIndicesOf(Doubles xs,
ContinuousIndexArray result)```
For each x in xs, the continuous index at which x falls in this sequence.
`ContinuousIndexArray`
`ContinuousIndexArray continuousIndicesOf(Doubles xs)`
`com.metsci.tracks.ContinuousIndexArray`