Class 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 Detail

      • TopologicalGraph

        public TopologicalGraph()
        Creates an empty graph-object.
    • 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.