pub fn union_find_parallel(
n: usize,
edges: &[(NodeId, NodeId)],
) -> Result<Vec<ComponentId>>Expand description
Parallel union-find using Shiloach-Vishkin style algorithm.
This implementation uses atomic operations for thread-safe parallel execution. The algorithm works in rounds of:
- Hook: For each edge, attempt to hook smaller component under larger
- Jump: Pointer jumping to flatten trees
Continues until no changes occur (convergence).