Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Generating powerset with progressive ordering

by Limbic~Region (Chancellor)
on Feb 25, 2005 at 19:16 UTC ( #434613=note: print w/replies, xml ) Need Help??


in reply to Re: Generating powerset with progressive ordering
in thread Generating powerset with progressive ordering

tall_man,
Regarding using Math::Pari's divisors. This is really cool and I need to learn more about this module. It is however a violation of the original question as stated. Only the prime factorization is to be known initially. I will look at the second part of your response in bit.

Cheers - L~R

  • Comment on Re^2: Generating powerset with progressive ordering

Replies are listed 'Best First'.
Re^3: Generating powerset with progressive ordering
by tall_man (Parson) on Feb 27, 2005 at 22:14 UTC
    I object to calling the use of divisors a "violation" of the original question. Given the prime factorization, it is a simple matter to multiply out all the possible combinations, giving the list of divisors. Math::Pari's divisor function just saves the work of doing the multiplications and sorting the results.
      tall_man,
      Given the downvotes - you aren't the only one who feels this way. I still like your solution for brevity, efficiency, and elegance even if it isn't the fastest. I really do need to learn more about Math::Pari.

      Cheers - L~R

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://434613]
help
Chatterbox?
[stevieb]: je ne pas parles en Francais, but I prefer a vape, not a pipe ;)
[RonW]: shmem++ # too dumb to debug it

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2017-03-28 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (342 votes). Check out past polls.