Name
Math::Power::List - Generate all subsets of a list.
Synopsis
use Math::Subsets::List;
subsets {say "@_"} qw(a b c);
#
# a
# b
# c
# a b
# a c
# b c
# a b c
Description
Generate and process all the all the subsets of a list using the
standard Perl metaphor.
"subsets()" returns the number of subsets. Please note that this
incloudes the empty set as it is a subset of all sets.
Its easy to use and fast. Its written in 100% Pure Perl.
Please note that the order in which the subsets are generated is not
guaranteed, so please do not rely on it.
Export
The "subsets()" function is exported.
Installation
Standard Module::Build process for building and installing modules:
perl Build.PL
./Build
./Build test
./Build install
Or, if you're on a platform (like DOS or Windows) that doesn't require
the "./" notation, you can do this:
perl Build.PL
Build
Build test
Build install
Author
PhilipRBrenan@handybackup.com
http://www.handybackup.com
See Also
Math::Permute::List Math::Disarrange::List
Copyright
Copyright (c) 2009 Philip R Brenan.
This module is free software. It may be used, redistributed and/or
modified under the same terms as Perl itself.