// Exact close-pair hazard and connectedness test; same predicates as NumPy. // C ABI keeps this numerical hot loop independent of ROS and Python versions. #include #include template int connected_grade(const T* p, int n) { if (n <= 0) return 0; std::vector parent(n); for(int i=0;iT(0.1001)) return 0; parent[root(i)]=root(j); } } const int first=root(0); for(int i=1;i