clustering_coefficient

Function clustering_coefficient 

Source
pub fn clustering_coefficient<N, E, Ix>(
    graph: &Graph<N, E, Ix>,
) -> Result<HashMap<N, f64>>
where N: Node + Debug, E: EdgeWeight, Ix: IndexType,
Expand description

Calculates the local clustering coefficient for each node in an undirected graph

The clustering coefficient measures how close a node’s neighbors are to being a clique.

§Arguments

  • graph - The graph to analyze

§Returns

  • Result<HashMap<N, f64>> - A map from nodes to their clustering coefficients