public IntMatrix MultiplyRow(uint r, int factor) { var newM = IntMatrix.FromArray(M); for (uint c = 0; c < newM.Cols; c++) { newM[r, c] *= factor; } return(newM); }
public IntMatrix AddRows(uint rSrc, uint rDst, int factor) { var newM = IntMatrix.FromArray(M); for (uint c = 0; c < newM.Cols; c++) { newM[rDst, c] += factor * newM[rSrc, c]; } return(newM); }
public IntMatrix SwapRows(uint r1, uint r2) { var newM = IntMatrix.FromArray(M); for (uint c = 0; c < newM.Cols; c++) { (newM[r1, c], newM[r2, c]) = (newM[r1, c], newM[r2, c]); } return(newM); }