Class FloatArrayAdapter
- java.lang.Object
-
- elki.utilities.datastructures.arraylike.FloatArrayAdapter
-
- All Implemented Interfaces:
ArrayAdapter<java.lang.Float,float[]>,NumberArrayAdapter<java.lang.Float,float[]>
public class FloatArrayAdapter extends java.lang.Object implements NumberArrayAdapter<java.lang.Float,float[]>
Use afloat[]in the ArrayAdapter API.This class is generated from a code template.
- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description static FloatArrayAdapterSTATICStatic instance.
-
Constructor Summary
Constructors Modifier Constructor Description protectedFloatArrayAdapter()Private constructor - use the static instance inSTATIC!
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Floatget(float[] array, int off)Deprecated.bytegetByte(float[] array, int off)Get the off'th item from the array as byte.doublegetDouble(float[] array, int off)Get the off'th item from the array as double.floatgetFloat(float[] array, int off)Get the off'th item from the array as float.intgetInteger(float[] array, int off)Get the off'th item from the array as integer.longgetLong(float[] array, int off)Get the off'th item from the array as long.shortgetShort(float[] array, int off)Get the off'th item from the array as short.intsize(float[] array)Get the size of the array.
-
-
-
Field Detail
-
STATIC
public static final FloatArrayAdapter STATIC
Static instance.
-
-
Constructor Detail
-
FloatArrayAdapter
protected FloatArrayAdapter()
Private constructor - use the static instance inSTATIC!
-
-
Method Detail
-
size
public int size(float[] array)
Description copied from interface:ArrayAdapterGet the size of the array.- Specified by:
sizein interfaceArrayAdapter<java.lang.Float,float[]>- Specified by:
sizein interfaceNumberArrayAdapter<java.lang.Float,float[]>- Parameters:
array- Array-like thing- Returns:
- Size
-
get
@Deprecated public java.lang.Float get(float[] array, int off) throws java.lang.IndexOutOfBoundsExceptionDeprecated.Description copied from interface:ArrayAdapterGet the off'th item from the array.- Specified by:
getin interfaceArrayAdapter<java.lang.Float,float[]>- Specified by:
getin interfaceNumberArrayAdapter<java.lang.Float,float[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getDouble
public double getDouble(float[] array, int off) throws java.lang.IndexOutOfBoundsExceptionDescription copied from interface:NumberArrayAdapterGet the off'th item from the array as double.- Specified by:
getDoublein interfaceNumberArrayAdapter<java.lang.Float,float[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getFloat
public float getFloat(float[] array, int off) throws java.lang.IndexOutOfBoundsExceptionDescription copied from interface:NumberArrayAdapterGet the off'th item from the array as float.- Specified by:
getFloatin interfaceNumberArrayAdapter<java.lang.Float,float[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getInteger
public int getInteger(float[] array, int off) throws java.lang.IndexOutOfBoundsExceptionDescription copied from interface:NumberArrayAdapterGet the off'th item from the array as integer.- Specified by:
getIntegerin interfaceNumberArrayAdapter<java.lang.Float,float[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getShort
public short getShort(float[] array, int off) throws java.lang.IndexOutOfBoundsExceptionDescription copied from interface:NumberArrayAdapterGet the off'th item from the array as short.- Specified by:
getShortin interfaceNumberArrayAdapter<java.lang.Float,float[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getLong
public long getLong(float[] array, int off) throws java.lang.IndexOutOfBoundsExceptionDescription copied from interface:NumberArrayAdapterGet the off'th item from the array as long.- Specified by:
getLongin interfaceNumberArrayAdapter<java.lang.Float,float[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getByte
public byte getByte(float[] array, int off) throws java.lang.IndexOutOfBoundsExceptionDescription copied from interface:NumberArrayAdapterGet the off'th item from the array as byte.- Specified by:
getBytein interfaceNumberArrayAdapter<java.lang.Float,float[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
-