
public class ByteVector extends AbstractNumberVector
byte[] storage.| Modifier and Type | Class and Description |
|---|---|
static class |
ByteVector.Factory
Factory for Byte vectors.
|
static class |
ByteVector.ShortSerializer
Serialization class for dense Byte vectors with up to
Short.MAX_VALUE dimensions, by using a short for storing the
dimensionality. |
static class |
ByteVector.SmallSerializer
Serialization class for dense Byte vectors with up to 127 dimensions, by
using a byte for storing the dimensionality.
|
| Modifier and Type | Field and Description |
|---|---|
static ByteBufferSerializer<ByteVector> |
BYTE_SERIALIZER
Serializer for up to 127 dimensions.
|
static ByteBufferSerializer<ByteVector> |
SHORT_SERIALIZER
Serializer for up to 2^15-1 dimensions.
|
static ByteVector.Factory |
STATIC
Static instance (object factory).
|
private byte[] |
values
Keeps the values of the real vector.
|
ATTRIBUTE_SEPARATOR| Modifier | Constructor and Description |
|---|---|
|
ByteVector(byte[] values)
Create an ByteVector consisting of the given Byte values.
|
private |
ByteVector(byte[] values,
boolean nocopy)
Private constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte |
byteValue(int dimension)
Returns the value in the specified dimension as byte.
|
double |
doubleValue(int dimension)
Returns the value in the specified dimension as double.
|
Vector |
getColumnVector()
Returns a Vector representing in one column and
getDimensionality() rows the values of this NumberVector of V. |
int |
getDimensionality()
The dimensionality of the vector space where of this FeatureVector of V is
an element.
|
Byte |
getValue(int dimension)
Deprecated.
|
byte[] |
getValues()
Get a copy of the raw byte[] array.
|
long |
longValue(int dimension)
Returns the value in the specified dimension as long.
|
String |
toString()
Returns a String representation of the FeatureVector of V as a line that is
suitable to be printed in a sequential file.
|
floatValue, getMax, getMin, intValue, shortValuepublic static final ByteVector.Factory STATIC
public static final ByteBufferSerializer<ByteVector> BYTE_SERIALIZER
public static final ByteBufferSerializer<ByteVector> SHORT_SERIALIZER
private final byte[] values
private ByteVector(byte[] values,
boolean nocopy)
values - Value datanocopy - Flag to use without copying.public ByteVector(byte[] values)
values - the values to be set as values of the ByteVectorpublic int getDimensionality()
FeatureVector@Deprecated public Byte getValue(int dimension)
FeatureVectordimension - the desired dimension, where 0 ≤ dimension ≤
this.getDimensionality()-1public double doubleValue(int dimension)
NumberVectorgetValue(dim).doubleValue(), but usually this is much more
efficient due to boxing/unboxing cost.dimension - the desired dimension, where 0 ≤ dimension <
this.getDimensionality()public long longValue(int dimension)
NumberVectorgetValue(dim).longValue(), but usually this is much more efficient
due to boxing/unboxing cost.dimension - the desired dimension, where 0 ≤ dimension <
this.getDimensionality()public byte byteValue(int dimension)
NumberVectorgetValue(dim).byteValue(), but usually this is much more efficient
due to boxing/unboxing cost.byteValue in interface NumberVectorbyteValue in class AbstractNumberVectordimension - the desired dimension, where 0 ≤ dimension <
this.getDimensionality()public byte[] getValues()
public Vector getColumnVector()
NumberVectorgetDimensionality() rows the values of this NumberVector of V.getDimensionality() rows the values of this
NumberVector of Vpublic String toString()
FeatureVectortoString in interface FeatureVector<Number>toString in class ObjectCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.