de.lmu.ifi.dbs.elki.data
Interface FeatureVector<V extends FeatureVector<? extends V,D>,D>

Type Parameters:
V - Vector class
D - Data type
All Known Subinterfaces:
NumberVector<V,N>, SparseFeatureVector<V,D>, SparseNumberVector<V,N>
All Known Implementing Classes:
AbstractNumberVector, BitVector, DoubleVector, FloatVector, IntegerVector, OneDimensionalDoubleVector, ParameterizationFunction, SparseFloatVector

public interface FeatureVector<V extends FeatureVector<? extends V,D>,D>

Generic FeatureVector class that can contain any type of data (i.e. numerical or categorical attributes). See NumberVector for vectors that actually store numerical features.


Method Summary
 int getDimensionality()
          The dimensionality of the vector space where of this FeatureVector of V is an element.
 D getValue(int dimension)
          Returns the value in the specified dimension.
 V newInstance(D[] values)
          Returns a new FeatureVector of V for the given values.
 V newInstance(List<D> values)
          Returns a new FeatureVector of V for the given values.
 String toString()
          Returns a String representation of the FeatureVector of V as a line that is suitable to be printed in a sequential file.
 

Method Detail

getDimensionality

int getDimensionality()
The dimensionality of the vector space where of this FeatureVector of V is an element.

Returns:
the number of dimensions of this FeatureVector of V

getValue

D getValue(int dimension)
Returns the value in the specified dimension.

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

toString

String toString()
Returns a String representation of the FeatureVector of V as a line that is suitable to be printed in a sequential file.

Overrides:
toString in class Object
Returns:
a String representation of the FeatureVector of V

newInstance

V newInstance(D[] values)
Returns a new FeatureVector of V for the given values.

Parameters:
values - the values of the featureVector
Returns:
a new FeatureVector of V for the given values

newInstance

V newInstance(List<D> values)
Returns a new FeatureVector of V for the given values.

Parameters:
values - the values of the featureVector
Returns:
a new FeatureVector of V for the given values

Release 0.4.0 (2011-09-20_1324)