@ende/data-structures/unstable-indexed-heap

ende add jsr:@ende/data-structures

Version 2026.10.15 on JSR.

Exports

  • HeapEntry — A key-priority pair returned by IndexedHeap methods.
  • IndexedHeap — A priority queue that supports looking up, removing, and re-prioritizing entries by key. Each entry is a unique `(key, priority)` pair. The entry with the smallest priority (under the comparator) is always at the front.
  • ReadonlyIndexedHeap — Read-only view of an IndexedHeap. Exposes query and iteration methods, hiding all methods that modify the heap. Follows the same pattern as `ReadonlyMap` and `ReadonlySet`.