Refactor utility functions for block extraction.
PiperOrigin-RevId: 908744392 Change-Id: I8d1323946870c90d5e37b1853697fb35d5291e11
This commit is contained in:
committed by
Copybara-Service
parent
3367b64a8e
commit
f7d31e06f0
@@ -158,13 +158,25 @@ MJAPI void mju_sqrMatTDSparseNumeric(
|
||||
// precompute res_rowadr for mju_sqrMatTDSparse using uncompressed memory
|
||||
MJAPI void mju_sqrMatTDUncompressedInit(int* res_rowadr, int nc);
|
||||
|
||||
// extract a single block of a dense matrix
|
||||
void mju_block(mjtNum* res, const mjtNum* mat, int nc_mat, int nc_res, int nr,
|
||||
const int* perm_r, const int* perm_c);
|
||||
|
||||
// block-diagonalize a dense matrix
|
||||
MJAPI void mju_blockDiag(mjtNum* res, const mjtNum* mat,
|
||||
int nc_mat, int nc_res, int nb,
|
||||
MJAPI void mju_blockDiag(mjtNum* res, const mjtNum* mat, int nc_mat, int nc_res, int nb,
|
||||
const int* perm_r, const int* perm_c,
|
||||
const int* block_nr, const int* block_nc,
|
||||
const int* block_r, const int* block_c);
|
||||
|
||||
// extract a single block of a sparse matrix
|
||||
void mju_blockSparse(
|
||||
mjtNum* res, int* res_rownnz, int* res_rowadr, int* res_colind,
|
||||
const mjtNum* mat, const int* rownnz, const int* rowadr, const int* colind,
|
||||
int nr,
|
||||
const int* perm_r, const int* perm_c,
|
||||
int col_offset, int res_offset,
|
||||
mjtNum* res2, const mjtNum* mat2);
|
||||
|
||||
// block-diagonalize a sparse matrix
|
||||
MJAPI void mju_blockDiagSparse(
|
||||
mjtNum* res, int* res_rownnz, int* res_rowadr, int* res_colind,
|
||||
|
||||
Reference in New Issue
Block a user