Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

All Superinterfaces:
DatabaseObject, SpatialComparable, SpatialObject
All Known Implementing Classes:
BitVector, DoubleVector, FloatVector, NumberVector, ParameterizationFunction, RealVector, SparseDoubleVector

public interface FeatureVector<V extends FeatureVector<V,N>,N extends Number>
extends DatabaseObject, SpatialObject

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

Author:
Arthur Zimek

Method Summary
 Vector getColumnVector()
          Returns a Vector representing in one column and getDimensionality() rows the values of this FeatureVector.
 int getDimensionality()
          The dimensionality of the vector space whereof this FeatureVector is an element.
 Matrix getRowVector()
          Returns a Matrix representing in one row and getDimensionality() columns the values of this FeatureVector.
 N getValue(int dimension)
          Returns the value in the specified dimension.
 V multiplicate(double k)
          Returns a new FeatureVector that is the result of a scalar multiplication with the given scalar.
 V negativeVector()
          Returns the additive inverse to this FeatureVector.
 V newInstance(N[] values)
          Returns a new FeatureVector of T for the given values.
 V nullVector()
          Provides a null vector of the same Feature Vector Space as this FeatureVector (that is, of the same dimensionality).
 V plus(V fv)
          Returns a new FeatureVector that is the sum of this FeatureVector and the given FeatureVector.
 V randomInstance(N min, N max, Random random)
          Returns a FeatureVector of T with random values between min and max.
 V randomInstance(Random random)
          Returns a FeatureVector of T with uniformly distributed (0-1) random values.
 String toString()
          Returns a String representation of the FeatureVector as a line that is suitable to be printed in a sequential file.
 
Methods inherited from interface de.lmu.ifi.dbs.elki.data.DatabaseObject
equals, getID, setID
 
Methods inherited from interface de.lmu.ifi.dbs.elki.index.tree.spatial.SpatialObject
getID
 
Methods inherited from interface de.lmu.ifi.dbs.elki.index.tree.spatial.SpatialComparable
getMax, getMin
 

Method Detail

newInstance

V newInstance(N[] values)
                                         throws SecurityException,
                                                NoSuchMethodException,
                                                IllegalArgumentException,
                                                InstantiationException,
                                                IllegalAccessException,
                                                InvocationTargetException
Returns a new FeatureVector of T for the given values.

Parameters:
values - the values of the featureVector
Returns:
a new FeatureVector of T for the given values
Throws:
NoSuchMethodException
SecurityException
InvocationTargetException
IllegalAccessException
InstantiationException
IllegalArgumentException

randomInstance

V randomInstance(Random random)
Returns a FeatureVector of T with uniformly distributed (0-1) random values.

Parameters:
random - a Random instance
Returns:
a FeatureVector of T with random values

randomInstance

V randomInstance(N min,
                 N max,
                 Random random)
Returns a FeatureVector of T with random values between min and max.

Parameters:
min - minimum of random value
max - maximu of random value
random - a random instance
Returns:
a FeatureVector of T with random values between min and max

getDimensionality

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

Specified by:
getDimensionality in interface SpatialComparable
Returns:
the number of dimensions of this FeatureVector

getValue

N 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

getColumnVector

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

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

getRowVector

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

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

plus

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

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

nullVector

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

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

negativeVector

V negativeVector()
Returns the additive inverse to this FeatureVector.

Returns:
the additive inverse to this FeatureVector

multiplicate

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

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

toString

String toString()
Returns a String representation of the FeatureVector 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

Release 0.1 (2008-07-10_1838)