Package elki.data.projection
Class FeatureSelection.ProjectedNumberFeatureVectorAdapter
- java.lang.Object
-
- elki.data.projection.FeatureSelection.ProjectedNumberFeatureVectorAdapter
-
- All Implemented Interfaces:
ArrayAdapter<java.lang.Double,NumberVector>,NumberArrayAdapter<java.lang.Double,NumberVector>
- Enclosing class:
- FeatureSelection<V extends FeatureVector<F>,F>
private class FeatureSelection.ProjectedNumberFeatureVectorAdapter extends java.lang.Object implements NumberArrayAdapter<java.lang.Double,NumberVector>
Adapter for generating number vectors without reboxing.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Modifier Constructor Description privateProjectedNumberFeatureVectorAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Doubleget(NumberVector array, int off)Get the off'th item from the array.doublegetDouble(NumberVector array, int off)Get the off'th item from the array as double.longgetLong(NumberVector array, int off)Get the off'th item from the array as long.intsize(NumberVector array)Get the size of the array.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.utilities.datastructures.arraylike.NumberArrayAdapter
getByte, getFloat, getInteger, getShort
-
-
-
-
Method Detail
-
size
public int size(NumberVector array)
Description copied from interface:ArrayAdapterGet the size of the array.- Specified by:
sizein interfaceArrayAdapter<java.lang.Double,NumberVector>- Specified by:
sizein interfaceNumberArrayAdapter<java.lang.Double,NumberVector>- Parameters:
array- Array-like thing- Returns:
- Size
-
get
public java.lang.Double get(NumberVector array, int off) throws java.lang.IndexOutOfBoundsException
Description copied from interface:ArrayAdapterGet the off'th item from the array.- Specified by:
getin interfaceArrayAdapter<java.lang.Double,NumberVector>- Specified by:
getin interfaceNumberArrayAdapter<java.lang.Double,NumberVector>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getDouble
public double getDouble(NumberVector array, int off) throws java.lang.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapterGet the off'th item from the array as double.- Specified by:
getDoublein interfaceNumberArrayAdapter<java.lang.Double,NumberVector>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getLong
public long getLong(NumberVector array, int off) throws java.lang.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapterGet the off'th item from the array as long.- Specified by:
getLongin interfaceNumberArrayAdapter<java.lang.Double,NumberVector>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
-