public class ArrayByte extends Array
Array
Modifier and Type | Class and Description |
---|---|
static class |
ArrayByte.D0
Concrete implementation of Array specialized for byte, rank 0.
|
static class |
ArrayByte.D1
Concrete implementation of Array specialized for byte, rank 1.
|
static class |
ArrayByte.D2
Concrete implementation of Array specialized for byte, rank 2.
|
static class |
ArrayByte.D3
Concrete implementation of Array specialized for byte, rank 3.
|
static class |
ArrayByte.D4
Concrete implementation of Array specialized for byte, rank 4.
|
static class |
ArrayByte.D5
Concrete implementation of Array specialized for byte, rank 5.
|
static class |
ArrayByte.D6
Concrete implementation of Array specialized for byte, rank 6.
|
static class |
ArrayByte.D7
Concrete implementation of Array specialized for byte, rank 7.
|
Modifier and Type | Field and Description |
---|---|
protected byte[] |
storage |
Constructor and Description |
---|
ArrayByte(int[] dimensions)
Create a new Array of type byte and the given shape.
|
Modifier and Type | Method and Description |
---|---|
protected void |
copyFrom1DJavaArray(IndexIterator iter,
java.lang.Object javaArray) |
protected void |
copyTo1DJavaArray(IndexIterator iter,
java.lang.Object javaArray) |
protected Array |
createView(Index index)
create new Array with given Index and the same backing store
|
byte |
get(Index i)
get the value at the specified index.
|
boolean |
getBoolean(Index i)
not legal, throw ForbiddenConversionException
|
boolean |
getBoolean(int index) |
byte |
getByte(Index i)
Get the array element at the current element of ima, as a byte.
|
byte |
getByte(int index) |
char |
getChar(Index i)
Get the array element at the current element of ima, as a char.
|
char |
getChar(int index) |
java.nio.ByteBuffer |
getDataAsByteBuffer()
This gets the data as a ByteBuffer, in correct order.
|
java.nio.ByteBuffer |
getDataAsByteBuffer(java.nio.ByteOrder order) |
double |
getDouble(Index i)
Get the array element at the current element of ima, as a double.
|
double |
getDouble(int index) |
java.lang.Class |
getElementType()
Return the element class type
|
float |
getFloat(Index i)
Get the array element at the current element of ima, as a float.
|
float |
getFloat(int index) |
int |
getInt(Index i)
Get the array element at the current element of ima, as a int.
|
int |
getInt(int index) |
long |
getLong(Index i)
Get the array element at the current element of ima, as a long.
|
long |
getLong(int index) |
java.lang.Object |
getObject(Index i)
Get the array element at index as an Object.
|
java.lang.Object |
getObject(int index) |
short |
getShort(Index i)
Get the array element at the current element of ima, as a short.
|
short |
getShort(int index) |
java.lang.Object |
getStorage()
Get underlying primitive array storage.
|
void |
set(Index i,
byte value)
set the value at the sepcified index.
|
void |
setBoolean(Index i,
boolean value)
not legal, throw ForbiddenConversionException
|
void |
setBoolean(int index,
boolean value) |
void |
setByte(Index i,
byte value)
Set the array element at the current element of ima.
|
void |
setByte(int index,
byte value) |
void |
setChar(Index i,
char value)
Set the array element at the current element of ima.
|
void |
setChar(int index,
char value) |
void |
setDouble(Index i,
double value)
Set the array element at the current element of ima.
|
void |
setDouble(int index,
double value) |
void |
setFloat(Index i,
float value)
Set the array element at the current element of ima.
|
void |
setFloat(int index,
float value) |
void |
setInt(Index i,
int value)
Set the array element at the current element of ima.
|
void |
setInt(int index,
int value) |
void |
setLong(Index i,
long value)
Set the array element at the current element of ima.
|
void |
setLong(int index,
long value) |
void |
setObject(Index i,
java.lang.Object value)
Set the array element at index to the specified value.
|
void |
setObject(int index,
java.lang.Object value) |
void |
setShort(Index i,
short value)
Set the array element at the current element of ima.
|
void |
setShort(int index,
short value) |
arraycopy, copy, copyTo1DJavaArray, copyToNDJavaArray, factory, factory, factory, factory, factory, factory, factoryConstant, flip, get1DJavaArray, getDataAsByteBuffer, getDataType, getIndex, getIndexIterator, getIndexIteratorFast, getIndexPrivate, getRangeIterator, getRank, getShape, getSize, getSizeBytes, hasNext, isConstant, isUnsigned, makeArray, makeArray, makeArray, makeArray, makeArrayRankPlusOne, next, nextBoolean, nextByte, nextChar, nextDouble, nextFloat, nextInt, nextLong, nextShort, permute, reduce, reduce, resetLocalIterator, reshape, reshapeNoCopy, section, section, section, sectionNoReduce, sectionNoReduce, setUnsigned, shapeToString, slice, toString, transpose
public ArrayByte(int[] dimensions)
dimensions
- the shape of the Array.protected Array createView(Index index)
Array
createView
in class Array
index
- use this Indexpublic java.lang.Object getStorage()
Array
getStorage
in class Array
protected void copyFrom1DJavaArray(IndexIterator iter, java.lang.Object javaArray)
copyFrom1DJavaArray
in class Array
protected void copyTo1DJavaArray(IndexIterator iter, java.lang.Object javaArray)
copyTo1DJavaArray
in class Array
public java.nio.ByteBuffer getDataAsByteBuffer()
Array
getDataAsByteBuffer
in class Array
public java.nio.ByteBuffer getDataAsByteBuffer(java.nio.ByteOrder order)
getDataAsByteBuffer
in class Array
public java.lang.Class getElementType()
getElementType
in class Array
public byte get(Index i)
i
- indexpublic void set(Index i, byte value)
i
- indexvalue
- set to this valuepublic double getDouble(Index i)
Array
public void setDouble(Index i, double value)
Array
public float getFloat(Index i)
Array
public void setFloat(Index i, float value)
Array
public long getLong(Index i)
Array
public void setLong(Index i, long value)
Array
public int getInt(Index i)
Array
public void setInt(Index i, int value)
Array
public short getShort(Index i)
Array
public void setShort(Index i, short value)
Array
public byte getByte(Index i)
Array
public void setByte(Index i, byte value)
Array
public char getChar(Index i)
Array
public void setChar(Index i, char value)
Array
public boolean getBoolean(Index i)
getBoolean
in class Array
i
- Index with current element setindex
cast to boolean if necessary.public void setBoolean(Index i, boolean value)
setBoolean
in class Array
i
- Index with current element setvalue
- the new value; cast to underlying data type if necessary.public java.lang.Object getObject(Index i)
Array
public void setObject(Index i, java.lang.Object value)
Array
public boolean getBoolean(int index)
getBoolean
in class Array
public void setBoolean(int index, boolean value)
setBoolean
in class Array