static void swapRowsList(List<double> m, int i, int j) { if (i == j) return; double temp = m[i]; m[i] = m[j]; m[j] = temp; }