public abstract static class MultiIndexLinearizer.BasicSequencer extends java.lang.Object implements MultiIndexLinearizer.Sequencer
This provides everything but the actual sequencing.
Indexable.Base<TT>, Indexable.IndexableSpliterator<TElem>, Indexable.ListView<T>
EMPTY, EMPTY_INDEXABLE_STRING
Constructor and Description |
---|
BasicSequencer(MultiIndexLinearizer indexLinearizer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int[] |
get(int index)
Get the element at the given index.
|
protected abstract int[] |
get(int index,
int[] sizes)
Get the multi-indexes for the given sequence index.
|
int |
getNumDimensions()
Get the number of dimensions used by this access,
|
long |
getNumElements()
Get the combined number of elements in all dimensions.
|
int |
getSize(int dim)
Get the size of the given dimension.
|
int[] |
getSizes()
Get the sizes of the dimensions of this access.
|
int |
size()
Get the size.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addToArray, addToArray, addToCollection, asBase, asCollection, asList, binarySearch, checkIndex, combine, compare, downCast, emptyIndexable, equal, findAll, findAllX, findFirst, findFirst, findFirst, findFirstX, findLast, findLast, findLast, findNext, findNext, findNext, findNextX, findPrevious, findPrevious, findPrevious, first, firstMatch, firstMatch, firstMatchX, forEachEntry, forEachEntryFragile, fromArray, fromCollection, fromCollection, fromCountable, fromCountable, fromEnumeration, fromEnumeration, fromIterable, fromIterable, fromIterable, fromIterable, fromIterator, fromList, fromOptional, frozenSpliterator, getMod, gyt, hash, headSet, indexedView, indexes, init, initByIndex, intIndexes, isEmpty, isOrdered, isStrictlyOrdered, iterator, iterator, last, listIterator, mapArray, optional, ordered, reverse, rotated, singleton, spliterator, subSet, sybSet, tailSet, toString, view, view, viewArray, viewArray, viewAsBooleanIndexable, viewAsByteIndexable, viewAsCharIndexable, viewAsDoubleIndexable, viewAsFloatIndexable, viewAsIntIndexable, viewAsLongIndexable, viewAsShortIndexable, viewByIndex, viewFragile, viewList, viewList, viewListN, viewListN, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, withAppendedItem, withCachedHash, withExchangedItemAt, withInsertedItemAt, withRemovedItemAt, withSwappedItemsAt
addAllTo, combined, combined, containsEq, containsRef, downCast, empty, equal, equals, filtered, filteredToIndexable, filterToCountable, firstOrNull, foldLeft, forEachFragile, freeze, frozen, frozen, groupingBy, groupingBy, hasAll, hasAny, isSorted, isStrictlySorted, lastOrNull, mappingBy, mappingBy, optFirst, optLast, orderedCombination, sorted, toArray, toArray, toList, toString, uniform, viewCollection, viewCollection, viewCollectionN, viewCollectionN
public BasicSequencer(@NotNull MultiIndexLinearizer indexLinearizer)
indexLinearizer
- multi-index linearizer on which this sequencer operatespublic int getNumDimensions()
MultiDimensional
getNumDimensions
in interface MultiDimensional
public int getSize(int dim)
MultiDimensional
getSize
in interface MultiDimensional
dim
- dimension, greater than 0
and less than MultiDimensional.getNumDimensions()
public long getNumElements()
MultiDimensional
getNumElements
in interface MultiDimensional
@NotNull public int[] getSizes()
MultiDimensional
getSizes
in interface MultiDimensional
MultiDimensional.getNumDimensions()
public int size()
Sizeable
@NotNull public int[] get(int index)
Indexable
@NotNull protected abstract int[] get(int index, @NotNull int[] sizes)
index
- linear sequence index between 0
(included)
and getNumElements()
(excluded)sizes
- sizes of the dimensions (do not change!)index
th element