Chapter 14. Boost.Heap (original) (raw)
Copyright © 2010, 2011 Tim Blechmann
boost.heap is an implementation of priority queues. Priority queues are queue data structures, that order their elements by a priority. The STL provides a single template class std::priority_queue, which only provides a limited functionality. To overcome these limitations,boost.heap implements data structures with more functionality and different performance characteristics. Especially, it deals with additional aspects:
- Mutability: The priority of heap elements can be modified.
- Iterators: Heaps provide iterators to iterate all elements.
- Mergable: While all heaps can be merged, some can be merged efficiently.
- Stability: Heaps can be configured to be stable sorted.
- Comparison: Heaps can be compared for equivalence.