jist.swans.field
Class Placement.Grid

java.lang.Object
  extended by jist.swans.field.Placement.Grid
All Implemented Interfaces:
Placement
Enclosing interface:
Placement

public static class Placement.Grid
extends java.lang.Object
implements Placement

Placement along a regular grid.


Nested Class Summary
 
Nested classes/interfaces inherited from interface jist.swans.field.Placement
Placement.Grid, Placement.Random
 
Field Summary
 
Fields inherited from interface jist.swans.field.Placement
UNBOUNDED
 
Constructor Summary
Placement.Grid(Location loc, int nodex, int nodey)
          Initialize grid placement model.
Placement.Grid(Location loc, java.lang.String s)
          Initialize grid placement model.
Placement.Grid(java.lang.String field, java.lang.String nodes)
          Initialize grid placement model.
 
Method Summary
 Location getNextLocation()
          Return location of next node.
 int getSize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Placement.Grid

public Placement.Grid(Location loc,
                      int nodex,
                      int nodey)
Initialize grid placement model.

Parameters:
loc - field dimensions (in meters)
nodex - number of nodes in x-dimension
nodey - number of nodes in y-dimension

Placement.Grid

public Placement.Grid(Location loc,
                      java.lang.String s)
Initialize grid placement model.

Parameters:
loc - field dimensions (in meters)
s - node configuration string

Placement.Grid

public Placement.Grid(java.lang.String field,
                      java.lang.String nodes)
Initialize grid placement model.

Parameters:
field - field dimensions string
nodes - node configuration string
Method Detail

getSize

public int getSize()
Specified by:
getSize in interface Placement
Returns:
number of nodes, if known apriori. If not known, return UNBOUNDED

getNextLocation

public Location getNextLocation()
Return location of next node.

Specified by:
getNextLocation in interface Placement
Returns:
location of next node