Expand description
Shared spatial-hash clustering with union-find.
Used by the obstacle detector, scene graph builder, and perception pipeline to avoid duplicating the same algorithm.
§Optimizations
- Union-by-rank prevents tree degeneration, keeping
findnear O(α(n)). - Path halving in
findfor efficient path compression. #[inline]on hot helpers to ensure inlining in tight loops.
Functions§
- cluster_
point_ cloud - Cluster a point cloud using spatial hashing and union-find over adjacent cells.