org.simnet.layouts
Class GridLayout

java.lang.Object
  extended by org.simnet.layouts.GridLayout
All Implemented Interfaces:
Layout

public class GridLayout
extends Object
implements Layout

Lay neurons out in a line.

Author:
jyoshimi

Constructor Summary
GridLayout(double hSpacing, double vSpacing, int numColumns)
          Create a layout.
 
Method Summary
 String getLayoutName()
           
 void layoutNeurons(Network network)
          Perform the layout.
 void setInitialLocation(Point2D initialPoint)
          Set the initial position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridLayout

public GridLayout(double hSpacing,
                  double vSpacing,
                  int numColumns)
Create a layout.

Parameters:
hSpacing - horizontal spacing between neurons
vSpacing - vertical spacing between neurons
numColumns - number of columns of neurons
Method Detail

layoutNeurons

public void layoutNeurons(Network network)
Description copied from interface: Layout
Perform the layout.

Specified by:
layoutNeurons in interface Layout
Parameters:
network - reference to network whose nodes should be laid out
See Also:
Layout

setInitialLocation

public void setInitialLocation(Point2D initialPoint)
Description copied from interface: Layout
Set the initial position.

Specified by:
setInitialLocation in interface Layout
Parameters:
initialPoint - initial position
See Also:
Layout

getLayoutName

public String getLayoutName()
Specified by:
getLayoutName in interface Layout
Returns:
the name of this layout type
See Also:
Layout