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>

Type Parameters:
V - the type of FeatureVector implemented by a subclass
N - the type of the attribute values
All Superinterfaces:
DatabaseObject, SpatialComparable, SpatialObject
All Known Implementing Classes:
BitVector, DoubleVector, FloatVector, NumberVector, ParameterizationFunction, RealVector, SparseFloatVector

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 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 FeatureVector of V.
 N getValue(int dimension)
          Returns the value in the specified dimension.
 V multiplicate(double k)
          Returns a new FeatureVector of V that is the result of a scalar multiplication with the given scalar.
 V negativeVector()
          Returns the additive inverse to this FeatureVector of V.
 V newInstance(List<N> values)
          Returns a new FeatureVector of V for the given values.
 V newInstance(N[] values)
          Returns a new FeatureVector of V for the given values.
 V nullVector()
          Provides a null vector of the same Feature Vector Space as this FeatureVector of V (that is, of the same dimensionality).
 V plus(V fv)
          Returns a new FeatureVector of V that is the sum of this FeatureVector of V and the given FeatureVector of V.
 V randomInstance(N min, N max, Random random)
          Returns a FeatureVector of V with random values between min and max.
 V randomInstance(Random random)
          Returns a FeatureVector of V with uniformly distributed (0-1) random values.
 V randomInstance(V min, V max, Random random)
          Returns a FeatureVector of V with random values between min and max.
 String toString()
          Returns a String representation of the FeatureVector of V 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)
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<N> 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

randomInstance

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

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

randomInstance

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

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

randomInstance

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

Parameters:
min - minimum of random value for each axis
max - maximum of random value for each axis
random - a random instance
Returns:
a FeatureVector of V with random values between min and max

getDimensionality

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

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

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 of V.

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

getRowVector

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

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

plus

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

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

nullVector

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

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

negativeVector

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

Returns:
the additive inverse to this FeatureVector of V

multiplicate

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

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

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

Release 0.2 (2009-07-06_1820)