public class SortedDoubleVector extends Object
Modifier and Type | Field and Description |
---|---|
static EPTypeClass |
EPTYPE |
Constructor and Description |
---|
SortedDoubleVector()
Constructor.
|
SortedDoubleVector(ArrayList<Double> values) |
Modifier and Type | Method and Description |
---|---|
void |
add(double value)
Add a value to the collection.
|
void |
clear()
Clear out the collection.
|
protected int |
findInsertIndex(double value)
Returns the index into which to insert to.
|
double |
getValue(int index)
Returns the value at a given index.
|
ArrayList<Double> |
getValues()
Returns underlying ArrayList, for testing purposes only.
|
static SortedDoubleVector |
readPoints(DataInput input)
NOTE: Code-generation-invoked method, method name and parameter order matters
|
void |
remove(double value)
Remove a value from the collection.
|
int |
size()
Returns the number of items in the collection.
|
static void |
writePoints(DataOutput output,
SortedDoubleVector vector)
NOTE: Code-generation-invoked method, method name and parameter order matters
|
public static final EPTypeClass EPTYPE
public void clear()
public int size()
public double getValue(int index)
index
- for which to return value forpublic void add(double value)
value
- is the double-type value to addpublic void remove(double value)
value
- to removepublic ArrayList<Double> getValues()
protected int findInsertIndex(double value)
value
- to find insert indexpublic static void writePoints(DataOutput output, SortedDoubleVector vector) throws IOException
output
- outvector
- pointsIOException
- io errorpublic static SortedDoubleVector readPoints(DataInput input) throws IOException
input
- inputIOException
- io errorCopyright © 2005–2021. All rights reserved.