Class TopologicalGraph
java.lang.Object
org.cloudbus.cloudsim.network.topologies.TopologicalGraph
Represents a graph containing vertices (nodes) and edges (links),
used for input with a network-layer.
Graphical-Output Restrictions:
- EdgeColors: GraphicalProperties.getColorEdge
- NodeColors: GraphicalProperties.getColorNode
- Since:
- CloudSim Toolkit 1.0
- Author:
- Thomas Hohnstein
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLink
(TopologicalLink edge) Adds a link between two topological nodes.void
addNode
(TopologicalNode node) Adds a Topological Node to this graph.Gets a read-only List of all network-graph links.Gets a read-only list of nodes of the network graph.int
Gets the number of links contained inside the topological-graph.int
Gets the number of nodes contained inside the topological-graph.toString()
-
Constructor Details
-
TopologicalGraph
public TopologicalGraph()Creates an empty network topology graph.
-
-
Method Details
-
addLink
Adds a link between two topological nodes.- Parameters:
edge
- the topological link
-
addNode
Adds a Topological Node to this graph.- Parameters:
node
- the topological node to add
-
getNumberOfNodes
public int getNumberOfNodes()Gets the number of nodes contained inside the topological-graph.- Returns:
- number of nodes
-
getNumberOfLinks
public int getNumberOfLinks()Gets the number of links contained inside the topological-graph.- Returns:
- number of links
-
getLinksList
Gets a read-only List of all network-graph links.- Returns:
- the List of network-graph links
-
toString
-
getNodeList
Gets a read-only list of nodes of the network graph.
-