edu.unh.sdb.lattice
Class GBoundsGapIterator

java.lang.Object
  extended by edu.unh.sdb.common.Bounds
      extended by edu.unh.sdb.lattice.GBounds
          extended by edu.unh.sdb.lattice.GBoundsIterator
              extended by edu.unh.sdb.lattice.GBoundsGapIterator
All Implemented Interfaces:
SDBIterator, java.lang.Cloneable

public class GBoundsGapIterator
extends GBoundsIterator
implements java.lang.Cloneable, SDBIterator


Field Summary
 
Fields inherited from class edu.unh.sdb.lattice.GBounds
lower, upper
 
Constructor Summary
GBoundsGapIterator(GBounds space, float[] shape, float[] gaps)
          Construct an GBoundsGapIterator that will traverse the given space with an an GBounds of the given shape (dimensions).
GBoundsGapIterator(GBounds space, float[] shape, float[] gaps, AxisOrdering ordering)
           
GBoundsGapIterator(GBounds space, Point start, float[] shape, float[] gaps)
           
GBoundsGapIterator(GBounds space, Point start, float[] shape, float[] gaps, AxisOrdering ordering)
           
 
Method Summary
 java.lang.Object clone()
          Return a copy of this GBoundsGapIterator
 GBounds copyBounds()
          Return a simple GBounds corresponding to the current value of this iterator.
 void end()
          Not implemented.
 Point getSteps()
          Return an IndexSpaceID representing the iterator's steps.
 void init()
          Initialize this GBoundsGapIterator
static void main(java.lang.String[] args)
          For debugging.
 boolean next()
          Moving the GBoundsGapIterator to the next position.
 java.lang.String toString()
          Return a String representing the object.
 java.lang.String toString(java.lang.String indent)
          Return description of this GBoundsGapIterator
 boolean valid()
          Return true if the current position is a valid position in the IndexSpace.
 
Methods inherited from class edu.unh.sdb.lattice.GBoundsIterator
getAxisLength, getAxisLengthArray, getAxisOrdering, getBlockShape
 
Methods inherited from class edu.unh.sdb.lattice.GBounds
boundingVolume, contains, contains, contains, copy, copyAndMoveToOrigin, dim, equals, getDimension, getDimensions, getDimensions, getLower, getLowerArray, getUpper, getUpperArray, intersects, move, move, moveTo, moveTo, moveToOrigin, setLower, setLower, setUpper, setUpper, volume
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GBoundsGapIterator

public GBoundsGapIterator(GBounds space,
                          float[] shape,
                          float[] gaps)
Construct an GBoundsGapIterator that will traverse the given space with an an GBounds of the given shape (dimensions). The last argument specifies the desired gaps between GBounds in each dimension. A gaps array of all zeros means the generated GBounds all abut exactly. If a gap value is positive, then there will be that many rows/columns between the generated GBounds in that dimension. If any of the gaps are negative, then the generated GBounds will overlap in the corresponding dimension. ( e.g. a gap of -1 means the Bounds will overlap by 1 row/column.) Values in the shape array must be >= 1, and values in the gaps array must allow the iterator to make forward progress. In particular, for negative gap values, the magnitude must be less than the shape value of the same dimension.


GBoundsGapIterator

public GBoundsGapIterator(GBounds space,
                          float[] shape,
                          float[] gaps,
                          AxisOrdering ordering)

GBoundsGapIterator

public GBoundsGapIterator(GBounds space,
                          Point start,
                          float[] shape,
                          float[] gaps)

GBoundsGapIterator

public GBoundsGapIterator(GBounds space,
                          Point start,
                          float[] shape,
                          float[] gaps,
                          AxisOrdering ordering)
Method Detail

init

public void init()
Initialize this GBoundsGapIterator

Specified by:
init in interface SDBIterator
Overrides:
init in class GBoundsIterator

getSteps

public final Point getSteps()
Return an IndexSpaceID representing the iterator's steps.


valid

public boolean valid()
Return true if the current position is a valid position in the IndexSpace.

Specified by:
valid in interface SDBIterator
Overrides:
valid in class GBoundsIterator

next

public boolean next()
Moving the GBoundsGapIterator to the next position.

Specified by:
next in interface SDBIterator
Overrides:
next in class GBoundsIterator

end

public void end()
Not implemented.

Specified by:
end in interface SDBIterator
Overrides:
end in class GBoundsIterator

copyBounds

public GBounds copyBounds()
Return a simple GBounds corresponding to the current value of this iterator.

Overrides:
copyBounds in class GBoundsIterator

clone

public java.lang.Object clone()
Return a copy of this GBoundsGapIterator

Overrides:
clone in class GBoundsIterator

toString

public java.lang.String toString()
Return a String representing the object.

Overrides:
toString in class GBoundsIterator

toString

public java.lang.String toString(java.lang.String indent)
Return description of this GBoundsGapIterator

Overrides:
toString in class GBoundsIterator

main

public static void main(java.lang.String[] args)
For debugging. Runs basic tests on the GBoundsGapIterator class.