public class OneDimensionalDoubleVector extends java.lang.Object implements NumberVector
| Modifier and Type | Class and Description |
|---|---|
static class |
OneDimensionalDoubleVector.Factory
Factory class.
|
| Modifier and Type | Field and Description |
|---|---|
static OneDimensionalDoubleVector.Factory |
STATIC
Static factory instance.
|
(package private) double |
val
The actual data value.
|
ATTRIBUTE_SEPARATOR, FIELD, FIELD_1D, FIELD_2D, VARIABLE_LENGTHTYPE| Constructor and Description |
|---|
OneDimensionalDoubleVector(double val)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
doubleValue(int dimension)
Returns the value in the specified dimension as double.
|
int |
getDimensionality()
The dimensionality of the vector space where of this FeatureVector of V is
an element.
|
long |
longValue(int dimension)
Returns the value in the specified dimension as long.
|
double[] |
toArray()
Returns a double array copy of this vector.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbyteValue, floatValue, getMax, getMin, getValue, intValue, shortValuetoStringpublic static final OneDimensionalDoubleVector.Factory STATIC
double val
public OneDimensionalDoubleVector(double val)
val - Valuepublic int getDimensionality()
FeatureVectorgetDimensionality in interface FeatureVector<java.lang.Number>getDimensionality in interface SpatialComparablepublic double doubleValue(int dimension)
NumberVectorgetValue(dim).doubleValue(), but usually this is much more
efficient due to boxing/unboxing cost.doubleValue in interface NumberVectordimension - 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.longValue in interface NumberVectordimension - the desired dimension, where 0 ≤ dimension <
this.getDimensionality()public double[] toArray()
NumberVectortoArray in interface NumberVectordouble[]Copyright © 2019 ELKI Development Team. License information.