public class ISBoundsIterator extends ISBounds implements java.lang.Cloneable, SDBIterator
ISBoundsIterator iter = new ISBoundsIterator(dsBounds, shape, steps);
while (iter.valid()) { System.out.println(iter.toString()); iter.next(); }
or
for(iter.init(); iter.valid(); iter.next()) {
System.out.println(iter.toString()); }
Modifier and Type | Field and Description |
---|---|
protected int[] |
anchor |
protected boolean[] |
fullShape |
protected int[] |
lbounds |
protected AxisOrdering |
ordering |
protected int[] |
shape |
protected ISBounds |
spaceBnds |
protected int[] |
steps |
protected int[] |
ubounds |
protected boolean |
valid |
Modifier | Constructor and Description |
---|---|
protected |
ISBoundsIterator(int d) |
|
ISBoundsIterator(ISBounds space,
int[] shape)
Construct a bounds iterator with no gaps and default AxisOrdering.
|
|
ISBoundsIterator(ISBounds space,
int[] shape,
AxisOrdering ordering)
Construct a bounds iterator with no gaps.
|
|
ISBoundsIterator(ISBounds space,
int[] shape,
int[] gaps)
Construct a bounds iterator with default AxisOrdering.
|
|
ISBoundsIterator(ISBounds space,
int[] shape,
int[] gaps,
AxisOrdering ordering)
Construct an ISBoundsIterator that will traverse the given space with an
an ISBounds of the given shape (dimensions).
|
|
ISBoundsIterator(ISBounds space,
IntegerIndexSpaceID anchor,
int[] shape)
Construct a bounds iterator with specified anchor position, no gaps
and default axis axisOrdering.
|
|
ISBoundsIterator(ISBounds space,
IntegerIndexSpaceID anchor,
int[] shape,
AxisOrdering ordering)
Construct a bounds iterator with specified anchor position and no gaps.
|
|
ISBoundsIterator(ISBounds space,
IntegerIndexSpaceID anchor,
int[] shape,
int[] gaps)
Construct a bounds iterator with specified anchor position and default
axis axisOrdering.
|
|
ISBoundsIterator(ISBounds space,
IntegerIndexSpaceID anchor,
int[] shape,
int[] gaps,
AxisOrdering ordering)
Construct an ISBoundsIterator that will traverse the given space with an
an ISBounds of the given shape (dimensions).
|
|
ISBoundsIterator(ISBounds space,
ISBounds shape)
Construct a bounds iterator with no gaps and default AxisOrdering.
|
|
ISBoundsIterator(ISBounds space,
ISBounds shape,
AxisOrdering ordering)
Construct a bounds iterator with no gaps.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Return a copy of this ISBoundsIterator
|
ISBounds |
copyBounds()
Return a simple ISBounds corresponding to the current value of this
iterator.
|
void |
end()
Set the iterator value to the last valid value in the iteration.
|
int |
getAxisLength(int axis)
Return the length of this iterator's space along the specified axis.
|
AxisOrdering |
getAxisOrdering()
Return the AxisOrdering object for this iterator.
|
IndexSpaceID |
getBlockShape()
Return an IndexSpaceID representing the shape of the iterator's blocks.
|
AxisOrdering |
getOrdering()
Deprecated.
|
ISBounds |
getSpaceBounds()
Returns an ISBounds representing the space being iterated over.
|
ISBounds |
getSpaceDimensions()
Returns an ISBounds representing the shape, but not the position, of the
space being iterated over.
|
int[] |
getSpaceDimensionsArray()
Returns an array of ints representing the dimensions of the space being
iterated over.
|
IndexSpaceID |
getSteps()
Return an IndexSpaceID representing the iterator's steps.
|
protected boolean |
incrementAxis(int axisNumber)
this is a help fuction for next() function, which is to set a specified
value to the specified axis if the value is in bounds
|
void |
init()
Initialize this ISBoundsIterator
|
protected void |
init(ISBounds bounds)
this is a help function for constructor, which is to set the Geometric
bounds and initial positon of the shape to traverse.
|
protected void |
init(ISBounds bounds,
IntegerIndexSpaceID anchor) |
boolean |
isFullShape()
Return true if the current position defines a bounds that is the full
extent of the shape specified for the Iterator.
|
static void |
main(java.lang.String[] args)
For debugging.
|
boolean |
next()
Moving the ISBoundsIterator to the next position.
|
protected void |
resetAxis(int axisNumber) |
void |
setAll(ISBounds spaceBounds,
IndexSpaceID anchor,
int[] shp) |
void |
setAnchor(IndexSpaceID anchor)
Change the anchor position that this object uses to partition the
iteration with.
|
void |
setBounds(ISBounds spaceBounds)
Change the bounds of the space that this object iterates over.
|
void |
setBoundsAndShape(ISBounds spaceBounds,
int[] shp) |
void |
setShape(int[] shp)
Change the shape of the iteration.
|
protected void |
setupAndCheck(int[] shape,
int[] gaps) |
java.lang.String |
toString()
Return a String representing the object.
|
java.lang.String |
toString(java.lang.String indent)
Return description of this ISBoundsIterator
|
boolean |
valid()
Return true if the current position is a valid position in the IndexSpace.
|
boundingVolume, contains, contains, contains, containsExcludeUpper, containsExcludeUpper, copy, copy, copyAndMove, copyAndMove, copyAndMoveCenterTo, copyAndMoveCenterTo, copyAndMoveTo, copyAndMoveTo, copyAndMoveToOrigin, copyExpandBy, copyExpandByFactor, copyIncreasedBy, copyLower, copyLower, copyLowerArray, copyLowerArray, copyReducedBy, copyScaled, copyScaled, copyScaled, copyShrinkBy, copyShrinkByFactor, copyTo, copyTo, copyToOrigin, copyUpper, copyUpper, copyUpperArray, copyUpperArray, createAtOrigin, createAtOrigin, createCentered, createCentered, createCentered, dim, equals, equalShape, equalShapeAfterProject, expand, expandByFactor, getDimension, getDimensions, getDimensions, getDimensionsArray, getLower, getLower, getLowerArray, getLowerArray, getUpper, getUpper, getUpperArray, getUpperArray, getVertex, getVertex, hasSameShape, increase, increaseByOne, increaseByOne, intersection, intersects, intersectWith, isSlice, longVolume, makeRelativeTo, makeRelativeTo, move, move, move, moveCenterTo, moveCenterTo, moveTo, moveTo, moveToOrigin, newBoundsAtOrigin, project, reduce, reduceByOne, reduceByOne, set, setAndMove, setAndMoveTo, setLower, setLower, setLower, setToBoundingVolume, setUpper, setUpper, setUpper, shrinkByFactor, slice, split, volume
protected AxisOrdering ordering
protected boolean valid
protected boolean[] fullShape
protected int[] shape
protected int[] steps
protected int[] anchor
protected int[] ubounds
protected int[] lbounds
protected ISBounds spaceBnds
public ISBoundsIterator(ISBounds space, int[] shape, int[] gaps, AxisOrdering ordering)
space
- - space over which iteration is doneshape
- - shape of iteration blockgaps
- - gaps between blocks (can be negative for overlapping iteration)axisOrdering
- - AxisOrdering for the spacepublic ISBoundsIterator(ISBounds space, int[] shape, int[] gaps)
space
- - space over which iteration is doneshape
- - shape of iteration blockgaps
- - gaps between blocks (can be negative for overlapping iteration)public ISBoundsIterator(ISBounds space, int[] shape)
space
- - space over which iteration is doneshape
- - shape of iteration blockpublic ISBoundsIterator(ISBounds space, ISBounds shape)
space
- - space over which iteration is doneshape
- - shape of iteration blockpublic ISBoundsIterator(ISBounds space, int[] shape, AxisOrdering ordering)
space
- - space over which iteration is doneshape
- - shape of iteration blockaxisOrdering
- - AxisOrdering for the spacepublic ISBoundsIterator(ISBounds space, ISBounds shape, AxisOrdering ordering)
space
- - space over which iteration is doneshape
- - shape of iteration blockaxisOrdering
- - AxisOrdering for the spacepublic ISBoundsIterator(ISBounds space, IntegerIndexSpaceID anchor, int[] shape, int[] gaps, AxisOrdering ordering)
space
- - space over which iteration is doneanchor
- - anchor position of partitioningshape
- - shape of iteration blockgaps
- - gaps between blocks (can be negative for overlapping iteration)axisOrdering
- - AxisOrdering for the spacepublic ISBoundsIterator(ISBounds space, IntegerIndexSpaceID anchor, int[] shape)
space
- - space over which iteration is doneanchor
- - anchor position of partitioningshape
- - shape of iteration blockpublic ISBoundsIterator(ISBounds space, IntegerIndexSpaceID anchor, int[] shape, AxisOrdering ordering)
space
- - space over which iteration is doneanchor
- - anchor position of partitioningshape
- - shape of iteration blockaxisOrdering
- - AxisOrdering for the spacepublic ISBoundsIterator(ISBounds space, IntegerIndexSpaceID anchor, int[] shape, int[] gaps)
space
- - space over which iteration is doneanchor
- - anchor position of partitioningshape
- - shape of iteration blockgaps
- - gaps between blocks (can be negative for overlapping iteration)protected ISBoundsIterator(int d)
protected final void setupAndCheck(int[] shape, int[] gaps)
protected void init(ISBounds bounds)
protected void init(ISBounds bounds, IntegerIndexSpaceID anchor)
public void setShape(int[] shp)
public void setAll(ISBounds spaceBounds, IndexSpaceID anchor, int[] shp)
public void setAnchor(IndexSpaceID anchor)
public void setBounds(ISBounds spaceBounds)
public void setBoundsAndShape(ISBounds spaceBounds, int[] shp)
public void init()
init
in interface SDBIterator
public void end()
end
in interface SDBIterator
public final AxisOrdering getAxisOrdering()
public final AxisOrdering getOrdering()
public final int getAxisLength(int axis)
public final ISBounds getSpaceBounds()
public final ISBounds getSpaceDimensions()
public final int[] getSpaceDimensionsArray()
public final IndexSpaceID getBlockShape()
public final IndexSpaceID getSteps()
protected void resetAxis(int axisNumber)
protected boolean incrementAxis(int axisNumber)
public boolean valid()
valid
in interface SDBIterator
public boolean isFullShape()
public boolean next()
next
in interface SDBIterator
public ISBounds copyBounds()
public java.lang.Object clone()
public java.lang.String toString()
public java.lang.String toString(java.lang.String indent)
public static void main(java.lang.String[] args)