Package ons.util

Class WeightedGraphMultiWeight

java.lang.Object
ons.util.WeightedGraphMultiWeight

public class WeightedGraphMultiWeight
extends java.lang.Object
This graphs shows the reach of each node in each modulation level to all nodes in topology. If the node is unreachable in modulation level then the edge's weight is 0.
  • Constructor Details

  • Method Details

    • size

      public int size()
    • getLevels

      public int getLevels()
    • addEdge

      public void addEdge​(int source, int target, double w, int level)
    • isEdge

      public boolean isEdge​(int source, int target, int level)
    • removeEdge

      public void removeEdge​(int source, int target, int level)
    • getWeight

      public double getWeight​(int source, int target, int level)
    • getEdge

      public WeightedGraphMultiWeightEdge getEdge​(int src, int dst)
    • neighbors

      public int[] neighbors​(int vertex, int level)
    • toString

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

      public void removeNodeEdge​(int node, int level)
    • removeNodeEdge

      public void removeNodeEdge​(int node)
    • removeNode

      public void removeNode​(int node)
    • getGraphDiameter

      public double getGraphDiameter​(int level)
      Retrieves the diameter of this graph.
      Parameters:
      level - the edge level
      Returns:
      the longest of all the calculated shortest paths in a network
    • getClusteringCoefficient

      public double getClusteringCoefficient​(int node, int level)
      Retrieves the clustering coefficient of this node. The clustering coefficient of a node is the ratio of existing links connecting a node's neighbors to each other to the maximum possible number of such links.
      Parameters:
      node - the node
      level - the modulation level
      Returns:
      the clustering coefficient