This routine inverts a
permutation in place. It can be used to transform an index vector (from a sort) into a rank vector and
CALL PDA_IPERM( N, X )
N = INTEGER (Read)
X( N ) = _INTEGER (Read and Write)
The permutation. On exit this contains the inverse.
The permutation must consist of positive integers. The permutation inverse Y(X(I))=I for
I=1,N can be formed trivially with 2*N arrays.
The Art of Computer Programming,
Fundamental Algorithms Vol 1, by Donald E. Knuth (Addison-Wesley).
Proportional to N.