psqueues: Pure priority search queues

[ bsd3, data-structures, library ] [ Propose Tags ]

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 type Int.

  • OrdPSQs just require the key to implement the Ord typeclass, but are the slowest structures of the three.

  • HashPSQs require the key to implement both the Ord and Hashable typeclasses. They use an IntMap over the hash of the keys combined with a OrdPSQ to manage collisions. Except for keys with a very fast comparison and small smaps HashPSQs are faster than OrdPSQs.

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

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

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No 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
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
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
Uploaded by JasperVanDerJeugt at 2014-06-23T13:53:14Z
Distributions Arch:0.2.8.0, Debian:0.2.7.2, Fedora:0.2.7.3, LTSHaskell:0.2.8.0, NixOS:0.2.8.0, Stackage:0.2.8.0, openSUSE:0.2.8.0
Reverse Dependencies 37 direct, 3574 indirect [details]
Downloads 70480 total (371 in the last 30 days)
Rating 2.25 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 1 reports]