pub fn vietoris_rips_h0(points: &[&[f32]]) -> PersistenceDiagramExpand description
Compute Vietoris-Rips persistent homology (dimension 0 only).
Dimension 0 (connected components) tracks how clusters merge as the filtration radius grows. This is equivalent to single-linkage clustering.
§Algorithm
- Compute pairwise distance matrix.
- Sort edges by distance (Kruskal’s algorithm).
- Use Union-Find to track component merges.
- Each merge creates a death event for the younger component.
§Complexity
O(N² log N) for N points (dominated by sorting N² edges).
For region centroids (N~80), this is ~6,400 edges — instant.