https://github.com/ocramz/depq
Double-ended priority queues
https://github.com/ocramz/depq
double-ended-queue priority-queue priority-search-queue scheduling-algorithms searching-algorithms sorting-algorithms
Last synced: 6 months ago
JSON representation
Double-ended priority queues
- Host: GitHub
- URL: https://github.com/ocramz/depq
- Owner: ocramz
- License: bsd-3-clause
- Created: 2020-05-23T06:51:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-12T10:00:14.000Z (over 4 years ago)
- Last Synced: 2025-03-28T06:33:21.991Z (7 months ago)
- Topics: double-ended-queue, priority-queue, priority-search-queue, scheduling-algorithms, searching-algorithms, sorting-algorithms
- Language: Haskell
- Homepage:
- Size: 19.5 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# depq
[](https://hackage.haskell.org/package/depq)
[](http://stackage.org/nightly/package/depq)Double-ended priority queues
This library provides a type for 'DEPQ's, along with functions for constructing and querying them.
## Usage
The `Data.DEPQ` module exports the user interface, which is similar to that of most Haskell data container libraries.
Populate a DEPQ (either from a `Foldable` collection such as a list or array or by `insert`ing incrementally) and query either of its extremes (with `findMin`, `findMax`, `popMin`, `popMax`, `topK`, `bottomK`).
Have fun!
## Implementation
Currently the implementation is based on 'IntPSQ' (integer-indexed priority search queues) from the 'psqueues' package.