Swaps two rows in a matrix
The matrix to modify
The index of the first row
The index of the second row
If true, modifies M directly; if false, creates a copy (default: false)
The matrix with rows i and j swapped
Swaps two rows in a matrix