Given the index i into what would be the sorted array, the index in the unsorted original array is returned. If the original array was a double array, double[] vals , then the sorted order can be printed with for(int i = 0; i < indexTable.{@link #length() leng
(int i)
| 255 | * @return the index in the original list that would be in the i'th position |
| 256 | */ |
| 257 | public int index(int i) |
| 258 | { |
| 259 | if(i >= prevSize || i < 0) |
| 260 | throw new IndexOutOfBoundsException("The size of the previously sorted array/list is " + prevSize + " so index " + i + " is not valid"); |
| 261 | return index.get(i); |
| 262 | } |
| 263 | |
| 264 | /** |
| 265 | * The length of the previous array that was sorted |