Skip to main content

triangles

Function triangles 

Source
pub fn triangles(graph: &Graph) -> TrianglesResult
Expand description

Counts the number of triangles each node participates in.

A triangle is a 3-clique. Each triangle is counted once per participating node. Returns nodes in graph’s node-insertion order (matching G.nodes()).