next up previous contents index
suivant: Checking for a permutation monter: Permutations précédent: Transform a cycle into   Table des matières   Index


Transform a permutation into a matrix : permu2mat

permu2mat takes as argument a permutation p of size n.
permu2mat returns the matrix of the permutation, that is the matrix obtained by permuting the rows of the identity matrix of size n with the permutation p.
Input :
permu2mat([2,0,1])
Output :
[[0,0,1],[1,0,0],[0,1,0]]



giac documentation written by Renée De Graeve and Bernard Parisse