Function matrix_transpose (o2scl)

O2scl : Function List

template<class mat_t, class mat2_t>
void o2scl::matrix_transpose(mat_t &src, mat2_t &dest)

Simple transpose.

Copy the transpose of src to dest, resizing dest only if one of the two dimensions are too small.

This function will work for any classes mat_t and mat2_t which have suitably defined operator(), size(), and resize() 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 first cols of the matrix src into the matrix dest

This function will work for any classes mat_t and mat2_t which has a suitably defined operator() 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 and mat2_t which have suitably defined operator(), size(), and resize() 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 first cols of the matrix src into the matrix dest

This function will work for any classes mat_t and mat2_t which has a suitably defined operator() method.