|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.unh.sdb.common.Bounds
edu.unh.sdb.datasource.ISBounds
edu.unh.sdb.datasource.ISBoundsIterator
edu.unh.sdb.datasource.BDISBoundsIterator
public class BDISBoundsIterator
The BDISBoundsIterator class traverses the specified IndexSpace with the specified shape and the specified steps. use the while loop or for loop to traverse:
BDISBoundsIterator iter = new BDISBoundsIterator(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()); }
Field Summary | |
---|---|
protected boolean[] |
positiveDirection
|
protected int[] |
startPoint
|
Fields inherited from class edu.unh.sdb.datasource.ISBoundsIterator |
---|
anchor, fullShape, lbounds, ordering, shape, steps, ubounds, valid |
Fields inherited from class edu.unh.sdb.datasource.ISBounds |
---|
lower, upper |
Constructor Summary | |
---|---|
protected |
BDISBoundsIterator(int d)
|
|
BDISBoundsIterator(ISBounds space,
int[] shape)
Construct a bounds iterator with no gaps and default AxisOrdering. |
|
BDISBoundsIterator(ISBounds space,
int[] shape,
AxisOrdering ordering)
Construct a bounds iterator with no gaps. |
|
BDISBoundsIterator(ISBounds space,
int[] shape,
int[] gaps)
Construct a bounds iterator with default AxisOrdering. |
|
BDISBoundsIterator(ISBounds space,
int[] shape,
int[] gaps,
AxisOrdering ordering)
Construct an BDISBoundsIterator that will traverse the given space with an an ISBounds of the given shape (dimensions). |
|
BDISBoundsIterator(ISBounds space,
IntegerIndexSpaceID anchor,
int[] shape)
Construct a bounds iterator with specified anchor position, no gaps and default axis axisOrdering. |
|
BDISBoundsIterator(ISBounds space,
IntegerIndexSpaceID anchor,
int[] shape,
AxisOrdering ordering)
Construct a bounds iterator with specified anchor position and no gaps. |
|
BDISBoundsIterator(ISBounds space,
IntegerIndexSpaceID anchor,
int[] shape,
int[] gaps)
Construct a bounds iterator with specified anchor position and default axis axisOrdering. |
|
BDISBoundsIterator(ISBounds space,
IntegerIndexSpaceID anchor,
int[] shape,
int[] gaps,
AxisOrdering ordering)
Construct an BDISBoundsIterator that will traverse the given space with an an ISBounds of the given shape (dimensions). |
|
BDISBoundsIterator(ISBounds space,
ISBounds shape)
Construct a bounds iterator with no gaps and default AxisOrdering. |
|
BDISBoundsIterator(ISBounds space,
ISBounds shape,
AxisOrdering ordering)
Construct a bounds iterator with no gaps. |
Method Summary | |
---|---|
protected void |
BDsetupAndCheck(int[] shape,
int[] gaps)
|
java.lang.Object |
clone()
Return a copy of this BDISBoundsIterator |
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. |
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 BDISBoundsIterator |
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 specifed for the Iterator. |
static void |
main(java.lang.String[] args)
For debugging. |
boolean |
next()
Moving the BDISBoundsIterator to the next position. |
protected void |
resetAxis(int axisNumber)
|
void |
setBounds(ISBounds spaceBounds)
Change the bounds of the space that this object iterates over. |
java.lang.String |
toString()
Return a String representing the object. |
java.lang.String |
toString(java.lang.String indent)
Return description of this BDISBoundsIterator |
boolean |
valid()
Return true if the current position is a valid position in the IndexSpace. |
Methods inherited from class edu.unh.sdb.datasource.ISBoundsIterator |
---|
getAxisLength, getAxisOrdering, getBlockShape, getOrdering, getSpaceBounds, getSpaceDimensions, getSpaceDimensionsArray, getSteps, setupAndCheck |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int[] startPoint
protected boolean[] positiveDirection
Constructor Detail |
---|
public BDISBoundsIterator(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 iterationpublic BDISBoundsIterator(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 BDISBoundsIterator(ISBounds space, int[] shape)
space
- - space over which iteration is doneshape
- - shape of iteration blockpublic BDISBoundsIterator(ISBounds space, ISBounds shape)
space
- - space over which iteration is doneshape
- - shape of iteration blockpublic BDISBoundsIterator(ISBounds space, int[] shape, AxisOrdering ordering)
space
- - space over which iteration is doneshape
- - shape of iteration blockaxisOrdering
- - AxisOrdering for the spacepublic BDISBoundsIterator(ISBounds space, ISBounds shape, AxisOrdering ordering)
space
- - space over which iteration is doneshape
- - shape of iteration blockaxisOrdering
- - AxisOrdering for the spacepublic BDISBoundsIterator(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 iterationpublic BDISBoundsIterator(ISBounds space, IntegerIndexSpaceID anchor, int[] shape)
space
- - space over which iteration is doneanchor
- - anchor position of partitioningshape
- - shape of iteration blockpublic BDISBoundsIterator(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 BDISBoundsIterator(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 BDISBoundsIterator(int d)
Method Detail |
---|
protected final void BDsetupAndCheck(int[] shape, int[] gaps)
protected void init(ISBounds bounds)
init
in class ISBoundsIterator
protected void init(ISBounds bounds, IntegerIndexSpaceID anchor)
init
in class ISBoundsIterator
public void setBounds(ISBounds spaceBounds)
setBounds
in class ISBoundsIterator
public void init()
init
in interface SDBIterator
init
in class ISBoundsIterator
public void end()
end
in interface SDBIterator
end
in class ISBoundsIterator
protected void resetAxis(int axisNumber)
resetAxis
in class ISBoundsIterator
protected boolean incrementAxis(int axisNumber)
incrementAxis
in class ISBoundsIterator
public boolean valid()
valid
in interface SDBIterator
valid
in class ISBoundsIterator
public boolean isFullShape()
isFullShape
in class ISBoundsIterator
public boolean next()
next
in interface SDBIterator
next
in class ISBoundsIterator
public ISBounds copyBounds()
copyBounds
in class ISBoundsIterator
public java.lang.Object clone()
clone
in class ISBoundsIterator
public java.lang.String toString()
toString
in class ISBoundsIterator
public java.lang.String toString(java.lang.String indent)
toString
in class ISBoundsIterator
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |