Interface NumberVector
-
- All Superinterfaces:
FeatureVector<java.lang.Number>,SpatialComparable
- All Known Subinterfaces:
ClusterFeature,SparseNumberVector
- All Known Implementing Classes:
ALOCI.Node,BIRCHCF,BitVector,ByteVector,Centroid,DeLiCluLeafEntry,DoubleVector,FloatVector,IntegerVector,OneDimensionalDoubleVector,ProjectedCentroid,RdKNNLeafEntry,ShortVector,SparseByteVector,SparseDoubleVector,SparseFloatVector,SparseIntegerVector,SparseShortVector,SpatialPointLeafEntry,VIIFeature,VVIFeature,VVVFeature
public interface NumberVector extends FeatureVector<java.lang.Number>, SpatialComparable
Interface NumberVector defines the methods that should be implemented by any Object that is element of a real vector space of type N.- Since:
- 0.1
- Author:
- Arthur Zimek
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceNumberVector.Factory<V extends NumberVector>Factory API for this feature vector.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTRIBUTE_SEPARATORThe String to separate attribute values in a String that represents the values.static VectorFieldTypeInformation<NumberVector>FIELDInput type for algorithms that require number vector fields.static VectorFieldTypeInformation<NumberVector>FIELD_1DType request for two-dimensional number vectorsstatic VectorFieldTypeInformation<NumberVector>FIELD_2DType request for two-dimensional number vectorsstatic VectorTypeInformation<NumberVector>VARIABLE_LENGTHNumber vectors of variable length.-
Fields inherited from interface elki.data.FeatureVector
TYPE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default bytebyteValue(int dimension)Returns the value in the specified dimension as byte.doubledoubleValue(int dimension)Returns the value in the specified dimension as double.default floatfloatValue(int dimension)Returns the value in the specified dimension as float.default doublegetMax(int dimension)Returns the maximum coordinate at the specified dimension.default doublegetMin(int dimension)Returns the minimum coordinate at the specified dimension.default java.lang.NumbergetValue(int dimension)Deprecated.default intintValue(int dimension)Returns the value in the specified dimension as int.longlongValue(int dimension)Returns the value in the specified dimension as long.default shortshortValue(int dimension)Returns the value in the specified dimension as short.double[]toArray()Returns a double array copy of this vector.-
Methods inherited from interface elki.data.FeatureVector
getDimensionality, toString
-
Methods inherited from interface elki.data.spatial.SpatialComparable
getDimensionality
-
-
-
-
Field Detail
-
ATTRIBUTE_SEPARATOR
static final java.lang.String ATTRIBUTE_SEPARATOR
The String to separate attribute values in a String that represents the values.- See Also:
- Constant Field Values
-
VARIABLE_LENGTH
static final VectorTypeInformation<NumberVector> VARIABLE_LENGTH
Number vectors of variable length.
-
FIELD
static final VectorFieldTypeInformation<NumberVector> FIELD
Input type for algorithms that require number vector fields.
-
FIELD_1D
static final VectorFieldTypeInformation<NumberVector> FIELD_1D
Type request for two-dimensional number vectors
-
FIELD_2D
static final VectorFieldTypeInformation<NumberVector> FIELD_2D
Type request for two-dimensional number vectors
-
-
Method Detail
-
getValue
@Deprecated default java.lang.Number getValue(int dimension)
Deprecated.Description copied from interface:FeatureVectorReturns the value in the specified dimension.- Specified by:
getValuein interfaceFeatureVector<java.lang.Number>- Parameters:
dimension- the desired dimension, where 0 ≤ dimension ≤this.getDimensionality()-1- Returns:
- the value in the specified dimension
-
getMin
default double getMin(int dimension)
Description copied from interface:SpatialComparableReturns the minimum coordinate at the specified dimension.- Specified by:
getMinin interfaceSpatialComparable- Parameters:
dimension- the dimension for which the coordinate should be returned, where 0 ≤ dimension <getDimensionality()- Returns:
- the minimum coordinate at the specified dimension
-
getMax
default double getMax(int dimension)
Description copied from interface:SpatialComparableReturns the maximum coordinate at the specified dimension.- Specified by:
getMaxin interfaceSpatialComparable- Parameters:
dimension- the dimension for which the coordinate should be returned, where 0 ≤ dimension <getDimensionality()- Returns:
- the maximum coordinate at 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
default 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
default 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
default 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
default 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
-
toArray
double[] toArray()
Returns a double array copy of this vector.- Returns:
- Copy as
double[]
-
-