diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
commit | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (patch) | |
tree | 7a7053ceb8874b28ec4b868d4c49b500008a102e /doc/html/intrusive/sg_set_multiset.html | |
parent | bb4dd8289b351fae6b55e303f189127a394a1edd (diff) | |
download | boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.gz boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.bz2 boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.zip |
Imported Upstream version 1.57.0upstream/1.57.0
Diffstat (limited to 'doc/html/intrusive/sg_set_multiset.html')
-rw-r--r-- | doc/html/intrusive/sg_set_multiset.html | 86 |
1 files changed, 19 insertions, 67 deletions
diff --git a/doc/html/intrusive/sg_set_multiset.html b/doc/html/intrusive/sg_set_multiset.html index 1609018d25..734240647d 100644 --- a/doc/html/intrusive/sg_set_multiset.html +++ b/doc/html/intrusive/sg_set_multiset.html @@ -3,10 +3,10 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Intrusive scapegoat tree based associative containers: sg_set, sg_multiset and sgtree</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../intrusive.html" title="Chapter 13. Boost.Intrusive"> -<link rel="prev" href="avl_set_multiset.html" title="Intrusive avl tree based associative containers: avl_set, avl_multiset and avltree"> +<link rel="up" href="../intrusive.html" title="Chapter 15. Boost.Intrusive"> +<link rel="prev" href="splay_set_multiset.html" title="Intrusive splay tree based associative containers: splay_set, splay_multiset and , splay_tree"> <link rel="next" href="treap_set_multiset.html" title="Intrusive treap based associative containers: treap_set, treap_multiset and treap"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -20,16 +20,14 @@ </tr></table> <hr> <div class="spirit-nav"> -<a accesskey="p" href="avl_set_multiset.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrusive.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="treap_set_multiset.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> +<a accesskey="p" href="splay_set_multiset.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrusive.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="treap_set_multiset.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="intrusive.sg_set_multiset"></a><a class="link" href="sg_set_multiset.html" title="Intrusive scapegoat tree based associative containers: sg_set, sg_multiset and sgtree">Intrusive scapegoat tree based associative containers: sg_set, sg_multiset and sgtree</a> </h2></div></div></div> -<div class="toc"><dl> -<dt><span class="section"><a href="sg_set_multiset.html#intrusive.sg_set_multiset.sg_set_multiset_hooks">Using - binary search tree hooks: bs_set_base_hook and bs_set_member_hook</a></span></dt> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="sg_set_multiset.html#intrusive.sg_set_multiset.sg_set_multiset_containers">sg_set, sg_multiset and sgtree containers</a></span></dt> <dt><span class="section"><a href="sg_set_multiset.html#intrusive.sg_set_multiset.sg_set_multiset_example">Example</a></span></dt> @@ -49,7 +47,7 @@ <p> <span class="bold"><strong><span class="emphasis"><em>height(tree) <= log1/a(tree.size())</em></span></strong></span> </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> <span class="bold"><strong><span class="emphasis"><em>a == 1</em></span></strong></span>: A tree forming a linked list is considered balanced. @@ -77,7 +75,7 @@ <p> Scapegoat trees also have downsides: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> They need additional storage of data on the root (the size of the tree, for example) to achieve logarithmic complexity operations so it's not possible @@ -107,56 +105,11 @@ has also the size of 3 pointers, two integers and two floating point values (equivalent to the size of 7 pointers on most systems). </p> -<div class="section"> -<div class="titlepage"><div><div><h3 class="title"> -<a name="intrusive.sg_set_multiset.sg_set_multiset_hooks"></a><a class="link" href="sg_set_multiset.html#intrusive.sg_set_multiset.sg_set_multiset_hooks" title="Using binary search tree hooks: bs_set_base_hook and bs_set_member_hook">Using - binary search tree hooks: bs_set_base_hook and bs_set_member_hook</a> -</h3></div></div></div> <p> - <code class="computeroutput"><a class="link" href="../boost/intrusive/sg_set.html" title="Class template sg_set">sg_set</a></code>, <code class="computeroutput"><a class="link" href="../boost/intrusive/sg_multiset.html" title="Class template sg_multiset">sg_multiset</a></code> and <code class="computeroutput"><a class="link" href="../boost/intrusive/sgtree.html" title="Class template sgtree">sgtree</a></code> don't use their own hooks - but plain binary search tree hooks. This has many advantages since binary - search tree hooks can also be used to insert values in splay and treap containers. - </p> -<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="special">...</span><span class="identifier">Options</span><span class="special">></span> -<span class="keyword">class</span> <span class="identifier">bs_set_base_hook</span><span class="special">;</span> -</pre> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"> - <code class="computeroutput"><a class="link" href="../boost/intrusive/bs_set_base_hook.html" title="Class template bs_set_base_hook">bs_set_base_hook</a></code>: - the user class derives publicly from this class to make it compatible - with scapegoat tree based containers. - </li></ul></div> -<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="special">...</span><span class="identifier">Options</span><span class="special">></span> -<span class="keyword">class</span> <span class="identifier">bs_set_member_hook</span><span class="special">;</span> -</pre> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"> - <code class="computeroutput"><a class="link" href="../boost/intrusive/set_member_hook.html" title="Class template set_member_hook">set_member_hook</a></code>: - the user class contains a public member of this class to make it compatible - with scapegoat tree based containers. - </li></ul></div> -<p> - <code class="computeroutput"><a class="link" href="../boost/intrusive/bs_set_base_hook.html" title="Class template bs_set_base_hook">bs_set_base_hook</a></code> - and <code class="computeroutput"><a class="link" href="../boost/intrusive/bs_set_member_hook.html" title="Class template bs_set_member_hook">bs_set_member_hook</a></code> - receive the same options explained in the section <a class="link" href="usage.html" title="How to use Boost.Intrusive">How - to use Boost.Intrusive</a>: - </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> -<li class="listitem"> - <span class="bold"><strong><code class="computeroutput"><span class="identifier">tag</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Tag</span><span class="special">></span></code></strong></span> - (for base hooks only): This argument serves as a tag, so you can derive - from more than one base hook. Default: <code class="computeroutput"><span class="identifier">tag</span><span class="special"><</span><span class="identifier">default_tag</span><span class="special">></span></code>. - </li> -<li class="listitem"> - <span class="bold"><strong><code class="computeroutput"><span class="identifier">link_mode</span><span class="special"><</span><span class="identifier">link_mode_type</span> - <span class="identifier">LinkMode</span><span class="special">></span></code></strong></span>: - The linking policy. Default: <code class="computeroutput"><span class="identifier">link_mode</span><span class="special"><</span><span class="identifier">safe_link</span><span class="special">></span></code>. - </li> -<li class="listitem"> - <span class="bold"><strong><code class="computeroutput"><span class="identifier">void_pointer</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">VoidPointer</span><span class="special">></span></code></strong></span>: - The pointer type to be used internally in the hook and propagated to - the container. Default: <code class="computeroutput"><span class="identifier">void_pointer</span><span class="special"><</span><span class="keyword">void</span><span class="special">*></span></code>. - </li> -</ul></div> -</div> + <span class="bold"><strong>Boost.Intrusive</strong></span> scapegoat associative containers + don't use their own hook types but plain Binary search tree hooks. See <a class="link" href="bst_hooks.html" title="Binary search tree hooks: bs_set_base_hook and bs_set_member_hook">Binary search tree hooks: bs_set_base_hook and + bs_set_member_hook</a> section for more information about these hooks. + </p> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="intrusive.sg_set_multiset.sg_set_multiset_containers"></a><a class="link" href="sg_set_multiset.html#intrusive.sg_set_multiset.sg_set_multiset_containers" title="sg_set, sg_multiset and sgtree containers">sg_set, @@ -174,7 +127,7 @@ <p> These containers receive the same options explained in the section <a class="link" href="usage.html" title="How to use Boost.Intrusive">How to use Boost.Intrusive</a>: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> <span class="bold"><strong><code class="computeroutput"><span class="identifier">base_hook</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Hook</span><span class="special">></span></code></strong></span> / <span class="bold"><strong><code class="computeroutput"><span class="identifier">member_hook</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Hook</span><span class="special">,</span> <span class="identifier">Hook</span> <span class="identifier">T</span><span class="special">::*</span> <span class="identifier">PtrToMember</span><span class="special">></span></code></strong></span> @@ -192,7 +145,7 @@ <p> And they also can receive additional options: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> <span class="bold"><strong><code class="computeroutput"><span class="identifier">compare</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Compare</span><span class="special">></span></code></strong></span>: Comparison function for the objects to be inserted in containers. The @@ -215,8 +168,8 @@ <a name="intrusive.sg_set_multiset.sg_set_multiset_example"></a><a class="link" href="sg_set_multiset.html#intrusive.sg_set_multiset.sg_set_multiset_example" title="Example">Example</a> </h3></div></div></div> <p> - Now let's see a small example using both hooks and <code class="computeroutput"><a class="link" href="../boost/intrusive/sg_set.html" title="Class template sg_set">sg_set</a></code>/ - <code class="computeroutput"><a class="link" href="../boost/intrusive/sg_multiset.html" title="Class template sg_multiset">sg_multiset</a></code> containers: + Now let's see a small example using binary search tree hooks and <code class="computeroutput"><a class="link" href="../boost/intrusive/sg_set.html" title="Class template sg_set">sg_set</a></code>/ <code class="computeroutput"><a class="link" href="../boost/intrusive/sg_multiset.html" title="Class template sg_multiset">sg_multiset</a></code> + containers: </p> <p> </p> @@ -258,7 +211,6 @@ <span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">iterator</span> <span class="identifier">VectIt</span><span class="special">;</span> - <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">>::</span><span class="identifier">reverse_iterator</span> <span class="identifier">VectRit</span><span class="special">;</span> <span class="comment">//Create several MyClass objects, each one with a different value</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">MyClass</span><span class="special">></span> <span class="identifier">values</span><span class="special">;</span> @@ -278,8 +230,8 @@ <span class="comment">//Now test sg_sets</span> <span class="special">{</span> - <span class="identifier">BaseSet</span><span class="special">::</span><span class="identifier">reverse_iterator</span> <span class="identifier">rbit</span><span class="special">(</span><span class="identifier">baseset</span><span class="special">.</span><span class="identifier">rbegin</span><span class="special">()),</span> <span class="identifier">rbitend</span><span class="special">(</span><span class="identifier">baseset</span><span class="special">.</span><span class="identifier">rend</span><span class="special">());</span> - <span class="identifier">MemberMultiset</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">mit</span><span class="special">(</span><span class="identifier">membermultiset</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()),</span> <span class="identifier">mitend</span><span class="special">(</span><span class="identifier">membermultiset</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span> + <span class="identifier">BaseSet</span><span class="special">::</span><span class="identifier">reverse_iterator</span> <span class="identifier">rbit</span><span class="special">(</span><span class="identifier">baseset</span><span class="special">.</span><span class="identifier">rbegin</span><span class="special">());</span> + <span class="identifier">MemberMultiset</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">mit</span><span class="special">(</span><span class="identifier">membermultiset</span><span class="special">.</span><span class="identifier">begin</span><span class="special">());</span> <span class="identifier">VectIt</span> <span class="identifier">it</span><span class="special">(</span><span class="identifier">values</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()),</span> <span class="identifier">itend</span><span class="special">(</span><span class="identifier">values</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span> <span class="comment">//Test the objects inserted in the base hook sg_set</span> @@ -299,7 +251,7 @@ </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> -<td align="right"><div class="copyright-footer">Copyright © 2005 Olaf Krzikalla<br>Copyright © 2006-2012 Ion Gaztanaga<p> +<td align="right"><div class="copyright-footer">Copyright © 2005 Olaf Krzikalla<br>Copyright © 2006-2013 Ion Gaztanaga<p> Distributed under the Boost Software License, Version 1.0. (See accompanying 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>) </p> @@ -307,7 +259,7 @@ </tr></table> <hr> <div class="spirit-nav"> -<a accesskey="p" href="avl_set_multiset.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrusive.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="treap_set_multiset.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> +<a accesskey="p" href="splay_set_multiset.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrusive.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="treap_set_multiset.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html> |