powered by
Finds the inverse of a permutation given as a vector of indices.
gsi2.invperm( i,n )
an integer vector v describing the inverse permutation of p.
a sequence of different integers in 1:n considered as a permutation given by p=unique(c(i,1:n))
1:n
p=unique(c(i,1:n))
the number of elements to be permuted
K.Gerald v.d. Boogaart http://www.stat.boogaart.de
The inverse permutation is defined by p[v]==1:n and v[p]==1:n.
p[v]==1:n
v[p]==1:n
gsi
#gsi2.invperm(c(2,3),10)
Run the code above in your browser using DataLab