gnu.lists
Class GeneralArray
- Array
public class GeneralArray
A class to handle general multi-dimensional arrays.
This class is unfinished.
If the number of dimensions (the "rank") is one, should use
a class that implements Sequence.
GeneralArray uses a SimpleVector 'base' to store the actual data, and
provides general linear mapping from the array indexes to an
element index in the 'base' SimpleVector. Thus such uperations as
transposing an array can be implement as just creating a simple
re-mapping of the indexes.
add , add , addAll , addAll , addPos , clear , compare , compare , compare , consume , consumeNext , consumePosRange , contains , containsAll , copyPos , createPos , createRelativePos , elements , endPos , equals , equals , fill , fill , fillPosRange , firstAttributePos , firstChildPos , firstChildPos , fromEndIndex , get , get , getAttribute , getAttributeLength , getContainingSequenceSize , getEffectiveIndex , getIndexDifference , getIterator , getIterator , getIteratorAtPos , getLowBound , getNextKind , getNextTypeName , getNextTypeObject , getPosNext , getPosPrevious , getSize , gotoAttributesStart , gotoChildrenStart , gotoParent , hasNext , hasPrevious , hashCode , indexOf , isAfterPos , isEmpty , iterator , lastIndexOf , listIterator , listIterator , nextIndex , nextIndex , nextMatching , nextPos , parentPos , previousPos , rank , releasePos , remove , remove , removeAll , removePos , removePosRange , retainAll , set , set , setPosNext , setPosPrevious , size , stableCompare , startPos , subList , subSequence , subSequencePos , toArray , toArray , toString , toString , unsupported , unsupportedException |
GeneralArray
public GeneralArray()
GeneralArray
public GeneralArray(int[] dimensions)
createPos
public int createPos(int index,
boolean isAfter)
Generate a position at a given index.
The result is a position cookie that must be free'd with releasePos.
- createPos in interface AbstractSequence
index
- offset from beginning of desired positionisAfter
- should the position have the isAfter property
makeSimple
public static Array makeSimple(int[] lowBounds,
int[] dimensions,
SimpleVector base)
toString
public static void toString(Array array,
StringBuffer sbuf)
transpose
public Array transpose(int[] lowBounds,
int[] dimensions,
int offset0,
int[] factors)
- transpose in interface Array