@Immutable public class ArrayScalar extends Array
Constructor and Description |
---|
ArrayScalar(java.lang.Object value) |
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
|
boolean |
getBoolean(Index ima)
Get the array element at the current element of ima, as a boolean.
|
boolean |
getBoolean(int elem) |
byte |
getByte(Index ima)
Get the array element at the current element of ima, as a byte.
|
byte |
getByte(int elem) |
char |
getChar(Index ima)
Get the array element at the current element of ima, as a char.
|
char |
getChar(int elem) |
double |
getDouble(Index ima)
Get the array element at the current element of ima, as a double.
|
double |
getDouble(int elem) |
java.lang.Class |
getElementType()
Get the element class type of this Array
|
float |
getFloat(Index ima)
Get the array element at the current element of ima, as a float.
|
float |
getFloat(int elem) |
int |
getInt(Index ima)
Get the array element at the current element of ima, as a int.
|
int |
getInt(int elem) |
long |
getLong(Index ima)
Get the array element at the current element of ima, as a long.
|
long |
getLong(int elem) |
java.lang.Object |
getObject(Index ima)
Get the array element at index as an Object.
|
java.lang.Object |
getObject(int elem) |
short |
getShort(Index ima)
Get the array element at the current element of ima, as a short.
|
short |
getShort(int elem) |
java.lang.Object |
getStorage()
Get underlying primitive array storage.
|
void |
setBoolean(Index ima,
boolean value)
Set the array element at the current element of ima.
|
void |
setBoolean(int elem,
boolean value) |
void |
setByte(Index ima,
byte value)
Set the array element at the current element of ima.
|
void |
setByte(int elem,
byte value) |
void |
setChar(Index ima,
char value)
Set the array element at the current element of ima.
|
void |
setChar(int elem,
char value) |
void |
setDouble(Index ima,
double value)
Set the array element at the current element of ima.
|
void |
setDouble(int elem,
double val) |
void |
setFloat(Index ima,
float value)
Set the array element at the current element of ima.
|
void |
setFloat(int elem,
float val) |
void |
setInt(Index ima,
int value)
Set the array element at the current element of ima.
|
void |
setInt(int elem,
int value) |
void |
setLong(Index ima,
long value)
Set the array element at the current element of ima.
|
void |
setLong(int elem,
long value) |
void |
setObject(Index ima,
java.lang.Object value)
Set the array element at index to the specified value.
|
void |
setObject(int elem,
java.lang.Object value) |
void |
setShort(Index ima,
short value)
Set the array element at the current element of ima.
|
void |
setShort(int elem,
short value) |
arraycopy, copy, copyTo1DJavaArray, copyToNDJavaArray, factory, factory, factory, factory, factory, factory, factoryConstant, flip, get1DJavaArray, getDataAsByteBuffer, getDataAsByteBuffer, 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 java.lang.Class getElementType()
Array
getElementType
in class 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 double getDouble(Index ima)
Array
public void setDouble(Index ima, double value)
Array
public float getFloat(Index ima)
Array
public void setFloat(Index ima, float value)
Array
public long getLong(Index ima)
Array
public void setLong(Index ima, long value)
Array
public int getInt(Index ima)
Array
public void setInt(Index ima, int value)
Array
public short getShort(Index ima)
Array
public void setShort(Index ima, short value)
Array
public byte getByte(Index ima)
Array
public void setByte(Index ima, byte value)
Array
public char getChar(Index ima)
Array
public void setChar(Index ima, char value)
Array
public boolean getBoolean(Index ima)
Array
getBoolean
in class Array
ima
- Index with current element setindex
cast to boolean if necessary.public void setBoolean(Index ima, boolean value)
Array
setBoolean
in class Array
ima
- Index with current element setvalue
- the new value; cast to underlying data type if necessary.public java.lang.Object getObject(Index ima)
Array
public void setObject(Index ima, java.lang.Object value)
Array
public boolean getBoolean(int elem)
getBoolean
in class Array
public void setBoolean(int elem, boolean value)
setBoolean
in class Array