|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.ma2.Array
ucar.ma2.ArrayFloat
public class ArrayFloat
Concrete implementation of Array specialized for floats. Data storage is with 1D java array of floats. issues: what should we do if a conversion loses accuracy? nothing ? Exception ?
Array| Nested Class Summary | |
|---|---|
static class |
ArrayFloat.D0
Concrete implementation of Array specialized for floats, rank 0. |
static class |
ArrayFloat.D1
Concrete implementation of Array specialized for floats, rank 1. |
static class |
ArrayFloat.D2
Concrete implementation of Array specialized for floats, rank 2. |
static class |
ArrayFloat.D3
Concrete implementation of Array specialized for floats, rank 3. |
static class |
ArrayFloat.D4
Concrete implementation of Array specialized for floats, rank 4. |
static class |
ArrayFloat.D5
Concrete implementation of Array specialized for floats, rank 5. |
static class |
ArrayFloat.D6
Concrete implementation of Array specialized for floats, rank 6. |
static class |
ArrayFloat.D7
Concrete implementation of Array specialized for floats, rank 7. |
| Constructor Summary | |
|---|---|
ArrayFloat(int[] dimensions)
Create a new Array of type float and the given shape. |
|
| Method Summary | |
|---|---|
float |
get(Index i)
get the value at the specified index. |
boolean |
getBoolean(Index i)
not legal, throw ForbiddenConversionException |
byte |
getByte(Index i)
Get the array element at the current element of ima, as a byte. |
char |
getChar(Index i)
Get the array element at the current element of ima, as a char. |
java.nio.ByteBuffer |
getDataAsByteBuffer()
This gets the data as a ByteBuffer, in correct order. |
double |
getDouble(Index i)
Get the array element at the current element of ima, as a double. |
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. |
int |
getInt(Index i)
Get the array element at the current element of ima, as a int. |
long |
getLong(Index i)
Get the array element at the current element of ima, as a long. |
java.lang.Object |
getObject(Index i)
Get the array element at index as an Object. |
short |
getShort(Index i)
Get the array element at the current element of ima, as a short. |
java.lang.Object |
getStorage()
Get underlying primitive array storage. |
void |
set(Index i,
float value)
set the value at the sepcified index. |
void |
setBoolean(Index i,
boolean value)
not legal, throw ForbiddenConversionException |
void |
setByte(Index i,
byte value)
Set the array element at the current element of ima. |
void |
setChar(Index i,
char value)
Set the array element at the current element of ima. |
void |
setDouble(Index i,
double value)
Set the array element at the current element of ima. |
void |
setFloat(Index i,
float value)
Set the array element at the current element of ima. |
void |
setInt(Index i,
int value)
Set the array element at the current element of ima. |
void |
setLong(Index i,
long value)
Set the array element at the current element of ima. |
void |
setObject(Index i,
java.lang.Object value)
Set the array element at index to the specified value. |
void |
setShort(Index i,
short value)
Set the array element at the current element of ima. |
| Methods inherited from class ucar.ma2.Array |
|---|
arraycopy, copy, copyTo1DJavaArray, copyToNDJavaArray, factory, factory, factory, factory, factoryConstant, flip, get1DJavaArray, getIndex, getIndexIterator, getIndexIteratorFast, getRangeIterator, getRank, getShape, getSize, hasNext, makeArray, makeArray, makeArray, next, nextBoolean, nextByte, nextChar, nextDouble, nextFloat, nextInt, nextLong, nextShort, permute, reduce, reduce, resetLocalIterator, reshape, section, section, section, sectionNoReduce, sectionNoReduce, shapeToString, slice, toString, transpose |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayFloat(int[] dimensions)
dimensions - the shape of the Array.| Method Detail |
|---|
public java.lang.Object getStorage()
Array
getStorage in class Arraypublic java.nio.ByteBuffer getDataAsByteBuffer()
Array
getDataAsByteBuffer in class Arraypublic java.lang.Class getElementType()
getElementType in class Arraypublic float get(Index i)
public void set(Index i,
float value)
public double getDouble(Index i)
Array
getDouble in class Arrayi - Index with current element set
index cast to double if necessary.
public void setDouble(Index i,
double value)
Array
setDouble in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public float getFloat(Index i)
Array
getFloat in class Arrayi - Index with current element set
index cast to float if necessary.
public void setFloat(Index i,
float value)
Array
setFloat in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public long getLong(Index i)
Array
getLong in class Arrayi - Index with current element set
index cast to long if necessary.
public void setLong(Index i,
long value)
Array
setLong in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public int getInt(Index i)
Array
getInt in class Arrayi - Index with current element set
index cast to int if necessary.
public void setInt(Index i,
int value)
Array
setInt in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public short getShort(Index i)
Array
getShort in class Arrayi - Index with current element set
index cast to short if necessary.
public void setShort(Index i,
short value)
Array
setShort in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public byte getByte(Index i)
Array
getByte in class Arrayi - Index with current element set
index cast to float if necessary.
public void setByte(Index i,
byte value)
Array
setByte in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public char getChar(Index i)
Array
getChar in class Arrayi - Index with current element set
index cast to char if necessary.
public void setChar(Index i,
char value)
Array
setChar in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public boolean getBoolean(Index i)
getBoolean in class Arrayi - Index with current element set
index cast to boolean if necessary.
public void setBoolean(Index i,
boolean value)
setBoolean in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public java.lang.Object getObject(Index i)
Array
getObject in class Arrayi - element Index
index
public void setObject(Index i,
java.lang.Object value)
Array
setObject in class Arrayi - Index with current element setvalue - the new value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||