Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: adding n-tuples

by WoodyWeaver (Monk)
on May 16, 2019 at 13:44 UTC ( [id://11100084]=note: print w/replies, xml ) Need Help??


in reply to adding n-tuples

Quick clue: your friend is Math::Combinatorics or Algorithm::Combinatorics. This is just fiddly enough to not write your own. Its not clear from your question what you are looking for (it sounds like you have 2N data points and you want all sums of N tuples, so its probably the Algorithm::Combinatorics::variations() you want, but I'm sure you'll get it from that man page.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-03-29 10:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found