public static class PrimitiveVector.Float extends PrimitiveVector
PrimitiveVector.Double, PrimitiveVector.Float, PrimitiveVector.Integer, PrimitiveVector.Long
Modifier and Type | Method and Description |
---|---|
void |
add(double[] x) |
void |
add(double[] x,
int start,
int len) |
void |
add(float x) |
void |
add(float[] x) |
void |
add(float[] x,
int start,
int len) |
void |
add(float x,
float y) |
void |
add(float x,
float y,
float z) |
int |
capacity()
Returns the size of the underlying array.
|
double |
get(int i) |
double |
getAsDouble(int i) |
float[] |
getCopiedData() |
float[] |
getUnderlyingData() |
void |
removeAll()
Removes all elements from the vector.
|
int |
size()
Returns the number of elements stored in this array.
|
void |
trimToSize()
Copies the data into a new underlying array of minimum sufficient size.
|
public final void add(float x)
public final void add(float x, float y)
public final void add(float x, float y, float z)
public final void add(float[] x)
public final void add(double[] x)
public final void add(float[] x, int start, int len)
public final void add(double[] x, int start, int len)
public final float[] getUnderlyingData()
public final float[] getCopiedData()
public final double get(int i)
public final int size()
PrimitiveVector
public final int capacity()
PrimitiveVector
public final double getAsDouble(int i)
public void removeAll()
PrimitiveVector
public void trimToSize()
PrimitiveVector
Typically there will be unused slots in the underlying array,
causing the PrimitiveVector
to use more memory than
necessary. Calling this function eliminates this overhead; however,
calling it too often will reduce performance.
Copyright © 2018 Metron, Inc.. All rights reserved.