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