Class TopologicalGraph

java.lang.Object
org.cloudbus.cloudsim.network.topologies.TopologicalGraph

public class TopologicalGraph extends Object
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 Details

    • TopologicalGraph

      public TopologicalGraph()
      Creates an empty network topology graph.
  • Method Details

    • addLink

      public void addLink(TopologicalLink edge)
      Adds a link between two topological nodes.
      Parameters:
      edge - the topological link
    • addNode

      public void addNode(TopologicalNode node)
      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

      public List<TopologicalLink> getLinksList()
      Gets a read-only List of all network-graph links.
      Returns:
      the List of network-graph links
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getNodeList

      public List<TopologicalNode> getNodeList()
      Gets a read-only list of nodes of the network graph.