Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: help with simplifying program

by BillKSmith (Deacon)
on May 24, 2013 at 18:05 UTC ( #1035184=note: print w/ replies, xml ) Need Help??


in reply to Re^2: help with simplifying program
in thread help with simplifying program

Oops, I was slightly wrong. Combinations will only replace three of your loops. You still have to select the applicable combinations.

use Algorithm::Combinatorics qw(combinations); my $lep = int 1; my $rep = int 100; my $iter = combinations( [$lep+2 ..$rep], 3 ); while (my $c = $iter->next) { my ($x, $y, $z) = @$c; foreach my $s (1..$rep/4) { # as before } }
Bill


Comment on Re^3: help with simplifying program
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2015-07-08 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls