Swaps the specified rows of this matrix.

@param i the row index
@param j the row index
970269
public void swapRows(int i, int j) {
        if (i != j) {
            Vector ii = getRow(i);
            Vector jj = getRow(j);

            setRow(i, jj);
            setRow(j, ii);
        }
    }
307811
public static void swapCols(Matrix matrix, long col1, long col2) {
		double temp = 0;
		long rows = matrix.getRowCount();
		for (long row = 0; row < rows; row++) {
			temp = matrix.getAsDouble(row, col1);
			matrix.setAsDouble(matrix.getAsDouble(row, col2), row, col1);
			matrix.setAsDouble(temp, row, col2);
		}
	}
30244
public Matrix insertRow(int i, Vector row) {
        if (i > rows || i < 0) {
            throw new IndexOutOfBoundsException("Illegal row number, must be 0.." + rows);
        }

        Matrix result;
        if (columns == 0) {
            result = blankOfShape(rows + 1, row.length());
        } else {
            result = blankOfShape(rows + 1, columns);
        }

        for (int ii = 0; ii < i; ii++) {
            result.setRow(ii, getRow(ii));
        }

        result.setRow(i, row);

        for (int ii = i; ii < rows; ii++) {
            result.setRow(ii + 1, getRow(ii));
        }

        return result;
    }
1159087
private static void exch(long[] values, int i, int j) {
        long k = values[i];
        values[i] = values[j];
        values[j] = k;
    }
971023
public void setRow(int i, Vector row) {
        if (columns != row.length()) {
            fail("Wrong vector length: " + row.length() + ". Should be: " + columns + ".");
        }

        for (int j = 0; j < row.length(); j++) {
            set(i, j, row.get(j));
        }
    }
726191
protected void swap(int i, int j) {
        byte[] ltemp = ranges[i];
        ranges[i] = ranges[j];
        ranges[j] = ltemp;

        String tempFilename = filenames[i];
        filenames[i] = filenames[j];
        filenames[j] = tempFilename;
    }
39686
public void setRow(int row, double[] value) {
    for (int i = 0; i < value.length; i++) {
      this.matrix[translate(row, i, numRows)] = value[i];
    }
  }
334025
private static void swap(Object[] w, int a, int b) {

        Object t = w[a];

        w[a] = w[b];
        w[b] = t;
    }
895139
def _swap_rows(self, i, j):
        

        L = np.eye(3, dtype='intc')
        L[i, i] = 0
        L[j, j] = 0
        L[i, j] = 1
        L[j, i] = 1
        self._L.append(L.copy())
        self._A = np.dot(L, self._A)
352217
public static void swap(long[] longArray, int index1, int index2) {
        TrivialSwap.swap(longArray, index1, longArray, index2);
    }
1285233
public void set(int i, int j, T v)
    {
        consumer.set(i, j, v);
    }
1088944
private static <T> void swapReferences( T[] arr, int idx1, int idx2 )
    {
        T tmp = arr[idx1];
        arr[idx1] = arr[idx2];
        arr[idx2] = tmp;
    }
189103
public void set(final int i, final int j, final int val) {
		p[(j - i + editDistance + 1) * rowLength + j] = val;
	}
672740
public static void addRow(Matrix A, int i, double c)
    {
        addRow(A, i, 0, A.cols(), c);
    }
453554
protected void swapColumns( int j ) {

        // find the column with the largest norm
        int largestIndex = j;
        double largestNorm = normsCol[j];
        for( int col = j+1; col < numCols; col++ ) {
            double n = normsCol[col];
            if( n > largestNorm ) {
                largestNorm = n;
                largestIndex = col;
            }
        }
        // swap the columns
        double []tempC = dataQR[j];
        dataQR[j] = dataQR[largestIndex];
        dataQR[largestIndex] = tempC;
        double tempN = normsCol[j];
        normsCol[j] = normsCol[largestIndex];
        normsCol[largestIndex] = tempN;
        int tempP = pivots[j];
        pivots[j] = pivots[largestIndex];
        pivots[largestIndex] = tempP;
    }
597249
public void set(int i, int j, double x) {
        if (i < 0 || j < 0) {
            throw new IllegalArgumentException("Invalid index: i = " + i + " j = " + j);
        }

        int nrows = size();
        if (i >= nrows) {
            for (int k = nrows; k <= i; k++) {
                data.add(new Datum<>(new SparseArray()));
            }
        }

        if (j >= ncols()) {
            numColumns = j + 1;
            if (numColumns > colSize.length) {
                int[] size = new int[3 * numColumns / 2];
                System.arraycopy(colSize, 0, size, 0, colSize.length);
                colSize = size;
            }
        }

        if (get(i).x.set(j, x)) {
            colSize[j]++;
            n++;            
        }
    }
467813
private void swap(int i, int j) {
        double[] temp = data[i];
        data[i] = data[j];
        data[j] = temp;
    }