Package ucar.ma2
Class ArrayRagged
- java.lang.Object
-
- ucar.ma2.Array
-
- ucar.ma2.ArrayRagged
-
public class ArrayRagged extends Array
DO NOT USE- Since:
- Nov 15, 2008
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ArrayRagged(int[] shape)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Array
copy()
DO NOT USE, throws UnsupportedOperationExceptionprotected void
copyFrom1DJavaArray(IndexIterator iter, Object javaArray)
protected void
copyTo1DJavaArray(IndexIterator iter, Object javaArray)
protected Array
createView(Index index)
DO NOT USE, throws UnsupportedOperationExceptionboolean
getBoolean(int index)
boolean
getBoolean(Index i)
DO NOT USE, throw ForbiddenConversionExceptionbyte
getByte(int index)
byte
getByte(Index i)
DO NOT USE, throw ForbiddenConversionExceptionchar
getChar(int index)
char
getChar(Index i)
DO NOT USE, throw ForbiddenConversionExceptiondouble
getDouble(int index)
double
getDouble(Index i)
DO NOT USE, throw ForbiddenConversionExceptionClass
getElementType()
Get the element class type of this Arrayfloat
getFloat(int index)
float
getFloat(Index i)
DO NOT USE, throw ForbiddenConversionExceptionint
getInt(int index)
int
getInt(Index i)
DO NOT USE, throw ForbiddenConversionExceptionlong
getLong(int index)
long
getLong(Index i)
DO NOT USE, throw ForbiddenConversionExceptionObject
getObject(int elem)
Object
getObject(Index ima)
Get the array element at index as an Object.short
getShort(int index)
short
getShort(Index i)
DO NOT USE, throw ForbiddenConversionExceptionObject
getStorage()
Get underlying primitive array storage.void
setBoolean(int index, boolean value)
void
setBoolean(Index i, boolean value)
DO NOT USE, throw ForbiddenConversionExceptionvoid
setByte(int index, byte value)
void
setByte(Index i, byte value)
DO NOT USE, throw ForbiddenConversionExceptionvoid
setChar(int index, char value)
void
setChar(Index i, char value)
DO NOT USE, throw ForbiddenConversionExceptionvoid
setDouble(int index, double value)
void
setDouble(Index i, double value)
DO NOT USE, throw ForbiddenConversionExceptionvoid
setFloat(int index, float value)
void
setFloat(Index i, float value)
DO NOT USE, throw ForbiddenConversionExceptionvoid
setInt(int index, int value)
void
setInt(Index i, int value)
DO NOT USE, throw ForbiddenConversionExceptionvoid
setLong(int index, long value)
void
setLong(Index i, long value)
DO NOT USE, throw ForbiddenConversionExceptionvoid
setObject(int elem, Object value)
void
setObject(Index ima, Object value)
Set the array element at index to the specified value.void
setShort(int index, short value)
void
setShort(Index i, short value)
DO NOT USE, throw ForbiddenConversionException-
Methods inherited from class ucar.ma2.Array
arraycopy, copyTo1DJavaArray, copyToNDJavaArray, factory, factory, factory, factory, factoryConstant, factoryCopy, flip, get1DJavaArray, get1DJavaArray, getDataAsByteBuffer, getDataAsByteBuffer, getDataAsByteBuffer, getDataType, getIndex, getIndexIterator, getRangeIterator, getRank, getShape, getSize, getSizeBytes, hasNext, isConstant, isUnsigned, isVlen, makeArray, makeArray, makeArray, makeArrayRankPlusOne, makeFromJavaArray, makeFromJavaArray, makeObjectArray, makeVlenArray, next, nextBoolean, nextByte, nextChar, nextDouble, nextFloat, nextInt, nextLong, nextShort, permute, reduce, reduce, resetLocalIterator, reshape, reshapeNoCopy, section, section, section, sectionNoReduce, sectionNoReduce, shapeToString, slice, toString, transpose
-
-
-
-
Method Detail
-
getElementType
public Class getElementType()
Description copied from class:Array
Get the element class type of this Array- Specified by:
getElementType
in classArray
- Returns:
- the class of the element
-
createView
protected Array createView(Index index)
DO NOT USE, throws UnsupportedOperationException- Specified by:
createView
in classArray
- Parameters:
index
- use this Index- Returns:
- a view of the Array using the given Index
-
getStorage
public Object getStorage()
Description copied from class:Array
Get underlying primitive array storage. Exposed for efficiency, use at your own risk.- Specified by:
getStorage
in classArray
- Returns:
- underlying primitive array storage
-
copyFrom1DJavaArray
protected void copyFrom1DJavaArray(IndexIterator iter, Object javaArray)
- Specified by:
copyFrom1DJavaArray
in classArray
-
copyTo1DJavaArray
protected void copyTo1DJavaArray(IndexIterator iter, Object javaArray)
- Specified by:
copyTo1DJavaArray
in classArray
-
copy
public Array copy()
DO NOT USE, throws UnsupportedOperationException
-
getDouble
public double getDouble(Index i)
DO NOT USE, throw ForbiddenConversionException
-
setDouble
public void setDouble(Index i, double value)
DO NOT USE, throw ForbiddenConversionException
-
getFloat
public float getFloat(Index i)
DO NOT USE, throw ForbiddenConversionException
-
setFloat
public void setFloat(Index i, float value)
DO NOT USE, throw ForbiddenConversionException
-
getLong
public long getLong(Index i)
DO NOT USE, throw ForbiddenConversionException
-
setLong
public void setLong(Index i, long value)
DO NOT USE, throw ForbiddenConversionException
-
getInt
public int getInt(Index i)
DO NOT USE, throw ForbiddenConversionException
-
setInt
public void setInt(Index i, int value)
DO NOT USE, throw ForbiddenConversionException
-
getShort
public short getShort(Index i)
DO NOT USE, throw ForbiddenConversionException
-
setShort
public void setShort(Index i, short value)
DO NOT USE, throw ForbiddenConversionException
-
getByte
public byte getByte(Index i)
DO NOT USE, throw ForbiddenConversionException
-
setByte
public void setByte(Index i, byte value)
DO NOT USE, throw ForbiddenConversionException
-
getBoolean
public boolean getBoolean(Index i)
DO NOT USE, throw ForbiddenConversionException- Specified by:
getBoolean
in classArray
- Parameters:
i
- Index with current element set- Returns:
- value at
index
cast to boolean if necessary.
-
setBoolean
public void setBoolean(Index i, boolean value)
DO NOT USE, throw ForbiddenConversionException- Specified by:
setBoolean
in classArray
- Parameters:
i
- Index with current element setvalue
- the new value; cast to underlying data type if necessary.
-
getObject
public Object getObject(Index ima)
Description copied from class:Array
Get the array element at index as an Object. The returned value is wrapped in an object, eg Double for double
-
setObject
public void setObject(Index ima, Object value)
Description copied from class:Array
Set the array element at index to the specified value. the value must be passed wrapped in the appropriate Object (eg Double for double)
-
getChar
public char getChar(Index i)
DO NOT USE, throw ForbiddenConversionException
-
setChar
public void setChar(Index i, char value)
DO NOT USE, throw ForbiddenConversionException
-
getBoolean
public boolean getBoolean(int index)
- Specified by:
getBoolean
in classArray
-
setBoolean
public void setBoolean(int index, boolean value)
- Specified by:
setBoolean
in classArray
-
-