edu.unh.sdb.lattice
Class GBoundsIterator

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

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


Field Summary
 
Fields inherited from class edu.unh.sdb.lattice.GBounds
lower, upper
 
Constructor Summary
GBoundsIterator(GBounds space, float[] shape)
          Construct an GBoundsIterator that will traverse the given space with an an GBounds of the given shape (dimensions).
GBoundsIterator(GBounds space, float[] shape, AxisOrdering ordering)
           
GBoundsIterator(GBounds space, IndexSpaceID dimensions)
           
GBoundsIterator(GBounds space, int[] dimensions)
           
GBoundsIterator(GBounds space, Point start, float[] shape)
           
GBoundsIterator(GBounds space, Point start, float[] shape, AxisOrdering ordering)
           
 
Method Summary
 java.lang.Object clone()
          Return a copy of this GBoundsIterator
 GBounds copyBounds()
          Return a simple GBounds corresponding to the current value of this iterator.
 void end()
          Not implemented.
 float getAxisLength(int axis)
          Return the length of this iterator's space along the specified axis.
 float[] getAxisLengthArray()
          Returns an array of ints representing the dimensions of the space being iterated over.
 AxisOrdering getAxisOrdering()
          Return the AxisOrdering object for this iterator.
 Point getBlockShape()
          Return an IndexSpaceID representing the shape of the iterator's blocks.
 void init()
          Initialize this GBoundsIterator so that its value is set to the first GBounds in the iteration.
static void main(java.lang.String[] args)
          For debugging.
 boolean next()
          Moving the GBoundsIterator 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 GBoundsIterator
 boolean valid()
          Return true if the current position is a valid position in the IndexSpace.
 
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

GBoundsIterator

public GBoundsIterator(GBounds space,
                       float[] shape)
Construct an GBoundsIterator that will traverse the given space with an an GBounds of the given shape (dimensions). Values in the shape array must be >= 1.


GBoundsIterator

public GBoundsIterator(GBounds space,
                       IndexSpaceID dimensions)

GBoundsIterator

public GBoundsIterator(GBounds space,
                       int[] dimensions)

GBoundsIterator

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

GBoundsIterator

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

GBoundsIterator

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

init

public void init()
Initialize this GBoundsIterator so that its value is set to the first GBounds in the iteration.

Specified by:
init in interface SDBIterator

getAxisOrdering

public final AxisOrdering getAxisOrdering()
Return the AxisOrdering object for this iterator.


getAxisLength

public final float getAxisLength(int axis)
Return the length of this iterator's space along the specified axis.


getAxisLengthArray

public final float[] getAxisLengthArray()
Returns an array of ints representing the dimensions of the space being iterated over.


getBlockShape

public final Point getBlockShape()
Return an IndexSpaceID representing the shape of the iterator's blocks.


valid

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

Specified by:
valid in interface SDBIterator

next

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

Specified by:
next in interface SDBIterator

end

public void end()
Not implemented.

Specified by:
end in interface SDBIterator

copyBounds

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

Overrides:
copyBounds in class GBounds

clone

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

Overrides:
clone in class GBounds

toString

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

Overrides:
toString in class GBounds

toString

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

Overrides:
toString in class GBounds

main

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