public class GeneralArray extends AbstractSequence implements Array
Constructor and Description |
---|
GeneralArray() |
GeneralArray(int[] dimensions) |
Modifier and Type | Method and Description |
---|---|
int |
createPos(int index,
boolean isAfter)
Generate a position at a given index.
|
java.lang.Object |
get(int index)
See java.util.List.
|
java.lang.Object |
get(int[] indexes) |
int |
getEffectiveIndex(int[] indexes)
Calculate corresponding index in base array.
|
int |
getLowBound(int dim)
Get the least dimension along the specified dimension.
|
java.lang.Object |
getRowMajor(int index) |
int |
getSize(int dim)
Get length along specified dimension.
|
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.
|
java.lang.Object |
set(int[] indexes,
java.lang.Object value) |
int |
size()
See java.util.Collection.
|
java.lang.String |
toString() |
static void |
toString(Array array,
java.lang.StringBuffer sbuf) |
Array |
transpose(int[] lowBounds,
int[] dimensions,
int offset0,
int[] factors) |
add, add, addAll, addAll, addPos, clear, compare, compare, compare, consume, consume, consumeNext, consumePosRange, contains, containsAll, copyPos, createRelativePos, elements, endPos, equals, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, getAttribute, getAttributeLength, getContainingSequenceSize, getIndexDifference, getIterator, getIterator, getIteratorAtPos, getNextKind, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, 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, setPosNext, setPosPrevious, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, unsupported, unsupportedException
public GeneralArray()
public GeneralArray(int[] dimensions)
protected int nextIndex(int ipos)
AbstractSequence
nextIndex
in class AbstractSequence
public static Array makeSimple(int[] lowBounds, int[] dimensions, SimpleVector base)
public int rank()
Array
rank
in interface Array
rank
in class AbstractSequence
public int getEffectiveIndex(int[] indexes)
getEffectiveIndex
in interface Array
getEffectiveIndex
in class AbstractSequence
public java.lang.Object get(int index)
AbstractSequence
get
in class AbstractSequence
public int createPos(int index, boolean isAfter)
AbstractSequence
createPos
in class AbstractSequence
index
- offset from beginning of desired positionisAfter
- should the position have the isAfter propertypublic java.lang.Object getRowMajor(int index)
getRowMajor
in interface Array
public java.lang.Object get(int[] indexes)
get
in interface Array
get
in class AbstractSequence
public java.lang.Object set(int[] indexes, java.lang.Object value)
set
in interface Array
set
in class AbstractSequence
public int size()
size
in class AbstractSequence
public int getLowBound(int dim)
Array
getLowBound
in interface Array
getLowBound
in class AbstractSequence
public int getSize(int dim)
Array
getSize
in interface Array
getSize
in class AbstractSequence
public Array transpose(int[] lowBounds, int[] dimensions, int offset0, int[] factors)
public static void toString(Array array, java.lang.StringBuffer sbuf)
public java.lang.String toString()
toString
in class AbstractSequence