% $Date: 2003/09/15 16:37:45 $ $Author: nthiery $ $Revision: 1.1.1.1 $

\begin{Mhelppage}{Perm2CycleType}{V. Prosper}%
  \begin{MInfo}
    \eng{computes the cycle type of a permutation}
  \end{MInfo}
  

\begin{MCalls}
  \Mcall{perm}
\end{MCalls}

\begin{MParameters}
  \param{perm}
  \eng{any list denoting a permutation} 
\end{MParameters}

\begin{MIntro}
  \eng{
The {\Mthis} function calculates the cycle type of the permutation \Mex{perm}.
 

A permutation can be expressed as a  product  of  disjoint  cycles.
The corresponding partition is obtained  by  listing  in  weakly  decreasing
order the lengths of these cycles.
}
\end{MIntro}

\begin{MExample}{ex1}
\begin{Mexin}
muEC::SG::Perm2CycleType( [7,1,3,6,5,4,2] );
\end{Mexin}
\begin{Mexout}
                         [3, 2, 1, 1]
\end{Mexout}
\begin{Mexin}
muEC::SG::Perm2Cycle( [7,1,3,6,5,4,2] );
\end{Mexin}
\begin{Mexout}
                      [[1, 7, 2], [4, 6]]
\end{Mexout}
\end{MExample}

\MRelatedFunctions{Cycle2Perm,Perm2Cycle}
\end{Mhelppage}
