Package gnu.lists
Class ComposedArray<E>
java.lang.Object
gnu.lists.AbstractSequence<E>
gnu.lists.TransformedArray<E>
gnu.lists.ComposedArray<E>
- All Implemented Interfaces:
Array<E>
- Direct Known Subclasses:
ComposedArray.AsSequence
Indexing "composes" with a set of indexing arrays.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Same as ComposedArray but also implements AVector. -
Field Summary
Fields inherited from class gnu.lists.TransformedArray
base
Fields inherited from class gnu.lists.AbstractSequence
noInts
-
Constructor Summary
ConstructorsConstructorDescriptionComposedArray
(Array base, int rank, int[] dims, int[] lowBounds, Array<Integer>[] mappers) -
Method Summary
Modifier and TypeMethodDescriptionfinal int
final int
effectiveIndex
(int i) final int
effectiveIndex
(int i, int j) final int
effectiveIndex
(int i, int j, int k, int... rest) static Object
generalIndex
(Array arr, boolean shared, int start, int nindexes, Object[] indexes) static Object
generalIndex
(Array arr, boolean shared, Object... indexes) int
getLowBound
(int dim) Get the least dimension along the specified dimension.int
getSize
(int dim) Get length along specified dimension.int
rank()
Get the rank (number of dimensions) of this array.Methods inherited from class gnu.lists.TransformedArray
checkCanWrite, getBooleanRaw, getByteRaw, getCharRaw, getDoubleRaw, getElementKind, getFloatRaw, getInt, getInt, getIntRaw, getLongRaw, getRaw, getRowMajor, getShortRaw, setRaw
Methods inherited from class gnu.lists.AbstractSequence
add, 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, 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, nextIndex, nextMatching, nextPos, parentPos, previousPos, releasePos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, setAt, setBuffer, setPosNext, setPosPrevious, size, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, toString, unsupported, unsupportedException
-
Constructor Details
-
ComposedArray
-
-
Method Details
-
rank
public int rank()Description copied from interface:Array
Get the rank (number of dimensions) of this array. The rank of a scalar is 0, of a Sequence is 1, of a matrix is 2, etc. -
getLowBound
public int getLowBound(int dim) Description copied from interface:Array
Get the least dimension along the specified dimension.- Specified by:
getLowBound
in interfaceArray<E>
- Overrides:
getLowBound
in classAbstractSequence<E>
-
getSize
public int getSize(int dim) Description copied from interface:Array
Get length along specified dimension. -
effectiveIndex
public final int effectiveIndex()- Specified by:
effectiveIndex
in interfaceArray<E>
- Overrides:
effectiveIndex
in classAbstractSequence<E>
-
effectiveIndex
public final int effectiveIndex(int i) - Specified by:
effectiveIndex
in interfaceArray<E>
- Overrides:
effectiveIndex
in classAbstractSequence<E>
-
effectiveIndex
public final int effectiveIndex(int i, int j) - Specified by:
effectiveIndex
in interfaceArray<E>
- Overrides:
effectiveIndex
in classAbstractSequence<E>
-
effectiveIndex
public final int effectiveIndex(int i, int j, int k, int... rest) - Specified by:
effectiveIndex
in interfaceArray<E>
- Overrides:
effectiveIndex
in classAbstractSequence<E>
-
generalIndex
-
generalIndex
-