Here you can find the source of swapRows(double[][] matrix, int i1, int i2)
Parameter | Description |
---|---|
matrix | the matrix |
i1 | index of the first row |
i2 | index of the second row |
public static void swapRows(double[][] matrix, int i1, int i2)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w ww.j av a 2 s. c o m*/ * Swaps two rows of a matrix. * @param matrix the matrix * @param i1 index of the first row * @param i2 index of the second row */ public static void swapRows(double[][] matrix, int i1, int i2) { double[] row1 = matrix[i1]; matrix[i1] = matrix[i2]; matrix[i2] = row1; } }