FUNCTION: ListPart - list of partitions of a given weight
 
CALLING SEQUENCE:
-   ListPart(n)
-   PART[ListPart](n)
-  
   
PARAMETERS:
- n    =  any non negative integer
 
 
SYNOPSIS:
-  The ListPart function  gives all partitions of n. A partition  of  n  is
  a  weakly decreasing list of positive integers, called parts, with sum n.
 
 
-  When called with  one  argument, say n, the function returns the list of
  all partitions of n.
 
 
-  The following options are available:
- 'maxlg' = l    sets  the  maximal  number  of  parts  of each
                            partition.
- 'maxpart' = p  enumerates only the partitions  pa  such  that
                            pa[1] <= p[1], ...,  pa[nops(p)] <= p[nops(p)].
- 'regular' = m  only m-regular partitions are  listed (no part
                            is repeated strictly more than m times).
- 'nb'           returns the  number  of  partitions instead of
                            the list thereof.
 
     
-  Given a partition part, convert(part,`+`) gives its weight.
 
 
-  Whenever there is a  conflict  between the  function  name ListPart  and
  another   name   used   in   the   same   session, use  the  long   form
  PART['ListPart'].
 
 
EXAMPLES:
> with(PART):
> ListPart(4);
 
              [[4], [3, 1], [2, 2], [2, 1, 1], [1, 1, 1, 1]]
 
> ListPart(5, 'maxlg'=3);
 
                [[5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1]]
 
> ListPart(5, 'maxpart'=[3,2], 'maxlg'=3);
                         [[3, 2], [3, 1, 1], [2, 2, 1]]
 
> ListPart(100, 'nb');
                                   190569292
 
SEE ALSO: ListPartIn ListSkewDiag