Create a reordering index array.
The result array is intepreted like this: R[j] = i means that the vertex on index i should be moved to index j
public int[] CalculateReordering()