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
private  float x
          placement boundaries.
private  float y
          placement boundaries.
 
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.
private  void init(float x, float y)
          Initialize random placement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

private float x
placement boundaries.


y

private float y
placement boundaries.

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

init

private void init(float x,
                  float y)
Initialize random placement.

Parameters:
x - field x-dimension (in meters)
y - field y-dimension (in meters)

getNextLocation

public Location getNextLocation()
Return location of next node.

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