1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>Chapter 17. Boost.Heap</title> 6<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css"> 7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 8<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> 9<link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries (BoostBook Subset)"> 10<link rel="prev" href="function/testsuite.html" title="Testsuite"> 11<link rel="next" href="heap/concepts.html" title="Concepts & Interface"> 12</head> 13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 14<table cellpadding="2" width="100%"><tr> 15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td> 16<td align="center"><a href="../../index.html">Home</a></td> 17<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td> 18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 20<td align="center"><a href="../../more/index.htm">More</a></td> 21</tr></table> 22<hr> 23<div class="spirit-nav"> 24<a accesskey="p" href="function/testsuite.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="heap/concepts.html"><img src="../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="chapter"> 27<div class="titlepage"><div> 28<div><h2 class="title"> 29<a name="heap"></a>Chapter 17. Boost.Heap</h2></div> 30<div><div class="author"><h3 class="author"> 31<span class="firstname">Tim</span> <span class="surname">Blechmann</span> 32</h3></div></div> 33<div><p class="copyright">Copyright © 2010, 2011 Tim Blechmann</p></div> 34<div><div class="legalnotice"> 35<a name="heap.legal"></a><p> 36 Distributed under the Boost Software License, Version 1.0. (See accompanying 37 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 38 </p> 39</div></div> 40</div></div> 41<div class="toc"> 42<p><b>Table of Contents</b></p> 43<dl class="toc"> 44<dt><span class="section"><a href="heap.html#heap.introduction___motivation">Introduction & Motivation</a></span></dt> 45<dt><span class="section"><a href="heap/concepts.html">Concepts & Interface</a></span></dt> 46<dd><dl> 47<dt><span class="section"><a href="heap/concepts.html#heap.concepts.basic">Basic Priority Queue Interface</a></span></dt> 48<dt><span class="section"><a href="heap/concepts.html#heap.concepts.iterators">Priority Queue Iterators</a></span></dt> 49<dt><span class="section"><a href="heap/concepts.html#heap.concepts.comparing">Comparing Priority Queues & 50 Equivalence</a></span></dt> 51<dt><span class="section"><a href="heap/concepts.html#heap.concepts.merge">Merging Priority Queues</a></span></dt> 52<dt><span class="section"><a href="heap/concepts.html#heap.concepts.mutability">Mutability</a></span></dt> 53<dt><span class="section"><a href="heap/concepts.html#heap.concepts.stability">Stability</a></span></dt> 54</dl></dd> 55<dt><span class="section"><a href="heap/data_structures.html">Data Structures</a></span></dt> 56<dd><dl><dt><span class="section"><a href="heap/data_structures.html#heap.data_structures.data_structure_configuration">Data 57 Structure Configuration</a></span></dt></dl></dd> 58<dt><span class="section"><a href="heap/reference.html">Reference</a></span></dt> 59<dd><dl> 60<dt><span class="section"><a href="heap/reference.html#header.boost.heap.binomial_heap_hpp">Header <boost/heap/binomial_heap.hpp></a></span></dt> 61<dt><span class="section"><a href="heap/reference.html#header.boost.heap.d_ary_heap_hpp">Header <boost/heap/d_ary_heap.hpp></a></span></dt> 62<dt><span class="section"><a href="heap/reference.html#header.boost.heap.fibonacci_heap_hpp">Header <boost/heap/fibonacci_heap.hpp></a></span></dt> 63<dt><span class="section"><a href="heap/reference.html#header.boost.heap.heap_concepts_hpp">Header <boost/heap/heap_concepts.hpp></a></span></dt> 64<dt><span class="section"><a href="heap/reference.html#header.boost.heap.heap_merge_hpp">Header <boost/heap/heap_merge.hpp></a></span></dt> 65<dt><span class="section"><a href="heap/reference.html#header.boost.heap.pairing_heap_hpp">Header <boost/heap/pairing_heap.hpp></a></span></dt> 66<dt><span class="section"><a href="heap/reference.html#header.boost.heap.policies_hpp">Header <boost/heap/policies.hpp></a></span></dt> 67<dt><span class="section"><a href="heap/reference.html#header.boost.heap.priority_queue_hpp">Header <boost/heap/priority_queue.hpp></a></span></dt> 68<dt><span class="section"><a href="heap/reference.html#header.boost.heap.skew_heap_hpp">Header <boost/heap/skew_heap.hpp></a></span></dt> 69</dl></dd> 70<dt><span class="section"><a href="heap/acknowledgements.html">Acknowledgements</a></span></dt> 71</dl> 72</div> 73<div class="section"> 74<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 75<a name="heap.introduction___motivation"></a><a class="link" href="heap.html#heap.introduction___motivation" title="Introduction & Motivation">Introduction & Motivation</a> 76</h2></div></div></div> 77<p> 78 <code class="literal">boost.heap</code> is an implementation of priority queues. Priority 79 queues are queue data structures, that order their elements by a priority. 80 The STL provides a single template class <code class="literal">std::priority_queue</code>, 81 which only provides a limited functionality. To overcome these limitations, 82 <code class="literal">boost.heap</code> implements <a class="link" href="heap/data_structures.html" title="Data Structures">data 83 structures</a> with more functionality and different performance characteristics. 84 Especially, it deals with additional aspects: 85 </p> 86<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 87<li class="listitem"> 88 <span class="bold"><strong>Mutability</strong></span>: The priority of heap elements 89 can be modified. 90 </li> 91<li class="listitem"> 92 <span class="bold"><strong>Iterators</strong></span>: Heaps provide iterators to 93 iterate all elements. 94 </li> 95<li class="listitem"> 96 <span class="bold"><strong>Mergable</strong></span>: While all heaps can be merged, 97 some can be merged efficiently. 98 </li> 99<li class="listitem"> 100 <span class="bold"><strong>Stability</strong></span>: Heaps can be configured to 101 be stable sorted. 102 </li> 103<li class="listitem"> 104 <span class="bold"><strong>Comparison</strong></span>: Heaps can be compared for 105 equivalence. 106 </li> 107</ul></div> 108</div> 109</div> 110<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 111<td align="left"><p><small>Last revised: August 11, 2020 at 15:03:46 GMT</small></p></td> 112<td align="right"><div class="copyright-footer"></div></td> 113</tr></table> 114<hr> 115<div class="spirit-nav"> 116<a accesskey="p" href="function/testsuite.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="heap/concepts.html"><img src="../../doc/src/images/next.png" alt="Next"></a> 117</div> 118</body> 119</html> 120