Documentation of 'edu.uci.ics.jung.algorithms.metrics.Metrics' Java class
Metrics
edu.uci.ics.jung.algorithms.metrics

Class Metrics



  • public class Metrics
    extends java.lang.Object
    A class consisting of static methods for calculating graph metrics.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Metrics() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static <V,E> java.util.Map<V,java.lang.Double> clusteringCoefficients(Graph<V,E> graph)
      Returns a Map of vertices to their clustering coefficients.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Metrics

        public Metrics()
    • Method Detail

      • clusteringCoefficients

        public static <V,E> java.util.Map<V,java.lang.Double> clusteringCoefficients(Graph<V,E> graph)
        Returns a Map of vertices to their clustering coefficients. The clustering coefficient cc(v) of a vertex v is defined as follows:
        • degree(v) == {0,1}: 0
        • degree(v) == n, n >= 2: given S, the set of neighbors of v: cc(v) = (the sum over all w in S of the number of other elements of w that are neighbors of w) / ((|S| * (|S| - 1) / 2). Less formally, the fraction of v's neighbors that are also neighbors of each other.

        Note: This algorithm treats its argument as an undirected graph; edge direction is ignored.

        Type Parameters:
        V - the vertex type
        E - the edge type
        Parameters:
        graph - the graph whose clustering coefficients are to be calculated
        Returns:
        the clustering coefficient for each vertex
        See Also:
        "The structure and function of complex networks, M.E.J. Newman, aps.arxiv.org/abs/cond-mat/0303516"

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.