Function matrix_swap (o2scl)

O2scl : Function List

template<class mat_t, class mat2_t, class data_t>
void o2scl::matrix_swap(size_t M, size_t N, mat_t &v1, mat2_t &v2)

Swap of the first \( (M,N) \) elements in two matrices.

This function swaps the elements of v1 and v2, one element at a time.

template<class mat_t, class data_t>
void o2scl::matrix_swap(mat_t &m, size_t i1, size_t j1, size_t i2, size_t j2)

Swap two elements in a matrix.

This function swaps the element (i1,j1) and element (i2,j2) of matrix m1.