pub fn parallel_triangle_count(graph: &CsrGraph) -> TriangleCountResultExpand description
Count triangles in an undirected graph using parallel intersection.
For each edge (u, v) where u < v, count the number of common neighbors w where w > v. This avoids triple-counting.
For directed graphs, edges are treated as undirected.
ยงComplexity
- Time: O(m * d_max / P) where m is edges, d_max is max degree, P is threads
- Space: O(V) for per-node triangle counts