Documentation for 8b1eab204b

This commit is contained in:
realstealthninja
2024-11-04 12:43:05 +00:00
parent 4fb6e622e9
commit a7bccf7d01
6732 changed files with 153919 additions and 365711 deletions

View File

@@ -1,3 +1,4 @@
<!-- HTML header for doxygen 1.12.0-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
@@ -5,10 +6,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: data_structures/binary_search_tree2.cpp File Reference</title>
<title>TheAlgorithms/C++: data_structures/binary_search_tree2.cpp File Reference</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../navtreedata.js"></script>
@@ -18,14 +24,24 @@
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
<script type="text/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
@@ -33,10 +49,11 @@ MathJax.Hub.Config({
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
@@ -123,7 +140,9 @@ Include dependency graph for binary_search_tree2.cpp:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../de/d33/binary__search__tree2_8cpp__incl.svg" width="446" height="126"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div><table class="memberdecls">
</div>
<p><a href="../../df/d42/binary__search__tree2_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/dde/classbinary__search__tree.html">binary_search_tree&lt; T &gt;</a></td></tr>
@@ -165,6 +184,8 @@ Functions</h2></td></tr>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A generic <a href="https://en.wikipedia.org/wiki/Binary_search_tree" target="_blank">binary search tree</a> implementation. Here you can find more information about the algorithm: <a href="https://www.scaler.com/topics/data-structures/binary-search-tree/" target="_blank">Scaler - Binary Search tree</a>. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d3/d26/binary__search__tree_8cpp.html" title="A simple tree implementation using structured nodes.">binary_search_tree.cpp</a> </dd></dl>
<p class="definition">Definition in file <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html">binary_search_tree2.cpp</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&#160;</a></span>main()</h2>
@@ -180,6 +201,8 @@ Functions</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html#l00556">556</a> of file <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html">binary_search_tree2.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 556</span> {</div>
<div class="line"><span class="lineno"> 557</span> <a class="code hl_function" href="#a8c882f43e1e52948a7841a8bfb091350">test_insert</a>();</div>
<div class="line"><span class="lineno"> 558</span> <a class="code hl_function" href="#ab1333c3ea06dcad896ee204bbd407c4e">test_remove</a>();</div>
@@ -190,14 +213,14 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 563</span> <a class="code hl_function" href="#ab00b8d0f21aeb5fbddb6decf3bcb640a">test_get_elements_preorder</a>();</div>
<div class="line"><span class="lineno"> 564</span> <a class="code hl_function" href="#a94b76f781fcbe1ad0e3397ace6bb1965">test_get_elements_postorder</a>();</div>
<div class="line"><span class="lineno"> 565</span>}</div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_a06f35064850e891d6fda0093c0d9ee6e"><div class="ttname"><a href="#a06f35064850e891d6fda0093c0d9ee6e">test_get_elements_inorder</a></div><div class="ttdeci">static void test_get_elements_inorder()</div><div class="ttdoc">Function for testing get_elements_inorder().</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:498</div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_a1d42876440ac5346e2850a32497385c3"><div class="ttname"><a href="#a1d42876440ac5346e2850a32497385c3">test_contains</a></div><div class="ttdeci">static void test_contains()</div><div class="ttdoc">Function for testing contains().</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:429</div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_a8c882f43e1e52948a7841a8bfb091350"><div class="ttname"><a href="#a8c882f43e1e52948a7841a8bfb091350">test_insert</a></div><div class="ttdeci">static void test_insert()</div><div class="ttdoc">Function for testing insert().</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:358</div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_a94b76f781fcbe1ad0e3397ace6bb1965"><div class="ttname"><a href="#a94b76f781fcbe1ad0e3397ace6bb1965">test_get_elements_postorder</a></div><div class="ttdeci">static void test_get_elements_postorder()</div><div class="ttdoc">Function for testing get_elements_postorder().</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:540</div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_a9856b68e2cba50d2e26a1cbe374e0365"><div class="ttname"><a href="#a9856b68e2cba50d2e26a1cbe374e0365">test_find_max</a></div><div class="ttdeci">static void test_find_max()</div><div class="ttdoc">Function for testing find_max().</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:475</div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_ab00b8d0f21aeb5fbddb6decf3bcb640a"><div class="ttname"><a href="#ab00b8d0f21aeb5fbddb6decf3bcb640a">test_get_elements_preorder</a></div><div class="ttdeci">static void test_get_elements_preorder()</div><div class="ttdoc">Function for testing get_elements_preorder().</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:519</div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_ab1333c3ea06dcad896ee204bbd407c4e"><div class="ttname"><a href="#ab1333c3ea06dcad896ee204bbd407c4e">test_remove</a></div><div class="ttdeci">static void test_remove()</div><div class="ttdoc">Function for testing remove().</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:392</div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_af2847a901160fd45b4044550e9921cb4"><div class="ttname"><a href="#af2847a901160fd45b4044550e9921cb4">test_find_min</a></div><div class="ttdeci">static void test_find_min()</div><div class="ttdoc">Function for testing find_min().</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:452</div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_a06f35064850e891d6fda0093c0d9ee6e"><div class="ttname"><a href="#a06f35064850e891d6fda0093c0d9ee6e">test_get_elements_inorder</a></div><div class="ttdeci">static void test_get_elements_inorder()</div><div class="ttdoc">Function for testing get_elements_inorder().</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00498">binary_search_tree2.cpp:498</a></div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_a1d42876440ac5346e2850a32497385c3"><div class="ttname"><a href="#a1d42876440ac5346e2850a32497385c3">test_contains</a></div><div class="ttdeci">static void test_contains()</div><div class="ttdoc">Function for testing contains().</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00429">binary_search_tree2.cpp:429</a></div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_a8c882f43e1e52948a7841a8bfb091350"><div class="ttname"><a href="#a8c882f43e1e52948a7841a8bfb091350">test_insert</a></div><div class="ttdeci">static void test_insert()</div><div class="ttdoc">Function for testing insert().</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00358">binary_search_tree2.cpp:358</a></div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_a94b76f781fcbe1ad0e3397ace6bb1965"><div class="ttname"><a href="#a94b76f781fcbe1ad0e3397ace6bb1965">test_get_elements_postorder</a></div><div class="ttdeci">static void test_get_elements_postorder()</div><div class="ttdoc">Function for testing get_elements_postorder().</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00540">binary_search_tree2.cpp:540</a></div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_a9856b68e2cba50d2e26a1cbe374e0365"><div class="ttname"><a href="#a9856b68e2cba50d2e26a1cbe374e0365">test_find_max</a></div><div class="ttdeci">static void test_find_max()</div><div class="ttdoc">Function for testing find_max().</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00475">binary_search_tree2.cpp:475</a></div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_ab00b8d0f21aeb5fbddb6decf3bcb640a"><div class="ttname"><a href="#ab00b8d0f21aeb5fbddb6decf3bcb640a">test_get_elements_preorder</a></div><div class="ttdeci">static void test_get_elements_preorder()</div><div class="ttdoc">Function for testing get_elements_preorder().</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00519">binary_search_tree2.cpp:519</a></div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_ab1333c3ea06dcad896ee204bbd407c4e"><div class="ttname"><a href="#ab1333c3ea06dcad896ee204bbd407c4e">test_remove</a></div><div class="ttdeci">static void test_remove()</div><div class="ttdoc">Function for testing remove().</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00392">binary_search_tree2.cpp:392</a></div></div>
<div class="ttc" id="abinary__search__tree2_8cpp_html_af2847a901160fd45b4044550e9921cb4"><div class="ttname"><a href="#af2847a901160fd45b4044550e9921cb4">test_find_min</a></div><div class="ttdeci">static void test_find_min()</div><div class="ttdoc">Function for testing find_min().</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00452">binary_search_tree2.cpp:452</a></div></div>
</div><!-- fragment -->
</div>
</div>
@@ -226,8 +249,10 @@ Functions</h2></td></tr>
<p>Function for testing contains(). </p>
<dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html#l00429">429</a> of file <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html">binary_search_tree2.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 429</span> {</div>
<div class="line"><span class="lineno"> 430</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Testing BST contains...&quot;</span>;</div>
<div class="line"><span class="lineno"> 430</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Testing BST contains...&quot;</span>;</div>
<div class="line"><span class="lineno"> 431</span> </div>
<div class="line"><span class="lineno"> 432</span> <a class="code hl_class" href="../../d9/dde/classbinary__search__tree.html">binary_search_tree&lt;int&gt;</a> tree;</div>
<div class="line"><span class="lineno"> 433</span> tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(5);</div>
@@ -241,19 +266,12 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 441</span> assert(tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#aa4f84b2eec9b9201af1840868ddb5fb2">contains</a>(6));</div>
<div class="line"><span class="lineno"> 442</span> assert(!tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#aa4f84b2eec9b9201af1840868ddb5fb2">contains</a>(999));</div>
<div class="line"><span class="lineno"> 443</span> </div>
<div class="line"><span class="lineno"> 444</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 444</span> std::cout &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 445</span>}</div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="aclassbinary__search__tree_html"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html">binary_search_tree</a></div><div class="ttdoc">The Binary Search Tree class.</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:20</div></div>
<div class="ttc" id="aclassbinary__search__tree_html_a9d1e7e10efa74d741bf48cf032df3778"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">binary_search_tree::insert</a></div><div class="ttdeci">bool insert(std::unique_ptr&lt; bst_node &gt; &amp;node, T new_value)</div><div class="ttdoc">Recursive function to insert a value into the BST.</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:90</div></div>
<div class="ttc" id="aclassbinary__search__tree_html_aa4f84b2eec9b9201af1840868ddb5fb2"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#aa4f84b2eec9b9201af1840868ddb5fb2">binary_search_tree::contains</a></div><div class="ttdeci">bool contains(std::unique_ptr&lt; bst_node &gt; &amp;node, T value)</div><div class="ttdoc">Recursive function to check if a value is in the BST.</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:177</div></div>
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d42/binary__search__tree2_8cpp_a1d42876440ac5346e2850a32497385c3_cgraph.svg" width="290" height="215"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassbinary__search__tree_html"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html">binary_search_tree</a></div><div class="ttdoc">The Binary Search Tree class.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00020">binary_search_tree2.cpp:20</a></div></div>
<div class="ttc" id="aclassbinary__search__tree_html_a9d1e7e10efa74d741bf48cf032df3778"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">binary_search_tree::insert</a></div><div class="ttdeci">bool insert(std::unique_ptr&lt; bst_node &gt; &amp;node, T new_value)</div><div class="ttdoc">Recursive function to insert a value into the BST.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00090">binary_search_tree2.cpp:90</a></div></div>
<div class="ttc" id="aclassbinary__search__tree_html_aa4f84b2eec9b9201af1840868ddb5fb2"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#aa4f84b2eec9b9201af1840868ddb5fb2">binary_search_tree::contains</a></div><div class="ttdeci">bool contains(std::unique_ptr&lt; bst_node &gt; &amp;node, T value)</div><div class="ttdoc">Recursive function to check if a value is in the BST.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00177">binary_search_tree2.cpp:177</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a9856b68e2cba50d2e26a1cbe374e0365" name="a9856b68e2cba50d2e26a1cbe374e0365"></a>
@@ -281,10 +299,12 @@ Here is the call graph for this function:</div>
<p>Function for testing find_max(). </p>
<dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html#l00475">475</a> of file <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html">binary_search_tree2.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 475</span> {</div>
<div class="line"><span class="lineno"> 476</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Testing BST find_max...&quot;</span>;</div>
<div class="line"><span class="lineno"> 476</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Testing BST find_max...&quot;</span>;</div>
<div class="line"><span class="lineno"> 477</span> </div>
<div class="line"><span class="lineno"> 478</span> <span class="keywordtype">int</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">max</a> = 0;</div>
<div class="line"><span class="lineno"> 478</span> <span class="keywordtype">int</span> max = 0;</div>
<div class="line"><span class="lineno"> 479</span> <a class="code hl_class" href="../../d9/dde/classbinary__search__tree.html">binary_search_tree&lt;int&gt;</a> tree;</div>
<div class="line"><span class="lineno"> 480</span> assert(!tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a75f897af6aa732a9901454401c869bcb">find_max</a>(max));</div>
<div class="line"><span class="lineno"> 481</span> </div>
@@ -296,16 +316,10 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 487</span> assert(tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a75f897af6aa732a9901454401c869bcb">find_max</a>(max));</div>
<div class="line"><span class="lineno"> 488</span> assert(max == 6);</div>
<div class="line"><span class="lineno"> 489</span> </div>
<div class="line"><span class="lineno"> 490</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 490</span> std::cout &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 491</span>}</div>
<div class="ttc" id="aclassbinary__search__tree_html_a75f897af6aa732a9901454401c869bcb"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#a75f897af6aa732a9901454401c869bcb">binary_search_tree::find_max</a></div><div class="ttdeci">bool find_max(std::unique_ptr&lt; bst_node &gt; &amp;node, T &amp;ret_value)</div><div class="ttdoc">Recursive function to find the maximum value in the BST.</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:53</div></div>
<div class="ttc" id="amax_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a></div><div class="ttdeci">T max(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d42/binary__search__tree2_8cpp_a9856b68e2cba50d2e26a1cbe374e0365_cgraph.svg" width="294" height="215"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassbinary__search__tree_html_a75f897af6aa732a9901454401c869bcb"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#a75f897af6aa732a9901454401c869bcb">binary_search_tree::find_max</a></div><div class="ttdeci">bool find_max(std::unique_ptr&lt; bst_node &gt; &amp;node, T &amp;ret_value)</div><div class="ttdoc">Recursive function to find the maximum value in the BST.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00053">binary_search_tree2.cpp:53</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="af2847a901160fd45b4044550e9921cb4" name="af2847a901160fd45b4044550e9921cb4"></a>
@@ -333,10 +347,12 @@ Here is the call graph for this function:</div>
<p>Function for testing find_min(). </p>
<dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html#l00452">452</a> of file <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html">binary_search_tree2.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 452</span> {</div>
<div class="line"><span class="lineno"> 453</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Testing BST find_min...&quot;</span>;</div>
<div class="line"><span class="lineno"> 453</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Testing BST find_min...&quot;</span>;</div>
<div class="line"><span class="lineno"> 454</span> </div>
<div class="line"><span class="lineno"> 455</span> <span class="keywordtype">int</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">min</a> = 0;</div>
<div class="line"><span class="lineno"> 455</span> <span class="keywordtype">int</span> min = 0;</div>
<div class="line"><span class="lineno"> 456</span> <a class="code hl_class" href="../../d9/dde/classbinary__search__tree.html">binary_search_tree&lt;int&gt;</a> tree;</div>
<div class="line"><span class="lineno"> 457</span> assert(!tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#af9a2c7c187a7ca3142c77ce342ef3153">find_min</a>(min));</div>
<div class="line"><span class="lineno"> 458</span> </div>
@@ -348,16 +364,10 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 464</span> assert(tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#af9a2c7c187a7ca3142c77ce342ef3153">find_min</a>(min));</div>
<div class="line"><span class="lineno"> 465</span> assert(min == 3);</div>
<div class="line"><span class="lineno"> 466</span> </div>
<div class="line"><span class="lineno"> 467</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 467</span> std::cout &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 468</span>}</div>
<div class="ttc" id="aclassbinary__search__tree_html_af9a2c7c187a7ca3142c77ce342ef3153"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#af9a2c7c187a7ca3142c77ce342ef3153">binary_search_tree::find_min</a></div><div class="ttdeci">bool find_min(std::unique_ptr&lt; bst_node &gt; &amp;node, T &amp;ret_value)</div><div class="ttdoc">Recursive function to find the minimum value in the BST.</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:71</div></div>
<div class="ttc" id="amin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a></div><div class="ttdeci">T min(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d42/binary__search__tree2_8cpp_af2847a901160fd45b4044550e9921cb4_cgraph.svg" width="290" height="215"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassbinary__search__tree_html_af9a2c7c187a7ca3142c77ce342ef3153"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#af9a2c7c187a7ca3142c77ce342ef3153">binary_search_tree::find_min</a></div><div class="ttdeci">bool find_min(std::unique_ptr&lt; bst_node &gt; &amp;node, T &amp;ret_value)</div><div class="ttdoc">Recursive function to find the minimum value in the BST.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00071">binary_search_tree2.cpp:71</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a06f35064850e891d6fda0093c0d9ee6e" name="a06f35064850e891d6fda0093c0d9ee6e"></a>
@@ -385,8 +395,10 @@ Here is the call graph for this function:</div>
<p>Function for testing get_elements_inorder(). </p>
<dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html#l00498">498</a> of file <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html">binary_search_tree2.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 498</span> {</div>
<div class="line"><span class="lineno"> 499</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Testing BST get_elements_inorder...&quot;</span>;</div>
<div class="line"><span class="lineno"> 499</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Testing BST get_elements_inorder...&quot;</span>;</div>
<div class="line"><span class="lineno"> 500</span> </div>
<div class="line"><span class="lineno"> 501</span> <a class="code hl_class" href="../../d9/dde/classbinary__search__tree.html">binary_search_tree&lt;int&gt;</a> tree;</div>
<div class="line"><span class="lineno"> 502</span> tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(5);</div>
@@ -394,20 +406,14 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 504</span> tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(3);</div>
<div class="line"><span class="lineno"> 505</span> tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(6);</div>
<div class="line"><span class="lineno"> 506</span> </div>
<div class="line"><span class="lineno"> 507</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> expected = {3, 4, 5, 6};</div>
<div class="line"><span class="lineno"> 508</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> actual = tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a1f23830316204664514f396a4eb5275a">get_elements_inorder</a>();</div>
<div class="line"><span class="lineno"> 507</span> std::vector&lt;int&gt; expected = {3, 4, 5, 6};</div>
<div class="line"><span class="lineno"> 508</span> std::vector&lt;int&gt; actual = tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a1f23830316204664514f396a4eb5275a">get_elements_inorder</a>();</div>
<div class="line"><span class="lineno"> 509</span> assert(actual == expected);</div>
<div class="line"><span class="lineno"> 510</span> </div>
<div class="line"><span class="lineno"> 511</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 511</span> std::cout &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 512</span>}</div>
<div class="ttc" id="aclassbinary__search__tree_html_a1f23830316204664514f396a4eb5275a"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#a1f23830316204664514f396a4eb5275a">binary_search_tree::get_elements_inorder</a></div><div class="ttdeci">std::vector&lt; T &gt; get_elements_inorder()</div><div class="ttdoc">Get all values of the BST in in-order order.</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:321</div></div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d42/binary__search__tree2_8cpp_a06f35064850e891d6fda0093c0d9ee6e_cgraph.svg" width="566" height="191"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassbinary__search__tree_html_a1f23830316204664514f396a4eb5275a"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#a1f23830316204664514f396a4eb5275a">binary_search_tree::get_elements_inorder</a></div><div class="ttdeci">std::vector&lt; T &gt; get_elements_inorder()</div><div class="ttdoc">Get all values of the BST in in-order order.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00321">binary_search_tree2.cpp:321</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a94b76f781fcbe1ad0e3397ace6bb1965" name="a94b76f781fcbe1ad0e3397ace6bb1965"></a>
@@ -435,8 +441,10 @@ Here is the call graph for this function:</div>
<p>Function for testing get_elements_postorder(). </p>
<dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html#l00540">540</a> of file <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html">binary_search_tree2.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 540</span> {</div>
<div class="line"><span class="lineno"> 541</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Testing BST get_elements_postorder...&quot;</span>;</div>
<div class="line"><span class="lineno"> 541</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Testing BST get_elements_postorder...&quot;</span>;</div>
<div class="line"><span class="lineno"> 542</span> </div>
<div class="line"><span class="lineno"> 543</span> <a class="code hl_class" href="../../d9/dde/classbinary__search__tree.html">binary_search_tree&lt;int&gt;</a> tree;</div>
<div class="line"><span class="lineno"> 544</span> tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(5);</div>
@@ -444,19 +452,14 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 546</span> tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(3);</div>
<div class="line"><span class="lineno"> 547</span> tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(6);</div>
<div class="line"><span class="lineno"> 548</span> </div>
<div class="line"><span class="lineno"> 549</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> expected = {3, 4, 6, 5};</div>
<div class="line"><span class="lineno"> 550</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> actual = tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a5c011e1b0863d79c3a7c11a0426bdcff">get_elements_postorder</a>();</div>
<div class="line"><span class="lineno"> 549</span> std::vector&lt;int&gt; expected = {3, 4, 6, 5};</div>
<div class="line"><span class="lineno"> 550</span> std::vector&lt;int&gt; actual = tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a5c011e1b0863d79c3a7c11a0426bdcff">get_elements_postorder</a>();</div>
<div class="line"><span class="lineno"> 551</span> assert(actual == expected);</div>
<div class="line"><span class="lineno"> 552</span> </div>
<div class="line"><span class="lineno"> 553</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 553</span> std::cout &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 554</span>}</div>
<div class="ttc" id="aclassbinary__search__tree_html_a5c011e1b0863d79c3a7c11a0426bdcff"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#a5c011e1b0863d79c3a7c11a0426bdcff">binary_search_tree::get_elements_postorder</a></div><div class="ttdeci">std::vector&lt; T &gt; get_elements_postorder()</div><div class="ttdoc">Get all values of the BST in post-order order.</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:345</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d42/binary__search__tree2_8cpp_a94b76f781fcbe1ad0e3397ace6bb1965_cgraph.svg" width="602" height="191"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassbinary__search__tree_html_a5c011e1b0863d79c3a7c11a0426bdcff"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#a5c011e1b0863d79c3a7c11a0426bdcff">binary_search_tree::get_elements_postorder</a></div><div class="ttdeci">std::vector&lt; T &gt; get_elements_postorder()</div><div class="ttdoc">Get all values of the BST in post-order order.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00345">binary_search_tree2.cpp:345</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ab00b8d0f21aeb5fbddb6decf3bcb640a" name="ab00b8d0f21aeb5fbddb6decf3bcb640a"></a>
@@ -484,8 +487,10 @@ Here is the call graph for this function:</div>
<p>Function for testing get_elements_preorder(). </p>
<dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html#l00519">519</a> of file <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html">binary_search_tree2.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 519</span> {</div>
<div class="line"><span class="lineno"> 520</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Testing BST get_elements_preorder...&quot;</span>;</div>
<div class="line"><span class="lineno"> 520</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Testing BST get_elements_preorder...&quot;</span>;</div>
<div class="line"><span class="lineno"> 521</span> </div>
<div class="line"><span class="lineno"> 522</span> <a class="code hl_class" href="../../d9/dde/classbinary__search__tree.html">binary_search_tree&lt;int&gt;</a> tree;</div>
<div class="line"><span class="lineno"> 523</span> tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(5);</div>
@@ -493,19 +498,14 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 525</span> tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(3);</div>
<div class="line"><span class="lineno"> 526</span> tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(6);</div>
<div class="line"><span class="lineno"> 527</span> </div>
<div class="line"><span class="lineno"> 528</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> expected = {5, 4, 3, 6};</div>
<div class="line"><span class="lineno"> 529</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> actual = tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a5764c1cf848f84a5b77462036a6d8c13">get_elements_preorder</a>();</div>
<div class="line"><span class="lineno"> 528</span> std::vector&lt;int&gt; expected = {5, 4, 3, 6};</div>
<div class="line"><span class="lineno"> 529</span> std::vector&lt;int&gt; actual = tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a5764c1cf848f84a5b77462036a6d8c13">get_elements_preorder</a>();</div>
<div class="line"><span class="lineno"> 530</span> assert(actual == expected);</div>
<div class="line"><span class="lineno"> 531</span> </div>
<div class="line"><span class="lineno"> 532</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 532</span> std::cout &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 533</span>}</div>
<div class="ttc" id="aclassbinary__search__tree_html_a5764c1cf848f84a5b77462036a6d8c13"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#a5764c1cf848f84a5b77462036a6d8c13">binary_search_tree::get_elements_preorder</a></div><div class="ttdeci">std::vector&lt; T &gt; get_elements_preorder()</div><div class="ttdoc">Get all values of the BST in pre-order order.</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:333</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d42/binary__search__tree2_8cpp_ab00b8d0f21aeb5fbddb6decf3bcb640a_cgraph.svg" width="582" height="191"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassbinary__search__tree_html_a5764c1cf848f84a5b77462036a6d8c13"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#a5764c1cf848f84a5b77462036a6d8c13">binary_search_tree::get_elements_preorder</a></div><div class="ttdeci">std::vector&lt; T &gt; get_elements_preorder()</div><div class="ttdoc">Get all values of the BST in pre-order order.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00333">binary_search_tree2.cpp:333</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a8c882f43e1e52948a7841a8bfb091350" name="a8c882f43e1e52948a7841a8bfb091350"></a>
@@ -533,12 +533,14 @@ Here is the call graph for this function:</div>
<p>Function for testing <a class="el" href="../../d8/dee/avltree_8cpp.html#a2473fe7416332495b2678ebe89652e4b" title="inserts a new element into AVL tree">insert()</a>. </p>
<dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html#l00358">358</a> of file <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html">binary_search_tree2.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 358</span> {</div>
<div class="line"><span class="lineno"> 359</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Testing BST insert...&quot;</span>;</div>
<div class="line"><span class="lineno"> 359</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Testing BST insert...&quot;</span>;</div>
<div class="line"><span class="lineno"> 360</span> </div>
<div class="line"><span class="lineno"> 361</span> <a class="code hl_class" href="../../d9/dde/classbinary__search__tree.html">binary_search_tree&lt;int&gt;</a> tree;</div>
<div class="line"><span class="lineno"> 362</span> <span class="keywordtype">bool</span> res = tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(5);</div>
<div class="line"><span class="lineno"> 363</span> <span class="keywordtype">int</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">min</a> = -1, <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">max</a> = -1;</div>
<div class="line"><span class="lineno"> 363</span> <span class="keywordtype">int</span> min = -1, max = -1;</div>
<div class="line"><span class="lineno"> 364</span> assert(res);</div>
<div class="line"><span class="lineno"> 365</span> assert(tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a75f897af6aa732a9901454401c869bcb">find_max</a>(max));</div>
<div class="line"><span class="lineno"> 366</span> assert(tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#af9a2c7c187a7ca3142c77ce342ef3153">find_min</a>(min));</div>
@@ -559,15 +561,10 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 381</span> assert(!fail_res);</div>
<div class="line"><span class="lineno"> 382</span> assert(tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a564fe43e7e8f7ecb6f10667a70fbc6f3">size</a>() == 4);</div>
<div class="line"><span class="lineno"> 383</span> </div>
<div class="line"><span class="lineno"> 384</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 384</span> std::cout &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 385</span>}</div>
<div class="ttc" id="aclassbinary__search__tree_html_a564fe43e7e8f7ecb6f10667a70fbc6f3"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#a564fe43e7e8f7ecb6f10667a70fbc6f3">binary_search_tree::size</a></div><div class="ttdeci">std::size_t size()</div><div class="ttdoc">Get the number of values in the BST.</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:314</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d42/binary__search__tree2_8cpp_a8c882f43e1e52948a7841a8bfb091350_cgraph.svg" width="272" height="370"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassbinary__search__tree_html_a564fe43e7e8f7ecb6f10667a70fbc6f3"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#a564fe43e7e8f7ecb6f10667a70fbc6f3">binary_search_tree::size</a></div><div class="ttdeci">std::size_t size()</div><div class="ttdoc">Get the number of values in the BST.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00314">binary_search_tree2.cpp:314</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ab1333c3ea06dcad896ee204bbd407c4e" name="ab1333c3ea06dcad896ee204bbd407c4e"></a>
@@ -595,8 +592,10 @@ Here is the call graph for this function:</div>
<p>Function for testing remove(). </p>
<dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html#l00392">392</a> of file <a class="el" href="../../df/d42/binary__search__tree2_8cpp_source.html">binary_search_tree2.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 392</span> {</div>
<div class="line"><span class="lineno"> 393</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Testing BST remove...&quot;</span>;</div>
<div class="line"><span class="lineno"> 393</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Testing BST remove...&quot;</span>;</div>
<div class="line"><span class="lineno"> 394</span> </div>
<div class="line"><span class="lineno"> 395</span> <a class="code hl_class" href="../../d9/dde/classbinary__search__tree.html">binary_search_tree&lt;int&gt;</a> tree;</div>
<div class="line"><span class="lineno"> 396</span> tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(5);</div>
@@ -605,7 +604,7 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 399</span> tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a9d1e7e10efa74d741bf48cf032df3778">insert</a>(6);</div>
<div class="line"><span class="lineno"> 400</span> </div>
<div class="line"><span class="lineno"> 401</span> <span class="keywordtype">bool</span> res = tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#af4a865ce5244608819b169fc78a41153">remove</a>(5);</div>
<div class="line"><span class="lineno"> 402</span> <span class="keywordtype">int</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">min</a> = -1, <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">max</a> = -1;</div>
<div class="line"><span class="lineno"> 402</span> <span class="keywordtype">int</span> min = -1, max = -1;</div>
<div class="line"><span class="lineno"> 403</span> assert(res);</div>
<div class="line"><span class="lineno"> 404</span> assert(tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a75f897af6aa732a9901454401c869bcb">find_max</a>(max));</div>
<div class="line"><span class="lineno"> 405</span> assert(tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#af9a2c7c187a7ca3142c77ce342ef3153">find_min</a>(min));</div>
@@ -624,15 +623,10 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 418</span> assert(!fail_res);</div>
<div class="line"><span class="lineno"> 419</span> assert(tree.<a class="code hl_function" href="../../d9/dde/classbinary__search__tree.html#a564fe43e7e8f7ecb6f10667a70fbc6f3">size</a>() == 0);</div>
<div class="line"><span class="lineno"> 420</span> </div>
<div class="line"><span class="lineno"> 421</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 421</span> std::cout &lt;&lt; <span class="stringliteral">&quot;ok&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 422</span>}</div>
<div class="ttc" id="aclassbinary__search__tree_html_af4a865ce5244608819b169fc78a41153"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#af4a865ce5244608819b169fc78a41153">binary_search_tree::remove</a></div><div class="ttdeci">bool remove(std::unique_ptr&lt; bst_node &gt; &amp;parent, std::unique_ptr&lt; bst_node &gt; &amp;node, T rm_value)</div><div class="ttdoc">Recursive function to remove a value from the BST.</div><div class="ttdef"><b>Definition</b> binary_search_tree2.cpp:125</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d42/binary__search__tree2_8cpp_ab1333c3ea06dcad896ee204bbd407c4e_cgraph.svg" width="463" height="510"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassbinary__search__tree_html_af4a865ce5244608819b169fc78a41153"><div class="ttname"><a href="../../d9/dde/classbinary__search__tree.html#af4a865ce5244608819b169fc78a41153">binary_search_tree::remove</a></div><div class="ttdeci">bool remove(std::unique_ptr&lt; bst_node &gt; &amp;parent, std::unique_ptr&lt; bst_node &gt; &amp;node, T rm_value)</div><div class="ttdoc">Recursive function to remove a value from the BST.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d42/binary__search__tree2_8cpp_source.html#l00125">binary_search_tree2.cpp:125</a></div></div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->