de.lmu.ifi.dbs.elki.data
Interface NumberVector<V extends NumberVector<? extends V,N>,N extends Number>

Type Parameters:
V - the type of NumberVector implemented by a subclass
N - the type of the attribute values
All Superinterfaces:
FeatureVector<V,N>, SpatialComparable
All Known Subinterfaces:
SparseNumberVector<V,N>
All Known Implementing Classes:
AbstractNumberVector, BitVector, DoubleVector, FloatVector, IntegerVector, OneDimensionalDoubleVector, ParameterizationFunction, SparseFloatVector

public interface NumberVector<V extends NumberVector<? extends V,N>,N extends Number>
extends FeatureVector<V,N>, SpatialComparable

Interface NumberVector defines the methods that should be implemented by any Object that is element of a real vector space of type N.


Method Summary
 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.
 float floatValue(int dimension)
          Returns the value in the specified dimension as float.
 Vector getColumnVector()
          Returns a Vector representing in one column and getDimensionality() rows the values of this NumberVector of V.
 Matrix getRowVector()
          Returns a Matrix representing in one row and getDimensionality() columns the values of this NumberVector of V.
 int intValue(int dimension)
          Returns the value in the specified dimension as int.
 long longValue(int dimension)
          Returns the value in the specified dimension as long.
 V minus(V fv)
          Returns a new NumberVector of V that is the sum of this NumberVector of V and the negativeVector() of given NumberVector of V.
 V multiplicate(double k)
          Returns a new NumberVector of V that is the result of a scalar multiplication with the given scalar.
 V negativeVector()
          Returns the additive inverse to this NumberVector of V.
 V newInstance(double[] values)
          Returns a new NumberVector of N for the given values.
 V newInstance(Vector values)
          Returns a new NumberVector of N for the given values.
 V nullVector()
          Provides a null vector of the same Vector Space as this NumberVector of V (that is, of the same dimensionality).
 V plus(V fv)
          Returns a new NumberVector of V that is the sum of this NumberVector of V and the given NumberVector of V.
 N scalarProduct(V fv)
          Provides the scalar product (inner product) of this NumberVector of V and the given NumberVector of V.
 short shortValue(int dimension)
          Returns the value in the specified dimension as short.
 
Methods inherited from interface de.lmu.ifi.dbs.elki.data.FeatureVector
getDimensionality, getValue, newInstance, newInstance, toString
 
Methods inherited from interface de.lmu.ifi.dbs.elki.data.spatial.SpatialComparable
getDimensionality, getMax, getMin
 

Method Detail

doubleValue

double doubleValue(int dimension)
Returns the value in the specified dimension as double. Note: this might seem redundant with respect to getValue(dim).doubleValue(), but usually this is much more efficient due to boxing/unboxing cost.

Parameters:
dimension - the desired dimension, where 1 ≤ dimension ≤ this.getDimensionality()
Returns:
the value in the specified dimension

floatValue

float floatValue(int dimension)
Returns the value in the specified dimension as float. Note: this might seem redundant with respect to getValue(dim).floatValue(), but usually this is much more efficient due to boxing/unboxing cost.

Parameters:
dimension - the desired dimension, where 1 ≤ dimension ≤ this.getDimensionality()
Returns:
the value in the specified dimension

intValue

int intValue(int dimension)
Returns the value in the specified dimension as int. Note: this might seem redundant with respect to getValue(dim).intValue(), but usually this is much more efficient due to boxing/unboxing cost.

Parameters:
dimension - the desired dimension, where 1 ≤ dimension ≤ this.getDimensionality()
Returns:
the value in the specified dimension

longValue

long longValue(int dimension)
Returns the value in the specified dimension as long. Note: this might seem redundant with respect to getValue(dim).longValue(), but usually this is much more efficient due to boxing/unboxing cost.

Parameters:
dimension - the desired dimension, where 1 ≤ dimension ≤ this.getDimensionality()
Returns:
the value in the specified dimension

shortValue

short shortValue(int dimension)
Returns the value in the specified dimension as short. Note: this might seem redundant with respect to getValue(dim).shortValue(), but usually this is much more efficient due to boxing/unboxing cost.

Parameters:
dimension - the desired dimension, where 1 ≤ dimension ≤ this.getDimensionality()
Returns:
the value in the specified dimension

byteValue

byte byteValue(int dimension)
Returns the value in the specified dimension as byte. Note: this might seem redundant with respect to getValue(dim).byteValue(), but usually this is much more efficient due to boxing/unboxing cost.

Parameters:
dimension - the desired dimension, where 1 ≤ dimension ≤ this.getDimensionality()
Returns:
the value in the specified dimension

getColumnVector

Vector getColumnVector()
Returns a Vector representing in one column and getDimensionality() rows the values of this NumberVector of V.

Returns:
a Matrix representing in one column and getDimensionality() rows the values of this NumberVector of V

getRowVector

Matrix getRowVector()
Returns a Matrix representing in one row and getDimensionality() columns the values of this NumberVector of V.

Returns:
a Matrix representing in one row and getDimensionality() columns the values of this NumberVector of V

nullVector

V nullVector()
Provides a null vector of the same Vector Space as this NumberVector of V (that is, of the same dimensionality).

Returns:
a null vector of the same Vector Space as this NumberVector of V (that is, of the same dimensionality)

negativeVector

V negativeVector()
Returns the additive inverse to this NumberVector of V.

Returns:
the additive inverse to this NumberVector of V

plus

V plus(V fv)
Returns a new NumberVector of V that is the sum of this NumberVector of V and the given NumberVector of V.

Parameters:
fv - a NumberVector of V to be added to this NumberVector of V
Returns:
a new NumberVector of V that is the sum of this NumberVector of V and the given NumberVector of V

minus

V minus(V fv)
Returns a new NumberVector of V that is the sum of this NumberVector of V and the negativeVector() of given NumberVector of V.

Parameters:
fv - a NumberVector of V to be subtracted to this NumberVector of V
Returns:
a new NumberVector of V that is the sum of this NumberVector of V and the negative of given NumberVector of V

scalarProduct

N scalarProduct(V fv)
Provides the scalar product (inner product) of this NumberVector of V and the given NumberVector of V.

Parameters:
fv - the NumberVector of V to compute the scalar product for
Returns:
the scalar product (inner product) of this and the given NumberVector of V

multiplicate

V multiplicate(double k)
Returns a new NumberVector of V that is the result of a scalar multiplication with the given scalar.

Parameters:
k - a scalar to multiply this NumberVector of V with
Returns:
a new NumberVector of V that is the result of a scalar multiplication with the given scalar

newInstance

V newInstance(double[] values)
Returns a new NumberVector of N for the given values.

Parameters:
values - the values of the NumberVector
Returns:
a new NumberVector of N for the given values

newInstance

V newInstance(Vector values)
Returns a new NumberVector of N for the given values.

Parameters:
values - the values of the NumberVector
Returns:
a new NumberVector of N for the given values

Release 0.4.0 (2011-09-20_1324)