@param x @param start inclusive @param end exclusive
(double[] x, int start, int end)
| 210 | * @param end exclusive |
| 211 | */ |
| 212 | public static void insertionSort(double[] x, int start, int end) |
| 213 | { |
| 214 | for (int i = start; i < end; i++) |
| 215 | for (int j = i; j > start && x[j - 1] > x[j]; j--) |
| 216 | swap(x, j, j - 1); |
| 217 | } |
| 218 | |
| 219 | /** |
| 220 | * Performs sorting based on the double values natural comparator. |