Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: How to restrict partitions

by Laurent_R (Canon)
on Jan 18, 2014 at 19:57 UTC ( [id://1071139]=note: print w/replies, xml ) Need Help??


in reply to How to restrict partitions

Hmm, for small numbers, you can certainly afford to use Integer::Partition and filter out combinations that do not fit your needs, but if your numbers grow only slightly larger, then your program is going to do really a lot of unnecessary work and very quickly become unusable. I do not know if any module is able to do that, but I strongly suspect that you might need to write your own algorithm if you want to process any number with more than 2 digits, perhaps even with smaller numbers.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1071139]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2025-07-14 01:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.