public class TopologyGenerators
extends java.lang.Object
TopologyGenerators
is a convenience class providing methods used to generate different patterns with default
values.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_NODE_MODEL |
Constructor and Description |
---|
TopologyGenerators() |
Modifier and Type | Method and Description |
---|---|
static void |
generateGrid(Topology topology,
int order)
Generates a grid.
|
static void |
generateGrid(Topology topology,
int nbNodesRow,
int nbNodesColumn)
Generates a grid.
|
static void |
generateGrid(Topology topology,
int nbNodesRow,
int nbNodesColumn,
java.lang.String nodeModelName)
Generates a grid.
|
static void |
generateGrid(Topology topology,
int order,
java.lang.String nodeModelName)
Generates a grid.
|
static void |
generateKN(Topology topology,
int nbNodes)
Generates a complete graph (Kn), as a ring.
|
static void |
generateKN(Topology topology,
int nbNodes,
java.lang.String nodeModelName)
Generates a complete graph (Kn), as a ring.
|
static void |
generateLine(Topology topology,
int nbNodes)
Generates an horizontal line.
|
static void |
generateLine(Topology topology,
int nbNodes,
java.lang.String nodeModelName)
Generates an horizontal line.
|
static void |
generateRing(Topology topology,
int nbNodes)
Generates a ring.
|
static void |
generateRing(Topology topology,
int nbNodes,
boolean directed)
Generates a ring.
|
static void |
generateRing(Topology topology,
int nbNodes,
boolean directed,
java.lang.String nodeModelName)
Generates a ring.
|
static void |
generateRing(Topology topology,
int nbNodes,
java.lang.String nodeModelName)
Generates a ring.
|
static void |
generateTorus(Topology topology,
int order)
Generates a torus.
|
static void |
generateTorus(Topology topology,
int order,
java.lang.String nodeModelName)
Generates a torus.
|
public static final java.lang.String DEFAULT_NODE_MODEL
public static void generateLine(Topology topology, int nbNodes)
public static void generateLine(Topology topology, int nbNodes, java.lang.String nodeModelName)
topology
- the related Topology
object.nbNodes
- the desired amount of Node
s.nodeModelName
- the model name under which the Class
object (used to instantiate the
Node
) is known in the provided Topology
(see Topology.setNodeModel(String, Class)
).public static void generateRing(Topology topology, int nbNodes)
public static void generateRing(Topology topology, int nbNodes, java.lang.String nodeModelName)
topology
- the related Topology
object.nbNodes
- the desired amount of Node
s.nodeModelName
- the model name under which the Class
object (used to instantiate the
Node
) is known in the provided Topology
(see Topology.setNodeModel(String, Class)
).public static void generateRing(Topology topology, int nbNodes, boolean directed)
public static void generateRing(Topology topology, int nbNodes, boolean directed, java.lang.String nodeModelName)
topology
- the related Topology
object.nbNodes
- the desired amount of Node
s.directed
- true
if the links should be directed; false
otherwise.nodeModelName
- the model name under which the Class
object (used to instantiate the
Node
) is known in the provided Topology
(see Topology.setNodeModel(String, Class)
).public static void generateGrid(Topology topology, int order)
public static void generateGrid(Topology topology, int order, java.lang.String nodeModelName)
topology
- the related Topology
object.order
- the desired amount of Node
s per row and per column.nodeModelName
- the model name under which the Class
object (used to instantiate the
Node
) is known in the provided Topology
(see Topology.setNodeModel(String, Class)
).public static void generateGrid(Topology topology, int nbNodesRow, int nbNodesColumn)
public static void generateGrid(Topology topology, int nbNodesRow, int nbNodesColumn, java.lang.String nodeModelName)
topology
- the related Topology
object.nbNodesRow
- the desired amount of Node
s per row.nbNodesColumn
- the desired amount of Node
s per column.nodeModelName
- the model name under which the Class
object (used to instantiate the
Node
) is known in the provided Topology
(see Topology.setNodeModel(String, Class)
).public static void generateTorus(Topology topology, int order)
public static void generateTorus(Topology topology, int order, java.lang.String nodeModelName)
topology
- the related Topology
object.order
- the desired amount of Node
s per row and per column.nodeModelName
- the model name under which the Class
object (used to instantiate the
Node
) is known in the provided Topology
(see Topology.setNodeModel(String, Class)
).public static void generateKN(Topology topology, int nbNodes)
public static void generateKN(Topology topology, int nbNodes, java.lang.String nodeModelName)
topology
- the related Topology
object.nbNodes
- the desired amount of Node
s.nodeModelName
- the model name under which the Class
object (used to instantiate the
Node
) is known in the provided Topology
(see Topology.setNodeModel(String, Class)
).