public class TorusGenerator extends GridGenerator
The TorusGenerator
is a TopologyGenerator
used to generated tori of Node
s.
This implementation relies on the GridGenerator
.
absoluteCoords, dimensionsMap, directed, FIRST_DIMENSION_INDEX, nbNodesMap, nodeClass, SECOND_DIMENSION_INDEX, wired, wirelessEnabled, x, y
Constructor and Description |
---|
TorusGenerator(int nbRows,
int nbColumns)
Creates a
TorusGenerator creating a torus with nbRows rows and nbColumns columns. |
Modifier and Type | Method and Description |
---|---|
protected void |
addLinks(Topology tp,
int nbRows,
int nbColumns,
Node[][] nodes) |
generate, generateGrid, getHeight, getWidth, setHeight, setWidth
addNodeAtLocation, getAbsoluteHeight, getAbsoluteWidth, getAbsoluteX, getAbsoluteY, getDimension, getNbNodes, getNbNodes, getNodeClass, getSize, getX, getY, isAbsoluteCoords, isDirected, isWired, isWirelessEnabled, setAbsoluteCoords, setDefaultWidthHeight, setDimension, setDirected, setNbNodes, setNbNodes, setNodeClass, setSize, setWired, setWirelessEnabled, setX, setY
public TorusGenerator(int nbRows, int nbColumns)
TorusGenerator
creating a torus with nbRows rows and nbColumns columns.nbRows
- the amount of desired rows.nbColumns
- the amount of desired columns.protected void addLinks(Topology tp, int nbRows, int nbColumns, Node[][] nodes)
addLinks
in class GridGenerator