jist.swans.field
Class Placement.Random

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

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

Random (uniform) placement.


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.Random(float x, float y)
          Initialize random placement model.
Placement.Random(Location loc)
          Initialize random placement.
Placement.Random(java.lang.String field)
          Initialize random placement.
 
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.Random

public Placement.Random(float x,
                        float y)
Initialize random placement model.

Parameters:
x - x-axis upper limit
y - y-axis upper limit

Placement.Random

public Placement.Random(Location loc)
Initialize random placement.

Parameters:
loc - upper limit coordinate

Placement.Random

public Placement.Random(java.lang.String field)
Initialize random placement.

Parameters:
field - field dimensions 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