On Fri, Jul 25, 2008 at 5:59 PM, John Randall <[EMAIL PROTECTED]> wrote: > Here is a program for generating partitions in lexicographic order. I > am still using uncanonicalized ones, so it gives too many. It will > work on arbitrary sized partitions.
You can ensure canonicalized partitions by selecting those where (-:/:~)&~. For example: (#~ (-:/:~)&~."1) next^:(i.20) 0 0 1 1 2 2 0 0 1 1 2 2 0 0 1 2 1 2 0 0 1 2 2 1 0 1 0 1 2 2 0 1 0 2 1 2 0 1 0 2 2 1 0 1 1 0 2 2 0 1 1 2 0 2 0 1 1 2 2 0 0 1 2 0 1 2 0 1 2 0 2 1 0 1 2 1 0 2 0 1 2 1 2 0 0 1 2 2 0 1 0 1 2 2 1 0 FYI, -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
