Class TopologicalGraph
- java.lang.Object
-
- org.cloudbus.cloudsim.network.topologies.TopologicalGraph
-
public class TopologicalGraph extends Object
This class represents a graph containing vertices (nodes) and edges (links), used for input with a network-layer.Graphical-Output Restricions:
- EdgeColors: GraphicalProperties.getColorEdge
- NodeColors: GraphicalProperties.getColorNode
- Since:
- CloudSim Toolkit 1.0
- Author:
- Thomas Hohnstein
-
-
Constructor Summary
Constructors Constructor Description TopologicalGraph()
Creates an empty graph-object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLink(TopologicalLink edge)
Adds an link between two topological nodes.void
addNode(TopologicalNode node)
Adds an Topological Node to this graph.List<TopologicalLink>
getLinksList()
Gets a read-only List of all network-graph links.List<TopologicalNode>
getNodeList()
Gets a read-only list of nodes of the network graph.int
getNumberOfLinks()
Gets the number of links contained inside the topological-graph.int
getNumberOfNodes()
Gets the number of nodes contained inside the topological-graph.String
toString()
-
-
-
Method Detail
-
addLink
public void addLink(TopologicalLink edge)
Adds an link between two topological nodes.- Parameters:
edge
- the topological link
-
addNode
public void addNode(TopologicalNode node)
Adds an 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
public List<TopologicalLink> getLinksList()
Gets a read-only List of all network-graph links.- Returns:
- the List of network-graph links
-
getNodeList
public List<TopologicalNode> getNodeList()
Gets a read-only list of nodes of the network graph.
-
-