List::Permutor::Repeat - Process all possible repeat permutations of a list
组合数学,可重复排列
use List::Permutor::Repeat; my $perm = new List::Permutor::Repeat qw/ a b /; while (my @set = $perm->next) { print @set, "\n"; } #aa #ab #ba #bb
This is repeat permutation.
Not repeat elem permutation see Tom Phoenix's List::Permutor.
初始化,传入一个数组
Returns a permutor for the given items.
取出下一个可重复的排列
Returns a list of the items in the next permutation.
for example, the repeat permutations of (1..5) first: (1, 1, 1, 1, 1) last: (5, 5, 5, 5, 5)
取回当前的排列
Returns the list of items which would be returned by next()
重置排列,从头开始
Resets the iterator to the start.
Abby Pan <abbypan@gmail.com>
The object oriented interface/method is taken from Tom Phoenix's List::Permutor.
1 POD Error
The following errors were encountered while parsing the POD:
=pod directives shouldn't be over one line long! Ignoring all 2 lines of content
To install List::Permutor::Repeat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm List::Permutor::Repeat
CPAN shell
perl -MCPAN -e shell install List::Permutor::Repeat
For more information on module installation, please visit the detailed CPAN module installation guide.