The OpenD Programming Language

mir.container.binaryheap

This module provides a BinaryHeap (aka priority queue) adaptor that makes a binary heap out of any user-provided random-access range.

Current implementation is suitable for Mir/BetterC concepts.

This module is a submodule of mir.container.

Members

Functions

heapify
BinaryHeap!(less, Store) heapify(Store s, size_t initialSize)

Convenience function that returns a BinaryHeap!Store object initialized with s and initialSize.

Structs

BinaryHeap
struct BinaryHeap(alias less = "a < b", Store)

Implements a binary heap container on top of a given random-access range type (usually T[]) or a random-access container type (usually Array!T). The documentation of BinaryHeap will refer to the underlying range or container as the store of the heap.

Templates

HeapOps
template HeapOps(alias less, Range)

Heap operations for random-access ranges

Meta

Authors

Andrei Alexandrescu (original Phobos code), Ilia Ki (Mir & BetterC rework).