psqueues: Pure priority search queues
A priority search queue manages a set of triples of the form
(key, priority, value) and allows for efficient lookup by key, and
efficient lookup and removal of the element with minimal priority. This
package contains three, performant implementations of priority search
queues, which differ in the requirements on the type of keys.
IntPSQs are the most efficient structure, but require the keys to be of typeInt.OrdPSQs just require the key to implement theOrdtypeclass, but are the slowest structures of the three.HashPSQs require the key to implement both theOrdandHashabletypeclasses. They use anIntMapover the hash of the keys combined with aOrdPSQto manage collisions. Except for keys with a very fast comparison and small smapsHashPSQs are faster thanOrdPSQs.
Typical use cases for priority search queues are LRU caches, where the priority is the time of the last access, and timeout management, where the priority is the time at which the timeout should trigger.
Downloads
- psqueues-0.1.0.0.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1.0.0, 0.1.0.1, 0.1.1.0, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.1.0, 0.2.2.0, 0.2.2.1, 0.2.2.2, 0.2.2.3, 0.2.3.0, 0.2.4.0, 0.2.5.0, 0.2.6.0, 0.2.7.0, 0.2.7.1, 0.2.7.2, 0.2.7.3, 0.2.8.0, 0.2.8.1, 0.2.8.2, 0.2.8.3 |
|---|---|
| Dependencies | base (>=4.2 && <5), deepseq (>=1.2 && <1.4), ghc-prim, hashable (>=1.2.1 && <1.3) [details] |
| License | BSD-3-Clause |
| Author | |
| Maintainer | haskell@better.com |
| Uploaded | by JasperVanDerJeugt at 2014-06-23T13:53:14Z |
| Revised | Revision 1 made by HerbertValerioRiedel at 2019-01-08T18:52:35Z |
| Category | Data Structures |
| Bug tracker | https://github.com/bttr/psqueues/issues |
| Source repo | head: git clone http://github.com/bttr/psqueues.git |
| Reverse Dependencies | 40 direct, 3820 indirect [details] |
| Downloads | 74758 total (98 in the last 30 days) |
| Rating | 2.5 (votes: 3) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Successful builds reported [all 1 reports] |