|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uci.ics.jung.algorithms.metrics.Metrics
public class Metrics
A class consisting of static methods for calculating graph metrics.
Constructor Summary | |
---|---|
Metrics()
|
Method Summary | ||
---|---|---|
static
|
clusteringCoefficients(Graph<V,E> graph)
Returns a Map of vertices to their clustering coefficients. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Metrics()
Method Detail |
---|
public static <V,E> Map<V,Double> clusteringCoefficients(Graph<V,E> graph)
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.
graph
- the graph whose clustering coefficients are to be calculated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |