edu.unh.sdb.lattice
Class GIterator

java.lang.Object
  extended by edu.unh.sdb.common.SpaceID
      extended by edu.unh.sdb.lattice.Point
          extended by edu.unh.sdb.lattice.GIterator
All Implemented Interfaces:
java.lang.Cloneable

public class GIterator
extends Point
implements java.lang.Cloneable

Child class of Point. GIterator can iterate through a Domain


Field Summary
 
Fields inherited from class edu.unh.sdb.lattice.Point
axes
 
Constructor Summary
GIterator(GBounds db)
          Constructor taking an GBounds, which specifies the IndexSpace
GIterator(GBounds db, AxisOrdering ord)
          Constructor taking an GBounds, which specifies the Domain, and the AxisOrdering which specifies the axis incrementation order
GIterator(GBounds db, AxisOrdering ord, float[] steps)
          Constructor taking an GBounds, AxisOrdering and steps array
GIterator(GBounds db, float[] steps)
          Constructor taking an GBounds, which specifies the Domain and the steps array allowing GIterator increment step other than 1
 
Method Summary
 java.lang.Object clone()
          Return a copy of this GIterator
 boolean containedBy(GBounds db)
          Returns true if this Point is contained by the GBounds parameter, or false otherwise.
 Point copyID()
          Return a Point corresponding to the current position.
 float getCoord(int axisNumber)
          Get the value corresponding to the specified axis.
 boolean hasMoreElements()
          Return true if this GIterator can be incremented.
 void init()
          Initilize this ISiterator
static void main(java.lang.String[] args)
           
 boolean next()
          Increment the GIterator to the next position.
 void setBounds(GBounds bound)
          Change the IndexSpace to which this GIterator is bound
 void setCoord(int axisNumber, float value)
          Set the specified axis to the specified value.
 java.lang.String toString()
          Return a String representing the object.
 java.lang.String toString(java.lang.String indent)
          Return a String representing the object indented by the argument string.
 boolean valid()
          Return true if the current position is a valid position in the IndexSpace.
 
Methods inherited from class edu.unh.sdb.lattice.Point
add, assign, assign, dim, distance, equal, getCoords, getFloatAxis, getIntAxis, greaterThanOrEqual, lessThanOrEqual, makeDatum, negate, print, setCoord, setCoords, subtract
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GIterator

public GIterator(GBounds db)
Constructor taking an GBounds, which specifies the IndexSpace


GIterator

public GIterator(GBounds db,
                 AxisOrdering ord)
Constructor taking an GBounds, which specifies the Domain, and the AxisOrdering which specifies the axis incrementation order


GIterator

public GIterator(GBounds db,
                 float[] steps)
Constructor taking an GBounds, which specifies the Domain and the steps array allowing GIterator increment step other than 1


GIterator

public GIterator(GBounds db,
                 AxisOrdering ord,
                 float[] steps)
Constructor taking an GBounds, AxisOrdering and steps array

Method Detail

copyID

public Point copyID()
Return a Point corresponding to the current position.


clone

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

Overrides:
clone in class Point

toString

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

Overrides:
toString in class Point

toString

public java.lang.String toString(java.lang.String indent)
Return a String representing the object indented by the argument string.

Overrides:
toString in class Point

setBounds

public void setBounds(GBounds bound)
Change the IndexSpace to which this GIterator is bound


init

public void init()
Initilize this ISiterator


getCoord

public float getCoord(int axisNumber)
Get the value corresponding to the specified axis.

Overrides:
getCoord in class Point

setCoord

public void setCoord(int axisNumber,
                     float value)
Set the specified axis to the specified value.

Overrides:
setCoord in class Point

valid

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


next

public boolean next()
Increment the GIterator to the next position.


hasMoreElements

public boolean hasMoreElements()
Return true if this GIterator can be incremented.


containedBy

public boolean containedBy(GBounds db)
Returns true if this Point is contained by the GBounds parameter, or false otherwise. If the GBounds has a diifferent dimensionality than this Point, then a DimensionalityException is thrown.

Overrides:
containedBy in class Point

main

public static void main(java.lang.String[] args)