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 DoubleArrayAdapter
STATIC
Static instance.
-
Constructor Summary
Constructors Modifier Constructor Description protected
DoubleArrayAdapter()
Private constructor - use the static instance inSTATIC
!
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Double
get(double[] array, int off)
Deprecated.byte
getByte(double[] array, int off)
Get the off'th item from the array as byte.double
getDouble(double[] array, int off)
Get the off'th item from the array as double.float
getFloat(double[] array, int off)
Get the off'th item from the array as float.int
getInteger(double[] array, int off)
Get the off'th item from the array as integer.long
getLong(double[] array, int off)
Get the off'th item from the array as long.short
getShort(double[] array, int off)
Get the off'th item from the array as short.int
size(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:ArrayAdapter
Get the size of the array.- Specified by:
size
in interfaceArrayAdapter<java.lang.Double,double[]>
- Specified by:
size
in 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.IndexOutOfBoundsException
Deprecated.Description copied from interface:ArrayAdapter
Get the off'th item from the array.- Specified by:
get
in interfaceArrayAdapter<java.lang.Double,double[]>
- Specified by:
get
in 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.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapter
Get the off'th item from the array as double.- Specified by:
getDouble
in 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.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapter
Get the off'th item from the array as float.- Specified by:
getFloat
in 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.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapter
Get the off'th item from the array as integer.- Specified by:
getInteger
in 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.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapter
Get the off'th item from the array as short.- Specified by:
getShort
in 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.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapter
Get the off'th item from the array as long.- Specified by:
getLong
in 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.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapter
Get the off'th item from the array as byte.- Specified by:
getByte
in 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.
-
-