Benchmark and expose disjoint-set islands

Signed-off-by: teerthsharma <teerths57@gmail.com>
This commit is contained in:
teerthsharma
2026-07-18 16:59:24 +05:30
committed by teerthsharma
parent ba2782140f
commit 5d91d878c2
5 changed files with 772 additions and 36 deletions
+6
View File
@@ -23,6 +23,12 @@
extern "C" {
#endif
MJAPI int _mjPRIVATE_dsuFind(int* parent, int tree);
MJAPI void _mjPRIVATE_dsuInit(int* parent, int ntree);
MJAPI void _mjPRIVATE_dsuUnion(int* parent, int tree1, int tree2);
MJAPI int _mjPRIVATE_dsuAssign(int* island, int* parent,
const int* tree_dofnum, int ntree, int* nidof);
// find disjoint subgraphs ("islands") given sparse symmetric adjacency matrix
MJAPI int mj_floodFill(int* island, int nr, const int* rownnz, const int* rowadr, const int* colind,