Class TopologicalGraph

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

public class TopologicalGraph
extends java.lang.Object
This class 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

    Constructors 
    Constructor Description
    TopologicalGraph()
    Creates an empty graph-object.
  • Method Summary

    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.
    java.util.List<TopologicalLink> getLinksList()
    Gets a read-only List of all network-graph links.
    java.util.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.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • 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 java.util.List<TopologicalLink> getLinksList()
      Gets a read-only List of all network-graph links.
      Returns:
      the List of network-graph links
    • toString

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

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