gsi2.invperm          package:compositions          R Documentation

_I_n_t_e_r_n_a_l _f_u_n_c_t_i_o_n: _I_n_v_e_r_t _a _p_e_r_m_u_t_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Finds the inverse of a permutation given as a vector of indices.

_U_s_a_g_e:

     gsi2.invperm( i,n )

_A_r_g_u_m_e_n_t_s:

       i: a sequence of different integers in '1:n' considered as a
          permutation given by 'p=unique(c(i,1:n))'

       n: the number of elements to be permuted

_D_e_t_a_i_l_s:

     The inverse permutation is defined by 'p[\var{v}]==1:n' and
     'v[\var{p}]==1:n'.

_V_a_l_u_e:

     an integer vector v describing the inverse permutation of p.

_N_o_t_e:

     Do not use gsi.* functions directly since they are internal
     functions of the package

_R_e_f_e_r_e_n_c_e_s:

_S_e_e _A_l_s_o:

     'gsi'

_E_x_a_m_p_l_e_s:

     gsi2.invperm(c(2,3),10)

