RePast
v. 2.0

uchicago.src.sim.network
Class SquareLatticeNet

java.lang.Object
  |
  +--uchicago.src.sim.network.SquareLatticeNet

public class SquareLatticeNet
extends Object

Creates a square lattice network. Use NetworkFactory.createSquareLatticeNetwork rather than this class. DOCUMENTATION NOT COMPLETE!


Constructor Summary
SquareLatticeNet()
           
SquareLatticeNet(Class node, Class edge)
           
SquareLatticeNet(Class node, Class edge, int cols, int rows)
           
SquareLatticeNet(Class node, Class edge, int cols, int rows, boolean wrapAround, int connectRadius)
           
 
Method Summary
 ArrayList createSquareLatticeNet()
          * Use NetworkFactory.createSquareLatticeNetwork rather than this class.
 ArrayList createSquareLatticeNet(Class node, Class edge, int cols, int rows, boolean wrapAround, int connectRadius)
          !!! DOCS NEEDED !!!
 int getConnectRadius()
           
 Class getEdgeClass()
          Returns the Class of edges to be used in constructing the network.
 Class getNodeClass()
          Returns the Class of nodes to be used in constructing the network.
 int getNumCols()
           
 int getNumRows()
           
 int getSize()
          Returns the int for the size (number of nodes) in the network to be constructed.
 boolean isSymmetric()
          Returns true if the constructed network will always be symmetric.
 boolean isWrapAround()
           
 void setConnectRadius(int connectRadius)
          Sets the "radius" of neighbors along the grid which additional connections will be generated to.
 void setDimension(int cols, int rows)
           
 void setEdgeClass(Class edge)
          Sets the Class of edges to be used in constructing the network.
 void setNodeClass(Class node)
          Sets the Class of nodes to be used in constructing the network Must be set beforemakeSquareLatticeNet() is called.
 void setWrapAround(boolean wrapAround)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SquareLatticeNet

public SquareLatticeNet()

SquareLatticeNet

public SquareLatticeNet(Class node,
                        Class edge)

SquareLatticeNet

public SquareLatticeNet(Class node,
                        Class edge,
                        int cols,
                        int rows)

SquareLatticeNet

public SquareLatticeNet(Class node,
                        Class edge,
                        int cols,
                        int rows,
                        boolean wrapAround,
                        int connectRadius)
Method Detail

getNodeClass

public Class getNodeClass()
Returns the Class of nodes to be used in constructing the network. Must be set before makeSquareLatticeNet() is called.


setNodeClass

public void setNodeClass(Class node)
Sets the Class of nodes to be used in constructing the network Must be set beforemakeSquareLatticeNet() is called.


getEdgeClass

public Class getEdgeClass()
Returns the Class of edges to be used in constructing the network. Must be set before makeSquareLatticeNet() is called.


setEdgeClass

public void setEdgeClass(Class edge)
Sets the Class of edges to be used in constructing the network. Must be set before makeSquareLatticeNet() is called.


getNumCols

public int getNumCols()

getNumRows

public int getNumRows()

setDimension

public void setDimension(int cols,
                         int rows)

getSize

public int getSize()
Returns the int for the size (number of nodes) in the network to be constructed. Must be set before makeSquareLatticeNet() is called.


getConnectRadius

public int getConnectRadius()

setConnectRadius

public void setConnectRadius(int connectRadius)
Sets the "radius" of neighbors along the grid which additional connections will be generated to. In general, the average degree of each node will be 2*radius, but if nCols or nRows are not multiples of radius, there will be some nodes with lower degree.


isWrapAround

public boolean isWrapAround()

setWrapAround

public void setWrapAround(boolean wrapAround)

isSymmetric

public boolean isSymmetric()
Returns true if the constructed network will always be symmetric. (in a symmetric network, all ties i -> j = j -> i)


createSquareLatticeNet

public ArrayList createSquareLatticeNet()
                                 throws IllegalAccessException,
                                        InstantiationException
* Use NetworkFactory.createSquareLatticeNetwork rather than this class. !!!!!!! DOCS NEEDED !!!!!!!!

IllegalAccessException
InstantiationException

createSquareLatticeNet

public ArrayList createSquareLatticeNet(Class node,
                                        Class edge,
                                        int cols,
                                        int rows,
                                        boolean wrapAround,
                                        int connectRadius)
                                 throws IllegalAccessException,
                                        InstantiationException
!!! DOCS NEEDED !!!

USE NetworkFactory.createSquareLatticeNetwork rather than this.

Throws:
IllegalAccessException, - InstantiationException
IllegalAccessException
InstantiationException

RePast
v. 2.0

Bug reports and feature requests to RePast