加藤 明 > Set-Intersection-0.04 > Set::Intersection

Download:
Set-Intersection-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.04   Source  

NAME ^

Set::Intersection - provides an API to get intersection (of set theory) of ARRAYs.

VERSION ^

Version 0.04;

SYNOPSIS ^

  use Set::Intersection;

  my @arr1 = qw/3 1 4 1 5 9/;
  my @arr2 = qw/1 7 3 2 0 5/;
  my @intersection = get_intersection(\@arr1, \@arr2);
  # got (1, 3, 5) in @intersection

EXPORT ^

get_intersection

FUNCTIONS ^

get_intersection()

    get_intersection([\%options,] [\@ARRAY[, \@ARRAY[, ...]]]);

Returns intersection set (as LIST) of all ARRAYs.

%options

    -preordered => BOOLEAN

To reduce calculation time, get_intersection() sorts ARRAYs by their length before calculating intersections.

This option tells that order of ARRAYs are well done, and calculation of intersection will be based on left most ARRAY.

SEE ALSO ^

List::Compare, Set::Object

AUTHOR ^

turugina, <turugina at cpan.org>

BUGS ^

Please report any bugs or feature requests to bug-list-intersection at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Set-Intersection. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Set::Intersection

You can also look for information at:

ACKNOWLEDGEMENTS ^

COPYRIGHT & LICENSE ^

Copyright 2009 turugina, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: