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

\begin{Mhelppage}{ListPart}{V. Prosper}

  \begin{MInfo}
    \eng{list of partitions of a given weight}
  \end{MInfo}

  \begin{MCalls}
    \Mcall{n \Mopt{,options}}
  \end{MCalls}

  \MDeclareOption{\maxlg}{maxlg}
  \MDeclareOption{\maxpart}{maxpart}
  \MDeclareOption{\regular}{regular}
  \MDeclareOption{\nb}{nb}

  \begin{MParameters}
    \param{n}
    \eng{any non negative integer}
  \end{MParameters}
  \begin{MOptions}
    \option{\maxlg=l}
    \eng{maximal number of parts of each partition}
    \option{\maxpart=p}
    \eng{outermost possible shape}
    \option{\regular=m}
    \eng{only \Mpar{m}-regular partitions are listed}
    \option{\nb}
    \eng{only counts objects}
  \end{MOptions}


  \vspace*{1ex}
  \Mwarning{%
    Use the syntax \Mex{hold(identifier)}, instead of
    \Mex{identifier}, if one of the identifiers above is already
    defined. }


\begin{MIntro}
  \eng{
The {\Mthis} function  gives all partitions of \Mex{n}.

A partition  of  \Mex{n}  is a  weakly decreasing list of positive integers,
called parts, with sum \Mex{n}.
 
When called with one argument, say \Mex{n}, the function returns the list of
all partitions of \Mex{n}.
 
Given a partition \Mex{part}, \Mex{\_plus(op(part))} gives its weight.
}
\end{MIntro}

\begin{MExample}{ex1}
\begin{Mexin}
muEC::PART::ListPart( 4 );
\end{Mexin}
\begin{Mexout}
        [[4], [3, 1], [2, 2], [2, 1, 1], [1, 1, 1, 1]]
\end{Mexout}
\begin{Mexin}
muEC::PART::ListPart( 5, maxlg=3 );
\end{Mexin}
\begin{Mexout}
          [[5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1]]
\end{Mexout}
\begin{Mexin}
muEC::PART::ListPart( 5, maxpart=[3,2], maxlg=3 );
\end{Mexin}
\begin{Mexout}
                [[3, 2], [3, 1, 1], [2, 2, 1]]
\end{Mexout}
\begin{Mexin}
muEC::PART::ListPart( 100, nb );
\end{Mexin}
\begin{Mexout}
                           190569292
\end{Mexout}
\end{MExample}

\MRelatedFunctions{ListPartIn,ListSkewDiag,TYP::IsPart}
\end{Mhelppage}
