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