Name : perl-Set-Bag
| |
Version : 1.012
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 5.67
| Date : 2024-08-05 17:28:43
|
Group : Development/Libraries/Perl
| Source RPM : perl-Set-Bag-1.012-5.67.src.rpm
|
Size : 0.01 MB
| |
Packager : (none)
| |
Summary : Bag (multiset) class
|
Description :
This module implements a simple bag (multiset) class.
A bag may contain one or more instances of elements. One may add and delete one or more instances at a time.
If one attempts to delete more instances than there are to delete from, the default behavious of *delete* is to raise an exception. The *over_delete* method can be used to control this behaviour.
Inserting or removing negative number of instances translates into removing or inserting positive number of instances, respectively.
The *sum* is also known as the _additive union_. It leaves in the result bag the sum of all the instances of all bags.
Before using the *difference* you very often will need the *over_delete*.
The *union* is also known as the _maximal union_. It leaves in the result bag the maximal number of instances in all bags.
The *intersection* leaves in the result bag only the elements that have instances in all bags and of those the minimal number of instances.
The *complement* will leave in the result bag the maximal number of instances _ever_ seen (via *new*, *insert*, *sum*, or *maximize*) in the bag minus the current number of instances in the bag.
The *grab* method returns the contents of a bag. If used with parameters the parameters are the elements and their number of instances in the bag are returned. If an element that does not exist in the bag is grabbed for, the number of instances returned for that element will be \'undef\'. If used without parameters the elements are returned in pseudorandom order.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-S/openSUSE_Tumbleweed/noarch |