priority-queue
Version, currently 1.0.14 versions
- 1.1.2latestJul 27, 2024
- 1.1.1not indexedJul 27, 2024
- 1.1.0not indexedJul 27, 2024
- 1.0.1not indexedJul 27, 2024
github.com/spider-gazelle/priority-queue
Priority Queue and Heap implementation for Crystal Lang
Nothing has been indexed for 1.0.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
priority-queue:
github: spider-gazelle/priority-queue
version: ~> 1.0.1Then run:
shards installshard.yml
No shard.yml has been indexed for 1.0.1. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
Crystal Lang Priority Queue
Usage
Simple priority queue.
- Higher numbers
popfirst - lower numbers
shiftfirst - always insert using
pushor<<to maintain validity
require 'priority-queue'
queue = Priority::Queue(String).new
queue.push 10, "Insert 1"
queue.push 20, "Insert 2"
queue.pop.value # => "Insert 2"
queue.pop.value # => "Insert 1"
A named priority queue where newer items with the same name replace existing items. The highest of the two priorities is inherited by the new item.
require 'priority-queue'
queue = Priority::NamedQueue(String).new
queue.push 20, "Insert 1", :named
queue.push 20, "Insert 2"
queue.push 10, "Insert 3", :named
queue.size # => 2
queue.pop.value # => "Insert 3"
queue.pop.value # => "Insert 2"
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.0.1- Tagged
- Jul 27, 2024
- Commit
52824216cfbc- Indexed
- not yet
Dependents
Repository
github.com/spider-gazelle/priority-queue
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 25, 2026
- Synced
- Sep 25, 2026
- Versions
- 4