public class NumberVectorAdapter extends java.lang.Object implements NumberArrayAdapter<java.lang.Number,NumberVector>
STATIC
!Modifier and Type | Field and Description |
---|---|
static NumberVectorAdapter |
STATIC
Static adapter class.
|
Modifier | Constructor and Description |
---|---|
private |
NumberVectorAdapter()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Number |
get(NumberVector array,
int off)
Deprecated.
|
byte |
getByte(NumberVector array,
int off)
Get the off'th item from the array as byte.
|
double |
getDouble(NumberVector array,
int off)
Get the off'th item from the array as double.
|
float |
getFloat(NumberVector array,
int off)
Get the off'th item from the array as float.
|
int |
getInteger(NumberVector array,
int off)
Get the off'th item from the array as integer.
|
long |
getLong(NumberVector array,
int off)
Get the off'th item from the array as long.
|
short |
getShort(NumberVector array,
int off)
Get the off'th item from the array as short.
|
int |
size(NumberVector array)
Get the size of the array.
|
public static final NumberVectorAdapter STATIC
private NumberVectorAdapter()
STATIC
!public int size(NumberVector array)
ArrayAdapter
size
in interface ArrayAdapter<java.lang.Number,NumberVector>
size
in interface NumberArrayAdapter<java.lang.Number,NumberVector>
array
- Array-like thing@Deprecated public java.lang.Number get(NumberVector array, int off) throws java.lang.IndexOutOfBoundsException
ArrayAdapter
get
in interface ArrayAdapter<java.lang.Number,NumberVector>
get
in interface NumberArrayAdapter<java.lang.Number,NumberVector>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.public double getDouble(NumberVector array, int off) throws java.lang.IndexOutOfBoundsException
NumberArrayAdapter
getDouble
in interface NumberArrayAdapter<java.lang.Number,NumberVector>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.public float getFloat(NumberVector array, int off) throws java.lang.IndexOutOfBoundsException
NumberArrayAdapter
getFloat
in interface NumberArrayAdapter<java.lang.Number,NumberVector>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.public int getInteger(NumberVector array, int off) throws java.lang.IndexOutOfBoundsException
NumberArrayAdapter
getInteger
in interface NumberArrayAdapter<java.lang.Number,NumberVector>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.public short getShort(NumberVector array, int off) throws java.lang.IndexOutOfBoundsException
NumberArrayAdapter
getShort
in interface NumberArrayAdapter<java.lang.Number,NumberVector>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.public long getLong(NumberVector array, int off) throws java.lang.IndexOutOfBoundsException
NumberArrayAdapter
getLong
in interface NumberArrayAdapter<java.lang.Number,NumberVector>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.public byte getByte(NumberVector array, int off) throws java.lang.IndexOutOfBoundsException
NumberArrayAdapter
getByte
in interface NumberArrayAdapter<java.lang.Number,NumberVector>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.Copyright © 2019 ELKI Development Team. License information.