Algorithm::PermuteAlgorithm::Permute is a Perl module with handy and fast permutation with object oriented interface. | |
Download |
Algorithm::Permute Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Edwin Pratomo
- Publisher web site:
- http://search.cpan.org/~edpratomo/Algorithm-Permute-0.08/Permute.pm
Algorithm::Permute Tags
Algorithm::Permute Description
Algorithm::Permute is a Perl module with handy and fast permutation with object oriented interface. Algorithm::Permute is a Perl module with handy and fast permutation with object oriented interface.SYNOPSIS use Algorithm::Permute; my $p = new Algorithm::Permute(); while (@res = $p->next) { print join(", ", @res), "n"; } my @array = (1..9); Algorithm::Permute::permute { print "@arrayn" } @array;This handy module makes performing permutation in Perl easy and fast, although perhaps its algorithm is not the fastest on the earth. Currently it only supports permutation n of n objects.No exported functions. This version is not backward compatible with the previous one, version 0.01. The old interface is no longer supported.METHODSnew Returns a permutor object for the given items.nextReturns a list of the items in the next permutation. The order of the resulting permutation is the same as of the previous version of Algorithm::Permute.peekReturns the list of items which will be returned by next(), but doesn't advance the sequence. Could be useful if you wished to skip over just a few unwanted permutations.resetResets the iterator to the start. May be used at any time, whether the entire set has been produced or not. Has no useful return value. Requirements: · Perl
Algorithm::Permute Related Software