in reply to Combinatorics of Math::Combinatorics
#!/usr/bin/perl -l BEGIN { $| = 1; $^W = 1; } use strict; use warnings; use Data::Dump qw(pp); use Algorithm::Combinatorics qw(partitions); my(@data) = qw(a b c d e f g); my $iter = partitions(\@data, 3, 4); while (my $p = $iter->next) { print pp($p); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Combinatorics of Math::Combinatorics (usage)
by tye (Sage) on Jul 21, 2012 at 20:26 UTC |