MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / index

Method index

JSAT/src/jsat/utils/IndexTable.java:257–262  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 15

testSortDMethod · 0.95
testSortGMethod · 0.95
testSortListMethod · 0.95
testSwapMethod · 0.95
applyMethod · 0.95
sortByEigenValueMethod · 0.95
sortedCopyMethod · 0.95
findNNMethod · 0.95
search_Method · 0.95
searchMethod · 0.95
updateMethod · 0.95

Calls 1

getMethod · 0.45

Tested by 5

testSortDMethod · 0.76
testSortGMethod · 0.76
testSortListMethod · 0.76
testSwapMethod · 0.76