Skip to main content

count_triangles

Function count_triangles 

Source
pub fn count_triangles(graph: &Graph) -> IgraphResult<u64>
Expand description

Count the number of triangles in graph. Edge directions, parallel edges, and self-loops are ignored.

Counterpart of igraph_count_triangles(). Returns the number of triangles as a u64 (fits comfortably for graphs up to about n = 600 000 cliques).