[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: partitions function
From: |
Jordi Gutierrez Hermoso |
Subject: |
Re: partitions function |
Date: |
Mon, 15 May 2006 10:52:38 -0500 |
On 5/11/06, Gorazd Brumen <address@hidden> wrote:
Is there a function in octave/octave-forge which generates all the
partitions of the set,
Hm, I don't think there is (or at least I couldn't find one). But what
do you need it for? Consider reworking your code without this
function.
Maxima, another free piece of free software, does include this
function, along with many others for manipulating sets. It's called
"set_partitions(...)". If you're doing more symbolic work than
numerical work, consider using Maxima instead:
Maxima restarted.
(%i1) X : set(a,b,c);
(%o1) {a, b, c}
(%i2) set_partitions(X);
(%o2) {{{a}, {b}, {c}}, {{a}, {b, c}}, {{a, b}, {c}}, {{a, b, c}},
{{a, c}, {b}}}
I hope this helps.
- Jordi G. H.
- partitions function, Gorazd Brumen, 2006/05/11
- Re: partitions function,
Jordi Gutierrez Hermoso <=