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
src
todest
, resizingdest
if it is too small.This function will work for any classes
mat_t
andmat2_t
which 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
m
rows and the firstcols
of the matrixsrc
into the matrixdest
This function will work for any classes
mat_t
andmat2_t
which 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_t
andmat2_t
which 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
m
rows and the firstcols
of the matrixsrc
into the matrixdest
This function will work for any classes
mat_t
andmat2_t
which has a suitably definedoperator()
method.