private static final class IndexedTensor.EqualSizeSingleDimensionIndexes extends IndexedTensor.Indexes
Modifier and Type | Field and Description |
---|---|
private long |
currentValueIndex
Maintain this directly as an optimization for 1-d iteration
|
private int |
iterateDimension |
private long |
size |
private long |
step
The iteration step in the value index space
|
indexes
Modifier | Constructor and Description |
---|---|
private |
EqualSizeSingleDimensionIndexes(DimensionSizes sizes,
int iterateDimension,
long[] initialIndexes,
long size) |
Modifier and Type | Method and Description |
---|---|
void |
next()
Advances this to the next cell in the standard indexed tensor cell order.
|
long |
size()
Returns the number of values this will iterate over - i.e the product if the iterating dimension sizes
|
(package private) long |
toIterationValueIndex() |
(package private) long |
toSourceValueIndex() |
dimensionSizes, indexesCopy, indexesForReading, of, toList, toString
private final long size
private final int iterateDimension
private long currentValueIndex
private final long step
private EqualSizeSingleDimensionIndexes(DimensionSizes sizes, int iterateDimension, long[] initialIndexes, long size)
public long size()
size
in class IndexedTensor.Indexes
public void next()
next
in class IndexedTensor.Indexes
RuntimeException
- if this is called more times than its sizelong toSourceValueIndex()
toSourceValueIndex
in class IndexedTensor.Indexes
long toIterationValueIndex()
toIterationValueIndex
in class IndexedTensor.Indexes
Copyright © 2018. All rights reserved.