Function matrix_transpose (o2scl)¶
-
template<class mat_t, class mat2_t>
void o2scl::matrix_transpose(mat_t &src, mat2_t &dest)¶ Simple transpose.
Copy the transpose of
srctodest, resizingdestonly if one of the two dimensions are too small.This function will work for any classes
mat_tandmat2_twhich have suitably definedoperator(),size(), andresize()methods.
-
template<class mat_t, class mat2_t>
void o2scl::matrix_transpose(size_t m, size_t n, mat_t &src, mat2_t &dest)¶ Simple transpose of the first \( (m,n) \) matrix elements.
Copy the transpose of the first
mrows and the firstcolsof the matrixsrcinto the matrixdestThis function will work for any classes
mat_tandmat2_twhich has a suitably definedoperator()method.
-
template<class mat_t, class data_t>
void o2scl::matrix_transpose(mat_t &src)¶ Simple in-place transpose.
Transpose the matrix
src. If the matrix is not square, only the upper-left square part of the matrix will be transposed.This function will work for any classes
mat_tandmat2_twhich have suitably definedoperator(),size(), andresize()methods.
-
template<class mat_t, class data_t>
void o2scl::matrix_transpose(size_t m, size_t n, mat_t &src)¶ Simple in-place transpose of the first \( (m,n) \) matrix elements.
Copy the transpose of the first
mrows and the firstcolsof the matrixsrcinto the matrixdestThis function will work for any classes
mat_tandmat2_twhich has a suitably definedoperator()method.Warning
No checking is performed to ensure that the matrix has enough rows and columns to ensure that this makes sense, because not all matrix types have the same way of determining the matrix size).