package psq
Functional Priority Search Queues
Install
Dune Dependency
Authors
Maintainers
Sources
psq-0.2.1.tbz
sha256=42005f533eabe74b1799ee32b8905654cd66a22bed4af2bd266b28d8462cd344
sha512=8a8dfe20dc77e1cf38a7b1a7fc76f815c71a4ffe04627151b855feaba8f1ae742594739d1b7a45580b5b24a2cd99b58516f6b5c8d858aa314201f4a6422101ee
doc/psq/Psq/index.html
Module Psq
Source
Functional Priority Search Queues
Psq
provides a functional structure that behaves as both a finite map and a priority queue.
- The structure contains a collection of bindings
k -> p
, and allows efficient addition, lookup and removal of bindings by key. - It additionally supports access to, and removal of the binding
k -> p
with the leastp
.
The implementation is backed by a weight-balanced semi-heap. Access by key is O(log n)
. Access to the minimal p
is O(1)
, and its removal is O(log n)
.
References
- Ralf Hinze. A Simple Implementation Technique for Priority Search Queues. 2001.
v0.2.0-7-gb2eb861 — homepage
Psq
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page