public class OneDimensionalDoubleVector extends AbstractNumberVector<OneDimensionalDoubleVector,Double>
Modifier and Type | Field and Description |
---|---|
(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.
|
Matrix |
getRowVector()
Returns a Matrix representing in one row and
getDimensionality() columns the values of this NumberVector of
V. |
Double |
getValue(int dimension)
Returns the value in the specified dimension.
|
long |
longValue(int dimension)
Returns the value in the specified dimension as long.
|
OneDimensionalDoubleVector |
minus(OneDimensionalDoubleVector fv)
Returns a new NumberVector of V that is the sum of this NumberVector of V
and the negativeVector() of given NumberVector of V.
|
OneDimensionalDoubleVector |
multiplicate(double k)
Returns a new NumberVector of V that is the result of a scalar
multiplication with the given scalar.
|
OneDimensionalDoubleVector |
negativeVector()
Returns the additive inverse to this NumberVector of V.
|
OneDimensionalDoubleVector |
newInstance(double[] values)
Returns a new NumberVector of N for the given values.
|
OneDimensionalDoubleVector |
newInstance(Double[] values)
Returns a new FeatureVector of V for the given values.
|
OneDimensionalDoubleVector |
newInstance(List<Double> values)
Returns a new FeatureVector of V for the given values.
|
OneDimensionalDoubleVector |
newInstance(Vector values)
Returns a new NumberVector of N for the given values.
|
OneDimensionalDoubleVector |
nullVector()
Provides a null vector of the same Vector Space as this NumberVector of V
(that is, of the same dimensionality).
|
OneDimensionalDoubleVector |
plus(OneDimensionalDoubleVector fv)
Returns a new NumberVector of V that is the sum of this NumberVector of V
and the given NumberVector of V.
|
Double |
scalarProduct(OneDimensionalDoubleVector fv)
Provides the scalar product (inner product) of this NumberVector of V and
the given NumberVector of V.
|
byteValue, equals, floatValue, getMax, getMin, hashCode, intValue, shortValue
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
toString
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 Matrix getRowVector()
NumberVector
getDimensionality()
columns the values of this NumberVector of
V.getDimensionality()
columns the values of this
NumberVector of Vpublic OneDimensionalDoubleVector nullVector()
NumberVector
public OneDimensionalDoubleVector negativeVector()
NumberVector
public OneDimensionalDoubleVector plus(OneDimensionalDoubleVector fv)
NumberVector
fv
- a NumberVector of V to be added to this NumberVector of Vpublic OneDimensionalDoubleVector minus(OneDimensionalDoubleVector fv)
NumberVector
fv
- a NumberVector of V to be subtracted to this NumberVector of Vpublic Double scalarProduct(OneDimensionalDoubleVector fv)
NumberVector
fv
- the NumberVector of V to compute the scalar product forpublic OneDimensionalDoubleVector multiplicate(double k)
NumberVector
k
- a scalar to multiply this NumberVector of V withpublic OneDimensionalDoubleVector newInstance(double[] values)
NumberVector
values
- the values of the NumberVectorpublic OneDimensionalDoubleVector newInstance(Vector values)
NumberVector
values
- the values of the NumberVectorpublic OneDimensionalDoubleVector newInstance(Double[] values)
FeatureVector
values
- the values of the featureVectorpublic OneDimensionalDoubleVector newInstance(List<Double> values)
FeatureVector
values
- the values of the featureVector