NAME
List::Permutor::Repeat - Process all possible repeat permutations of a list
组合数学,可重复排列
SYNOPSIS
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
DESCRIPTION
This is repeat permutation.
Not repeat elem permutation see Tom Phoenix's List::Permutor.
METHODS
- new LIST
-
初始化,传入一个数组
Returns a permutor for the given items.
- next
-
取出下一个可重复的排列
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)
- peek
-
取回当前的排列
Returns the list of items which would be returned by next()
- reset
-
重置排列,从头开始
Resets the iterator to the start.
AUTHOR
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:
- Around line 59:
=pod directives shouldn't be over one line long! Ignoring all 2 lines of content