laziness, impatience, and hubris | |
PerlMonks |
Re: adding n-tuplesby WoodyWeaver (Monk) |
on May 16, 2019 at 13:44 UTC ( [id://11100084]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|