code: public static void swapRows(Matrix matrix, long row1, long row2) {
  		double temp = 0;
  		long cols = matrix.getColumnCount();
  		for (long col = 0; col < cols; col++) {
  			temp = matrix.getAsDouble(row1, col);
  			matrix.setAsDouble(matrix.getAsDouble(row2, col), row1, col);
  			matrix.setAsDouble(temp, row2, col);
  		}
  	}
docs: Swap components in the two rows.
  
  @param matrix
  the matrix to modify
  @param row1
  the first row
  @param row2
  the second row