Reuse sparse Dof-Dof matrix to make compressed sparse M in mj_addM.

PiperOrigin-RevId: 556823353
Change-Id: I650ac83767d60c69859aae6e38aa331f43814378
This commit is contained in:
Kyle Bayes
2023-08-14 09:48:35 -07:00
committed by Copybara-Service
parent 7e1c65b10e
commit f34cb22bd3
4 changed files with 115 additions and 61 deletions
+3 -3
View File
@@ -116,9 +116,9 @@ MJAPI void mj_mulM2(const mjModel* m, const mjData* d, mjtNum* res, const mjtNum
MJAPI void mj_addM(const mjModel* m, mjData* d, mjtNum* dst,
int* rownnz, int* rowadr, int* colind);
// create inertia matrix M (uncompressed)
MJAPI void mj_createMSparse(const mjModel* m, mjData* d, mjtNum* M,
int* M_rownnz, int* M_rowadr, int* M_colind);
// make inertia matrix M
MJAPI void mj_makeMSparse(const mjModel* m, mjData* d, mjtNum* M,
int* M_rownnz, int* M_rowadr, int* M_colind);
// add inertia matrix to sparse destination matrix
MJAPI void mj_addMSparse(const mjModel* m, mjData* d, mjtNum* dst,