in reply to Telephone - Nested Loops
More update: my decision chart:# updated to add leading zeroes sub Arbitel { # takes number of digits as argument my $count = shift; my $limit = 10**$count; for ( my $i = 0; $i < $limit; $i++ ) { print Lzro( $count, $i ) . "\n"; } } sub Lzro my ( $count, $number ) = @_; substr( ( '0' x $count ) . $number, -$count ); }
"Can it be mapped to a simple virtual structure? Y: don't build it and don;t bother to use a CPAN module to generate or iterate it.
N: "Can the structure be iterated virtually without building it? N: use Algorithm::
Y: "Is there a method for it in Math::Combinatorics? Y: use that then N: use Algorithm::
^M Free your mind!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Telephone - Nested Loops (no)
by tye (Sage) on Jun 22, 2007 at 16:38 UTC |