Change MuJoCo engine source code function-spacing convention from 3 blank lines to 2
PiperOrigin-RevId: 813754244 Change-Id: I6836e41c3b021cb727e922c25c60f629b9814c93
This commit is contained in:
committed by
Copybara-Service
parent
c439628f82
commit
edbdb5195c
@@ -58,7 +58,6 @@ void mju_dotSparseX3(mjtNum* res0, mjtNum* res1, mjtNum* res2,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// dot-product, both vectors are sparse
|
||||
mjtNum mju_dotSparse2(const mjtNum* vec1, const int* ind1, int nnz1,
|
||||
const mjtNum* vec2, const int* ind2, int nnz2) {
|
||||
@@ -91,7 +90,6 @@ mjtNum mju_dotSparse2(const mjtNum* vec1, const int* ind1, int nnz1,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// convert matrix from dense to sparse
|
||||
// nnz is size of res and colind, return 1 if too small, 0 otherwise
|
||||
int mju_dense2sparse(mjtNum* res, const mjtNum* mat, int nr, int nc,
|
||||
@@ -129,7 +127,6 @@ int mju_dense2sparse(mjtNum* res, const mjtNum* mat, int nr, int nc,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// convert matrix from sparse to dense
|
||||
void mju_sparse2dense(mjtNum* res, const mjtNum* mat, int nr, int nc,
|
||||
const int* rownnz, const int* rowadr, const int* colind) {
|
||||
@@ -145,7 +142,6 @@ void mju_sparse2dense(mjtNum* res, const mjtNum* mat, int nr, int nc,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// multiply sparse matrix and dense vector: res = mat * vec.
|
||||
void mju_mulMatVecSparse(mjtNum* res, const mjtNum* mat, const mjtNum* vec,
|
||||
int nr, const int* rownnz, const int* rowadr,
|
||||
@@ -161,7 +157,6 @@ void mju_mulMatVecSparse(mjtNum* res, const mjtNum* mat, const mjtNum* vec,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// multiply transposed sparse matrix and dense vector: res = mat' * vec.
|
||||
void mju_mulMatTVecSparse(mjtNum* res, const mjtNum* mat, const mjtNum* vec, int nr, int nc,
|
||||
const int* rownnz, const int* rowadr, const int* colind) {
|
||||
@@ -221,7 +216,6 @@ void mju_addToSymSparse(mjtNum* res, const mjtNum* mat, int n,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// multiply symmetric matrix (only lower triangle represented) by vector:
|
||||
// res = (mat + strict_upper(mat')) * vec
|
||||
void mju_mulSymVecSparse(mjtNum* restrict res, const mjtNum* restrict mat,
|
||||
@@ -252,7 +246,6 @@ void mju_mulSymVecSparse(mjtNum* restrict res, const mjtNum* restrict mat,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// count the number of non-zeros in the sum of two sparse vectors
|
||||
int mju_combineSparseCount(int a_nnz, int b_nnz, const int* a_ind, const int* b_ind) {
|
||||
int a = 0, b = 0, c_nnz = 0;
|
||||
@@ -279,7 +272,6 @@ int mju_combineSparseCount(int a_nnz, int b_nnz, const int* a_ind, const int* b_
|
||||
}
|
||||
|
||||
|
||||
|
||||
// incomplete combine sparse: dst = a*dst + b*src at common indices
|
||||
void mju_combineSparseInc(mjtNum* dst, const mjtNum* src, int n, mjtNum a, mjtNum b,
|
||||
int dst_nnz, int src_nnz, const int* dst_ind, const int* src_ind) {
|
||||
@@ -327,7 +319,6 @@ void mju_combineSparseInc(mjtNum* dst, const mjtNum* src, int n, mjtNum a, mjtNu
|
||||
}
|
||||
|
||||
|
||||
|
||||
// dst += scl*src, only at common non-zero indices
|
||||
void mju_addToSclSparseInc(mjtNum* dst, const mjtNum* src,
|
||||
int nnzdst, const int* inddst,
|
||||
@@ -379,7 +370,6 @@ void mju_addToSclSparseInc(mjtNum* dst, const mjtNum* src,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// add to sparse matrix: dst = dst + scl*src, return nnz of result
|
||||
int mju_addToSparseMat(mjtNum* dst, const mjtNum* src, int n, int nrow, mjtNum scl,
|
||||
int dst_nnz, int src_nnz, int* dst_ind, const int* src_ind,
|
||||
@@ -447,7 +437,6 @@ int mju_addToSparseMat(mjtNum* dst, const mjtNum* src, int n, int nrow, mjtNum s
|
||||
}
|
||||
|
||||
|
||||
|
||||
// add(merge) two chains
|
||||
int mju_addChains(int* res, int n, int NV1, int NV2,
|
||||
const int* chain1, const int* chain2) {
|
||||
@@ -497,7 +486,6 @@ int mju_addChains(int* res, int n, int NV1, int NV2,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// compress sparse matrix, remove elements with abs(value) <= minval, return total non-zeros
|
||||
int mju_compressSparse(mjtNum* mat, int nr, int nc, int* rownnz, int* rowadr, int* colind,
|
||||
mjtNum minval) {
|
||||
@@ -529,7 +517,6 @@ int mju_compressSparse(mjtNum* mat, int nr, int nc, int* rownnz, int* rowadr, in
|
||||
}
|
||||
|
||||
|
||||
|
||||
// transpose sparse matrix, optionally compute row supernodes
|
||||
void mju_transposeSparse(mjtNum* res, const mjtNum* mat, int nr, int nc,
|
||||
int* res_rownnz, int* res_rowadr, int* res_colind, int* res_rowsuper,
|
||||
@@ -606,7 +593,6 @@ void mju_transposeSparse(mjtNum* res, const mjtNum* mat, int nr, int nc,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// construct row supernodes
|
||||
void mju_superSparse(int nr, int* rowsuper,
|
||||
const int* rownnz, const int* rowadr, const int* colind) {
|
||||
@@ -743,7 +729,6 @@ void mju_sqrMatTDUncompressedInit(int* res_rowadr, int nc) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// max number of supernodes handled
|
||||
#define mjMAXSUPER 8
|
||||
|
||||
@@ -1092,7 +1077,6 @@ void mju_sqrMatTDSparse_row(mjtNum* res, const mjtNum* mat, const mjtNum* matT,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// block-diagonalize a dense matrix
|
||||
// res output matrix
|
||||
// mat input matrix
|
||||
|
||||
Reference in New Issue
Block a user