- Type Parameters:
N
- the type of the attribute values
- All Superinterfaces:
FeatureVector<N>
,SpatialComparable
- All Known Implementing Classes:
Vector
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
Modifier and TypeInterfaceDescriptionstatic interface
NumberVector.Factory<V extends NumberVector<? extends N>,
N extends Number> Factory API for this feature vector. -
Method Summary
Modifier and TypeMethodDescriptionbyte
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 andgetDimensionality()
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.Description copied from interface:FeatureVector
Returns the value in the specified dimension.- Specified by:
getValue
in interfaceFeatureVector<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 togetValue(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 togetValue(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 togetValue(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 togetValue(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 togetValue(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 togetValue(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 andgetDimensionality()
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
-