Here you can find the source of swap(double[] data, int i, int j)
static public void swap(double[] data, int i, int j)
//package com.java2s; //License from project: Open Source License public class Main { static public void swap(double[] data, int i, int j) { double tmp = data[i]; data[i] = data[j];/* www. j a v a2s . co m*/ data[j] = tmp; } static public void swap(double[][] data, int i1, int j1, int i2, int j2) { double tmp = data[i1][j1]; data[i1][j1] = data[i2][j2]; data[i2][j2] = tmp; } }