Module math

Interface NumberVector<N extends Number>

Type Parameters:
N - the type of the attribute values
All Superinterfaces:
FeatureVector<N>, SpatialComparable
All Known Implementing Classes:
Vector

public interface NumberVector<N extends Number> extends FeatureVector<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.
Author:
Arthur Zimek
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    NumberVector.Factory<V extends NumberVector<? extends N>,N extends Number>
    Factory API for this feature vector.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    Returns a Vector representing in one column and getDimensionality() rows the values of this NumberVector of V.
    getValue(int dimension)
    Deprecated.
    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.
    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, toString

    Methods inherited from interface de.lmu.ifi.dbs.elki.data.spatial.SpatialComparable

    getDimensionality, getMax, getMin
  • Method Details

    • getValue

      @Deprecated N getValue(int dimension)
      Deprecated.
      Description copied from interface: FeatureVector
      Returns the value in the specified dimension.
      Specified by:
      getValue in interface FeatureVector<N extends Number>
      Parameters:
      dimension - the desired dimension, where 0 ≤ dimension ≤ this.getDimensionality()-1
      Returns:
      the value in the specified dimension
    • 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 0 ≤ 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 0 ≤ 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 0 ≤ 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 0 ≤ 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 0 ≤ 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 0 ≤ 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