
public class DoubleVector extends AbstractNumberVector<Double>
| Modifier and Type | Class and Description | 
|---|---|
| static class  | DoubleVector.FactoryFactory for Double vectors. | 
| static class  | DoubleVector.ShortSerializerSerialization class for dense double vectors with up to
  Short.MAX_VALUEdimensions, by using a short for storing the
 dimensionality. | 
| static class  | DoubleVector.SmallSerializerSerialization class for dense double vectors with up to 127 dimensions, by
 using a byte for storing the dimensionality. | 
| static class  | DoubleVector.VariableSerializerSerialization class for variable dimensionality by using VarInt encoding. | 
| Modifier and Type | Field and Description | 
|---|---|
| static ByteBufferSerializer<DoubleVector> | BYTE_SERIALIZERSerializer for up to 127 dimensions. | 
| static DoubleVector.Factory | FACTORYStatic factory instance. | 
| static ByteBufferSerializer<DoubleVector> | SHORT_SERIALIZERSerializer for up to 2^15-1 dimensions. | 
| private double[] | valuesStores the values of the real vector. | 
| static ByteBufferSerializer<DoubleVector> | VARIABLE_SERIALIZERSerializer using varint encoding. | 
ATTRIBUTE_SEPARATOR| Modifier | Constructor and Description | 
|---|---|
|   | DoubleVector(double[] values)Provides a DoubleVector consisting of the given double values. | 
|   | DoubleVector(Double[] values)Provides a DoubleVector consisting of the given double values. | 
| private  | DoubleVector(double[] values,
            boolean nocopy)Private constructor. | 
|   | DoubleVector(List<Double> values)Provides a feature vector consisting of double values according to the
 given Double values. | 
|   | DoubleVector(Vector columnMatrix)Expects a matrix of one column. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
| Double | getValue(int dimension)Deprecated.  | 
| double[] | getValues()Get a copy of the raw double[] 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. | 
byteValue, floatValue, getMax, getMin, intValue, shortValuepublic static final DoubleVector.Factory FACTORY
public static final ByteBufferSerializer<DoubleVector> BYTE_SERIALIZER
public static final ByteBufferSerializer<DoubleVector> SHORT_SERIALIZER
public static final ByteBufferSerializer<DoubleVector> VARIABLE_SERIALIZER
private final double[] values
private DoubleVector(double[] values,
            boolean nocopy)
values - Values to usenocopy - Flag to not copy the arraypublic DoubleVector(List<Double> values)
values - the values to be set as values of the real vectorpublic DoubleVector(double[] values)
values - the values to be set as values of the DoubleVectorpublic DoubleVector(Double[] values)
values - the values to be set as values of the DoubleVectorpublic DoubleVector(Vector columnMatrix)
columnMatrix - a matrix of one columnpublic int getDimensionality()
FeatureVector@Deprecated public Double getValue(int dimension)
FeatureVectordimension - the desired dimension, where 1 ≤ dimension ≤
        this.getDimensionality()public 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 double[] 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<Double>toString in class Object