[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] more maths wanted...

Arnd Zapletal <a_zapletal@web.de>:
> Does anybody knows whether there exist extensions dealing with
> combinatorics? I'm looking for something generating all/even/odd
> permutations of lists/sequences etc. (My home brew solutions are 2
> slow ;)

I don't know of any extensions, but -- what algorithm are you using?
If you're using a recursive one, perhaps a non-recursive one might
help? (I've got the relevant pseudocode -- at least for all the
permutations -- if you're interested.)

> cu
> Arnd

Magnus Lie Hetland                "In this house we obey the laws of
http://hetland.org                 thermodynamics!"    Homer Simpson