Set::IntSpan::Partition - Partition int sets using Set::IntSpan objects
my @partition = intspan_partition( @list );
Partition sets based on membership in a set of Set::IntSpan objects.
Given a set of Set::IntSpan objects, this sub creates the smallest set of Set::IntSpan objects such that, iff an element was in one or more of the input sets, it will be in exactly one of the output sets, and an output set is either a subset of an input set or disjoint with it.
Returns a hash mapping input object indices to Set::IntSpan objects which are subsets of the input objects the same way intspan_partition does. This also uses a faster implementation.
intspan_partition and intspan_partition_map.
Slow. Patches welcome. I don't like the name intspan_partition, ideas welcome.
Thanks to Paul Cochrane for his many improvements to this distribution as part of Neil Bowers' http://neilb.org/2014/11/29/pr-challenge-2015.html.
Copyright (c) 2008-2015 Bjoern Hoehrmann <email@example.com>.
This module is licensed under the same terms as Perl itself.
To install Set::IntSpan::Partition, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.