com.metsci.glimpse.util.primitives.sorted
Interface SortedLongs

All Superinterfaces:
Longs
All Known Subinterfaces:
SortedLongsModifiable
All Known Implementing Classes:
SortedLongsArithmetic, SortedLongsArray

public interface SortedLongs
extends Longs

Author:
hogye

Method Summary
 ContinuousIndex continuousIndexOf(long x)
          The continuous index at which x falls in this sequence.
 void continuousIndexOf(long x, ContinuousIndex result)
          The continuous index at which x falls in this sequence.
 ContinuousIndexArray continuousIndicesOf(Longs xs)
          For each x in xs, the continuous index at which x falls in this sequence.
 void continuousIndicesOf(Longs xs, ContinuousIndexArray result)
          For each x in xs, the continuous index at which x falls in this sequence.
 ContinuousIndexArray continuousIndicesOf(SortedLongs xs)
          For each x in xs, the continuous index at which x falls in this sequence.
 void continuousIndicesOf(SortedLongs xs, ContinuousIndexArray result)
          For each x in xs, the continuous index at which x falls in this sequence.
 int indexAfter(long x)
          Smallest index whose value is greater than x
 int indexAtOrAfter(long x)
          Smallest index whose value is greater than or equal to x
 int indexAtOrBefore(long x)
          Largest index whose value is less than or equal to x
 int indexBefore(long x)
          Largest index whose value is less than x
 int indexNearest(long x)
          Index of the value closest to x.
 int indexOf(long x)
          Follows the convention of Arrays.binarySearch(long[], long): 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.Longs
copyOf, copyOf, copyTo, first, isEmpty, last, n, v
 

Method Detail

indexOf

int indexOf(long x)
Follows the convention of Arrays.binarySearch(long[], long):

See Also:
Arrays.binarySearch(long[], long)

indexNearest

int indexNearest(long 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 longs is empty, returns -1.


indexBefore

int indexBefore(long x)
Largest index whose value is less than x


indexAfter

int indexAfter(long x)
Smallest index whose value is greater than x


indexAtOrBefore

int indexAtOrBefore(long x)
Largest index whose value is less than or equal to x


indexAtOrAfter

int indexAtOrAfter(long x)
Smallest index whose value is greater than or equal to x


continuousIndexOf

void continuousIndexOf(long x,
                       ContinuousIndex result)
The continuous index at which x falls in this sequence.

See Also:
ContinuousIndex

continuousIndexOf

ContinuousIndex continuousIndexOf(long x)
The continuous index at which x falls in this sequence.

See Also:
ContinuousIndex

continuousIndicesOf

void continuousIndicesOf(Longs xs,
                         ContinuousIndexArray result)
For each x in xs, the continuous index at which x falls in this sequence.

See Also:
ContinuousIndexArray

continuousIndicesOf

ContinuousIndexArray continuousIndicesOf(Longs 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(SortedLongs 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 than continuousIndicesOf(Longs, ContinuousIndexArray) in some implementations.

See Also:
ContinuousIndexArray

continuousIndicesOf

ContinuousIndexArray continuousIndicesOf(SortedLongs 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 than continuousIndicesOf(Longs) in some implementations.

See Also:
ContinuousIndexArray


Copyright © 2012 Metron, Inc.. All Rights Reserved.