package psq

  1. Overview
  2. Docs
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 PsqSource

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 least p.

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

v0.2.0-7-gb2eb861 — homepage

Psq

Sourcemodule type S = sig ... end

Signature of priority search queues.

Sourcemodule type Ordered = sig ... end

Signature of ordered types.

Sourcemodule Make (K : Ordered) (P : Ordered) : S with type k = K.t and type p = P.t

Make(K)(P) is the priority search queue with bindings K.t -> P.t.

OCaml

Innovation. Community. Security.

On This Page
  1. Psq