Class ClusteringCoefficient

Class Documentation

class ClusteringCoefficient

Public Static Functions

static double avgLocal(Graph &G, bool turbo = false)

DEPRECATED: use centrality.LocalClusteringCoefficient and take average

This calculates the average local clustering coefficient of graph G.


$$c(G) := \frac{1}{n} \sum_{u \in V} c(u)$$ where $c(u) := \frac{2 \cdot |E(N(u))| }{\deg(u) \cdot ( \deg(u) - 1)}$


G – The graph (may not contain self-loops).

static double sequentialAvgLocal(const Graph &G)
static double approxAvgLocal(Graph &G, count trials)
static double exactGlobal(Graph &G)

This calculates the global clustering coefficient

static double approxGlobal(Graph &G, count trials)