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

\begin{Mhelppage}{Compo2MajorIndex}{V. Prosper}%
  \begin{MInfo}
    \eng{major index of a composition}
  \end{MInfo}
  

\begin{MCalls}
\Mcall{compo}
\end{MCalls}

\begin{MParameters}
  \param{compo}
  \eng{any list denoting a composition}
\end{MParameters}

\begin{MIntro}
  \eng{
The {\Mthis} function computes the major index of a given composition.
Let
\Mmath{I = [i1, i2, ..., im]}{I = [i_1, i_2, ..., i_m]}
be a composition, then
\Mthis\Mmath{(I)}{(I)}
is set to be
\Mmath{(m-1) i1 + (m-2) i2 + ... + i\{m-1\}}%
      {(m-1) i_1 + (m-2) i_2 + ... + i_{m-1}}.

}
    \end{MIntro}

\begin{MExample}{ex1}
\begin{Mexin}
muEC::COMP::Compo2MajorIndex( [2,3,1,2] );
\end{Mexin}
\begin{Mexout}
                              13
\end{Mexout}
\end{MExample}

\MRelatedFunctions{ListCompo,TYP::IsCompo}
\end{Mhelppage}
