Class FeatureVectorAdapter<F>
- java.lang.Object
-
- elki.utilities.datastructures.arraylike.FeatureVectorAdapter<F>
-
- Type Parameters:
F
- Feature type
- All Implemented Interfaces:
ArrayAdapter<F,FeatureVector<F>>
public final class FeatureVectorAdapter<F> extends java.lang.Object implements ArrayAdapter<F,FeatureVector<F>>
Adapter to use a feature vector as an array of features.Use the static instance from
ArrayLikeUtil
!- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description static FeatureVectorAdapter<?>
STATIC
Static instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
FeatureVectorAdapter()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description F
get(FeatureVector<F> array, int off)
Get the off'th item from the array.int
size(FeatureVector<F> array)
Get the size of the array.
-
-
-
Field Detail
-
STATIC
public static final FeatureVectorAdapter<?> STATIC
Static instance.
-
-
Constructor Detail
-
FeatureVectorAdapter
private FeatureVectorAdapter()
Constructor.Use the static instance from
ArrayLikeUtil
!
-
-
Method Detail
-
size
public int size(FeatureVector<F> array)
Description copied from interface:ArrayAdapter
Get the size of the array.- Specified by:
size
in interfaceArrayAdapter<F,FeatureVector<F>>
- Parameters:
array
- Array-like thing- Returns:
- Size
-
get
public F get(FeatureVector<F> array, int off)
Description copied from interface:ArrayAdapter
Get the off'th item from the array.- Specified by:
get
in interfaceArrayAdapter<F,FeatureVector<F>>
- Parameters:
array
- Array to get fromoff
- Offset- Returns:
- Item at offset off
-
-