public class OneDimensionalDoubleVector extends AbstractNumberVector<OneDimensionalDoubleVector,Double>
Modifier and Type | Class and Description |
---|---|
static class |
OneDimensionalDoubleVector.Parameterizer
Parameterization class
|
Modifier and Type | Field and Description |
---|---|
static OneDimensionalDoubleVector |
STATIC
Static factory instance
|
(package private) double |
val
The actual data value
|
ATTRIBUTE_SEPARATOR
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.
|
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)
Returns the value in the specified dimension.
|
long |
longValue(int dimension)
Returns the value in the specified dimension as long.
|
<A> OneDimensionalDoubleVector |
newFeatureVector(A array,
ArrayAdapter<Double,A> adapter)
Returns a new FeatureVector of V for the given values.
|
<A> OneDimensionalDoubleVector |
newNumberVector(A array,
NumberArrayAdapter<?,A> adapter)
Instantiate from any number-array like object.
|
byteValue, equals, floatValue, getMax, getMin, hashCode, intValue, newNumberVector, shortValue
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
toString
public static final OneDimensionalDoubleVector STATIC
double val
public OneDimensionalDoubleVector(double val)
val
- Valuepublic int getDimensionality()
FeatureVector
public double doubleValue(int dimension)
NumberVector
getValue(dim).doubleValue()
, but usually this is much more
efficient due to boxing/unboxing cost.dimension
- the desired dimension, where 1 ≤ dimension ≤
this.getDimensionality()
public long longValue(int dimension)
NumberVector
getValue(dim).longValue()
, but usually this is much more efficient
due to boxing/unboxing cost.dimension
- the desired dimension, where 1 ≤ dimension ≤
this.getDimensionality()
public Double getValue(int dimension)
FeatureVector
dimension
- the desired dimension, where 1 ≤ dimension ≤
this.getDimensionality()
public Vector getColumnVector()
NumberVector
getDimensionality()
rows the values of this NumberVector of V.getDimensionality()
rows the values of this
NumberVector of Vpublic <A> OneDimensionalDoubleVector newFeatureVector(A array, ArrayAdapter<Double,A> adapter)
FeatureVector
A
- Array typearray
- the values of the featureVectoradapter
- adapter classpublic <A> OneDimensionalDoubleVector newNumberVector(A array, NumberArrayAdapter<?,A> adapter)
NumberVector
A
- Array typearray
- Arrayadapter
- Adapter