public class GeneralArray<E> extends TransformedArray<E>
basenoInts| Constructor and Description |
|---|
GeneralArray() |
GeneralArray(AVector<E> base,
int[] dimensions,
int[] lowBounds) |
GeneralArray(AVector<E> base,
int[] dimensions,
int[] lowBounds,
int[] strides,
int offset) |
GeneralArray(int[] dimensions) |
| Modifier and Type | Method and Description |
|---|---|
int |
effectiveIndex() |
int |
effectiveIndex(int i) |
int |
effectiveIndex(int i,
int j) |
int |
effectiveIndex(int i,
int j,
int k,
int... rest) |
E |
get(int[] indexes) |
AVector<E> |
getBase() |
int[] |
getDimensions() |
int |
getLowBound(int dim)
Get the least dimension along the specified dimension.
|
int[] |
getLowBounds() |
int |
getSize(int dim)
Get length along specified dimension.
|
java.lang.String |
getTag() |
protected void |
init(AVector<E> base,
int[] dimensions,
int[] lowBounds,
int[] strides,
int offset) |
static <E> GeneralArray<E> |
make(AVector<E> base,
int[] dimensions,
int[] lowBounds,
int[] strides,
int offset) |
static <E> GeneralArray<E> |
make0(AVector<E> base) |
static Array |
makeSimple(int[] lowBounds,
int[] dimensions,
SimpleVector base) |
protected int |
nextIndex(int ipos)
Get the offset from the beginning corresponding to a position cookie.
|
int |
rank()
Get the rank (number of dimensions) of this array.
|
int |
resolve(int[] indexes)
Calculate corresponding index in base array.
|
void |
setBase(AVector<E> base) |
void |
setBase(E[] data) |
void |
setStrides(int[] strides,
int offset) |
int |
size()
See java.util.Collection.
|
java.lang.String |
toString() |
static void |
toString(Array array,
java.lang.StringBuffer sbuf) |
checkCanWrite, getBooleanRaw, getByteRaw, getCharRaw, getDoubleRaw, getElementKind, getFloatRaw, getInt, getInt, getIntRaw, getLongRaw, getRaw, getRowMajor, getShortRaw, setRawadd, add, addAll, addAll, addPos, asImmutable, badRank, boundedHash, checkRank, clear, compare, compare, compare, consume, consume, consumeNext, consumePosRange, contains, containsAll, copyPos, createPos, createRelativePos, effectiveIndex, elements, endPos, equals, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, get, get, get, getAttribute, getAttributeLength, getContainingSequenceSize, getIndexDifference, getInt, getInt, getInt, getIterator, getIterator, getIteratorAtPos, getNextKind, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hashCode, hasNext, hasPrevious, indexOf, isAfterPos, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextMatching, nextPos, parentPos, previousPos, releasePos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, setAt, setBuffer, setPosNext, setPosPrevious, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, unsupported, unsupportedExceptionpublic GeneralArray()
public GeneralArray(int[] dimensions)
public GeneralArray(AVector<E> base, int[] dimensions, int[] lowBounds, int[] strides, int offset)
protected int nextIndex(int ipos)
AbstractSequencenextIndex in class AbstractSequence<E>public static Array makeSimple(int[] lowBounds, int[] dimensions, SimpleVector base)
protected void init(AVector<E> base, int[] dimensions, int[] lowBounds, int[] strides, int offset)
public static <E> GeneralArray<E> make0(AVector<E> base)
public static <E> GeneralArray<E> make(AVector<E> base, int[] dimensions, int[] lowBounds, int[] strides, int offset)
public void setBase(E[] data)
public void setStrides(int[] strides,
int offset)
public int[] getDimensions()
public int[] getLowBounds()
public int rank()
Arraypublic int effectiveIndex()
effectiveIndex in interface Array<E>effectiveIndex in class AbstractSequence<E>public int effectiveIndex(int i)
effectiveIndex in interface Array<E>effectiveIndex in class AbstractSequence<E>public int effectiveIndex(int i,
int j)
effectiveIndex in interface Array<E>effectiveIndex in class AbstractSequence<E>public int effectiveIndex(int i,
int j,
int k,
int... rest)
effectiveIndex in interface Array<E>effectiveIndex in class AbstractSequence<E>public int resolve(int[] indexes)
public E get(int[] indexes)
public int size()
size in class AbstractSequence<E>public int getLowBound(int dim)
ArraygetLowBound in interface Array<E>getLowBound in class AbstractSequence<E>public int getSize(int dim)
Arraypublic static void toString(Array array, java.lang.StringBuffer sbuf)
public java.lang.String getTag()
public java.lang.String toString()
toString in class AbstractSequence<E>