Class DoubleArrayAdapter
- java.lang.Object
-
- elki.utilities.datastructures.arraylike.DoubleArrayAdapter
-
- All Implemented Interfaces:
ArrayAdapter<java.lang.Double,double[]>,NumberArrayAdapter<java.lang.Double,double[]>
public class DoubleArrayAdapter extends java.lang.Object implements NumberArrayAdapter<java.lang.Double,double[]>
Use adouble[]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 DoubleArrayAdapterSTATICStatic instance.
-
Constructor Summary
Constructors Modifier Constructor Description protectedDoubleArrayAdapter()Private constructor - use the static instance inSTATIC!
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Doubleget(double[] array, int off)Deprecated.bytegetByte(double[] array, int off)Get the off'th item from the array as byte.doublegetDouble(double[] array, int off)Get the off'th item from the array as double.floatgetFloat(double[] array, int off)Get the off'th item from the array as float.intgetInteger(double[] array, int off)Get the off'th item from the array as integer.longgetLong(double[] array, int off)Get the off'th item from the array as long.shortgetShort(double[] array, int off)Get the off'th item from the array as short.intsize(double[] array)Get the size of the array.
-
-
-
Field Detail
-
STATIC
public static final DoubleArrayAdapter STATIC
Static instance.
-
-
Constructor Detail
-
DoubleArrayAdapter
protected DoubleArrayAdapter()
Private constructor - use the static instance inSTATIC!
-
-
Method Detail
-
size
public int size(double[] array)
Description copied from interface:ArrayAdapterGet the size of the array.- Specified by:
sizein interfaceArrayAdapter<java.lang.Double,double[]>- Specified by:
sizein interfaceNumberArrayAdapter<java.lang.Double,double[]>- Parameters:
array- Array-like thing- Returns:
- Size
-
get
@Deprecated public java.lang.Double get(double[] 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.Double,double[]>- Specified by:
getin interfaceNumberArrayAdapter<java.lang.Double,double[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getDouble
public double getDouble(double[] 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.Double,double[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getFloat
public float getFloat(double[] 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.Double,double[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getInteger
public int getInteger(double[] 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.Double,double[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getShort
public short getShort(double[] 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.Double,double[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getLong
public long getLong(double[] 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.Double,double[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
getByte
public byte getByte(double[] 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.Double,double[]>- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException- for an invalid index.
-
-