public class SliceNDIterator extends IndexIterator
It allows a number of axes to be omitted and iterates over the axes left over. The omitted axes define an inner shape and the remaining axes define an outer shape which is iterated over.
index
Constructor and Description |
---|
SliceNDIterator(SliceND slice,
int... axes)
Constructor for an iterator that misses out several axes
|
Modifier and Type | Method and Description |
---|---|
SliceND |
getCurrentSlice()
Get current slice
|
boolean[] |
getOmit() |
SliceND |
getOmittedSlice()
Get omitted part of source slice which never changes.
|
SliceND |
getOutputSlice()
Get output or destination slice
|
int[] |
getPos() |
int[] |
getShape() |
int[] |
getUsedPos()
Shortened position where axes are omitted
|
SliceND |
getUsedSlice()
Shortened slice where axes are omitted
|
boolean |
hasNext() |
void |
reset()
Reset iterator
|
public SliceNDIterator(SliceND slice, int... axes)
slice
- axes
- missing axespublic boolean hasNext()
hasNext
in class IndexIterator
public int[] getPos()
getPos
in class IndexIterator
public SliceND getOmittedSlice()
public SliceND getOutputSlice()
public SliceND getCurrentSlice()
public int[] getUsedPos()
public SliceND getUsedSlice()
public boolean[] getOmit()
public void reset()
IndexIterator
reset
in class IndexIterator
public int[] getShape()
getShape
in class IndexIterator
Copyright © 2014–2019 Eclipse Foundation. All rights reserved.