[DEV] add v1.76.0

This commit is contained in:
2021-10-05 21:37:46 +02:00
parent a97e9ae7d4
commit d0115b733d
45133 changed files with 4744437 additions and 1026325 deletions

View File

@@ -4,9 +4,14 @@
<namespace name="heap">
<class name="binomial_heap"><template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
<template-nontype-parameter name="Options"><type>class ...</type></template-nontype-parameter>
</template><purpose>binomial heap </purpose><description><para>The template parameter T is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options:<itemizedlist>
<listitem><para><computeroutput>boost::heap::stable&lt;&gt;</computeroutput>, defaults to <computeroutput>stable&lt;false&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::compare&lt;&gt;</computeroutput>, defaults to <computeroutput>compare&lt;std::less&lt;T&gt;</computeroutput> &gt;</para></listitem><listitem><para><computeroutput>boost::heap::allocator&lt;&gt;</computeroutput>, defaults to <computeroutput>allocator&lt;std::allocator&lt;T&gt;</computeroutput> &gt;</para></listitem><listitem><para><computeroutput>boost::heap::constant_time_size&lt;&gt;</computeroutput>, defaults to <computeroutput>constant_time_size&lt;true&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::stability_counter_type&lt;&gt;</computeroutput>, defaults to <computeroutput>stability_counter_type&lt;boost::uintmax_t&gt;</computeroutput> </para></listitem></itemizedlist>
<listitem><para><computeroutput>boost::heap::stable&lt;&gt;</computeroutput>, defaults to <computeroutput>stable&lt;false&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::compare&lt;&gt;</computeroutput>, defaults to <computeroutput>compare&lt;std::less&lt;T&gt;</computeroutput> &gt;</para>
</listitem><listitem><para><computeroutput>boost::heap::allocator&lt;&gt;</computeroutput>, defaults to <computeroutput>allocator&lt;std::allocator&lt;T&gt;</computeroutput> &gt;</para>
</listitem><listitem><para><computeroutput>boost::heap::constant_time_size&lt;&gt;</computeroutput>, defaults to <computeroutput>constant_time_size&lt;true&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::stability_counter_type&lt;&gt;</computeroutput>, defaults to <computeroutput>stability_counter_type&lt;boost::uintmax_t&gt;</computeroutput> </para>
</listitem></itemizedlist>
</para></description><typedef name="value_type"><type>T</type></typedef>
<typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
<typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
@@ -50,7 +55,7 @@
<method name="ordered_begin" cv="const"><type>ordered_iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an ordered iterator to the first element contained in the priority queue.</para><para><emphasis role="bold">Note:</emphasis> Ordered iterators traverse the priority queue in heap order. </para></description></method>
<method name="ordered_end" cv="const"><type>ordered_iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an ordered iterator to the end of the priority queue.</para><para><emphasis role="bold">Note:</emphasis> Ordered iterators traverse the priority queue in heap order. </para></description></method>
<method name="erase"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Removes the element handled by <computeroutput>handle</computeroutput> from the <classname alt="boost::heap::priority_queue">priority_queue</classname>.</para><para><emphasis role="bold">Complexity:</emphasis> Logarithmic. </para></description></method>
<method name="value_comp" cv="const"><type>value_compare const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effect:</emphasis> Returns the value_compare object used by the priority queue </para></description></method>
<method name="value_comp" cv="const"><type>value_compare const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effect:</emphasis> Returns the value_compare object used by the priority queue </para></description></method>
<method name="operator&lt;" cv="const"><type>bool</type><template>
<template-type-parameter name="HeapType"/>
</template><parameter name="rhs"><paramtype>HeapType const &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns:</emphasis> Element-wise comparison of heap data structures</para><para><emphasis role="bold">Requirement:</emphasis> the <computeroutput>value_compare</computeroutput> object of both heaps must match. </para></description></method>
@@ -88,9 +93,15 @@
<namespace name="heap">
<class name="d_ary_heap"><template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
<template-nontype-parameter name="Options"><type>class ...</type></template-nontype-parameter>
</template><purpose>d-ary heap class </purpose><description><para>This class implements an immutable priority queue. Internally, the d-ary heap is represented as dynamically sized array (std::vector), that directly stores the values.</para><para>The template parameter T is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options:<itemizedlist>
<listitem><para><computeroutput>boost::heap::arity&lt;&gt;</computeroutput>, required</para></listitem><listitem><para><computeroutput>boost::heap::compare&lt;&gt;</computeroutput>, defaults to <computeroutput>compare&lt;std::less&lt;T&gt;</computeroutput> &gt;</para></listitem><listitem><para><computeroutput>boost::heap::stable&lt;&gt;</computeroutput>, defaults to <computeroutput>stable&lt;false&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::stability_counter_type&lt;&gt;</computeroutput>, defaults to <computeroutput>stability_counter_type&lt;boost::uintmax_t&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::allocator&lt;&gt;</computeroutput>, defaults to <computeroutput>allocator&lt;std::allocator&lt;T&gt;</computeroutput> &gt;</para></listitem><listitem><para><computeroutput>boost::heap::mutable_&lt;&gt;</computeroutput>, defaults to <computeroutput>mutable_&lt;false&gt;</computeroutput> </para></listitem></itemizedlist>
<listitem><para><computeroutput>boost::heap::arity&lt;&gt;</computeroutput>, required</para>
</listitem><listitem><para><computeroutput>boost::heap::compare&lt;&gt;</computeroutput>, defaults to <computeroutput>compare&lt;std::less&lt;T&gt;</computeroutput> &gt;</para>
</listitem><listitem><para><computeroutput>boost::heap::stable&lt;&gt;</computeroutput>, defaults to <computeroutput>stable&lt;false&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::stability_counter_type&lt;&gt;</computeroutput>, defaults to <computeroutput>stability_counter_type&lt;boost::uintmax_t&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::allocator&lt;&gt;</computeroutput>, defaults to <computeroutput>allocator&lt;std::allocator&lt;T&gt;</computeroutput> &gt;</para>
</listitem><listitem><para><computeroutput>boost::heap::mutable_&lt;&gt;</computeroutput>, defaults to <computeroutput>mutable_&lt;false&gt;</computeroutput> </para>
</listitem></itemizedlist>
</para></description><typedef name="value_type"><type>T</type></typedef>
<typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
<typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
@@ -115,9 +126,9 @@
<method name="max_size" cv="const"><type>size_type</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns the maximum number of elements the priority queue can contain.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="clear"><type>void</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Removes all elements from the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> Linear. </para></description></method>
<method name="get_allocator" cv="const"><type>allocator_type</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns allocator.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="top" cv="const"><type>value_type const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns a const_reference to the maximum element.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="push"><type>mpl::if_c&lt; is_mutable, handle_type, void &gt;::type</type><parameter name="v"><paramtype>value_type const &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Adds a new element to the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> Logarithmic (amortized). Linear (worst case). </para></description></method>
<method name="emplace"><type>mpl::if_c&lt; is_mutable, handle_type, void &gt;::type</type><template>
<method name="top" cv="const"><type>value_type const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns a const_reference to the maximum element.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="push"><type>boost::conditional&lt; is_mutable, handle_type, void &gt;::type</type><parameter name="v"><paramtype>value_type const &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Adds a new element to the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> Logarithmic (amortized). Linear (worst case). </para></description></method>
<method name="emplace"><type>boost::conditional&lt; is_mutable, handle_type, void &gt;::type</type><template>
<template-nontype-parameter name="Args"><type>class...</type></template-nontype-parameter>
</template><parameter name="args"><paramtype>Args &amp;&amp;...</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Adds a new element to the priority queue. The element is directly constructed in-place.</para><para><emphasis role="bold">Complexity:</emphasis> Logarithmic (amortized). Linear (worst case). </para></description></method>
<method name="operator&lt;" cv="const"><type>bool</type><template>
@@ -154,7 +165,7 @@
<method name="ordered_begin" cv="const"><type>ordered_iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an ordered iterator to the first element contained in the priority queue.</para><para><emphasis role="bold">Note:</emphasis> Ordered iterators traverse the priority queue in heap order. </para></description></method>
<method name="ordered_end" cv="const"><type>ordered_iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an ordered iterator to the end of the priority queue.</para><para><emphasis role="bold">Note:</emphasis> Ordered iterators traverse the priority queue in heap order. </para></description></method>
<method name="reserve"><type>void</type><parameter name="element_count"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Reserves memory for element_count elements</para><para><emphasis role="bold">Complexity:</emphasis> Linear.</para><para><emphasis role="bold">Node:</emphasis> Invalidates iterators </para></description></method>
<method name="value_comp" cv="const"><type>value_compare const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effect:</emphasis> Returns the value_compare object used by the priority queue </para></description></method>
<method name="value_comp" cv="const"><type>value_compare const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effect:</emphasis> Returns the value_compare object used by the priority queue </para></description></method>
</method-group>
<constructor specifiers="explicit"><parameter name="cmp"><paramtype>value_compare const &amp;</paramtype><default>value_compare()</default></parameter><description><para><emphasis role="bold">Effects:</emphasis> constructs an empty priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></constructor>
<constructor><parameter name="rhs"><paramtype><classname>d_ary_heap</classname> const &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> copy-constructs priority queue from rhs.</para><para><emphasis role="bold">Complexity:</emphasis> Linear. </para></description></constructor>
@@ -173,9 +184,14 @@
<namespace name="heap">
<class name="fibonacci_heap"><template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
<template-nontype-parameter name="Options"><type>class ...</type></template-nontype-parameter>
</template><purpose>fibonacci heap </purpose><description><para>The template parameter T is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options:<itemizedlist>
<listitem><para><computeroutput>boost::heap::stable&lt;&gt;</computeroutput>, defaults to <computeroutput>stable&lt;false&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::compare&lt;&gt;</computeroutput>, defaults to <computeroutput>compare&lt;std::less&lt;T&gt;</computeroutput> &gt;</para></listitem><listitem><para><computeroutput>boost::heap::allocator&lt;&gt;</computeroutput>, defaults to <computeroutput>allocator&lt;std::allocator&lt;T&gt;</computeroutput> &gt;</para></listitem><listitem><para><computeroutput>boost::heap::constant_time_size&lt;&gt;</computeroutput>, defaults to <computeroutput>constant_time_size&lt;true&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::stability_counter_type&lt;&gt;</computeroutput>, defaults to <computeroutput>stability_counter_type&lt;boost::uintmax_t&gt;</computeroutput> </para></listitem></itemizedlist>
<listitem><para><computeroutput>boost::heap::stable&lt;&gt;</computeroutput>, defaults to <computeroutput>stable&lt;false&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::compare&lt;&gt;</computeroutput>, defaults to <computeroutput>compare&lt;std::less&lt;T&gt;</computeroutput> &gt;</para>
</listitem><listitem><para><computeroutput>boost::heap::allocator&lt;&gt;</computeroutput>, defaults to <computeroutput>allocator&lt;std::allocator&lt;T&gt;</computeroutput> &gt;</para>
</listitem><listitem><para><computeroutput>boost::heap::constant_time_size&lt;&gt;</computeroutput>, defaults to <computeroutput>constant_time_size&lt;true&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::stability_counter_type&lt;&gt;</computeroutput>, defaults to <computeroutput>stability_counter_type&lt;boost::uintmax_t&gt;</computeroutput> </para>
</listitem></itemizedlist>
</para></description><typedef name="value_type"><type>T</type></typedef>
<typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
<typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
@@ -201,7 +217,7 @@
<method name="clear"><type>void</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Removes all elements from the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> Linear. </para></description></method>
<method name="get_allocator" cv="const"><type>allocator_type</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns allocator.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="swap"><type>void</type><parameter name="rhs"><paramtype><classname>fibonacci_heap</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Swaps two priority queues.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="top" cv="const"><type>value_type const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns a const_reference to the maximum element.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="top" cv="const"><type>value_type const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns a const_reference to the maximum element.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="push"><type>handle_type</type><parameter name="v"><paramtype>value_type const &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Adds a new element to the priority queue. Returns handle to element</para><para><emphasis role="bold">Complexity:</emphasis> Constant.</para><para><emphasis role="bold">Note:</emphasis> Does not invalidate iterators. </para></description></method>
<method name="emplace"><type>handle_type</type><template>
<template-nontype-parameter name="Args"><type>class...</type></template-nontype-parameter>
@@ -221,7 +237,7 @@
<method name="ordered_begin" cv="const"><type>ordered_iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an ordered iterator to the first element contained in the priority queue.</para><para><emphasis role="bold">Note:</emphasis> Ordered iterators traverse the priority queue in heap order. </para></description></method>
<method name="ordered_end" cv="const"><type>ordered_iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an ordered iterator to the end of the priority queue.</para><para><emphasis role="bold">Note:</emphasis> Ordered iterators traverse the priority queue in heap order. </para></description></method>
<method name="merge"><type>void</type><parameter name="rhs"><paramtype><classname>fibonacci_heap</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Merge with priority queue rhs.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="value_comp" cv="const"><type>value_compare const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effect:</emphasis> Returns the value_compare object used by the priority queue </para></description></method>
<method name="value_comp" cv="const"><type>value_compare const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effect:</emphasis> Returns the value_compare object used by the priority queue </para></description></method>
<method name="operator&lt;" cv="const"><type>bool</type><template>
<template-type-parameter name="HeapType"/>
</template><parameter name="rhs"><paramtype>HeapType const &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns:</emphasis> Element-wise comparison of heap data structures</para><para><emphasis role="bold">Requirement:</emphasis> the <computeroutput>value_compare</computeroutput> object of both heaps must match. </para></description></method>
@@ -257,18 +273,7 @@
<header name="boost/heap/heap_concepts.hpp">
<namespace name="boost">
<namespace name="heap">
<struct name="PriorityQueue"><template>
<template-type-parameter name="C"/>
</template><inherit access="public">boost::ForwardContainer&lt; C &gt;</inherit><typedef name="iterator"><type>C::iterator</type></typedef>
<typedef name="const_iterator"><type>C::const_iterator</type></typedef>
<typedef name="allocator_type"><type>C::allocator_type</type></typedef>
<typedef name="value_compare"><type>C::value_compare</type></typedef>
<typedef name="value_type"><type>C::value_type</type></typedef>
<typedef name="const_reference"><type>C::const_reference</type></typedef>
<method-group name="public member functions">
<method name="BOOST_CONCEPT_USAGE"><type/><parameter name=""><paramtype>PriorityQueue</paramtype></parameter></method>
</method-group>
</struct><struct name="MergablePriorityQueue"><template>
<struct name="MergablePriorityQueue"><template>
<template-type-parameter name="C"/>
</template><inherit access="public">boost::heap::PriorityQueue&lt; C &gt;</inherit><method-group name="public member functions">
<method name="BOOST_CONCEPT_USAGE"><type/><parameter name=""><paramtype>MergablePriorityQueue</paramtype></parameter></method>
@@ -296,6 +301,17 @@
<method name="BOOST_CONCEPT_USAGE"><type/><parameter name=""><paramtype>MutablePriorityQueue</paramtype></parameter></method>
<method name="BOOST_CONCEPT_USAGE"><type/><parameter name=""><paramtype>PriorityQueue</paramtype></parameter></method>
</method-group>
</struct><struct name="PriorityQueue"><template>
<template-type-parameter name="C"/>
</template><inherit access="public">boost::ForwardContainer&lt; C &gt;</inherit><typedef name="iterator"><type>C::iterator</type></typedef>
<typedef name="const_iterator"><type>C::const_iterator</type></typedef>
<typedef name="allocator_type"><type>C::allocator_type</type></typedef>
<typedef name="value_compare"><type>C::value_compare</type></typedef>
<typedef name="value_type"><type>C::value_type</type></typedef>
<typedef name="const_reference"><type>C::const_reference</type></typedef>
<method-group name="public member functions">
<method name="BOOST_CONCEPT_USAGE"><type/><parameter name=""><paramtype>PriorityQueue</paramtype></parameter></method>
</method-group>
</struct>
</namespace>
</namespace>
@@ -315,9 +331,14 @@
<namespace name="heap">
<class name="pairing_heap"><template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
<template-nontype-parameter name="Options"><type>class ...</type></template-nontype-parameter>
</template><purpose>pairing heap </purpose><description><para>Pairing heaps are self-adjusting binary heaps. Although design and implementation are rather simple, the complexity analysis is yet unsolved. For details, consult:</para><para>Pettie, Seth (2005), "Towards a final analysis of pairing heaps", Proc. 46th Annual IEEE Symposium on Foundations of Computer Science, pp. 174-183</para><para>The template parameter T is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options:<itemizedlist>
<listitem><para><computeroutput>boost::heap::compare&lt;&gt;</computeroutput>, defaults to <computeroutput>compare&lt;std::less&lt;T&gt;</computeroutput> &gt;</para></listitem><listitem><para><computeroutput>boost::heap::stable&lt;&gt;</computeroutput>, defaults to <computeroutput>stable&lt;false&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::stability_counter_type&lt;&gt;</computeroutput>, defaults to <computeroutput>stability_counter_type&lt;boost::uintmax_t&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::allocator&lt;&gt;</computeroutput>, defaults to <computeroutput>allocator&lt;std::allocator&lt;T&gt;</computeroutput> &gt;</para></listitem><listitem><para><computeroutput>boost::heap::constant_time_size&lt;&gt;</computeroutput>, defaults to <computeroutput>constant_time_size&lt;true&gt;</computeroutput> </para></listitem></itemizedlist>
<listitem><para><computeroutput>boost::heap::compare&lt;&gt;</computeroutput>, defaults to <computeroutput>compare&lt;std::less&lt;T&gt;</computeroutput> &gt;</para>
</listitem><listitem><para><computeroutput>boost::heap::stable&lt;&gt;</computeroutput>, defaults to <computeroutput>stable&lt;false&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::stability_counter_type&lt;&gt;</computeroutput>, defaults to <computeroutput>stability_counter_type&lt;boost::uintmax_t&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::allocator&lt;&gt;</computeroutput>, defaults to <computeroutput>allocator&lt;std::allocator&lt;T&gt;</computeroutput> &gt;</para>
</listitem><listitem><para><computeroutput>boost::heap::constant_time_size&lt;&gt;</computeroutput>, defaults to <computeroutput>constant_time_size&lt;true&gt;</computeroutput> </para>
</listitem></itemizedlist>
</para></description><typedef name="value_type"><type>T</type></typedef>
<typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
<typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
@@ -344,24 +365,24 @@
<method name="get_allocator" cv="const"><type>allocator_type</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns allocator.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="swap"><type>void</type><parameter name="rhs"><paramtype><classname>pairing_heap</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Swaps two priority queues.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="top" cv="const"><type>const_reference</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns a const_reference to the maximum element.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="push"><type>handle_type</type><parameter name="v"><paramtype>value_type const &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Adds a new element to the priority queue. Returns handle to element</para><para><emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized). </para></description></method>
<method name="push"><type>handle_type</type><parameter name="v"><paramtype>value_type const &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Adds a new element to the priority queue. Returns handle to element<emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized). </para></description></method>
<method name="emplace"><type>handle_type</type><template>
<template-nontype-parameter name="Args"><type>class...</type></template-nontype-parameter>
</template><parameter name="args"><paramtype>Args &amp;&amp;...</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Adds a new element to the priority queue. The element is directly constructed in-place. Returns handle to element.</para><para><emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized). </para></description></method>
</template><parameter name="args"><paramtype>Args &amp;&amp;...</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Adds a new element to the priority queue. The element is directly constructed in-place. Returns handle to element.<emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized). </para></description></method>
<method name="pop"><type>void</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Removes the top element from the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> Logarithmic (amortized). </para></description></method>
<method name="update"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><parameter name="v"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Assigns <computeroutput>v</computeroutput> to the element handled by <computeroutput>handle</computeroutput> &amp; updates the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized). </para></description></method>
<method name="update"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Updates the heap after the element handled by <computeroutput>handle</computeroutput> has been changed.</para><para><emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized).</para><para><emphasis role="bold">Note:</emphasis> If this is not called, after a handle has been updated, the behavior of the data structure is undefined! </para></description></method>
<method name="increase"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><parameter name="v"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Assigns <computeroutput>v</computeroutput> to the element handled by <computeroutput>handle</computeroutput> &amp; updates the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized).</para><para><emphasis role="bold">Note:</emphasis> The new value is expected to be greater than the current one </para></description></method>
<method name="increase"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Updates the heap after the element handled by <computeroutput>handle</computeroutput> has been changed.</para><para><emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized).</para><para><emphasis role="bold">Note:</emphasis> If this is not called, after a handle has been updated, the behavior of the data structure is undefined! </para></description></method>
<method name="decrease"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><parameter name="v"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Assigns <computeroutput>v</computeroutput> to the element handled by <computeroutput>handle</computeroutput> &amp; updates the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized).</para><para><emphasis role="bold">Note:</emphasis> The new value is expected to be less than the current one </para></description></method>
<method name="decrease"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Updates the heap after the element handled by <computeroutput>handle</computeroutput> has been changed.</para><para><emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized).</para><para><emphasis role="bold">Note:</emphasis> The new value is expected to be less than the current one. If this is not called, after a handle has been updated, the behavior of the data structure is undefined! </para></description></method>
<method name="erase"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Removes the element handled by <computeroutput>handle</computeroutput> from the <classname alt="boost::heap::priority_queue">priority_queue</classname>.</para><para><emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized). </para></description></method>
<method name="update"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><parameter name="v"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Assigns <computeroutput>v</computeroutput> to the element handled by <computeroutput>handle</computeroutput> &amp; updates the priority queue.<emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized). </para></description></method>
<method name="update"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Updates the heap after the element handled by <computeroutput>handle</computeroutput> has been changed.<emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized).</para><para><emphasis role="bold">Note:</emphasis> If this is not called, after a handle has been updated, the behavior of the data structure is undefined! </para></description></method>
<method name="increase"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><parameter name="v"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Assigns <computeroutput>v</computeroutput> to the element handled by <computeroutput>handle</computeroutput> &amp; updates the priority queue.<emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized).</para><para><emphasis role="bold">Note:</emphasis> The new value is expected to be greater than the current one </para></description></method>
<method name="increase"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Updates the heap after the element handled by <computeroutput>handle</computeroutput> has been changed.<emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized).</para><para><emphasis role="bold">Note:</emphasis> If this is not called, after a handle has been updated, the behavior of the data structure is undefined! </para></description></method>
<method name="decrease"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><parameter name="v"><paramtype>const_reference</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Assigns <computeroutput>v</computeroutput> to the element handled by <computeroutput>handle</computeroutput> &amp; updates the priority queue.<emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized).</para><para><emphasis role="bold">Note:</emphasis> The new value is expected to be less than the current one </para></description></method>
<method name="decrease"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Updates the heap after the element handled by <computeroutput>handle</computeroutput> has been changed.<emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized).</para><para><emphasis role="bold">Note:</emphasis> The new value is expected to be less than the current one. If this is not called, after a handle has been updated, the behavior of the data structure is undefined! </para></description></method>
<method name="erase"><type>void</type><parameter name="handle"><paramtype>handle_type</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Removes the element handled by <computeroutput>handle</computeroutput> from the <classname alt="boost::heap::priority_queue">priority_queue</classname>.<emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized). </para></description></method>
<method name="begin" cv="const"><type>iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an iterator to the first element contained in the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="end" cv="const"><type>iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an iterator to the end of the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="ordered_begin" cv="const"><type>ordered_iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an ordered iterator to the first element contained in the priority queue.</para><para><emphasis role="bold">Note:</emphasis> Ordered iterators traverse the priority queue in heap order. </para></description></method>
<method name="ordered_end" cv="const"><type>ordered_iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an ordered iterator to the first element contained in the priority queue.</para><para><emphasis role="bold">Note:</emphasis> Ordered iterators traverse the priority queue in heap order. </para></description></method>
<method name="merge"><type>void</type><parameter name="rhs"><paramtype><classname>pairing_heap</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Merge all elements from rhs into this</para><para><emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized). </para></description></method>
<method name="value_comp" cv="const"><type>value_compare const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effect:</emphasis> Returns the value_compare object used by the priority queue </para></description></method>
<method name="merge"><type>void</type><parameter name="rhs"><paramtype><classname>pairing_heap</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Merge all elements from rhs into this<emphasis role="bold">Complexity:</emphasis> 2**2*log(log(N)) (amortized). </para></description></method>
<method name="value_comp" cv="const"><type>value_compare const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effect:</emphasis> Returns the value_compare object used by the priority queue </para></description></method>
<method name="operator&lt;" cv="const"><type>bool</type><template>
<template-type-parameter name="HeapType"/>
</template><parameter name="rhs"><paramtype>HeapType const &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns:</emphasis> Element-wise comparison of heap data structures</para><para><emphasis role="bold">Requirement:</emphasis> the <computeroutput>value_compare</computeroutput> object of both heaps must match. </para></description></method>
@@ -397,23 +418,23 @@
<header name="boost/heap/policies.hpp">
<namespace name="boost">
<namespace name="heap">
<struct name="compare"><template>
<struct name="allocator"><template>
<template-type-parameter name="T"/>
</template><purpose>Specifies the predicate for the heap order. </purpose></struct><struct name="mutable_"><template>
<template-nontype-parameter name="T"><type>bool</type></template-nontype-parameter>
</template><purpose>Configure heap as mutable. </purpose><description><para>Certain heaps need to be configured specifically do be mutable. </para></description></struct><struct name="allocator"><template>
<template-type-parameter name="T"/>
</template><purpose>Specifies allocator for the internal memory management. </purpose></struct><struct name="stable"><template>
<template-nontype-parameter name="T"><type>bool</type></template-nontype-parameter>
</template><purpose>Configure a heap as <emphasis role="bold">stable</emphasis>. </purpose><description><para>A priority queue is stable, if elements with the same priority are popped from the heap, in the same order as they are inserted. </para></description></struct><struct name="stability_counter_type"><template>
<template-type-parameter name="IntType"/>
</template><purpose>Specifies the type for stability counter. </purpose></struct><struct name="constant_time_size"><template>
<template-nontype-parameter name="T"><type>bool</type></template-nontype-parameter>
</template><purpose>Configures complexity of <computeroutput> size() </computeroutput> </purpose><description><para>Specifies, whether size() should have linear or constant complexity. </para></description></struct><struct name="store_parent_pointer"><template>
<template-nontype-parameter name="T"><type>bool</type></template-nontype-parameter>
</template><purpose>Store parent pointer in heap node. </purpose><description><para>Maintaining a parent pointer adds some maintenance and size overhead, but iterating a heap is more efficient. </para></description></struct><struct name="arity"><template>
</template><purpose>Specifies allocator for the internal memory management. </purpose></struct><struct name="arity"><template>
<template-nontype-parameter name="T"><type>unsigned int</type></template-nontype-parameter>
</template><purpose>Specify arity. </purpose><description><para>Specifies the arity of a D-ary heap </para></description></struct>
</template><purpose>Specify arity. </purpose><description><para>Specifies the arity of a D-ary heap </para></description></struct><struct name="compare"><template>
<template-type-parameter name="T"/>
</template><purpose>Specifies the predicate for the heap order. </purpose></struct><struct name="constant_time_size"><template>
<template-nontype-parameter name="T"><type>bool</type></template-nontype-parameter>
</template><purpose>Configures complexity of <computeroutput> size() </computeroutput> </purpose><description><para>Specifies, whether size() should have linear or constant complexity. </para></description></struct><struct name="mutable_"><template>
<template-nontype-parameter name="T"><type>bool</type></template-nontype-parameter>
</template><purpose>Configure heap as mutable. </purpose><description><para>Certain heaps need to be configured specifically do be mutable. </para></description></struct><struct name="stability_counter_type"><template>
<template-type-parameter name="IntType"/>
</template><purpose>Specifies the type for stability counter. </purpose></struct><struct name="stable"><template>
<template-nontype-parameter name="T"><type>bool</type></template-nontype-parameter>
</template><purpose>Configure a heap as <emphasis role="bold">stable</emphasis>. </purpose><description><para>A priority queue is stable, if elements with the same priority are popped from the heap, in the same order as they are inserted. </para></description></struct><struct name="store_parent_pointer"><template>
<template-nontype-parameter name="T"><type>bool</type></template-nontype-parameter>
</template><purpose>Store parent pointer in heap node. </purpose><description><para>Maintaining a parent pointer adds some maintenance and size overhead, but iterating a heap is more efficient. </para></description></struct>
</namespace>
</namespace>
</header>
@@ -422,10 +443,14 @@
<namespace name="heap">
<class name="priority_queue"><template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
<template-nontype-parameter name="Options"><type>class ...</type></template-nontype-parameter>
</template><purpose>priority queue, based on stl heap functions </purpose><description><para>The <classname alt="boost::heap::priority_queue">priority_queue</classname> class is a wrapper for the stl heap functions.<sbr/>
The template parameter T is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options:<itemizedlist>
<listitem><para><computeroutput>boost::heap::compare&lt;&gt;</computeroutput>, defaults to <computeroutput>compare&lt;std::less&lt;T&gt;</computeroutput> &gt;</para></listitem><listitem><para><computeroutput>boost::heap::stable&lt;&gt;</computeroutput>, defaults to <computeroutput>stable&lt;false&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::stability_counter_type&lt;&gt;</computeroutput>, defaults to <computeroutput>stability_counter_type&lt;boost::uintmax_t&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::allocator&lt;&gt;</computeroutput>, defaults to <computeroutput>allocator&lt;std::allocator&lt;T&gt;</computeroutput> &gt; </para></listitem></itemizedlist>
<listitem><para><computeroutput>boost::heap::compare&lt;&gt;</computeroutput>, defaults to <computeroutput>compare&lt;std::less&lt;T&gt;</computeroutput> &gt;</para>
</listitem><listitem><para><computeroutput>boost::heap::stable&lt;&gt;</computeroutput>, defaults to <computeroutput>stable&lt;false&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::stability_counter_type&lt;&gt;</computeroutput>, defaults to <computeroutput>stability_counter_type&lt;boost::uintmax_t&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::allocator&lt;&gt;</computeroutput>, defaults to <computeroutput>allocator&lt;std::allocator&lt;T&gt;</computeroutput> &gt; </para>
</listitem></itemizedlist>
</para></description><typedef name="value_type"><type>T</type></typedef>
<typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
<typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
@@ -458,7 +483,7 @@
<method name="begin" cv="const noexcept"><type>iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an iterator to the first element contained in the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="end" cv="const noexcept"><type>iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an iterator to the end of the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
<method name="reserve"><type>void</type><parameter name="element_count"><paramtype>size_type</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Reserves memory for element_count elements</para><para><emphasis role="bold">Complexity:</emphasis> Linear.</para><para><emphasis role="bold">Node:</emphasis> Invalidates iterators </para></description></method>
<method name="value_comp" cv="const"><type>value_compare const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effect:</emphasis> Returns the value_compare object used by the priority queue </para></description></method>
<method name="value_comp" cv="const"><type>value_compare const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effect:</emphasis> Returns the value_compare object used by the priority queue </para></description></method>
<method name="operator&lt;" cv="const"><type>bool</type><template>
<template-type-parameter name="HeapType"/>
</template><parameter name="rhs"><paramtype>HeapType const &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns:</emphasis> Element-wise comparison of heap data structures</para><para><emphasis role="bold">Requirement:</emphasis> the <computeroutput>value_compare</computeroutput> object of both heaps must match. </para></description></method>
@@ -492,15 +517,31 @@
<namespace name="heap">
<class name="skew_heap"><template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="Options"><type>class...</type></template-nontype-parameter>
<template-nontype-parameter name="Options"><type>class ...</type></template-nontype-parameter>
</template><purpose>skew heap </purpose><description><para>The template parameter T is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.</para><para>The container supports the following options:<itemizedlist>
<listitem><para><computeroutput>boost::heap::compare&lt;&gt;</computeroutput>, defaults to <computeroutput>compare&lt;std::less&lt;T&gt;</computeroutput> &gt;</para></listitem><listitem><para><computeroutput>boost::heap::stable&lt;&gt;</computeroutput>, defaults to <computeroutput>stable&lt;false&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::stability_counter_type&lt;&gt;</computeroutput>, defaults to <computeroutput>stability_counter_type&lt;boost::uintmax_t&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::allocator&lt;&gt;</computeroutput>, defaults to <computeroutput>allocator&lt;std::allocator&lt;T&gt;</computeroutput> &gt;</para></listitem><listitem><para><computeroutput>boost::heap::constant_time_size&lt;&gt;</computeroutput>, defaults to <computeroutput>constant_time_size&lt;true&gt;</computeroutput> </para></listitem><listitem><para><computeroutput>boost::heap::store_parent_pointer&lt;&gt;</computeroutput>, defaults to <computeroutput>store_parent_pointer&lt;true&gt;</computeroutput>. Maintaining a parent pointer adds some maintenance and size overhead, but iterating a heap is more efficient.</para></listitem><listitem><para><computeroutput>boost::heap::mutable&lt;&gt;</computeroutput>, defaults to <computeroutput>mutable&lt;false&gt;</computeroutput>. </para></listitem></itemizedlist>
</para></description><struct name="implementation_defined"><typedef name="value_type"><type>T</type></typedef>
<listitem><para><computeroutput>boost::heap::compare&lt;&gt;</computeroutput>, defaults to <computeroutput>compare&lt;std::less&lt;T&gt;</computeroutput> &gt;</para>
</listitem><listitem><para><computeroutput>boost::heap::stable&lt;&gt;</computeroutput>, defaults to <computeroutput>stable&lt;false&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::stability_counter_type&lt;&gt;</computeroutput>, defaults to <computeroutput>stability_counter_type&lt;boost::uintmax_t&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::allocator&lt;&gt;</computeroutput>, defaults to <computeroutput>allocator&lt;std::allocator&lt;T&gt;</computeroutput> &gt;</para>
</listitem><listitem><para><computeroutput>boost::heap::constant_time_size&lt;&gt;</computeroutput>, defaults to <computeroutput>constant_time_size&lt;true&gt;</computeroutput> </para>
</listitem><listitem><para><computeroutput>boost::heap::store_parent_pointer&lt;&gt;</computeroutput>, defaults to <computeroutput>store_parent_pointer&lt;true&gt;</computeroutput>. Maintaining a parent pointer adds some maintenance and size overhead, but iterating a heap is more efficient.</para>
</listitem><listitem><para><computeroutput>boost::heap::mutable&lt;&gt;</computeroutput>, defaults to <computeroutput>mutable&lt;false&gt;</computeroutput>. </para>
</listitem></itemizedlist>
</para></description><struct name="implementation_defined"><template>
<template-type-parameter name="T"/>
<template-type-parameter name="A0"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A1"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A2"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A3"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A4"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A5"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A6"><default>boost::parameter::void_</default></template-type-parameter>
</template><typedef name="value_type"><type>T</type></typedef>
<typedef name="value_compare"><type>base_maker::compare_argument</type></typedef>
<typedef name="allocator_type"><type>base_maker::allocator_type</type></typedef>
<typedef name="node"><type>base_maker::node_type</type></typedef>
<typedef name="node_pointer"><type>allocator_type::pointer</type></typedef>
<typedef name="const_node_pointer"><type>allocator_type::const_pointer</type></typedef>
<typedef name="node_pointer"><type>boost::allocator_pointer&lt; allocator_type &gt;::type</type></typedef>
<typedef name="const_node_pointer"><type>boost::allocator_const_pointer&lt; allocator_type &gt;::type</type></typedef>
<typedef name="value_extractor"><type><emphasis>unspecified</emphasis></type></typedef>
<typedef name="child_list_type"><type>boost::array&lt; node_pointer, 2 &gt;</type></typedef>
<typedef name="child_list_iterator"><type>child_list_type::iterator</type></typedef>
@@ -509,6 +550,36 @@
<typedef name="ordered_iterator"><type><emphasis>unspecified</emphasis></type></typedef>
<typedef name="reference"><type><emphasis>unspecified</emphasis></type></typedef>
<typedef name="handle_type"><type><emphasis>unspecified</emphasis></type></typedef>
</struct><struct name="push_handle"><template>
<template-type-parameter name="T"/>
<template-type-parameter name="A0"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A1"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A2"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A3"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A4"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A5"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A6"><default>boost::parameter::void_</default></template-type-parameter>
</template><method-group name="public static functions">
<method name="push" specifiers="static"><type>handle_type</type><parameter name="self"><paramtype><classname>skew_heap</classname> *</paramtype></parameter><parameter name="v"><paramtype>const_reference</paramtype></parameter></method>
<method name="emplace" specifiers="static"><type>handle_type</type><template>
<template-nontype-parameter name="Args"><type>class...</type></template-nontype-parameter>
</template><parameter name="self"><paramtype><classname>skew_heap</classname> *</paramtype></parameter><parameter name="args"><paramtype>Args &amp;&amp;...</paramtype></parameter></method>
</method-group>
</struct><struct name="push_void"><template>
<template-type-parameter name="T"/>
<template-type-parameter name="A0"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A1"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A2"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A3"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A4"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A5"><default>boost::parameter::void_</default></template-type-parameter>
<template-type-parameter name="A6"><default>boost::parameter::void_</default></template-type-parameter>
</template><method-group name="public static functions">
<method name="push" specifiers="static"><type>void</type><parameter name="self"><paramtype><classname>skew_heap</classname> *</paramtype></parameter><parameter name="v"><paramtype>const_reference</paramtype></parameter></method>
<method name="emplace" specifiers="static"><type>void</type><template>
<template-nontype-parameter name="Args"><type>class...</type></template-nontype-parameter>
</template><parameter name="self"><paramtype><classname>skew_heap</classname> *</paramtype></parameter><parameter name="args"><paramtype>Args &amp;&amp;...</paramtype></parameter></method>
</method-group>
</struct><typedef name="value_type"><type>T</type></typedef>
<typedef name="size_type"><type>implementation_defined::size_type</type></typedef>
<typedef name="difference_type"><type>implementation_defined::difference_type</type></typedef>
@@ -521,7 +592,7 @@
<typedef name="iterator"><description><para><emphasis role="bold">Note:</emphasis> The iterator does not traverse the priority queue in order of the priorities. </para></description><type>implementation_defined::iterator</type></typedef>
<typedef name="const_iterator"><type>implementation_defined::const_iterator</type></typedef>
<typedef name="ordered_iterator"><type>implementation_defined::ordered_iterator</type></typedef>
<typedef name="handle_type"><type>mpl::if_c&lt; is_mutable, typename implementation_defined::handle_type, void * &gt;::type</type></typedef>
<typedef name="handle_type"><type>boost::conditional&lt; is_mutable, typename implementation_defined::handle_type, void * &gt;::type</type></typedef>
<data-member name="constant_time_size" specifiers="static"><type>const bool</type></data-member>
<data-member name="has_ordered_iterators" specifiers="static"><type>const bool</type></data-member>
<data-member name="is_mergable" specifiers="static"><type>const bool</type></data-member>
@@ -529,8 +600,8 @@
<data-member name="has_reserve" specifiers="static"><type>const bool</type></data-member>
<data-member name="is_mutable" specifiers="static"><type>const bool</type></data-member>
<method-group name="public member functions">
<method name="push"><type>mpl::if_c&lt; is_mutable, handle_type, void &gt;::type</type><parameter name="v"><paramtype>value_type const &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Adds a new element to the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> Logarithmic (amortized). </para></description></method>
<method name="emplace"><type>mpl::if_c&lt; is_mutable, handle_type, void &gt;::type</type><template>
<method name="push"><type>boost::conditional&lt; is_mutable, handle_type, void &gt;::type</type><parameter name="v"><paramtype>value_type const &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Adds a new element to the priority queue.</para><para><emphasis role="bold">Complexity:</emphasis> Logarithmic (amortized). </para></description></method>
<method name="emplace"><type>boost::conditional&lt; is_mutable, handle_type, void &gt;::type</type><template>
<template-nontype-parameter name="Args"><type>typename...</type></template-nontype-parameter>
</template><parameter name="args"><paramtype>Args &amp;&amp;...</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Adds a new element to the priority queue. The element is directly constructed in-place.</para><para><emphasis role="bold">Complexity:</emphasis> Logarithmic (amortized). </para></description></method>
<method name="empty" cv="const"><type>bool</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns true, if the priority queue contains no elements.</para><para><emphasis role="bold">Complexity:</emphasis> Constant. </para></description></method>
@@ -546,7 +617,7 @@
<method name="ordered_begin" cv="const"><type>ordered_iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an ordered iterator to the first element contained in the priority queue.</para><para><emphasis role="bold">Note:</emphasis> Ordered iterators traverse the priority queue in heap order. </para></description></method>
<method name="ordered_end" cv="const"><type>ordered_iterator</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Returns an ordered iterator to the first element contained in the priority queue.</para><para><emphasis role="bold">Note:</emphasis> Ordered iterators traverse the priority queue in heap order. </para></description></method>
<method name="merge"><type>void</type><parameter name="rhs"><paramtype><classname>skew_heap</classname> &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Merge all elements from rhs into this</para><para><emphasis role="bold">Complexity:</emphasis> Logarithmic (amortized). </para></description></method>
<method name="value_comp" cv="const"><type>value_compare const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effect:</emphasis> Returns the value_compare object used by the priority queue </para></description></method>
<method name="value_comp" cv="const"><type>value_compare const &amp;</type><parameter name=""><paramtype>void</paramtype></parameter><description><para><emphasis role="bold">Effect:</emphasis> Returns the value_compare object used by the priority queue </para></description></method>
<method name="operator&lt;" cv="const"><type>bool</type><template>
<template-type-parameter name="HeapType"/>
</template><parameter name="rhs"><paramtype>HeapType const &amp;</paramtype></parameter><description><para><emphasis role="bold">Returns:</emphasis> Element-wise comparison of heap data structures</para><para><emphasis role="bold">Requirement:</emphasis> the <computeroutput>value_compare</computeroutput> object of both heaps must match. </para></description></method>
@@ -582,6 +653,19 @@
<method-group name="public static functions">
<method name="s_handle_from_iterator" specifiers="static"><type>handle_type</type><parameter name="it"><paramtype>iterator const &amp;</paramtype></parameter><description><para><emphasis role="bold">Effects:</emphasis> Casts an iterator to a node handle.</para><para><emphasis role="bold">Complexity:</emphasis> Constant.</para><para><emphasis role="bold">Requirement:</emphasis> data structure must be configured as mutable </para></description></method>
</method-group>
<method-group name="private member functions">
<method name="push_internal"><type>node_pointer</type><parameter name="v"><paramtype>const_reference</paramtype></parameter></method>
<method name="emplace_internal"><type>node_pointer</type><template>
<template-nontype-parameter name="Args"><type>class...</type></template-nontype-parameter>
</template><parameter name="args"><paramtype>Args &amp;&amp;...</paramtype></parameter></method>
<method name="unlink_node"><type>void</type><parameter name="node"><paramtype>node_pointer</paramtype></parameter></method>
<method name="clone_tree"><type>void</type><parameter name="rhs"><paramtype><classname>skew_heap</classname> const &amp;</paramtype></parameter></method>
<method name="merge_node"><type>void</type><parameter name="other"><paramtype>node_pointer</paramtype></parameter></method>
<method name="merge_nodes"><type>node_pointer</type><parameter name="node1"><paramtype>node_pointer</paramtype></parameter><parameter name="node2"><paramtype>node_pointer</paramtype></parameter><parameter name="new_parent"><paramtype>node_pointer</paramtype></parameter></method>
<method name="merge_children"><type>node_pointer</type><parameter name="node"><paramtype>node_pointer</paramtype></parameter></method>
<method name="merge_nodes_recursive"><type>node_pointer</type><parameter name="node1"><paramtype>node_pointer</paramtype></parameter><parameter name="node2"><paramtype>node_pointer</paramtype></parameter><parameter name="new_parent"><paramtype>node_pointer</paramtype></parameter></method>
<method name="sanity_check"><type>void</type><parameter name=""><paramtype>void</paramtype></parameter></method>
</method-group>
</class>
</namespace>
</namespace>

View File

@@ -259,7 +259,7 @@ direction.
[mutable_fixup_interface]
Iterators can be coverted to handles using the static member function =s_handle_from_iterator=. However most implementations of
Iterators can be converted to handles using the static member function =s_handle_from_iterator=. However most implementations of
=update= invalidate all iterators. The most notable exception is the [classref boost::heap::fibonacci_heap fibonacci heap],
providing a lazy update function, that just invalidates the iterators, that are related to this handle.

View File

@@ -3,21 +3,37 @@
# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
import testing ;
import path ;
import regex ;
rule test_all
{
local all_rules = ;
local all_rules ;
local file ;
local headers_path = [ path.make $(BOOST_ROOT)/libs/heap/include/boost/heap ] ;
for file in [ path.glob-tree $(headers_path) : *.hpp : detail ]
{
local rel_file = [ path.relative-to $(headers_path) $(file) ] ;
# Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
# All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ;
#ECHO $(rel_file) ;
all_rules += [ compile self_contained_header.cpp : <define>"BOOST_HEAP_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(test_name) ] ;
}
for local fileb in [ glob *.cpp ]
for file in [ glob *.cpp ]
{
all_rules += [ run $(fileb)
: # additional args
: # test-files
: <library>/boost/test//boost_unit_test_framework # requirements
] ;
if [ path.basename $(file) ] != "self_contained_header.cpp"
{
all_rules += [ run $(file)
: # additional args
: # test-files
: <library>/boost/test//boost_unit_test_framework # requirements
] ;
}
}
return $(all_rules) ;
}
test-suite heap : [ test_all r ] : <threading>multi ;
test-suite heap : [ test_all ] : <threading>multi ;

View File

@@ -18,6 +18,29 @@
#include <boost/heap/heap_concepts.hpp>
#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
#include <cstdlib>
#include <iterator>
template<class RandomIt>
void random_shuffle(RandomIt first, RandomIt last)
{
typedef typename std::iterator_traits<RandomIt>::difference_type difference_type;
difference_type n = last - first;
for (difference_type i = n-1; i > 0; --i) {
difference_type j = std::rand() % (i + 1);
if (j != i) {
using std::swap;
swap(first[i], first[j]);
}
}
}
#else
using std::random_shuffle;
#endif
typedef boost::default_constructible_archetype<
boost::less_than_comparable_archetype<
@@ -132,7 +155,7 @@ void pri_queue_test_random_push(void)
test_data data = make_test_data(i);
test_data shuffled (data);
std::random_shuffle(shuffled.begin(), shuffled.end());
random_shuffle(shuffled.begin(), shuffled.end());
fill_q(q, shuffled);
@@ -211,7 +234,7 @@ void pri_queue_test_swap(void)
pri_queue q;
test_data data = make_test_data(i);
test_data shuffled (data);
std::random_shuffle(shuffled.begin(), shuffled.end());
random_shuffle(shuffled.begin(), shuffled.end());
fill_q(q, shuffled);
pri_queue r;
@@ -229,7 +252,7 @@ void pri_queue_test_iterators(void)
for (int i = 0; i != test_size; ++i) {
test_data data = make_test_data(test_size);
test_data shuffled (data);
std::random_shuffle(shuffled.begin(), shuffled.end());
random_shuffle(shuffled.begin(), shuffled.end());
pri_queue q;
BOOST_REQUIRE(q.begin() == q.end());
fill_q(q, shuffled);
@@ -258,7 +281,7 @@ void pri_queue_test_ordered_iterators(void)
for (int i = 0; i != test_size; ++i) {
test_data data = make_test_data(i);
test_data shuffled (data);
std::random_shuffle(shuffled.begin(), shuffled.end());
random_shuffle(shuffled.begin(), shuffled.end());
pri_queue q;
BOOST_REQUIRE(q.ordered_begin() == q.ordered_end());
fill_q(q, shuffled);

View File

@@ -11,7 +11,7 @@
#define GENERATE_TEST_DATA(INDEX) \
test_data data = make_test_data(test_size, 0, 1); \
std::random_shuffle(data.begin(), data.end()); \
random_shuffle(data.begin(), data.end()); \
\
test_data data_q (data.begin(), data.begin() + INDEX); \
test_data data_r (data.begin() + INDEX, data.end()); \
@@ -66,7 +66,7 @@ struct pri_queue_test_heap_merge
template <typename pri_queue>
void run_merge_tests(void)
{
boost::mpl::if_c<pri_queue::is_mergable,
boost::conditional<pri_queue::is_mergable,
pri_queue_test_merge<pri_queue>,
dummy_run
>::type::run();

View File

@@ -17,12 +17,13 @@
using namespace boost::heap;
#if BOOST_WORKAROUND(BOOST_MSVC, != 1800)
typedef fibonacci_heap<struct fwd_declared_struct_1>::handle_type handle_type_1;
typedef d_ary_heap<struct fwd_declared_struct_2, arity<4>, mutable_<true> >::handle_type handle_type_2;
typedef pairing_heap<struct fwd_declared_struct_3>::handle_type handle_type_3;
typedef binomial_heap<struct fwd_declared_struct_4>::handle_type handle_type_4;
typedef skew_heap<struct fwd_declared_struct_5, mutable_<true> >::handle_type handle_type_5;
#endif
template <typename HeapType>
void run_handle_as_member_test(void)

View File

@@ -82,7 +82,7 @@ void pri_queue_test_update_shuffled(void)
PUSH_WITH_HANDLES(handles, q, data);
test_data shuffled (data);
std::random_shuffle(shuffled.begin(), shuffled.end());
random_shuffle(shuffled.begin(), shuffled.end());
for (int i = 0; i != test_size; ++i)
q.update(handles[i], shuffled[i]);

View File

@@ -0,0 +1,22 @@
/*
* Copyright Andrey Semashev 2018.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
/*!
* \file self_contained_header.cpp
* \author Andrey Semashev
* \date 28.10.2018
*
* \brief This file contains a test boilerplate for checking that every public header is self-contained and does not have any missing #includes.
*/
#define BOOST_HEAP_TEST_INCLUDE_HEADER() <boost/heap/BOOST_HEAP_TEST_HEADER>
#include BOOST_HEAP_TEST_INCLUDE_HEADER()
int main(int, char*[])
{
return 0;
}