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 private
ProjectedNumberFeatureVectorAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Double
get(NumberVector array, int off)
Get the off'th item from the array.double
getDouble(NumberVector array, int off)
Get the off'th item from the array as double.long
getLong(NumberVector array, int off)
Get the off'th item from the array as long.int
size(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:ArrayAdapter
Get the size of the array.- Specified by:
size
in interfaceArrayAdapter<java.lang.Double,NumberVector>
- Specified by:
size
in 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:ArrayAdapter
Get the off'th item from the array.- Specified by:
get
in interfaceArrayAdapter<java.lang.Double,NumberVector>
- Specified by:
get
in 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:NumberArrayAdapter
Get the off'th item from the array as double.- Specified by:
getDouble
in 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:NumberArrayAdapter
Get the off'th item from the array as long.- Specified by:
getLong
in 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.
-
-