Name : perl-List-Priority
| |
Version : 0.05
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 6.70
| Date : 2024-08-05 18:02:25
|
Group : Development/Libraries/Perl
| Source RPM : perl-List-Priority-0.05-6.70.src.rpm
|
Size : 0.01 MB
| |
Packager : (none)
| |
Summary : Perl extension for a list that manipulates objects by their
|
Description :
If you want to handle multiple data items by their order of importance, this one\'s for you.
You may retrieve the highest-priority item from the list using \'pop()\', or the lowest-priority item from the list using \'shift()\'. If two items have the same priority, they are returned in first-in, first-out order. New items are inserted using \'insert()\'.
You can constrain the capacity of the list using the \'capacity\' parameter. Low-priority items are automatically evicted once the specified capacity is exceeded. By default the list\'s capacity is unlimited.
Currently insertion (in ordered or random order) is constant-time, but \'shift\' and \'pop\' are linear in the number of priorities. Hence List::Priority is a good choice if one of the following conditions is true:
* * you need one of its unusual features, like the ability to remove both high- and low-priority items, or to constrain the list\'s capacity,
* * you need to do a lot of inserting, but the list will never contain more than a few thousand different priority levels.
If neither of these describes your use case, another priority queue implementation like the POE::XS::Queue::Array manpage may perform better.
I\'d like to thank Joseph N. Hall and Randal L. Schwartz for their excellent book \"Effective Perl Programming\" for one of the code hacks.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-L/openSUSE_Tumbleweed/noarch |