public class SortedFloatsArray extends FloatsArray implements SortedFloatsModifiable
a, n
Constructor and Description |
---|
SortedFloatsArray() |
SortedFloatsArray(float[] a)
If the values of
a are not in ascending order, the behavior of
this instance is undefined. |
SortedFloatsArray(float[] a,
int n)
If the values of
a are not in ascending order, the behavior of
this instance is undefined. |
SortedFloatsArray(Floats xs)
If the values of
xs are not in ascending order, the behavior of
this instance is undefined. |
SortedFloatsArray(int n) |
Modifier and Type | Method and Description |
---|---|
int |
add(float v) |
ContinuousIndex |
continuousIndexOf(float x)
The continuous index at which x falls in this sequence.
|
void |
continuousIndexOf(float x,
ContinuousIndex result)
The continuous index at which x falls in this sequence.
|
ContinuousIndexArray |
continuousIndicesOf(Floats xs)
For each x in xs, the continuous index at which x falls in this
sequence.
|
void |
continuousIndicesOf(Floats xs,
ContinuousIndexArray result)
For each x in xs, the continuous index at which x falls in this
sequence.
|
ContinuousIndexArray |
continuousIndicesOf(SortedFloats xs)
For each x in xs, the continuous index at which x falls in this
sequence.
|
void |
continuousIndicesOf(SortedFloats xs,
ContinuousIndexArray result)
For each x in xs, the continuous index at which x falls in this
sequence.
|
int |
indexAfter(float x)
Smallest index whose value is greater than x
|
int |
indexAtOrAfter(float x)
Smallest index whose value is greater than or equal to x
|
int |
indexAtOrBefore(float x)
Largest index whose value is less than or equal to x
|
int |
indexBefore(float x)
Largest index whose value is less than x
|
int |
indexNearest(float x)
Index of the value closest to x.
|
int |
indexOf(float x)
Follows the convention of
Arrays.binarySearch(float[], float) :
If x is contained in this sequence, returns the index of x
Otherwise, returns (-insertionPoint - 1)
|
append, append, append, append, append, append, append, clear, compact, copyOf, copyOf, copyTo, copyTo, copyTo, ensureCapacity, first, insert, insert, insert, insert, insert, insert, insert, isEmpty, last, n, newArray, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepForAppend, prepForInsert, prepForPrepend, remove, removeIndex, removeRange, set, set, set, v
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, append, append, append, append, append, append, clear, compact, ensureCapacity, insert, insert, insert, insert, insert, insert, insert, prepend, prepend, prepend, prepend, prepend, prepend, prepend, remove, removeIndex, removeRange, set, set, set
public SortedFloatsArray(float[] a)
a
are not in ascending order, the behavior of
this instance is undefined.
For efficiency, does not clone the array arg.public SortedFloatsArray(int n)
public SortedFloatsArray()
public SortedFloatsArray(float[] a, int n)
a
are not in ascending order, the behavior of
this instance is undefined.
For efficiency, does not clone the array arg.public SortedFloatsArray(Floats xs)
xs
are not in ascending order, the behavior of
this instance is undefined.
Clones the sequence arg.public int indexOf(float x)
SortedFloats
Arrays.binarySearch(float[], float)
:
x
is contained in this sequence, returns the index of x
indexOf
in interface SortedFloats
Arrays.binarySearch(float[], float)
public int indexNearest(float x)
SortedFloats
indexNearest
in interface SortedFloats
public int indexAfter(float x)
SortedFloats
indexAfter
in interface SortedFloats
public int indexAtOrAfter(float x)
SortedFloats
indexAtOrAfter
in interface SortedFloats
public int indexBefore(float x)
SortedFloats
indexBefore
in interface SortedFloats
public int indexAtOrBefore(float x)
SortedFloats
indexAtOrBefore
in interface SortedFloats
public void continuousIndexOf(float x, ContinuousIndex result)
SortedFloats
continuousIndexOf
in interface SortedFloats
RuntimeException
- if n is less than 2 and the exact value is not foundContinuousIndex
public ContinuousIndex continuousIndexOf(float x)
SortedFloats
continuousIndexOf
in interface SortedFloats
RuntimeException
- if n is less than 2 and the exact value is not foundContinuousIndex
public void continuousIndicesOf(Floats xs, ContinuousIndexArray result)
SortedFloats
continuousIndicesOf
in interface SortedFloats
RuntimeException
- if n is less than 2ContinuousIndexArray
public ContinuousIndexArray continuousIndicesOf(Floats xs)
SortedFloats
continuousIndicesOf
in interface SortedFloats
RuntimeException
- if n is less than 2com.metsci.tracks.ContinuousIndexArray
public void continuousIndicesOf(SortedFloats xs, ContinuousIndexArray result)
SortedFloats
SortedFloats.continuousIndicesOf(Floats, ContinuousIndexArray)
in some implementations.continuousIndicesOf
in interface SortedFloats
RuntimeException
- if n is less than 2ContinuousIndexArray
public ContinuousIndexArray continuousIndicesOf(SortedFloats xs)
SortedFloats
SortedFloats.continuousIndicesOf(Floats)
in some implementations.continuousIndicesOf
in interface SortedFloats
RuntimeException
- if n is less than 2ContinuousIndexArray
public int add(float v)
add
in interface SortedFloatsModifiable
Copyright © 2018 Metron, Inc.. All rights reserved.