Class EdgeBetweeness<V>

  • Type Parameters:
    V - vertex type

    public class EdgeBetweeness<V>
    extends Object
    The edge betweenness centrality is defined as the number of the shortest paths that go through an edge in a graph or network.
    See Also:
    Edge Betweenness Centrality
    • Constructor Detail

      • EdgeBetweeness

        public EdgeBetweeness​(UnDiGraph<V,​? extends UndirectedEdge<V>> g)
        Computes the edge-betweeness-es of all edges in an undirected graph.
        Parameters:
        g - an undirected graph
    • Method Detail

      • contains

        public boolean contains​(UndirectedEdge<V> edge)
        Checks if the graph contains an edge.
        Parameters:
        edge - an edge
        Returns:
        true if the graph contains an edge
      • value

        public double value​(UndirectedEdge<V> edge)
        Gets the edge-betweeness of an edge.
        Parameters:
        edge - an edge
        Returns:
        the edge-betweeness
      • edges

        public Set<UndirectedEdge<V>> edges()
        Gets the set of all edges in the graph.
        Returns:
        the set of all edges
      • maxEdge

        public UndirectedEdge<V> maxEdge()
        Gets the edge with the maximal edge-betweeness.
        Returns:
        the edge with the maximal edge-betweeness; null if no edge in the cluster
      • maxValue

        public double maxValue()
        Gets the maximum of edge-betweeness-es.
        Returns:
        the maximal edge-betweeness-es
      • isEmpty

        public boolean isEmpty()
        Checks if there is no edge, e.g., all vertices are isolated.
        Returns:
        true if there is no edge