Documentation for 341ed50da8

This commit is contained in:
github-actions
2021-09-03 19:56:17 +00:00
parent 52d0c55145
commit 08e8eb037e
3432 changed files with 71392 additions and 72953 deletions

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: horspool Namespace Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d02/namespacehorspool.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -90,22 +90,21 @@ $(document).ready(function(){initNavTree('d5/d02/namespacehorspool.html','../../
</div>
<div class="header">
<div class="headertitle">
<div class="title">horspool Namespace Reference</div> </div>
<div class="headertitle"><div class="title">horspool Namespace Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Functions for <a href="https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm">Horspool's</a> algorithm.
<p>Functions for <a href="https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm" target="_blank">Horspool's</a> algorithm.
<a href="../../d5/d02/namespacehorspool.html#details">More...</a></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Functions for <a href="https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm">Horspool's</a> algorithm. </p>
<div class="textblock"><p >Functions for <a href="https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm" target="_blank">Horspool's</a> algorithm. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d5/d02/namespacehorspool.html">horspool</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,7 +0,0 @@
<map id="graph::Graph&lt; T &gt;" name="graph::Graph&lt; T &gt;">
<area shape="rect" id="node1" title=" " alt="" coords="103,199,234,225"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="5,95,161,136"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="23,5,143,32"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/map.html" title=" " alt="" coords="185,95,325,136"/>
<area shape="rect" id="node5" title=" " alt="" coords="236,5,275,32"/>
</map>

View File

@@ -1 +0,0 @@
dd90b2a0f94e72731318fb2cd2f8c019

View File

@@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
-->
<!-- Title: graph::Graph&lt; T &gt; Pages: 1 -->
<svg width="248pt" height="173pt"
viewBox="0.00 0.00 248.00 173.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 169)">
<title>graph::Graph&lt; T &gt;</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-169 244,-169 244,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title=" ">
<polygon fill="#bfbfbf" stroke="black" points="73.5,-0.5 73.5,-19.5 171.5,-19.5 171.5,-0.5 73.5,-0.5"/>
<text text-anchor="middle" x="122.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph&lt; T &gt;</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="0,-67.5 0,-97.5 117,-97.5 117,-67.5 0,-67.5"/>
<text text-anchor="start" x="8" y="-85.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; std::vector</text>
<text text-anchor="middle" x="58.5" y="-74.5" font-family="Helvetica,sans-Serif" font-size="10.00">&lt; int &gt; &gt;</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node2&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M78.23,-59.76C90.41,-46.34 105.39,-29.85 114.43,-19.89"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="75.58,-57.48 71.45,-67.23 80.76,-62.18 75.58,-57.48"/>
<text text-anchor="middle" x="120" y="-41" font-family="Helvetica,sans-Serif" font-size="10.00"> neighbors</text>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="13.5,-145.5 13.5,-164.5 103.5,-164.5 103.5,-145.5 13.5,-145.5"/>
<text text-anchor="middle" x="58.5" y="-152.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; int &gt;</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node3&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M58.5,-135.24C58.5,-123.41 58.5,-108.38 58.5,-97.58"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="55,-135.36 58.5,-145.36 62,-135.36 55,-135.36"/>
<text text-anchor="middle" x="80.5" y="-119" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/map.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="135,-67.5 135,-97.5 240,-97.5 240,-67.5 135,-67.5"/>
<text text-anchor="start" x="143" y="-85.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::map&lt; T, std::list</text>
<text text-anchor="middle" x="187.5" y="-74.5" font-family="Helvetica,sans-Serif" font-size="10.00">&lt; T &gt; &gt;</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node1 -->
<g id="edge3" class="edge">
<title>Node4&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M167.46,-59.68C161.08,-52.74 154,-45.05 147.5,-38 141.78,-31.8 135.31,-24.82 130.39,-19.51"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="165.2,-62.39 174.54,-67.38 170.35,-57.65 165.2,-62.39"/>
<text text-anchor="middle" x="190.5" y="-41" font-family="Helvetica,sans-Serif" font-size="10.00"> adjacency_list</text>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="173,-145.5 173,-164.5 202,-164.5 202,-145.5 173,-145.5"/>
<text text-anchor="middle" x="187.5" y="-152.5" font-family="Helvetica,sans-Serif" font-size="10.00">T</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node4 -->
<g id="edge4" class="edge">
<title>Node5&#45;&gt;Node4</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M187.5,-135.24C187.5,-123.41 187.5,-108.38 187.5,-97.58"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="184,-135.36 187.5,-145.36 191,-135.36 184,-135.36"/>
<text text-anchor="middle" x="199.5" y="-119" font-family="Helvetica,sans-Serif" font-size="10.00"> keys</text>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: data_structures::trie_using_hashmap::Trie::Node Struct Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -93,33 +93,26 @@ $(document).ready(function(){initNavTree('d5/d12/structdata__structures_1_1trie_
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="../../d1/deb/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">data_structures::trie_using_hashmap::Trie::Node Struct Reference</div> </div>
<div class="headertitle"><div class="title">data_structures::trie_using_hashmap::Trie::Node Struct Reference</div></div>
</div><!--header-->
<div class="contents">
<p>struct representing a trie node.
<a href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for data_structures::trie_using_hashmap::Trie::Node:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d1/dda/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node__coll__graph.svg" width="100%" height="372"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a08212cdc99164b59da91b81f45e2f88e"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">std::unordered_map</a>&lt; char16_t, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html">Node</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html#a08212cdc99164b59da91b81f45e2f88e">children</a></td></tr>
<tr class="separator:a08212cdc99164b59da91b81f45e2f88e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cdb077745d3dc97212d693132371219"><td class="memItemLeft" align="right" valign="top"><a id="a3cdb077745d3dc97212d693132371219"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html#a3cdb077745d3dc97212d693132371219">word_end</a> = false</td></tr>
<tr class="memitem:a3cdb077745d3dc97212d693132371219"><td class="memItemLeft" align="right" valign="top"><a id="a3cdb077745d3dc97212d693132371219" name="a3cdb077745d3dc97212d693132371219"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>word_end</b> = false</td></tr>
<tr class="memdesc:a3cdb077745d3dc97212d693132371219"><td class="mdescLeft">&#160;</td><td class="mdescRight">boolean variable to represent the node end <br /></td></tr>
<tr class="separator:a3cdb077745d3dc97212d693132371219"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>struct representing a trie node. </p>
<div class="textblock"><p >struct representing a trie node. </p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="a08212cdc99164b59da91b81f45e2f88e"></a>
<a id="a08212cdc99164b59da91b81f45e2f88e" name="a08212cdc99164b59da91b81f45e2f88e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08212cdc99164b59da91b81f45e2f88e">&#9670;&nbsp;</a></span>children</h2>
<div class="memitem">
@@ -130,7 +123,7 @@ bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../.
</tr>
</table>
</div><div class="memdoc">
<p>unordered map with key type char16_t and value is a shared pointer type of <a class="el" href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html" title="struct representing a trie node.">Node</a> </p>
<p >unordered map with key type char16_t and value is a shared pointer type of <a class="el" href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html" title="struct representing a trie node.">Node</a> </p>
</div>
</div>
@@ -143,7 +136,7 @@ bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../.
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d5/d3c/namespacedata__structures.html">data_structures</a></li><li class="navelem"><b>trie_using_hashmap</b></li><li class="navelem"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">Trie</a></li><li class="navelem"><a class="el" href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html">Node</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: cll Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d15/classcll.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -94,8 +94,7 @@ $(document).ready(function(){initNavTree('d5/d15/classcll.html','../../'); initR
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="../../d0/d55/classcll-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">cll Class Reference</div> </div>
<div class="headertitle"><div class="title">cll Class Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
@@ -105,39 +104,280 @@ Collaboration diagram for cll:</div>
</div>
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae957a9434f6d1ffef7461ea4d7c9a8fe"><td class="memItemLeft" align="right" valign="top"><a id="ae957a9434f6d1ffef7461ea4d7c9a8fe"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>display</b> ()</td></tr>
<tr class="memitem:ae957a9434f6d1ffef7461ea4d7c9a8fe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d15/classcll.html#ae957a9434f6d1ffef7461ea4d7c9a8fe">display</a> ()</td></tr>
<tr class="separator:ae957a9434f6d1ffef7461ea4d7c9a8fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9434bf2d7deca6d7fe1efe06c5341df0"><td class="memItemLeft" align="right" valign="top"><a id="a9434bf2d7deca6d7fe1efe06c5341df0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>insert_front</b> (int new_data)</td></tr>
<tr class="memitem:a9434bf2d7deca6d7fe1efe06c5341df0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d15/classcll.html#a9434bf2d7deca6d7fe1efe06c5341df0">insert_front</a> (int new_data)</td></tr>
<tr class="separator:a9434bf2d7deca6d7fe1efe06c5341df0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2eb66b7c9d059dcf75090248fa521262"><td class="memItemLeft" align="right" valign="top"><a id="a2eb66b7c9d059dcf75090248fa521262"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>insert_tail</b> (int new_data)</td></tr>
<tr class="memitem:a2eb66b7c9d059dcf75090248fa521262"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d15/classcll.html#a2eb66b7c9d059dcf75090248fa521262">insert_tail</a> (int new_data)</td></tr>
<tr class="separator:a2eb66b7c9d059dcf75090248fa521262"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04b61bb736525f28b8042c6145e1a265"><td class="memItemLeft" align="right" valign="top"><a id="a04b61bb736525f28b8042c6145e1a265"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>get_size</b> ()</td></tr>
<tr class="memitem:a04b61bb736525f28b8042c6145e1a265"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d15/classcll.html#a04b61bb736525f28b8042c6145e1a265">get_size</a> ()</td></tr>
<tr class="separator:a04b61bb736525f28b8042c6145e1a265"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb6fb5834563d077a4eaff1b7fdc5b44"><td class="memItemLeft" align="right" valign="top"><a id="abb6fb5834563d077a4eaff1b7fdc5b44"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>find_item</b> (int item_to_find)</td></tr>
<tr class="memitem:abb6fb5834563d077a4eaff1b7fdc5b44"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d15/classcll.html#abb6fb5834563d077a4eaff1b7fdc5b44">find_item</a> (int item_to_find)</td></tr>
<tr class="separator:abb6fb5834563d077a4eaff1b7fdc5b44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3665c1dd793c23873f4d8238b86c2021"><td class="memItemLeft" align="right" valign="top"><a id="a3665c1dd793c23873f4d8238b86c2021"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>operator*</b> ()</td></tr>
<tr class="memitem:a3665c1dd793c23873f4d8238b86c2021"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d15/classcll.html#a3665c1dd793c23873f4d8238b86c2021">operator*</a> ()</td></tr>
<tr class="separator:a3665c1dd793c23873f4d8238b86c2021"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b49e807e33b6f11b2ea151df61a9f2f"><td class="memItemLeft" align="right" valign="top"><a id="a1b49e807e33b6f11b2ea151df61a9f2f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>operator++</b> ()</td></tr>
<tr class="memitem:a1b49e807e33b6f11b2ea151df61a9f2f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d15/classcll.html#a1b49e807e33b6f11b2ea151df61a9f2f">operator++</a> ()</td></tr>
<tr class="separator:a1b49e807e33b6f11b2ea151df61a9f2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a852ab0b4ec38b8462df3f32ee6f11290"><td class="memItemLeft" align="right" valign="top"><a id="a852ab0b4ec38b8462df3f32ee6f11290"></a>
<tr class="memitem:a852ab0b4ec38b8462df3f32ee6f11290"><td class="memItemLeft" align="right" valign="top"><a id="a852ab0b4ec38b8462df3f32ee6f11290" name="a852ab0b4ec38b8462df3f32ee6f11290"></a>
<a class="el" href="../../d5/da1/structnode.html">node</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>head</b></td></tr>
<tr class="separator:a852ab0b4ec38b8462df3f32ee6f11290"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23cbc56c51dafc17bd16cecd0f491731"><td class="memItemLeft" align="right" valign="top"><a id="a23cbc56c51dafc17bd16cecd0f491731"></a>
<tr class="memitem:a23cbc56c51dafc17bd16cecd0f491731"><td class="memItemLeft" align="right" valign="top"><a id="a23cbc56c51dafc17bd16cecd0f491731" name="a23cbc56c51dafc17bd16cecd0f491731"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>total</b></td></tr>
<tr class="separator:a23cbc56c51dafc17bd16cecd0f491731"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a3f09a4ec2bc5a211a8409693b4cab4f8" name="a3f09a4ec2bc5a211a8409693b4cab4f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f09a4ec2bc5a211a8409693b4cab4f8">&#9670;&nbsp;</a></span>cll()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cll::cll </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> {</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> head = NULL;</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> total = 0;</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a239fa940a9ca1defdecfeeb07cad351b" name="a239fa940a9ca1defdecfeeb07cad351b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a239fa940a9ca1defdecfeeb07cad351b">&#9670;&nbsp;</a></span>~cll()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cll::~cll </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> { <span class="comment">/* Desstructure, no need to fill */</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span>}</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ae957a9434f6d1ffef7461ea4d7c9a8fe" name="ae957a9434f6d1ffef7461ea4d7c9a8fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae957a9434f6d1ffef7461ea4d7c9a8fe">&#9670;&nbsp;</a></span>display()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cll::display </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> {</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keywordflow">if</span> (head == NULL)</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;List is empty !&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;CLL list: &quot;</span>;</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *current = head;</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; total; i++) {</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; current-&gt;data &lt;&lt; <span class="stringliteral">&quot; -&gt; &quot;</span>;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> current = current-&gt;next;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> }</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; head-&gt;data &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;Total element: &quot;</span> &lt;&lt; total &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> }</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</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="amatrix__exponentiation_8cpp_html_a600eaf353befc174637855795f12d258"><div class="ttname"><a href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a></div><div class="ttdeci">#define endl</div><div class="ttdef"><b>Definition:</b> matrix_exponentiation.cpp:36</div></div>
<div class="ttc" id="astructnode_html"><div class="ttname"><a href="../../d5/da1/structnode.html">node</a></div><div class="ttdef"><b>Definition:</b> avltree.cpp:13</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="abb6fb5834563d077a4eaff1b7fdc5b44" name="abb6fb5834563d077a4eaff1b7fdc5b44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb6fb5834563d077a4eaff1b7fdc5b44">&#9670;&nbsp;</a></span>find_item()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cll::find_item </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>item_to_find</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> {</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">if</span> (head == NULL) {</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;List is empty !&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *current = head;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">while</span> (current-&gt;next != head) {</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">if</span> (current-&gt;data == item_to_find)</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> current = current-&gt;next;</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> }</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> }</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a04b61bb736525f28b8042c6145e1a265" name="a04b61bb736525f28b8042c6145e1a265"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04b61bb736525f28b8042c6145e1a265">&#9670;&nbsp;</a></span>get_size()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int cll::get_size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span>{ <span class="keywordflow">return</span> total; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a9434bf2d7deca6d7fe1efe06c5341df0" name="a9434bf2d7deca6d7fe1efe06c5341df0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9434bf2d7deca6d7fe1efe06c5341df0">&#9670;&nbsp;</a></span>insert_front()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cll::insert_front </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>new_data</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *newNode;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> newNode = <span class="keyword">new</span> <a class="code hl_typedef" href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a>;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> newNode-&gt;data = new_data;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> newNode-&gt;next = NULL;</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordflow">if</span> (head == NULL) {</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> head = newNode;</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> head-&gt;next = head;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *current = head;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">while</span> (current-&gt;next != head) {</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> current = current-&gt;next;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> }</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> newNode-&gt;next = head;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> current-&gt;next = newNode;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> head = newNode;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> }</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> total++;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span>}</div>
<div class="ttc" id="ahash__search_8cpp_html_a8ca8dcb494104d273679e219e53d0555"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a></div><div class="ttdeci">struct list node</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a2eb66b7c9d059dcf75090248fa521262" name="a2eb66b7c9d059dcf75090248fa521262"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2eb66b7c9d059dcf75090248fa521262">&#9670;&nbsp;</a></span>insert_tail()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cll::insert_tail </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>new_data</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> {</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *newNode;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> newNode = <span class="keyword">new</span> <a class="code hl_typedef" href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a>;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> newNode-&gt;data = new_data;</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> newNode-&gt;next = NULL;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">if</span> (head == NULL) {</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> head = newNode;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> head-&gt;next = head;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *current = head;</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">while</span> (current-&gt;next != head) {</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> current = current-&gt;next;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> }</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> current-&gt;next = newNode;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> newNode-&gt;next = head;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> }</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> total++;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a3665c1dd793c23873f4d8238b86c2021" name="a3665c1dd793c23873f4d8238b86c2021"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3665c1dd793c23873f4d8238b86c2021">&#9670;&nbsp;</a></span>operator*()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int cll::operator* </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span>{ <span class="keywordflow">return</span> head-&gt;data; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a1b49e807e33b6f11b2ea151df61a9f2f" name="a1b49e807e33b6f11b2ea151df61a9f2f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b49e807e33b6f11b2ea151df61a9f2f">&#9670;&nbsp;</a></span>operator++()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cll::operator++ </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> {</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">if</span> (head == NULL) {</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;List is empty !&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> *current = head;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">while</span> (current-&gt;next != head) {</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> current = current-&gt;next;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> }</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> current-&gt;next = head-&gt;next;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> head = head-&gt;next;</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> }</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> total--;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span>}</div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>data_structures/cll/<a class="el" href="../../d7/dba/cll_8h_source.html">cll.h</a></li>
<li>data_structures/cll/cll.cpp</li>
@@ -148,7 +388,7 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>total</b></td></tr>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d5/d15/classcll.html">cll</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,14 +0,0 @@
var classcll =
[
[ "cll", "d5/d15/classcll.html#a3f09a4ec2bc5a211a8409693b4cab4f8", null ],
[ "~cll", "d5/d15/classcll.html#a239fa940a9ca1defdecfeeb07cad351b", null ],
[ "display", "d5/d15/classcll.html#ae957a9434f6d1ffef7461ea4d7c9a8fe", null ],
[ "find_item", "d5/d15/classcll.html#abb6fb5834563d077a4eaff1b7fdc5b44", null ],
[ "get_size", "d5/d15/classcll.html#a04b61bb736525f28b8042c6145e1a265", null ],
[ "insert_front", "d5/d15/classcll.html#a9434bf2d7deca6d7fe1efe06c5341df0", null ],
[ "insert_tail", "d5/d15/classcll.html#a2eb66b7c9d059dcf75090248fa521262", null ],
[ "operator*", "d5/d15/classcll.html#a3665c1dd793c23873f4d8238b86c2021", null ],
[ "operator++", "d5/d15/classcll.html#a1b49e807e33b6f11b2ea151df61a9f2f", null ],
[ "head", "d5/d15/classcll.html#a852ab0b4ec38b8462df3f32ee6f11290", null ],
[ "total", "d5/d15/classcll.html#a23cbc56c51dafc17bd16cecd0f491731", null ]
];

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: std::is_unsigned&lt; uint128_t &gt; Struct Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d25/structstd_1_1is__unsigned_3_01uint128__t_01_4.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -90,8 +90,7 @@ $(document).ready(function(){initNavTree('d5/d25/structstd_1_1is__unsigned_3_01u
</div>
<div class="header">
<div class="headertitle">
<div class="title">std::is_unsigned&lt; uint128_t &gt; Struct Reference</div> </div>
<div class="headertitle"><div class="title">std::is_unsigned&lt; uint128_t &gt; Struct Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
@@ -115,7 +114,7 @@ Collaboration diagram for std::is_unsigned&lt; uint128_t &gt;:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d8/dcc/namespacestd.html">std</a></li><li class="navelem"><a class="el" href="../../d5/d25/structstd_1_1is__unsigned_3_01uint128__t_01_4.html">is_unsigned&lt; uint128_t &gt;</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: MinHeapNode Struct Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d29/struct_min_heap_node.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -94,8 +94,7 @@ $(document).ready(function(){initNavTree('d5/d29/struct_min_heap_node.html','../
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="../../d4/db6/struct_min_heap_node-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">MinHeapNode Struct Reference</div> </div>
<div class="headertitle"><div class="title">MinHeapNode Struct Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
@@ -105,27 +104,68 @@ Collaboration diagram for MinHeapNode:</div>
</div>
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a41f73e87e4ddf1fbe72ae0db2b4e674e"><td class="memItemLeft" align="right" valign="top"><a id="a41f73e87e4ddf1fbe72ae0db2b4e674e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>MinHeapNode</b> (char data, unsigned freq)</td></tr>
<tr class="memitem:a41f73e87e4ddf1fbe72ae0db2b4e674e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d29/struct_min_heap_node.html#a41f73e87e4ddf1fbe72ae0db2b4e674e">MinHeapNode</a> (char data, unsigned freq)</td></tr>
<tr class="separator:a41f73e87e4ddf1fbe72ae0db2b4e674e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a3d422a54a6e8f8ebc7e386125a09d8e8"><td class="memItemLeft" align="right" valign="top"><a id="a3d422a54a6e8f8ebc7e386125a09d8e8"></a>
<tr class="memitem:a3d422a54a6e8f8ebc7e386125a09d8e8"><td class="memItemLeft" align="right" valign="top"><a id="a3d422a54a6e8f8ebc7e386125a09d8e8" name="a3d422a54a6e8f8ebc7e386125a09d8e8"></a>
char&#160;</td><td class="memItemRight" valign="bottom"><b>data</b></td></tr>
<tr class="separator:a3d422a54a6e8f8ebc7e386125a09d8e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b604fe2d4f56fcb78f8e0e02b0458fd"><td class="memItemLeft" align="right" valign="top"><a id="a3b604fe2d4f56fcb78f8e0e02b0458fd"></a>
<tr class="memitem:a3b604fe2d4f56fcb78f8e0e02b0458fd"><td class="memItemLeft" align="right" valign="top"><a id="a3b604fe2d4f56fcb78f8e0e02b0458fd" name="a3b604fe2d4f56fcb78f8e0e02b0458fd"></a>
unsigned&#160;</td><td class="memItemRight" valign="bottom"><b>freq</b></td></tr>
<tr class="separator:a3b604fe2d4f56fcb78f8e0e02b0458fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad06549be842d9a2cacdb3e55b019e68c"><td class="memItemLeft" align="right" valign="top"><a id="ad06549be842d9a2cacdb3e55b019e68c"></a>
<tr class="memitem:ad06549be842d9a2cacdb3e55b019e68c"><td class="memItemLeft" align="right" valign="top"><a id="ad06549be842d9a2cacdb3e55b019e68c" name="ad06549be842d9a2cacdb3e55b019e68c"></a>
<a class="el" href="../../d5/d29/struct_min_heap_node.html">MinHeapNode</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>left</b></td></tr>
<tr class="separator:ad06549be842d9a2cacdb3e55b019e68c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6df054c3211ae8a8ec15a21e7d18343a"><td class="memItemLeft" align="right" valign="top"><a id="a6df054c3211ae8a8ec15a21e7d18343a"></a>
<tr class="memitem:a6df054c3211ae8a8ec15a21e7d18343a"><td class="memItemLeft" align="right" valign="top"><a id="a6df054c3211ae8a8ec15a21e7d18343a" name="a6df054c3211ae8a8ec15a21e7d18343a"></a>
<a class="el" href="../../d5/d29/struct_min_heap_node.html">MinHeapNode</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>right</b></td></tr>
<tr class="separator:a6df054c3211ae8a8ec15a21e7d18343a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a41f73e87e4ddf1fbe72ae0db2b4e674e" name="a41f73e87e4ddf1fbe72ae0db2b4e674e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41f73e87e4ddf1fbe72ae0db2b4e674e">&#9670;&nbsp;</a></span>MinHeapNode()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">MinHeapNode::MinHeapNode </td>
<td>(</td>
<td class="paramtype">char&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&#160;</td>
<td class="paramname"><em>freq</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> {</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> left = right = NULL;</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> this-&gt;data = data;</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> this-&gt;freq = freq;</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>greedy_algorithms/huffman.cpp</li>
</ul>
@@ -135,7 +175,7 @@ unsigned&#160;</td><td class="memItemRight" valign="bottom"><b>freq</b></td></tr
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d5/d29/struct_min_heap_node.html">MinHeapNode</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,8 +0,0 @@
var struct_min_heap_node =
[
[ "MinHeapNode", "d5/d29/struct_min_heap_node.html#a41f73e87e4ddf1fbe72ae0db2b4e674e", null ],
[ "data", "d5/d29/struct_min_heap_node.html#a3d422a54a6e8f8ebc7e386125a09d8e8", null ],
[ "freq", "d5/d29/struct_min_heap_node.html#a3b604fe2d4f56fcb78f8e0e02b0458fd", null ],
[ "left", "d5/d29/struct_min_heap_node.html#ad06549be842d9a2cacdb3e55b019e68c", null ],
[ "right", "d5/d29/struct_min_heap_node.html#a6df054c3211ae8a8ec15a21e7d18343a", null ]
];

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: layers Namespace Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d2c/namespacelayers.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -90,22 +90,21 @@ $(document).ready(function(){initNavTree('d5/d2c/namespacelayers.html','../../')
</div>
<div class="header">
<div class="headertitle">
<div class="title">layers Namespace Reference</div> </div>
<div class="headertitle"><div class="title">layers Namespace Reference</div></div>
</div><!--header-->
<div class="contents">
<p>This namespace contains layers used in MLP.
<a href="../../d5/d2c/namespacelayers.html#details">More...</a></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This namespace contains layers used in MLP. </p>
<div class="textblock"><p >This namespace contains layers used in MLP. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d5/d2c/namespacelayers.html">layers</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: linear_algebra/gram_schmidt.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d33/gram__schmidt_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -93,12 +93,11 @@ $(document).ready(function(){initNavTree('d5/d33/gram__schmidt_8cpp.html','../..
<div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">gram_schmidt.cpp File Reference</div> </div>
<div class="headertitle"><div class="title">gram_schmidt.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<p><a href="https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process">Gram Schmidt Orthogonalisation Process</a>
<p><a href="https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process" target="_blank">Gram Schmidt Orthogonalisation Process</a>
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;array&gt;</code><br />
<code>#include &lt;cassert&gt;</code><br />
@@ -112,16 +111,16 @@ Include dependency graph for gram_schmidt.cpp:</div>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:d3/d78/namespacelinear__algebra"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d78/namespacelinear__algebra.html">linear_algebra</a></td></tr>
<tr class="memitem:d3/d78/namespacelinear__algebra"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d78/namespacelinear__algebra.html">linear_algebra</a></td></tr>
<tr class="memdesc:d3/d78/namespacelinear__algebra"><td class="mdescLeft">&#160;</td><td class="mdescRight">for io operations <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d4/d0f/namespacegram__schmidt"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d0f/namespacegram__schmidt.html">gram_schmidt</a></td></tr>
<tr class="memdesc:d4/d0f/namespacegram__schmidt"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions for <a href="https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process">Gram Schmidt Orthogonalisation Process</a> <br /></td></tr>
<tr class="memitem:d4/d0f/namespacegram__schmidt"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d0f/namespacegram__schmidt.html">gram_schmidt</a></td></tr>
<tr class="memdesc:d4/d0f/namespacegram__schmidt"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions for <a href="https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process" target="_blank">Gram Schmidt Orthogonalisation Process</a> <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aed4d308f46ca1d91e348ca260ec1d2fb"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d33/gram__schmidt_8cpp.html#aed4d308f46ca1d91e348ca260ec1d2fb">linear_algebra::gram_schmidt::dot_product</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>&lt; double, 10 &gt; &amp;x, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>&lt; double, 10 &gt; &amp;y, const int &amp;c)</td></tr>
<tr class="separator:aed4d308f46ca1d91e348ca260ec1d2fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -138,16 +137,16 @@ Functions</h2></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a href="https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process">Gram Schmidt Orthogonalisation Process</a> </p>
<p>Takes the input of Linearly Independent Vectors, returns vectors orthogonal to each other.</p>
<div class="textblock"><p ><a href="https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process" target="_blank">Gram Schmidt Orthogonalisation Process</a> </p>
<p >Takes the input of Linearly Independent Vectors, returns vectors orthogonal to each other.</p>
<h3><a class="anchor" id="autotoc_md73"></a>
Algorithm</h3>
<p>Take the first vector of given LI vectors as first vector of Orthogonal vectors. Take projection of second input vector on the first vector of Orthogonal vector and subtract it from the 2nd LI vector. Take projection of third vector on the second vector of Othogonal vectors and subtract it from the 3rd LI vector. Keep repeating the above process until all the vectors in the given input array are exhausted.</p>
<p>For Example: In R2, Input LI Vectors={(3,1),(2,2)} then Orthogonal Vectors= {(3, 1),(-0.4, 1.2)}</p>
<p>Have defined maximum dimension of vectors to be 10 and number of vectors taken is 20. Please do not give linearly dependent vectors</p>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Akanksha-Gupta920">Akanksha Gupta</a> </dd></dl>
<p >Take the first vector of given LI vectors as first vector of Orthogonal vectors. Take projection of second input vector on the first vector of Orthogonal vector and subtract it from the 2nd LI vector. Take projection of third vector on the second vector of Othogonal vectors and subtract it from the 3rd LI vector. Keep repeating the above process until all the vectors in the given input array are exhausted.</p>
<p >For Example: In R2, Input LI Vectors={(3,1),(2,2)} then Orthogonal Vectors= {(3, 1),(-0.4, 1.2)}</p>
<p >Have defined maximum dimension of vectors to be 10 and number of vectors taken is 20. Please do not give linearly dependent vectors</p>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Akanksha-Gupta920" target="_blank">Akanksha Gupta</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ab6b70f9680752e9fe2ac4e2cce158c40"></a>
<a id="ab6b70f9680752e9fe2ac4e2cce158c40" name="ab6b70f9680752e9fe2ac4e2cce158c40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab6b70f9680752e9fe2ac4e2cce158c40">&#9670;&nbsp;</a></span>display()</h2>
<div class="memitem">
@@ -178,7 +177,7 @@ Algorithm</h3>
</tr>
</table>
</div><div class="memdoc">
<p>Function to print the orthogonalised vector</p>
<p >Function to print the orthogonalised vector</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">r</td><td>number of vectors </td></tr>
@@ -188,20 +187,20 @@ Algorithm</h3>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; {</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; r; ++i) {</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Vector &quot;</span> &lt;&lt; i + 1 &lt;&lt; <span class="stringliteral">&quot;: &quot;</span>;</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; c; ++j) {</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; B[i][j] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; }</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; }</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> {</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; r; ++i) {</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</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;Vector &quot;</span> &lt;&lt; i + 1 &lt;&lt; <span class="stringliteral">&quot;: &quot;</span>;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; c; ++j) {</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; B[i][j] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> }</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</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="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> }</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</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><!-- fragment -->
</div>
</div>
<a id="aed4d308f46ca1d91e348ca260ec1d2fb"></a>
<a id="aed4d308f46ca1d91e348ca260ec1d2fb" name="aed4d308f46ca1d91e348ca260ec1d2fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed4d308f46ca1d91e348ca260ec1d2fb">&#9670;&nbsp;</a></span>dot_product()</h2>
<div class="memitem">
@@ -232,7 +231,7 @@ Algorithm</h3>
</tr>
</table>
</div><div class="memdoc">
<p>Dot product function. Takes 2 vectors along with their dimension as input and returns the dot product. </p><dl class="params"><dt>Parameters</dt><dd>
<p >Dot product function. Takes 2 vectors along with their dimension as input and returns the dot product. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">x</td><td>vector 1 </td></tr>
<tr><td class="paramname">y</td><td>vector 2 </td></tr>
@@ -241,14 +240,14 @@ Algorithm</h3>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>sum </dd></dl>
<div class="fragment"><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; {</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keywordtype">double</span> <a class="code" href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44">sum</a> = 0;</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; c; ++i) {</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <a class="code" href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44">sum</a> += x[i] * y[i];</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; }</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44">sum</a>;</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;}</div>
<div class="ttc" id="anamespacemachine__learning_html_a5305cc18d11943d3dc0d66e70d7e9c44"><div class="ttname"><a href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44">machine_learning::sum</a></div><div class="ttdeci">T sum(const std::vector&lt; std::valarray&lt; T &gt;&gt; &amp;A)</div><div class="ttdef"><b>Definition:</b> vector_ops.hpp:232</div></div>
<div class="fragment"><div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> {</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordtype">double</span> <a class="code hl_function" href="../../d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35">sum</a> = 0;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; c; ++i) {</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <a class="code hl_function" href="../../d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35">sum</a> += x[i] * y[i];</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> }</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35">sum</a>;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span>}</div>
<div class="ttc" id="anamespacemachine__learning_html_a6f1c98c016ad34ff3d9f39372161bd35"><div class="ttname"><a href="../../d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35">machine_learning::sum</a></div><div class="ttdeci">T sum(const std::vector&lt; std::valarray&lt; T &gt; &gt; &amp;A)</div><div class="ttdef"><b>Definition:</b> vector_ops.hpp:232</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -258,7 +257,7 @@ Here is the call graph for this function:</div>
</div>
</div>
<a id="aa31ca28f60c880802462335eedc5d91f"></a>
<a id="aa31ca28f60c880802462335eedc5d91f" name="aa31ca28f60c880802462335eedc5d91f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa31ca28f60c880802462335eedc5d91f">&#9670;&nbsp;</a></span>gram_schmidt()</h2>
<div class="memitem">
@@ -295,7 +294,7 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p>Function for the process of Gram Schimdt Process </p><dl class="params"><dt>Parameters</dt><dd>
<p >Function for the process of Gram Schimdt Process </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">r</td><td>number of vectors </td></tr>
<tr><td class="paramname">c</td><td>dimension of vectors </td></tr>
@@ -305,67 +304,67 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<p>we check whether appropriate dimensions are given or not.</p>
<p>First vector is copied as it is.</p>
<p>array to store projections</p>
<p>First initialised to zero</p>
<p>to store previous projected array</p>
<p>to store the factor by which the previous array will change</p>
<p>projected array created</p>
<p>we take the projection with all the previous vector and add them.</p>
<p>subtract total projection vector from the input vector</p>
<div class="fragment"><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; {</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="keywordflow">if</span> (c &lt; r) { <span class="comment">/// we check whether appropriate dimensions are given or not.</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Dimension of vector is less than number of vector, hence &quot;</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="stringliteral">&quot;\n first &quot;</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; &lt;&lt; c &lt;&lt; <span class="stringliteral">&quot; vectors are orthogonalised\n&quot;</span>;</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; r = c;</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; }</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; </div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keywordtype">int</span> k = 1;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="keywordflow">while</span> (k &lt;= r) {</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordflow">if</span> (k == 1) {</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; c; j++)</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; B[0][j] = A[0][j]; <span class="comment">/// First vector is copied as it is.</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; }</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;double, 10&gt;</a></div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; all_projection{}; <span class="comment">/// array to store projections</span></div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; c; ++i) {</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; all_projection[i] = 0; <span class="comment">/// First initialised to zero</span></div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; }</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordtype">int</span> l = 1;</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">while</span> (l &lt; k) {</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;double, 10&gt;</a></div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; temp{}; <span class="comment">/// to store previous projected array</span></div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="keywordtype">double</span> factor = NAN; <span class="comment">/// to store the factor by which the</span><span class="comment"></span></div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;<span class="comment"> /// previous array will change</span></div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;<span class="comment"></span> factor = <a class="code" href="../../d5/d33/gram__schmidt_8cpp.html#a46e459aff5eafffb5ad9ceb129b4d274">projection</a>(A[k - 1], B[l - 1], c);</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; c; ++i) {</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; temp[i] = B[l - 1][i] * factor; <span class="comment">/// projected array created</span></div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; }</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; c; ++j) {</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; all_projection[j] =</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; all_projection[j] +</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; temp[j]; <span class="comment">/// we take the projection with all the</span><span class="comment"></span></div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;<span class="comment"> /// previous vector and add them.</span></div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;<span class="comment"></span> }</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; l++;</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; }</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; c; ++i) {</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; B[k - 1][i] =</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; A[k - 1][i] -</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; all_projection[i]; <span class="comment">/// subtract total projection vector</span><span class="comment"></span></div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;<span class="comment"> /// from the input vector</span></div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;<span class="comment"></span> }</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; }</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; k++;</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; }</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; display(r, c, B); <span class="comment">// for displaying orthogoanlised vectors</span></div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;}</div>
<p >we check whether appropriate dimensions are given or not.</p>
<p >First vector is copied as it is.</p>
<p >array to store projections</p>
<p >First initialised to zero</p>
<p >to store previous projected array</p>
<p >to store the factor by which the previous array will change</p>
<p >projected array created</p>
<p >we take the projection with all the previous vector and add them.</p>
<p >subtract total projection vector from the input vector</p>
<div class="fragment"><div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> {</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">if</span> (c &lt; r) { <span class="comment">/// we check whether appropriate dimensions are given or not.</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</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;Dimension of vector is less than number of vector, hence &quot;</span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="stringliteral">&quot;\n first &quot;</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> &lt;&lt; c &lt;&lt; <span class="stringliteral">&quot; vectors are orthogonalised\n&quot;</span>;</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> r = c;</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> }</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordtype">int</span> k = 1;</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordflow">while</span> (k &lt;= r) {</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">if</span> (k == 1) {</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; c; j++)</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> B[0][j] = A[0][j]; <span class="comment">/// First vector is copied as it is.</span></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> }</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;double, 10&gt;</a></div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> all_projection{}; <span class="comment">/// array to store projections</span></div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; c; ++i) {</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> all_projection[i] = 0; <span class="comment">/// First initialised to zero</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> }</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordtype">int</span> l = 1;</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">while</span> (l &lt; k) {</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;double, 10&gt;</a></div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> temp{}; <span class="comment">/// to store previous projected array</span></div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordtype">double</span> factor = NAN; <span class="comment">/// to store the factor by which the</span><span class="comment"></span></div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span><span class="comment"> /// previous array will change</span></div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span><span class="comment"></span> factor = <a class="code hl_function" href="../../d5/d33/gram__schmidt_8cpp.html#a46e459aff5eafffb5ad9ceb129b4d274">projection</a>(A[k - 1], B[l - 1], c);</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; c; ++i) {</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> temp[i] = B[l - 1][i] * factor; <span class="comment">/// projected array created</span></div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> }</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; c; ++j) {</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> all_projection[j] =</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> all_projection[j] +</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> temp[j]; <span class="comment">/// we take the projection with all the</span><span class="comment"></span></div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span><span class="comment"> /// previous vector and add them.</span></div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span><span class="comment"></span> }</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> l++;</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> }</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; c; ++i) {</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> B[k - 1][i] =</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> A[k - 1][i] -</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> all_projection[i]; <span class="comment">/// subtract total projection vector</span><span class="comment"></span></div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span><span class="comment"> /// from the input vector</span></div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span><span class="comment"></span> }</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> }</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> k++;</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> }</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> display(r, c, B); <span class="comment">// for displaying orthogoanlised vectors</span></div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span>}</div>
<div class="ttc" id="aarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a></div></div>
<div class="ttc" id="agram__schmidt_8cpp_html_a46e459aff5eafffb5ad9ceb129b4d274"><div class="ttname"><a href="../../d5/d33/gram__schmidt_8cpp.html#a46e459aff5eafffb5ad9ceb129b4d274">linear_algebra::gram_schmidt::projection</a></div><div class="ttdeci">double projection(const std::array&lt; double, 10 &gt; &amp;x, const std::array&lt; double, 10 &gt; &amp;y, const int &amp;c)</div><div class="ttdef"><b>Definition:</b> gram_schmidt.cpp:79</div></div>
</div><!-- fragment --><div class="dynheader">
@@ -377,7 +376,7 @@ Here is the call graph for this function:</div>
</div>
</div>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
@@ -395,55 +394,55 @@ Here is the call graph for this function:</div>
<p>Main Function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<p>a 2-D array for storing all vectors</p>
<p>a 2-D array for storing orthogonalised vectors</p>
<p>storing vectors in array A</p>
<p>Input of vectors is taken</p>
<p>To check whether vectors are orthogonal or not</p>
<p>take make the process numerically stable, upper bound for the dot product take 0.1</p>
<div class="fragment"><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; {</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; <span class="keywordtype">int</span> r = 0, c = 0;</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; <a class="code" href="../../d5/d33/gram__schmidt_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// perform self tests</span></div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Enter the dimension of your vectors\n&quot;</span>;</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; c;</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Enter the number of vectors you will enter\n&quot;</span>;</div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; r;</div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; </div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt;</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; A{}; <span class="comment">/// a 2-D array for storing all vectors</span></div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; B = {</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; {0}}; <span class="comment">/// a 2-D array for storing orthogonalised vectors</span><span class="comment"></span></div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160;<span class="comment"> /// storing vectors in array A</span></div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160;<span class="comment"></span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; r; ++i) {</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Enter vector &quot;</span> &lt;&lt; i + 1</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>; <span class="comment">/// Input of vectors is taken</span></div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; c; ++j) {</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Value &quot;</span> &lt;&lt; j + 1 &lt;&lt; <span class="stringliteral">&quot;th of vector: &quot;</span>;</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; A[i][j];</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; }</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; }</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; </div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; <a class="code" href="../../d5/d33/gram__schmidt_8cpp.html#aa31ca28f60c880802462335eedc5d91f">linear_algebra::gram_schmidt::gram_schmidt</a>(r, c, A, B);</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; </div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; <span class="keywordtype">double</span> dot = 0;</div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <span class="keywordtype">int</span> flag = 1; <span class="comment">/// To check whether vectors are orthogonal or not</span></div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; r - 1; ++i) {</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = i + 1; j &lt; r; ++j) {</div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; dot =</div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">fabs</a>(linear_algebra::gram_schmidt::dot_product(B[i], B[j], c));</div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; <span class="keywordflow">if</span> (dot &gt; 0.1) <span class="comment">/// take make the process numerically stable, upper</span><span class="comment"></span></div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;<span class="comment"> /// bound for the dot product take 0.1</span></div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;<span class="comment"></span> {</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; flag = 0;</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; }</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; }</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; }</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; <span class="keywordflow">if</span> (flag == 0)</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Vectors are linearly dependent\n&quot;</span>;</div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;}</div>
<p >a 2-D array for storing all vectors</p>
<p >a 2-D array for storing orthogonalised vectors</p>
<p >storing vectors in array A</p>
<p >Input of vectors is taken</p>
<p >To check whether vectors are orthogonal or not</p>
<p >take make the process numerically stable, upper bound for the dot product take 0.1</p>
<div class="fragment"><div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> {</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="keywordtype">int</span> r = 0, c = 0;</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <a class="code hl_function" href="../../d5/d33/gram__schmidt_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// perform self tests</span></div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</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;Enter the dimension of your vectors\n&quot;</span>;</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; c;</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</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;Enter the number of vectors you will enter\n&quot;</span>;</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; r;</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> </div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt;</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> A{}; <span class="comment">/// a 2-D array for storing all vectors</span></div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; B = {</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> {0}}; <span class="comment">/// a 2-D array for storing orthogonalised vectors</span><span class="comment"></span></div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span><span class="comment"> /// storing vectors in array A</span></div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span><span class="comment"></span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; r; ++i) {</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</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;Enter vector &quot;</span> &lt;&lt; i + 1</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>; <span class="comment">/// Input of vectors is taken</span></div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; c; ++j) {</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</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;Value &quot;</span> &lt;&lt; j + 1 &lt;&lt; <span class="stringliteral">&quot;th of vector: &quot;</span>;</div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; A[i][j];</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> }</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</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="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> }</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> </div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <a class="code hl_function" href="../../d5/d33/gram__schmidt_8cpp.html#aa31ca28f60c880802462335eedc5d91f">linear_algebra::gram_schmidt::gram_schmidt</a>(r, c, A, B);</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> </div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <span class="keywordtype">double</span> dot = 0;</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <span class="keywordtype">int</span> flag = 1; <span class="comment">/// To check whether vectors are orthogonal or not</span></div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; r - 1; ++i) {</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = i + 1; j &lt; r; ++j) {</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> dot =</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">fabs</a>(linear_algebra::gram_schmidt::dot_product(B[i], B[j], c));</div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> <span class="keywordflow">if</span> (dot &gt; 0.1) <span class="comment">/// take make the process numerically stable, upper</span><span class="comment"></span></div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span><span class="comment"> /// bound for the dot product take 0.1</span></div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span><span class="comment"></span> {</div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> flag = 0;</div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> }</div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> }</div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> }</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> <span class="keywordflow">if</span> (flag == 0)</div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</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;Vectors are linearly dependent\n&quot;</span>;</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span>}</div>
<div class="ttc" id="abasic_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a></div></div>
<div class="ttc" id="afabs_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a></div><div class="ttdeci">T fabs(T... args)</div></div>
<div class="ttc" id="agram__schmidt_8cpp_html_aa31ca28f60c880802462335eedc5d91f"><div class="ttname"><a href="../../d5/d33/gram__schmidt_8cpp.html#aa31ca28f60c880802462335eedc5d91f">linear_algebra::gram_schmidt::gram_schmidt</a></div><div class="ttdeci">void gram_schmidt(int r, const int &amp;c, const std::array&lt; std::array&lt; double, 10 &gt;, 20 &gt; &amp;A, std::array&lt; std::array&lt; double, 10 &gt;, 20 &gt; B)</div><div class="ttdef"><b>Definition:</b> gram_schmidt.cpp:121</div></div>
@@ -457,7 +456,7 @@ Here is the call graph for this function:</div>
</div>
</div>
<a id="a46e459aff5eafffb5ad9ceb129b4d274"></a>
<a id="a46e459aff5eafffb5ad9ceb129b4d274" name="a46e459aff5eafffb5ad9ceb129b4d274"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46e459aff5eafffb5ad9ceb129b4d274">&#9670;&nbsp;</a></span>projection()</h2>
<div class="memitem">
@@ -488,7 +487,7 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p>Projection Function Takes input of 2 vectors along with their dimension and evaluates their projection in temp</p>
<p >Projection Function Takes input of 2 vectors along with their dimension and evaluates their projection in temp</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">x</td><td>Vector 1 </td></tr>
@@ -498,20 +497,20 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>factor </dd></dl>
<p>The dot product of two vectors is taken</p>
<p>The norm of the second vector is taken.</p>
<p>multiply that factor with every element in a 3rd vector, whose initial values are same as the 2nd vector.</p>
<div class="fragment"><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; {</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordtype">double</span> dot =</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <a class="code" href="../../d5/d33/gram__schmidt_8cpp.html#aed4d308f46ca1d91e348ca260ec1d2fb">dot_product</a>(x, y, c); <span class="comment">/// The dot product of two vectors is taken</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordtype">double</span> anorm =</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="../../d5/d33/gram__schmidt_8cpp.html#aed4d308f46ca1d91e348ca260ec1d2fb">dot_product</a>(y, y, c); <span class="comment">/// The norm of the second vector is taken.</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keywordtype">double</span> factor =</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; dot /</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; anorm; <span class="comment">/// multiply that factor with every element in a 3rd vector,</span><span class="comment"></span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<span class="comment"> /// whose initial values are same as the 2nd vector.</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;<span class="comment"></span> <span class="keywordflow">return</span> factor;</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;}</div>
<p >The dot product of two vectors is taken</p>
<p >The norm of the second vector is taken.</p>
<p >multiply that factor with every element in a 3rd vector, whose initial values are same as the 2nd vector.</p>
<div class="fragment"><div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> {</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordtype">double</span> dot =</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <a class="code hl_function" href="../../d5/d33/gram__schmidt_8cpp.html#aed4d308f46ca1d91e348ca260ec1d2fb">dot_product</a>(x, y, c); <span class="comment">/// The dot product of two vectors is taken</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordtype">double</span> anorm =</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_function" href="../../d5/d33/gram__schmidt_8cpp.html#aed4d308f46ca1d91e348ca260ec1d2fb">dot_product</a>(y, y, c); <span class="comment">/// The norm of the second vector is taken.</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordtype">double</span> factor =</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> dot /</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> anorm; <span class="comment">/// multiply that factor with every element in a 3rd vector,</span><span class="comment"></span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="comment"> /// whose initial values are same as the 2nd vector.</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span><span class="comment"></span> <span class="keywordflow">return</span> factor;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span>}</div>
<div class="ttc" id="agram__schmidt_8cpp_html_aed4d308f46ca1d91e348ca260ec1d2fb"><div class="ttname"><a href="../../d5/d33/gram__schmidt_8cpp.html#aed4d308f46ca1d91e348ca260ec1d2fb">linear_algebra::gram_schmidt::dot_product</a></div><div class="ttdeci">double dot_product(const std::array&lt; double, 10 &gt; &amp;x, const std::array&lt; double, 10 &gt; &amp;y, const int &amp;c)</div><div class="ttdef"><b>Definition:</b> gram_schmidt.cpp:59</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -522,7 +521,7 @@ Here is the call graph for this function:</div>
</div>
</div>
<a id="aa8dca7b867074164d5f45b0f3851269d"></a>
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8dca7b867074164d5f45b0f3851269d">&#9670;&nbsp;</a></span>test()</h2>
<div class="memitem">
@@ -544,69 +543,69 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p>Test Function. Process has been tested for 3 Sample Inputs </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; {</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; a1 = {</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; {{1, 0, 1, 0}, {1, 1, 1, 1}, {0, 1, 2, 1}}};</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; b1 = {{0}};</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <span class="keywordtype">double</span> dot1 = 0;</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <a class="code" href="../../d5/d33/gram__schmidt_8cpp.html#aa31ca28f60c880802462335eedc5d91f">linear_algebra::gram_schmidt::gram_schmidt</a>(3, 4, a1, b1);</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="keywordtype">int</span> flag = 1;</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 2; ++i) {</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = i + 1; j &lt; 3; ++j) {</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; dot1 = <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">fabs</a>(</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; linear_algebra::gram_schmidt::dot_product(b1[i], b1[j], 4));</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="keywordflow">if</span> (dot1 &gt; 0.1) {</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; flag = 0;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; }</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; }</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; }</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <span class="keywordflow">if</span> (flag == 0)</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Vectors are linearly dependent\n&quot;</span>;</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; assert(flag == 1);</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Passed Test Case 1\n &quot;</span>;</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; </div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; a2 = {{{3, 1}, {2, 2}}};</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; b2 = {{0}};</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="keywordtype">double</span> dot2 = 0;</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <a class="code" href="../../d5/d33/gram__schmidt_8cpp.html#aa31ca28f60c880802462335eedc5d91f">linear_algebra::gram_schmidt::gram_schmidt</a>(2, 2, a2, b2);</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; flag = 1;</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 1; ++i) {</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = i + 1; j &lt; 2; ++j) {</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; dot2 = <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">fabs</a>(</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; linear_algebra::gram_schmidt::dot_product(b2[i], b2[j], 2));</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <span class="keywordflow">if</span> (dot2 &gt; 0.1) {</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; flag = 0;</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; }</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; }</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; }</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <span class="keywordflow">if</span> (flag == 0)</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Vectors are linearly dependent\n&quot;</span>;</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; assert(flag == 1);</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Passed Test Case 2\n&quot;</span>;</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; </div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; a3 = {{{1, 2, 2}, {-4, 3, 2}}};</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; b3 = {{0}};</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <span class="keywordtype">double</span> dot3 = 0;</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; <a class="code" href="../../d5/d33/gram__schmidt_8cpp.html#aa31ca28f60c880802462335eedc5d91f">linear_algebra::gram_schmidt::gram_schmidt</a>(2, 3, a3, b3);</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; flag = 1;</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 1; ++i) {</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = i + 1; j &lt; 2; ++j) {</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; dot3 = <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">fabs</a>(</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; linear_algebra::gram_schmidt::dot_product(b3[i], b3[j], 3));</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; <span class="keywordflow">if</span> (dot3 &gt; 0.1) {</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; flag = 0;</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; }</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; }</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; }</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <span class="keywordflow">if</span> (flag == 0)</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Vectors are linearly dependent\n&quot;</span>;</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; assert(flag == 1);</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Passed Test Case 3\n&quot;</span>;</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160;}</div>
<p >Test Function. Process has been tested for 3 Sample Inputs </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> {</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; a1 = {</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> {{1, 0, 1, 0}, {1, 1, 1, 1}, {0, 1, 2, 1}}};</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; b1 = {{0}};</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="keywordtype">double</span> dot1 = 0;</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <a class="code hl_function" href="../../d5/d33/gram__schmidt_8cpp.html#aa31ca28f60c880802462335eedc5d91f">linear_algebra::gram_schmidt::gram_schmidt</a>(3, 4, a1, b1);</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="keywordtype">int</span> flag = 1;</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 2; ++i) {</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = i + 1; j &lt; 3; ++j) {</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> dot1 = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">fabs</a>(</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> linear_algebra::gram_schmidt::dot_product(b1[i], b1[j], 4));</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <span class="keywordflow">if</span> (dot1 &gt; 0.1) {</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> flag = 0;</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> }</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> }</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> }</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <span class="keywordflow">if</span> (flag == 0)</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</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;Vectors are linearly dependent\n&quot;</span>;</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> assert(flag == 1);</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</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;Passed Test Case 1\n &quot;</span>;</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> </div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; a2 = {{{3, 1}, {2, 2}}};</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; b2 = {{0}};</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordtype">double</span> dot2 = 0;</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <a class="code hl_function" href="../../d5/d33/gram__schmidt_8cpp.html#aa31ca28f60c880802462335eedc5d91f">linear_algebra::gram_schmidt::gram_schmidt</a>(2, 2, a2, b2);</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> flag = 1;</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 1; ++i) {</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = i + 1; j &lt; 2; ++j) {</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> dot2 = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">fabs</a>(</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> linear_algebra::gram_schmidt::dot_product(b2[i], b2[j], 2));</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <span class="keywordflow">if</span> (dot2 &gt; 0.1) {</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> flag = 0;</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> }</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> }</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> }</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <span class="keywordflow">if</span> (flag == 0)</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</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;Vectors are linearly dependent\n&quot;</span>;</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> assert(flag == 1);</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</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;Passed Test Case 2\n&quot;</span>;</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> </div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; a3 = {{{1, 2, 2}, {-4, 3, 2}}};</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;std::array&lt;double, 10&gt;</a>, 20&gt; b3 = {{0}};</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordtype">double</span> dot3 = 0;</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> <a class="code hl_function" href="../../d5/d33/gram__schmidt_8cpp.html#aa31ca28f60c880802462335eedc5d91f">linear_algebra::gram_schmidt::gram_schmidt</a>(2, 3, a3, b3);</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> flag = 1;</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 1; ++i) {</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = i + 1; j &lt; 2; ++j) {</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> dot3 = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">fabs</a>(</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> linear_algebra::gram_schmidt::dot_product(b3[i], b3[j], 3));</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="keywordflow">if</span> (dot3 &gt; 0.1) {</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> flag = 0;</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> }</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> }</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> }</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <span class="keywordflow">if</span> (flag == 0)</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</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;Vectors are linearly dependent\n&quot;</span>;</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> assert(flag == 1);</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</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;Passed Test Case 3\n&quot;</span>;</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span>}</div>
</div><!-- fragment -->
</div>
</div>
@@ -616,7 +615,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_8c4128baa09a573ad2b8b8c0061a04c9.html">linear_algebra</a></li><li class="navelem"><a class="el" href="../../d5/d33/gram__schmidt_8cpp.html">gram_schmidt.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,5 +1,5 @@
<map id="linear_algebra::gram_schmidt::projection" name="linear_algebra::gram_schmidt::projection">
<area shape="rect" id="node1" title=" " alt="" coords="5,29,149,71"/>
<area shape="rect" id="node2" href="$d5/d33/gram__schmidt_8cpp.html#aed4d308f46ca1d91e348ca260ec1d2fb" title=" " alt="" coords="197,29,351,71"/>
<area shape="rect" id="node3" href="$d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44" title=" " alt="" coords="399,37,559,63"/>
<area shape="rect" id="node3" href="$d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35" title=" " alt="" coords="399,37,559,63"/>
</map>

View File

@@ -1 +1 @@
d01db209ea1f40231571867947eccaa2
9a55844be55392b1d85bd2133a4b5421

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: linear_algebra::gram_schmidt::projection Pages: 1 -->
<svg width="423pt" height="57pt"
@@ -50,7 +50,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44" target="_top" xlink:title=" ">
<g id="a_node3"><a xlink:href="../../d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="295,-6 295,-25 415,-25 415,-6 295,-6"/>
<text text-anchor="middle" x="355" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">machine_learning::sum</text>
</a>

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -2,5 +2,5 @@
<area shape="rect" id="node1" title=" " alt="" coords="5,29,172,71"/>
<area shape="rect" id="node2" href="$d5/d33/gram__schmidt_8cpp.html#a46e459aff5eafffb5ad9ceb129b4d274" title=" " alt="" coords="220,29,364,71"/>
<area shape="rect" id="node3" href="$d5/d33/gram__schmidt_8cpp.html#aed4d308f46ca1d91e348ca260ec1d2fb" title=" " alt="" coords="412,29,565,71"/>
<area shape="rect" id="node4" href="$d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44" title=" " alt="" coords="613,37,773,63"/>
<area shape="rect" id="node4" href="$d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35" title=" " alt="" coords="613,37,773,63"/>
</map>

View File

@@ -1 +1 @@
b6fdadb3e9a16b4603c1881c8dfce0f6
e03c9e7c1fb54f513373239885678c21

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: linear_algebra::gram_schmidt::gram_schmidt Pages: 1 -->
<!--zoomable 57 -->
@@ -112,7 +112,7 @@ var sectionId = 'dynsection-2';
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44" target="_top" xlink:title=" ">
<g id="a_node4"><a xlink:href="../../d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="456,-6 456,-25 576,-25 576,-6 456,-6"/>
<text text-anchor="middle" x="516" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">machine_learning::sum</text>
</a>

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: linear_algebra::gram_schmidt::gram_schmidt Pages: 1 -->
<svg width="584pt" height="57pt"
@@ -66,7 +66,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44" target="_top" xlink:title=" ">
<g id="a_node4"><a xlink:href="../../d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="456,-6 456,-25 576,-25 576,-6 456,-6"/>
<text text-anchor="middle" x="516" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">machine_learning::sum</text>
</a>

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: main Pages: 1 -->
<svg width="115pt" height="28pt"

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1,4 +1,4 @@
<map id="linear_algebra::gram_schmidt::dot_product" name="linear_algebra::gram_schmidt::dot_product">
<area shape="rect" id="node1" title=" " alt="" coords="5,29,159,71"/>
<area shape="rect" id="node2" href="$d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44" title=" " alt="" coords="207,37,367,63"/>
<area shape="rect" id="node2" href="$d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35" title=" " alt="" coords="207,37,367,63"/>
</map>

View File

@@ -1 +1 @@
99db7f1b10447ebfdcbf9c6fbac7adc2
519f80bc5b8f14ec0d179006f40216d7

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: linear_algebra::gram_schmidt::dot_product Pages: 1 -->
<svg width="279pt" height="57pt"
@@ -28,7 +28,7 @@
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44" target="_top" xlink:title=" ">
<g id="a_node2"><a xlink:href="../../d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="151,-6 151,-25 271,-25 271,-6 151,-6"/>
<text text-anchor="middle" x="211" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">machine_learning::sum</text>
</a>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: activations Namespace Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d39/namespaceactivations.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -90,22 +90,21 @@ $(document).ready(function(){initNavTree('d5/d39/namespaceactivations.html','../
</div>
<div class="header">
<div class="headertitle">
<div class="title">activations Namespace Reference</div> </div>
<div class="headertitle"><div class="title">activations Namespace Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Various activation functions used in Neural network.
<a href="../../d5/d39/namespaceactivations.html#details">More...</a></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Various activation functions used in Neural network. </p>
<div class="textblock"><p >Various activation functions used in Neural network. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d5/d39/namespaceactivations.html">activations</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: data_structures Namespace Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d3c/namespacedata__structures.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -93,58 +93,57 @@ $(document).ready(function(){initNavTree('d5/d3c/namespacedata__structures.html'
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<div class="title">data_structures Namespace Reference</div> </div>
<div class="headertitle"><div class="title">data_structures Namespace Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Data Structures algorithms.
<a href="../../d5/d3c/namespacedata__structures.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
<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">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d49/structdata__structures_1_1_node.html">Node</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d90/classdata__structures_1_1_skip_list.html">SkipList</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d3e/classdata__structures_1_1trie.html">trie</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a href="https://en.wikipedia.org/wiki/Trie">Trie</a> implementation for small-case English alphabets <code>a-z</code> <a href="../../d0/d3e/classdata__structures_1_1trie.html#details">More...</a><br /></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie</a> implementation for small-case English alphabets <code>a-z</code> <a href="../../d0/d3e/classdata__structures_1_1trie.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ac0d7e0be24da9f41bcb19745873c436a"><td class="memItemLeft" align="right" valign="top"><a id="ac0d7e0be24da9f41bcb19745873c436a"></a>
constexpr int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d3c/namespacedata__structures.html#ac0d7e0be24da9f41bcb19745873c436a">MAX_LEVEL</a> = 2</td></tr>
<tr class="memitem:ac0d7e0be24da9f41bcb19745873c436a"><td class="memItemLeft" align="right" valign="top"><a id="ac0d7e0be24da9f41bcb19745873c436a" name="ac0d7e0be24da9f41bcb19745873c436a"></a>
constexpr int&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_LEVEL</b> = 2</td></tr>
<tr class="memdesc:ac0d7e0be24da9f41bcb19745873c436a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum level of skip list. <br /></td></tr>
<tr class="separator:ac0d7e0be24da9f41bcb19745873c436a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a903639d8e6f955dd8d5c263781455d61"><td class="memItemLeft" align="right" valign="top"><a id="a903639d8e6f955dd8d5c263781455d61"></a>
constexpr float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d3c/namespacedata__structures.html#a903639d8e6f955dd8d5c263781455d61">PROBABILITY</a> = 0.5</td></tr>
<tr class="memitem:a903639d8e6f955dd8d5c263781455d61"><td class="memItemLeft" align="right" valign="top"><a id="a903639d8e6f955dd8d5c263781455d61" name="a903639d8e6f955dd8d5c263781455d61"></a>
constexpr float&#160;</td><td class="memItemRight" valign="bottom"><b>PROBABILITY</b> = 0.5</td></tr>
<tr class="memdesc:a903639d8e6f955dd8d5c263781455d61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Current probability for "coin toss". <br /></td></tr>
<tr class="separator:a903639d8e6f955dd8d5c263781455d61"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Data Structures algorithms. </p>
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></p>
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a></p>
<p>for IO operations</p>
<p>Data-structure algorithms.</p>
<p>Algorithms with data structures.</p>
<p>for assert</p>
<p>for io operations for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a></p>
<p>Algorithms with data structures</p>
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a> for assert</p>
<p>Data Structures algorithms</p>
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a> for assert for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ofstream.html">std::ofstream</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue</a></p>
<p>Algorithms with data structures</p>
<p>for assert for IO operations for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/stack.html">std::stack</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">std::unordered_map</a></p>
<p>Data structures algorithms </p>
<div class="textblock"><p >Data Structures algorithms. </p>
<p >for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></p>
<p >for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/to_string.html">std::to_string</a></p>
<p >for IO operations</p>
<p >Data-structure algorithms.</p>
<p >Algorithms with data structures.</p>
<p >for assert</p>
<p >for io operations for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a></p>
<p >Algorithms with data structures</p>
<p >for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a> for assert</p>
<p >Data Structures algorithms</p>
<p >for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a> for assert for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ofstream.html">std::ofstream</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue</a></p>
<p >Algorithms with data structures</p>
<p >for assert for IO operations for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/stack.html">std::stack</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">std::unordered_map</a></p>
<p >Data structures algorithms </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d5/d3c/namespacedata__structures.html">data_structures</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: search/sublist_search.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d45/sublist__search_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -94,12 +94,11 @@ $(document).ready(function(){initNavTree('d5/d45/sublist__search_8cpp.html','../
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">sublist_search.cpp File Reference</div> </div>
<div class="headertitle"><div class="title">sublist_search.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Implementation of the <a href="https://www.geeksforgeeks.org/sublist-search-search-a-linked-list-in-another-list">Sublist Search Algorithm</a>
<p>Implementation of the <a href="https://www.geeksforgeeks.org/sublist-search-search-a-linked-list-in-another-list" target="_blank">Sublist Search Algorithm</a>
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cassert&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
@@ -111,7 +110,7 @@ Include dependency graph for sublist_search.cpp:</div>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
<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">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d61/structsearch_1_1sublist__search_1_1_node.html">search::sublist_search::Node</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A <a class="el" href="../../da/d61/structsearch_1_1sublist__search_1_1_node.html" title="A Node structure representing a single link Node in a linked list.">Node</a> structure representing a single link <a class="el" href="../../da/d61/structsearch_1_1sublist__search_1_1_node.html" title="A Node structure representing a single link Node in a linked list.">Node</a> in a linked list. <a href="../../da/d61/structsearch_1_1sublist__search_1_1_node.html#details">More...</a><br /></td></tr>
@@ -120,23 +119,23 @@ Classes</h2></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">class encapsulating the necessary test cases <a href="../../d5/d58/class_test_cases.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:d9/dca/namespacesearch"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/dca/namespacesearch.html">search</a></td></tr>
<tr class="memitem:d9/dca/namespacesearch"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/dca/namespacesearch.html">search</a></td></tr>
<tr class="memdesc:d9/dca/namespacesearch"><td class="mdescLeft">&#160;</td><td class="mdescRight">for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d9/def/namespacesublist__search"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/def/namespacesublist__search.html">sublist_search</a></td></tr>
<tr class="memdesc:d9/def/namespacesublist__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions for the <a href="https://www.geeksforgeeks.org/sublist-search-search-a-linked-list-in-another-list">Sublist Search</a> implementation. <br /></td></tr>
<tr class="memitem:d9/def/namespacesublist__search"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/def/namespacesublist__search.html">sublist_search</a></td></tr>
<tr class="memdesc:d9/def/namespacesublist__search"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions for the <a href="https://www.geeksforgeeks.org/sublist-search-search-a-linked-list-in-another-list" target="_blank">Sublist Search</a> implementation. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad1028bc215281d62e344af99da57fab2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d45/sublist__search_8cpp.html#ad1028bc215281d62e344af99da57fab2">search::sublist_search::printLinkedList</a> (<a class="el" href="../../db/d8b/struct_node.html">Node</a> *start)</td></tr>
<tr class="memdesc:ad1028bc215281d62e344af99da57fab2"><td class="mdescLeft">&#160;</td><td class="mdescRight">A simple function to print the linked list. <a href="../../d5/d45/sublist__search_8cpp.html#ad1028bc215281d62e344af99da57fab2">More...</a><br /></td></tr>
<tr class="separator:ad1028bc215281d62e344af99da57fab2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4054b9ab80a5e609b6fcdf70f2e03b9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../db/d8b/struct_node.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d45/sublist__search_8cpp.html#ab4054b9ab80a5e609b6fcdf70f2e03b9">search::sublist_search::makeLinkedList</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; uint64_t &gt; &amp;<a class="el" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>)</td></tr>
<tr class="memdesc:ab4054b9ab80a5e609b6fcdf70f2e03b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Give a vector of data, it adds each element of vector in the linked list and return the address of head pointer. <a href="../../d5/d45/sublist__search_8cpp.html#ab4054b9ab80a5e609b6fcdf70f2e03b9">More...</a><br /></td></tr>
<tr class="separator:ab4054b9ab80a5e609b6fcdf70f2e03b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70ca8d0267008e09cfa50b4e2ddfbe53"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../db/d8b/struct_node.html">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d45/sublist__search_8cpp.html#a70ca8d0267008e09cfa50b4e2ddfbe53">search::sublist_search::makeLinkedList</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; uint64_t &gt; &amp;<a class="el" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>)</td></tr>
<tr class="memdesc:a70ca8d0267008e09cfa50b4e2ddfbe53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Give a vector of data, it adds each element of vector in the linked list and return the address of head pointer. <a href="../../d5/d45/sublist__search_8cpp.html#a70ca8d0267008e09cfa50b4e2ddfbe53">More...</a><br /></td></tr>
<tr class="separator:a70ca8d0267008e09cfa50b4e2ddfbe53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4faee403e2758aaab682ed6622ae218c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d45/sublist__search_8cpp.html#a4faee403e2758aaab682ed6622ae218c">search::sublist_search::sublistSearch</a> (<a class="el" href="../../db/d8b/struct_node.html">Node</a> *sublist, <a class="el" href="../../db/d8b/struct_node.html">Node</a> *mainList)</td></tr>
<tr class="memdesc:a4faee403e2758aaab682ed6622ae218c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main searching function. <a href="../../d5/d45/sublist__search_8cpp.html#a4faee403e2758aaab682ed6622ae218c">More...</a><br /></td></tr>
<tr class="separator:a4faee403e2758aaab682ed6622ae218c"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -148,7 +147,7 @@ Functions</h2></td></tr>
<tr class="separator:a0ddf1224851353fc92bfbff6f499fa97"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Implementation of the <a href="https://www.geeksforgeeks.org/sublist-search-search-a-linked-list-in-another-list">Sublist Search Algorithm</a> </p>
<div class="textblock"><p >Implementation of the <a href="https://www.geeksforgeeks.org/sublist-search-search-a-linked-list-in-another-list" target="_blank">Sublist Search Algorithm</a> </p>
<h3><a class="anchor" id="autotoc_md92"></a>
Algorithm</h3>
<ul>
@@ -162,9 +161,9 @@ Working</h3>
<li>The sublist search algorithm works by comparing the first element of the first list with the first element of the second list.</li>
<li>If the two values don't match, it goes to the next element of the second list. It does this until the two values match.</li>
</ul>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/foo290">Nitin Sharma</a> </dd></dl>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/foo290" target="_blank">Nitin Sharma</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a0ddf1224851353fc92bfbff6f499fa97"></a>
<a id="a0ddf1224851353fc92bfbff6f499fa97" name="a0ddf1224851353fc92bfbff6f499fa97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ddf1224851353fc92bfbff6f499fa97">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
@@ -199,50 +198,50 @@ Working</h3>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<p>&lt; Main list in which sublist is to be searched</p>
<p>&lt; Sublist to be searched</p>
<p>&lt; Main list in which sublist is to be searched</p>
<p>&lt; boolean to check if the sublist exists or not</p>
<div class="fragment"><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160; {</div>
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160; <a class="code" href="../../d5/d45/sublist__search_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160; </div>
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint64_t&gt;</a> mainlistData = {</div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160; 2, 5, 6, 7, 8}; <span class="comment">///&lt; Main list in which sublist is to be searched</span></div>
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint64_t&gt;</a> sublistData = {6, 8}; <span class="comment">///&lt; Sublist to be searched</span></div>
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160; </div>
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160; <a class="code" href="../../da/d61/structsearch_1_1sublist__search_1_1_node.html">search::sublist_search::Node</a> *mainlistLL =</div>
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>&#160; <a class="code" href="../../d5/d45/sublist__search_8cpp.html#ab4054b9ab80a5e609b6fcdf70f2e03b9">search::sublist_search::makeLinkedList</a>(mainlistData);</div>
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>&#160; <a class="code" href="../../da/d61/structsearch_1_1sublist__search_1_1_node.html">search::sublist_search::Node</a> *sublistLL =</div>
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160; <a class="code" href="../../d5/d45/sublist__search_8cpp.html#ab4054b9ab80a5e609b6fcdf70f2e03b9">search::sublist_search::makeLinkedList</a>(</div>
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>&#160; sublistData); <span class="comment">///&lt; Main list in which sublist is to be</span><span class="comment"></span></div>
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160;<span class="comment"> ///&lt; searched</span></div>
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="../../d3/d84/word__break_8cpp.html#a1cc9dd6e6190d10a010fdcdfe7a21a81">exists</a> = <a class="code" href="../../d5/d45/sublist__search_8cpp.html#a4faee403e2758aaab682ed6622ae218c">search::sublist_search::sublistSearch</a>(</div>
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160; sublistLL,</div>
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160; mainlistLL); <span class="comment">///&lt; boolean to check if the sublist exists or not</span></div>
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>&#160; </div>
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Sublist: &quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160; <a class="code" href="../../d5/d45/sublist__search_8cpp.html#ad1028bc215281d62e344af99da57fab2">search::sublist_search::printLinkedList</a>(sublistLL);</div>
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160; </div>
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Main list: &quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160; <a class="code" href="../../d5/d45/sublist__search_8cpp.html#ad1028bc215281d62e344af99da57fab2">search::sublist_search::printLinkedList</a>(mainlistLL);</div>
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160; </div>
<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160; <span class="keywordflow">if</span> (exists) {</div>
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;[TRUE] - sublist found in main list\n&quot;</span>;</div>
<div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;[FALSE] - sublist NOT found in main list\n&quot;</span>;</div>
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>&#160; }</div>
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>&#160;}</div>
<p >&lt; Main list in which sublist is to be searched</p>
<p >&lt; Sublist to be searched</p>
<p >&lt; Main list in which sublist is to be searched</p>
<p >&lt; boolean to check if the sublist exists or not</p>
<div class="fragment"><div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> {</div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> <a class="code hl_function" href="../../d5/d45/sublist__search_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> </div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint64_t&gt;</a> mainlistData = {</div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> 2, 5, 6, 7, 8}; <span class="comment">///&lt; Main list in which sublist is to be searched</span></div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint64_t&gt;</a> sublistData = {6, 8}; <span class="comment">///&lt; Sublist to be searched</span></div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> </div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> <a class="code hl_struct" href="../../da/d61/structsearch_1_1sublist__search_1_1_node.html">search::sublist_search::Node</a> *mainlistLL =</div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> <a class="code hl_function" href="../../d5/d45/sublist__search_8cpp.html#a70ca8d0267008e09cfa50b4e2ddfbe53">search::sublist_search::makeLinkedList</a>(mainlistData);</div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> <a class="code hl_struct" href="../../da/d61/structsearch_1_1sublist__search_1_1_node.html">search::sublist_search::Node</a> *sublistLL =</div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> <a class="code hl_function" href="../../d5/d45/sublist__search_8cpp.html#a70ca8d0267008e09cfa50b4e2ddfbe53">search::sublist_search::makeLinkedList</a>(</div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> sublistData); <span class="comment">///&lt; Main list in which sublist is to be</span><span class="comment"></span></div>
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span><span class="comment"> ///&lt; searched</span></div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span><span class="comment"></span> </div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../d3/d84/word__break_8cpp.html#a1cc9dd6e6190d10a010fdcdfe7a21a81">exists</a> = <a class="code hl_function" href="../../d5/d45/sublist__search_8cpp.html#a4faee403e2758aaab682ed6622ae218c">search::sublist_search::sublistSearch</a>(</div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> sublistLL,</div>
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> mainlistLL); <span class="comment">///&lt; boolean to check if the sublist exists or not</span></div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> </div>
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</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;Sublist: &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"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> <a class="code hl_function" href="../../d5/d45/sublist__search_8cpp.html#ad1028bc215281d62e344af99da57fab2">search::sublist_search::printLinkedList</a>(sublistLL);</div>
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> </div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</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;Main list: &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"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> <a class="code hl_function" href="../../d5/d45/sublist__search_8cpp.html#ad1028bc215281d62e344af99da57fab2">search::sublist_search::printLinkedList</a>(mainlistLL);</div>
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"> 362</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &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"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> </div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> <span class="keywordflow">if</span> (exists) {</div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</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;[TRUE] - sublist found in main list\n&quot;</span>;</div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</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;[FALSE] - sublist NOT found in main list\n&quot;</span>;</div>
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span> }</div>
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"> 369</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</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="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 class="ttc" id="astructsearch_1_1sublist__search_1_1_node_html"><div class="ttname"><a href="../../da/d61/structsearch_1_1sublist__search_1_1_node.html">search::sublist_search::Node</a></div><div class="ttdoc">A Node structure representing a single link Node in a linked list.</div><div class="ttdef"><b>Definition:</b> sublist_search.cpp:47</div></div>
<div class="ttc" id="asublist__search_8cpp_html_a4faee403e2758aaab682ed6622ae218c"><div class="ttname"><a href="../../d5/d45/sublist__search_8cpp.html#a4faee403e2758aaab682ed6622ae218c">search::sublist_search::sublistSearch</a></div><div class="ttdeci">bool sublistSearch(Node *sublist, Node *mainList)</div><div class="ttdoc">Main searching function.</div><div class="ttdef"><b>Definition:</b> sublist_search.cpp:100</div></div>
<div class="ttc" id="asublist__search_8cpp_html_a70ca8d0267008e09cfa50b4e2ddfbe53"><div class="ttname"><a href="../../d5/d45/sublist__search_8cpp.html#a70ca8d0267008e09cfa50b4e2ddfbe53">search::sublist_search::makeLinkedList</a></div><div class="ttdeci">Node * makeLinkedList(const std::vector&lt; uint64_t &gt; &amp;data)</div><div class="ttdoc">Give a vector of data, it adds each element of vector in the linked list and return the address of he...</div><div class="ttdef"><b>Definition:</b> sublist_search.cpp:73</div></div>
<div class="ttc" id="asublist__search_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../d5/d45/sublist__search_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition:</b> sublist_search.cpp:328</div></div>
<div class="ttc" id="asublist__search_8cpp_html_ab4054b9ab80a5e609b6fcdf70f2e03b9"><div class="ttname"><a href="../../d5/d45/sublist__search_8cpp.html#ab4054b9ab80a5e609b6fcdf70f2e03b9">search::sublist_search::makeLinkedList</a></div><div class="ttdeci">Node * makeLinkedList(const std::vector&lt; uint64_t &gt; &amp;data)</div><div class="ttdoc">Give a vector of data, it adds each element of vector in the linked list and return the address of he...</div><div class="ttdef"><b>Definition:</b> sublist_search.cpp:73</div></div>
<div class="ttc" id="asublist__search_8cpp_html_ad1028bc215281d62e344af99da57fab2"><div class="ttname"><a href="../../d5/d45/sublist__search_8cpp.html#ad1028bc215281d62e344af99da57fab2">search::sublist_search::printLinkedList</a></div><div class="ttdeci">void printLinkedList(Node *start)</div><div class="ttdoc">A simple function to print the linked list.</div><div class="ttdef"><b>Definition:</b> sublist_search.cpp:57</div></div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt; uint64_t &gt;</a></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 class="ttc" id="aword__break_8cpp_html_a1cc9dd6e6190d10a010fdcdfe7a21a81"><div class="ttname"><a href="../../d3/d84/word__break_8cpp.html#a1cc9dd6e6190d10a010fdcdfe7a21a81">dynamic_programming::word_break::exists</a></div><div class="ttdeci">bool exists(const std::string &amp;str, const std::unordered_set&lt; std::string &gt; &amp;strSet)</div><div class="ttdoc">Function that checks if the string passed in param is present in the the unordered_set passed.</div><div class="ttdef"><b>Definition:</b> word_break.cpp:60</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -253,14 +252,14 @@ Here is the call graph for this function:</div>
</div>
</div>
<a id="ab4054b9ab80a5e609b6fcdf70f2e03b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4054b9ab80a5e609b6fcdf70f2e03b9">&#9670;&nbsp;</a></span>makeLinkedList()</h2>
<a id="a70ca8d0267008e09cfa50b4e2ddfbe53" name="a70ca8d0267008e09cfa50b4e2ddfbe53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70ca8d0267008e09cfa50b4e2ddfbe53">&#9670;&nbsp;</a></span>makeLinkedList()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../db/d8b/struct_node.html">Node</a>* search::sublist_search::makeLinkedList </td>
<td class="memname"><a class="el" href="../../db/d8b/struct_node.html">Node</a> * search::sublist_search::makeLinkedList </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; uint64_t &gt; &amp;&#160;</td>
<td class="paramname"><em>data</em></td><td>)</td>
@@ -277,26 +276,26 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Node* A head pointer to the linked list. </dd></dl>
<p>This is used in test cases for rapidly creating linked list with 100+ elements, instead of hard-coding 100 elements in test cases.</p>
<div class="fragment"><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; {<span class="comment"></span></div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="comment"> /// This is used in test cases for rapidly creating linked list with 100+</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;<span class="comment"> /// elements, instead of hard-coding 100 elements in test cases.</span></div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;<span class="comment"></span> <a class="code" href="../../db/d8b/struct_node.html">Node</a> *head = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <a class="code" href="../../db/d8b/struct_node.html">Node</a> *tail = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i : <a class="code" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>) {</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <a class="code" href="../../db/d8b/struct_node.html">Node</a> *<a class="code" href="../../d5/da1/structnode.html">node</a> = <span class="keyword">new</span> <a class="code" href="../../db/d8b/struct_node.html">Node</a>;</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <a class="code" href="../../d5/da1/structnode.html">node</a>-&gt;data = i;</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <a class="code" href="../../d5/da1/structnode.html">node</a>-&gt;next = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keywordflow">if</span> (head == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; head = <a class="code" href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a>;</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; tail = <a class="code" href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a>;</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; tail-&gt;next = <a class="code" href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a>;</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; tail = tail-&gt;next;</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; }</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; }</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="keywordflow">return</span> head;</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;}</div>
<p >This is used in test cases for rapidly creating linked list with 100+ elements, instead of hard-coding 100 elements in test cases.</p>
<div class="fragment"><div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> {<span class="comment"></span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment"> /// This is used in test cases for rapidly creating linked list with 100+</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="comment"> /// elements, instead of hard-coding 100 elements in test cases.</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="comment"></span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a> *head = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a> *tail = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i : <a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>) {</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a> *<a class="code hl_class" href="../../d5/da1/structnode.html">node</a> = <span class="keyword">new</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a>;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>-&gt;data = i;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>-&gt;next = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">if</span> (head == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> head = <a class="code hl_typedef" href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a>;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> tail = <a class="code hl_typedef" href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a>;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> tail-&gt;next = <a class="code hl_typedef" href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a>;</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> tail = tail-&gt;next;</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> }</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> }</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordflow">return</span> head;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span>}</div>
<div class="ttc" id="ahash__search_8cpp_html_a6e1a77282bc65ad359d753d25df23243"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a></div><div class="ttdeci">int data[MAX]</div><div class="ttdoc">test data</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:24</div></div>
<div class="ttc" id="ahash__search_8cpp_html_a8ca8dcb494104d273679e219e53d0555"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a></div><div class="ttdeci">struct list node</div></div>
<div class="ttc" id="astruct_node_html"><div class="ttname"><a href="../../db/d8b/struct_node.html">Node</a></div><div class="ttdef"><b>Definition:</b> linkedlist_implentation_usingarray.cpp:14</div></div>
@@ -304,13 +303,13 @@ Here is the call graph for this function:</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="../../d5/d45/sublist__search_8cpp_ab4054b9ab80a5e609b6fcdf70f2e03b9_cgraph.svg" width="166" height="76"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d5/d45/sublist__search_8cpp_a70ca8d0267008e09cfa50b4e2ddfbe53_cgraph.svg" width="166" height="76"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="ad1028bc215281d62e344af99da57fab2"></a>
<a id="ad1028bc215281d62e344af99da57fab2" name="ad1028bc215281d62e344af99da57fab2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1028bc215281d62e344af99da57fab2">&#9670;&nbsp;</a></span>printLinkedList()</h2>
<div class="memitem">
@@ -334,13 +333,13 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; {</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="keywordflow">while</span> (start != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;-&gt;&quot;</span> &lt;&lt; start-&gt;data;</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; start = start-&gt;next;</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; }</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> {</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">while</span> (start != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</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;-&gt;&quot;</span> &lt;&lt; start-&gt;data;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> start = start-&gt;next;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> }</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &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"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span>}</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -350,7 +349,7 @@ Here is the call graph for this function:</div>
</div>
</div>
<a id="a4faee403e2758aaab682ed6622ae218c"></a>
<a id="a4faee403e2758aaab682ed6622ae218c" name="a4faee403e2758aaab682ed6622ae218c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4faee403e2758aaab682ed6622ae218c">&#9670;&nbsp;</a></span>sublistSearch()</h2>
<div class="memitem">
@@ -387,59 +386,59 @@ Here is the call graph for this function:</div>
<dl class="section return"><dt>Returns</dt><dd>true if the sublist is found </dd>
<dd>
false if the sublist is NOT found </dd></dl>
<p>Initialize target pointer to the head node of sublist.</p>
<p>Initialize main pointer to the current node of main list.</p>
<p>If the data of target node and main node is equal then move to the next node of both lists.</p>
<p>Is target pointer becomes null that means the target list is been traversed without returning false. Which means the sublist has been found and return ture.</p>
<p>set the target pointer again to stating point of target list.</p>
<p>set the main pointer to the next element of the main list and repeat the algo.</p>
<p>If the main list is exhausted, means sublist does not found, return false</p>
<div class="fragment"><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; {</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="keywordflow">if</span> (sublist == <span class="keyword">nullptr</span> || mainList == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; }</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;<span class="comment"> /// Initialize target pointer to the head node of sublist.</span></div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;<span class="comment"></span> <a class="code" href="../../db/d8b/struct_node.html">Node</a> *target_ptr = sublist;</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="keywordflow">while</span> (mainList != <span class="keyword">nullptr</span>) {<span class="comment"></span></div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;<span class="comment"> /// Initialize main pointer to the current node of main list.</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;<span class="comment"></span> <a class="code" href="../../db/d8b/struct_node.html">Node</a> *main_ptr = mainList;</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; </div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="keywordflow">while</span> (target_ptr != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="keywordflow">if</span> (main_ptr == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (main_ptr-&gt;data == target_ptr-&gt;data) {<span class="comment"></span></div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;<span class="comment"> /// If the data of target node and main node is equal then move</span></div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;<span class="comment"> /// to the next node of both lists.</span></div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;<span class="comment"></span> target_ptr = target_ptr-&gt;next;</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; main_ptr = main_ptr-&gt;next;</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; }</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; }</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordflow">if</span> (target_ptr == <span class="keyword">nullptr</span>) {<span class="comment"></span></div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="comment"> /// Is target pointer becomes null that means the target list is</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="comment"> /// been traversed without returning false. Which means the sublist</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;<span class="comment"> /// has been found and return ture.</span></div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;<span class="comment"></span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; }</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;<span class="comment"> /// set the target pointer again to stating point of target list.</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;<span class="comment"></span> target_ptr = sublist;</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;<span class="comment"> /// set the main pointer to the next element of the main list and repeat</span></div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;<span class="comment"> /// the algo.</span></div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;<span class="comment"></span> mainList = mainList-&gt;next;</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; }</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;<span class="comment"> /// If the main list is exhausted, means sublist does not found, return</span></div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;<span class="comment"> /// false</span></div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;<span class="comment"></span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;}</div>
<p >Initialize target pointer to the head node of sublist.</p>
<p >Initialize main pointer to the current node of main list.</p>
<p >If the data of target node and main node is equal then move to the next node of both lists.</p>
<p >Is target pointer becomes null that means the target list is been traversed without returning false. Which means the sublist has been found and return ture.</p>
<p >set the target pointer again to stating point of target list.</p>
<p >set the main pointer to the next element of the main list and repeat the algo.</p>
<p >If the main list is exhausted, means sublist does not found, return false</p>
<div class="fragment"><div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> {</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">if</span> (sublist == <span class="keyword">nullptr</span> || mainList == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> }</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="comment"></span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="comment"> /// Initialize target pointer to the head node of sublist.</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="comment"></span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a> *target_ptr = sublist;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">while</span> (mainList != <span class="keyword">nullptr</span>) {<span class="comment"></span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="comment"> /// Initialize main pointer to the current node of main list.</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="comment"></span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a> *main_ptr = mainList;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">while</span> (target_ptr != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordflow">if</span> (main_ptr == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (main_ptr-&gt;data == target_ptr-&gt;data) {<span class="comment"></span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span><span class="comment"> /// If the data of target node and main node is equal then move</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><span class="comment"> /// to the next node of both lists.</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="comment"></span> target_ptr = target_ptr-&gt;next;</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> main_ptr = main_ptr-&gt;next;</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> }</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> }</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">if</span> (target_ptr == <span class="keyword">nullptr</span>) {<span class="comment"></span></div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span><span class="comment"> /// Is target pointer becomes null that means the target list is</span></div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span><span class="comment"> /// been traversed without returning false. Which means the sublist</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span><span class="comment"> /// has been found and return ture.</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span><span class="comment"></span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> }</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span><span class="comment"></span> </div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span><span class="comment"> /// set the target pointer again to stating point of target list.</span></div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span><span class="comment"></span> target_ptr = sublist;</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span><span class="comment"></span> </div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span><span class="comment"> /// set the main pointer to the next element of the main list and repeat</span></div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span><span class="comment"> /// the algo.</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span><span class="comment"></span> mainList = mainList-&gt;next;</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> }</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span><span class="comment"></span> </div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span><span class="comment"> /// If the main list is exhausted, means sublist does not found, return</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span><span class="comment"> /// false</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span><span class="comment"></span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span>}</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -449,7 +448,7 @@ Here is the call graph for this function:</div>
</div>
</div>
<a id="aa8dca7b867074164d5f45b0f3851269d"></a>
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8dca7b867074164d5f45b0f3851269d">&#9670;&nbsp;</a></span>test()</h2>
<div class="memitem">
@@ -474,10 +473,10 @@ Here is the call graph for this function:</div>
<p>Self-test implementations. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; {</div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; <a class="code" href="../../d5/d58/class_test_cases.html">TestCases</a> tc;</div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; tc.<a class="code" href="../../d5/d58/class_test_cases.html#aeabea90c02f9159e4a784bbf736e1e23">runTests</a>();</div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> {</div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> <a class="code hl_class" href="../../d5/d58/class_test_cases.html">TestCases</a> tc;</div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> tc.<a class="code hl_function" href="../../d5/d58/class_test_cases.html#aeabea90c02f9159e4a784bbf736e1e23">runTests</a>();</div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span>}</div>
<div class="ttc" id="aclass_test_cases_html"><div class="ttname"><a href="../../d5/d58/class_test_cases.html">TestCases</a></div><div class="ttdoc">class encapsulating the necessary test cases</div><div class="ttdef"><b>Definition:</b> inorder_successor_of_bst.cpp:225</div></div>
<div class="ttc" id="aclass_test_cases_html_aeabea90c02f9159e4a784bbf736e1e23"><div class="ttname"><a href="../../d5/d58/class_test_cases.html#aeabea90c02f9159e4a784bbf736e1e23">TestCases::runTests</a></div><div class="ttdeci">void runTests()</div><div class="ttdoc">Executes test cases.</div><div class="ttdef"><b>Definition:</b> inorder_successor_of_bst.cpp:243</div></div>
</div><!-- fragment --><div class="dynheader">
@@ -495,7 +494,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_19b2bf9199a15c634a08b1ede1dd896a.html">search</a></li><li class="navelem"><a class="el" href="../../d5/d45/sublist__search_8cpp.html">sublist_search.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,9 +1,9 @@
var sublist__search_8cpp =
[
[ "Node", "da/d61/structsearch_1_1sublist__search_1_1_node.html", "da/d61/structsearch_1_1sublist__search_1_1_node" ],
[ "search::sublist_search::Node", "da/d61/structsearch_1_1sublist__search_1_1_node.html", "da/d61/structsearch_1_1sublist__search_1_1_node" ],
[ "TestCases", "d5/d58/class_test_cases.html", "d5/d58/class_test_cases" ],
[ "main", "d5/d45/sublist__search_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97", null ],
[ "makeLinkedList", "d5/d45/sublist__search_8cpp.html#ab4054b9ab80a5e609b6fcdf70f2e03b9", null ],
[ "makeLinkedList", "d5/d45/sublist__search_8cpp.html#a70ca8d0267008e09cfa50b4e2ddfbe53", null ],
[ "printLinkedList", "d5/d45/sublist__search_8cpp.html#ad1028bc215281d62e344af99da57fab2", null ],
[ "sublistSearch", "d5/d45/sublist__search_8cpp.html#a4faee403e2758aaab682ed6622ae218c", null ],
[ "test", "d5/d45/sublist__search_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: main Pages: 1 -->
<!--zoomable 208 -->

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: main Pages: 1 -->
<svg width="621pt" height="208pt"

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: search::sublist_search::sublistSearch Pages: 1 -->
<svg width="124pt" height="57pt"

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: search::sublist_search::makeLinkedList Pages: 1 -->
<svg width="124pt" height="57pt"

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: test Pages: 1 -->
<!--zoomable 142 -->

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: test Pages: 1 -->
<svg width="547pt" height="142pt"

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: search::sublist_search::printLinkedList Pages: 1 -->
<svg width="214pt" height="57pt"

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: Member List</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -90,27 +90,26 @@ $(document).ready(function(){initNavTree('d3/d26/classdata__structures_1_1trie__
</div>
<div class="header">
<div class="headertitle">
<div class="title">data_structures::trie_using_hashmap::Trie Member List</div> </div>
<div class="headertitle"><div class="title">data_structures::trie_using_hashmap::Trie Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75">delete_word</a>(std::string word)</td><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a5f501b7f1240a58bc082187f22c2fe17">get_all_words</a>(std::vector&lt; std::string &gt; results, const std::shared_ptr&lt; Node &gt; &amp;element, std::string prefix)</td><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd">get_all_words</a>(std::vector&lt; std::string &gt; results, const std::shared_ptr&lt; Node &gt; &amp;element, std::string prefix)</td><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(const std::string &amp;word)</td><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17">predict_words</a>(const std::string &amp;prefix)</td><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(const std::string &amp;prefix)</td><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a832072498abeaa52ad43c4fc99cba248">root_node</a></td><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(const std::string &amp;word)</td><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(const std::string &amp;word)</td><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(const std::string &amp;prefix)</td><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a092d0805a9e647c2048777dbe67b35ab">Trie</a>()=default</td><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a092d0805a9e647c2048777dbe67b35ab">Trie</a>()=default</td><td class="entry"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: dynamic_programming/shortest_common_supersequence.cpp Pages: 1 -->
<svg width="328pt" height="95pt"

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: Sorting Algorithm</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d4c/group__sorting.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -92,26 +92,31 @@ $(document).ready(function(){initNavTree('d5/d4c/group__sorting.html','../../');
<div class="header">
<div class="summary">
<a href="#files">Files</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Sorting Algorithm</div> </div>
<div class="headertitle"><div class="title">Sorting Algorithm</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
Files</h2></td></tr>
<tr class="memitem:d5/df4/merge__sort_8cpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/df4/merge__sort_8cpp.html">merge_sort.cpp</a></td></tr>
<tr class="memdesc:d5/df4/merge__sort_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a href="https://en.wikipedia.org/wiki/Merge_sort">Merege Sort Algorithm (MEREGE SORT)</a> implementation <br /></td></tr>
<tr class="memdesc:d5/df4/merge__sort_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a href="https://en.wikipedia.org/wiki/Merge_sort" target="_blank">Merege Sort Algorithm (MEREGE SORT)</a> implementation <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d1/dcc/wiggle__sort_8cpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/dcc/wiggle__sort_8cpp.html">wiggle_sort.cpp</a></td></tr>
<tr class="memdesc:d1/dcc/wiggle__sort_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a href="https://leetcode.com/problems/wiggle-sort-ii/">Wiggle Sort Algorithm</a> Implementation <br /></td></tr>
<tr class="memdesc:d1/dcc/wiggle__sort_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a href="https://leetcode.com/problems/wiggle-sort-ii/" target="_blank">Wiggle Sort Algorithm</a> Implementation <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:d5/d91/namespacesorting"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d91/namespacesorting.html">sorting</a></td></tr>
<tr class="memdesc:d5/d91/namespacesorting"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sorting algorithms. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gabd9a93f241c5c86f2ec0abf8b66b4145"><td class="memTemplParams" colspan="2"><a id="gabd9a93f241c5c86f2ec0abf8b66b4145"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:gabd9a93f241c5c86f2ec0abf8b66b4145"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>heapify</b> (T *arr, int n, int i)</td></tr>
<tr class="memitem:gabd9a93f241c5c86f2ec0abf8b66b4145"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:gabd9a93f241c5c86f2ec0abf8b66b4145"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d5/d4c/group__sorting.html#gabd9a93f241c5c86f2ec0abf8b66b4145">heapify</a> (T *arr, int n, int i)</td></tr>
<tr class="separator:gabd9a93f241c5c86f2ec0abf8b66b4145"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga29d28b140174dbdde7c9f5157758435f"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ga29d28b140174dbdde7c9f5157758435f"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d5/d4c/group__sorting.html#ga29d28b140174dbdde7c9f5157758435f">heapSort</a> (T *arr, int n)</td></tr>
@@ -132,7 +137,7 @@ template&lt;typename T &gt; </td></tr>
<tr class="separator:gaa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The heapify procedure can be thought of as building a heap from the bottom up by successively sifting downward to establish the heap property.</p>
<p >The heapify procedure can be thought of as building a heap from the bottom up by successively sifting downward to establish the heap property.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">arr</td><td>array to be sorted </td></tr>
@@ -142,7 +147,7 @@ template&lt;typename T &gt; </td></tr>
</dd>
</dl>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga135e4c638e3bcf548bd122b5f49a3e72"></a>
<a id="ga135e4c638e3bcf548bd122b5f49a3e72" name="ga135e4c638e3bcf548bd122b5f49a3e72"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga135e4c638e3bcf548bd122b5f49a3e72">&#9670;&nbsp;</a></span>displayElements()</h2>
<div class="memitem">
@@ -177,29 +182,82 @@ template&lt;typename T &gt; </div>
</dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="../../dd/db0/_2_users_2runner_2work_2_c-_plus-_plus_2_c-_plus-_plus_2sorting_2wiggle_sort_8cpp-example.html#a4">/Users/runner/work/C-Plus-Plus/C-Plus-Plus/sorting/wiggle_sort.cpp</a>.</dd>
</dl>
<div class="fragment"><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; {</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; uint32_t size = arr.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>();</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; </div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Sorted elements are as follows: &quot;</span>;</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;[&quot;</span>;</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; i++) {</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; arr[i];</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keywordflow">if</span> (i != size - 1) {</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;, &quot;</span>;</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; }</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; }</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;]&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> {</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> uint32_t size = arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>();</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</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;Sorted elements are as follows: &quot;</span>;</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</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;[&quot;</span>;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; i++) {</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; arr[i];</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">if</span> (i != size - 1) {</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</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;, &quot;</span>;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> }</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> }</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</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;]&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"><a id="l00100" name="l00100"></a><span class="lineno"> 100</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="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 class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(T... args)</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ga29d28b140174dbdde7c9f5157758435f"></a>
<a id="gabd9a93f241c5c86f2ec0abf8b66b4145" name="gabd9a93f241c5c86f2ec0abf8b66b4145"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabd9a93f241c5c86f2ec0abf8b66b4145">&#9670;&nbsp;</a></span>heapify()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="memname">
<tr>
<td class="memname">void heapify </td>
<td>(</td>
<td class="paramtype">T *&#160;</td>
<td class="paramname"><em>arr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>n</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>i</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> {</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordtype">int</span> largest = i;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordtype">int</span> l = 2 * i + 1;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordtype">int</span> r = 2 * i + 2;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">if</span> (l &lt; n &amp;&amp; arr[l] &gt; arr[largest])</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> largest = l;</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">if</span> (r &lt; n &amp;&amp; arr[r] &gt; arr[largest])</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> largest = r;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">if</span> (largest != i) {</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a>(arr[i], arr[largest]);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> heapify(arr, n, largest);</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> }</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span>}</div>
<div class="ttc" id="aswap_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a></div><div class="ttdeci">T swap(T... args)</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ga29d28b140174dbdde7c9f5157758435f" name="ga29d28b140174dbdde7c9f5157758435f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga29d28b140174dbdde7c9f5157758435f">&#9670;&nbsp;</a></span>heapSort()</h2>
<div class="memitem">
@@ -226,7 +284,7 @@ template&lt;typename T &gt; </div>
</tr>
</table>
</div><div class="memdoc">
<p>Utilizes heapify procedure to sort the array</p>
<p >Utilizes heapify procedure to sort the array</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">arr</td><td>array to be sorted </td></tr>
@@ -234,19 +292,18 @@ template&lt;typename T &gt; </div>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; {</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = n - 1; i &gt;= 0; i--) heapify(arr, n, i);</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; </div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = n - 1; i &gt;= 0; i--) {</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a>(arr[0], arr[i]);</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; heapify(arr, i, 0);</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; }</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;}</div>
<div class="ttc" id="aswap_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a></div><div class="ttdeci">T swap(T... args)</div></div>
<div class="fragment"><div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> {</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = n - 1; i &gt;= 0; i--) heapify(arr, n, i);</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = n - 1; i &gt;= 0; i--) {</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a>(arr[0], arr[i]);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> heapify(arr, i, 0);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> }</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="gae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<a id="gae66f6b31b5ad750f1fe042a706a4e3d4" name="gae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
@@ -261,30 +318,30 @@ template&lt;typename T &gt; </div>
</tr>
</table>
</div><div class="memdoc">
<p>Main function</p>
<p>Driver Code </p>
<div class="fragment"><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; {</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keywordtype">int</span> size;</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Enter the number of elements : &quot;</span>;</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; size;</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keywordtype">int</span> *arr = <span class="keyword">new</span> <span class="keywordtype">int</span>[size];</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Enter the unsorted elements : &quot;</span>;</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; ++i) {</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; arr[i];</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; }</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <a class="code" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort</a>(arr, 0, size - 1);</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Sorted array : &quot;</span>;</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <a class="code" href="../../d5/d4c/group__sorting.html#ga0a9a57a1f1bbba3d4822531d002b7e07">show</a>(arr, size);</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keyword">delete</span>[] arr;</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;}</div>
<p >Main function</p>
<p >Driver Code </p>
<div class="fragment"><div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> {</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">int</span> size;</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</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;Enter the number of elements : &quot;</span>;</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; size;</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordtype">int</span> *arr = <span class="keyword">new</span> <span class="keywordtype">int</span>[size];</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</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;Enter the unsorted elements : &quot;</span>;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; ++i) {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; arr[i];</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> }</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <a class="code hl_function" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort</a>(arr, 0, size - 1);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</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;Sorted array : &quot;</span>;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <a class="code hl_function" href="../../d5/d4c/group__sorting.html#ga0a9a57a1f1bbba3d4822531d002b7e07">show</a>(arr, size);</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keyword">delete</span>[] arr;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span>}</div>
<div class="ttc" id="abasic_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a></div></div>
<div class="ttc" id="agroup__sorting_html_ga0a9a57a1f1bbba3d4822531d002b7e07"><div class="ttname"><a href="../../d5/d4c/group__sorting.html#ga0a9a57a1f1bbba3d4822531d002b7e07">show</a></div><div class="ttdeci">void show(int *arr, int size)</div><div class="ttdef"><b>Definition:</b> merge_sort.cpp:84</div></div>
<div class="ttc" id="agroup__sorting_html_gab6b14fea48d9841e29b9fc26be6e05d7"><div class="ttname"><a href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort</a></div><div class="ttdeci">void mergeSort(int *arr, int l, int r)</div><div class="ttdef"><b>Definition:</b> merge_sort.cpp:71</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ga460c61cd948203b4816bef2accb3fc73"></a>
<a id="ga460c61cd948203b4816bef2accb3fc73" name="ga460c61cd948203b4816bef2accb3fc73"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga460c61cd948203b4816bef2accb3fc73">&#9670;&nbsp;</a></span>merge()</h2>
<div class="memitem">
@@ -321,7 +378,7 @@ template&lt;typename T &gt; </div>
</tr>
</table>
</div><div class="memdoc">
<p>The <a class="el" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge()</a> function is used for merging two halves. The merge(arr, l, m, r) is key process that assumes that arr[l..m] and arr[m+1..r] are sorted and merges the two sorted sub-arrays into one.</p>
<p >The <a class="el" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge()</a> function is used for merging two halves. The merge(arr, l, m, r) is key process that assumes that arr[l..m] and arr[m+1..r] are sorted and merges the two sorted sub-arrays into one.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">arr</td><td>- array with two halves arr[l...m] and arr[m+1...l] </td></tr>
@@ -337,37 +394,37 @@ template&lt;typename T &gt; </div>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; {</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keywordtype">int</span> i, j, k;</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="keywordtype">int</span> n1 = m - l + 1;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keywordtype">int</span> n2 = r - m;</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keywordtype">int</span> *L = <span class="keyword">new</span> <span class="keywordtype">int</span>[n1], *R = <span class="keyword">new</span> <span class="keywordtype">int</span>[n2];</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; <span class="keywordflow">for</span> (i = 0; i &lt; n1; i++) L[i] = arr[l + i];</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keywordflow">for</span> (j = 0; j &lt; n2; j++) R[j] = arr[m + 1 + j];</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; i = 0;</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; j = 0;</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; k = l;</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keywordflow">while</span> (i &lt; n1 || j &lt; n2) {</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="keywordflow">if</span> (j &gt;= n2 || (i &lt; n1 &amp;&amp; L[i] &lt;= R[j])) {</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; arr[k] = L[i];</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; i++;</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; arr[k] = R[j];</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; j++;</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; }</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; k++;</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; }</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keyword">delete</span>[] L;</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="keyword">delete</span>[] R;</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordtype">int</span> i, j, k;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordtype">int</span> n1 = m - l + 1;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordtype">int</span> n2 = r - m;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordtype">int</span> *L = <span class="keyword">new</span> <span class="keywordtype">int</span>[n1], *R = <span class="keyword">new</span> <span class="keywordtype">int</span>[n2];</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">for</span> (i = 0; i &lt; n1; i++) L[i] = arr[l + i];</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">for</span> (j = 0; j &lt; n2; j++) R[j] = arr[m + 1 + j];</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> i = 0;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> j = 0;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> k = l;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">while</span> (i &lt; n1 || j &lt; n2) {</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">if</span> (j &gt;= n2 || (i &lt; n1 &amp;&amp; L[i] &lt;= R[j])) {</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> arr[k] = L[i];</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> i++;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> arr[k] = R[j];</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> j++;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> }</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> k++;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> }</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">delete</span>[] L;</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keyword">delete</span>[] R;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="gab6b14fea48d9841e29b9fc26be6e05d7"></a>
<a id="gab6b14fea48d9841e29b9fc26be6e05d7" name="gab6b14fea48d9841e29b9fc26be6e05d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab6b14fea48d9841e29b9fc26be6e05d7">&#9670;&nbsp;</a></span>mergeSort()</h2>
<div class="memitem">
@@ -398,7 +455,7 @@ template&lt;typename T &gt; </div>
</tr>
</table>
</div><div class="memdoc">
<p>Merge sort is a divide and conquer algorithm, it divides the input array into two halves and calls itself for the two halves and then calls <a class="el" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge()</a> to merge the two halves</p>
<p >Merge sort is a divide and conquer algorithm, it divides the input array into two halves and calls itself for the two halves and then calls <a class="el" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge()</a> to merge the two halves</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">arr</td><td>- array to be sorted </td></tr>
@@ -407,25 +464,25 @@ template&lt;typename T &gt; </div>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; {</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keywordflow">if</span> (l &lt; r) {</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keywordtype">int</span> m = l + (r - l) / 2;</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <a class="code" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort</a>(arr, l, m);</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <a class="code" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort</a>(arr, m + 1, r);</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <a class="code" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge</a>(arr, l, m, r);</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; }</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> {</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">if</span> (l &lt; r) {</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordtype">int</span> m = l + (r - l) / 2;</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_function" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort</a>(arr, l, m);</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_function" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort</a>(arr, m + 1, r);</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <a class="code hl_function" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge</a>(arr, l, m, r);</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> }</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>}</div>
<div class="ttc" id="agroup__sorting_html_ga460c61cd948203b4816bef2accb3fc73"><div class="ttname"><a href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge</a></div><div class="ttdeci">void merge(int *arr, int l, int m, int r)</div><div class="ttdef"><b>Definition:</b> merge_sort.cpp:33</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="../../d5/d4c/group__sorting_gab6b14fea48d9841e29b9fc26be6e05d7_cgraph.svg" width="203" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d5/d4c/group__sorting_gab6b14fea48d9841e29b9fc26be6e05d7_cgraph.svg" width="203" height="62"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="ga0a9a57a1f1bbba3d4822531d002b7e07"></a>
<a id="ga0a9a57a1f1bbba3d4822531d002b7e07" name="ga0a9a57a1f1bbba3d4822531d002b7e07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0a9a57a1f1bbba3d4822531d002b7e07">&#9670;&nbsp;</a></span>show()</h2>
<div class="memitem">
@@ -450,15 +507,15 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p>Utility function used to print the array after sorting </p>
<div class="fragment"><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; {</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; i++) <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; arr[i] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;}</div>
<p >Utility function used to print the array after sorting </p>
<div class="fragment"><div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> {</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; i++) <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; arr[i] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</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;\n&quot;</span>;</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="gaa8dca7b867074164d5f45b0f3851269d"></a>
<a id="gaa8dca7b867074164d5f45b0f3851269d" name="gaa8dca7b867074164d5f45b0f3851269d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa8dca7b867074164d5f45b0f3851269d">&#9670;&nbsp;</a></span>test()</h2>
<div class="memitem">
@@ -480,26 +537,26 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p>Test function </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; {</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a>(<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a>(<span class="keyword">nullptr</span>)); <span class="comment">// initialize random number generator</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;float&gt;</a> data1(100);</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> &amp;d : data1) { <span class="comment">// generate random numbers between -5.0 and 4.99</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; d = float(<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 1000 - 500) / 100.f;</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; }</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; </div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;float&gt;</a> sorted = sorting::wiggle_sort::wiggleSort&lt;float&gt;(data1);</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <a class="code" href="../../d5/d4c/group__sorting.html#ga135e4c638e3bcf548bd122b5f49a3e72">displayElements</a>(sorted);</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="keywordflow">for</span> (uint32_t j = 0; j &lt; data1.size(); j += 2) {</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; assert(data1[j] &lt;= data1[j + 1] &amp;&amp;</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; data1[j + 1] &gt;= data1[j + 2]); <span class="comment">// check the validation condition</span></div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; }</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 1 passed\n&quot;</span>;</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;}</div>
<p >Test function </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> {</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a>(<span class="keyword">nullptr</span>)); <span class="comment">// initialize random number generator</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;float&gt;</a> data1(100);</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &amp;d : data1) { <span class="comment">// generate random numbers between -5.0 and 4.99</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> d = float(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 1000 - 500) / 100.f;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> }</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;float&gt;</a> sorted = sorting::wiggle_sort::wiggleSort&lt;float&gt;(data1);</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <a class="code hl_function" href="../../d5/d4c/group__sorting.html#ga135e4c638e3bcf548bd122b5f49a3e72">displayElements</a>(sorted);</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> </div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">for</span> (uint32_t j = 0; j &lt; data1.size(); j += 2) {</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> assert(data1[j] &lt;= data1[j + 1] &amp;&amp;</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> data1[j + 1] &gt;= data1[j + 2]); <span class="comment">// check the validation condition</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> }</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> </div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</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;Test 1 passed\n&quot;</span>;</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span>}</div>
<div class="ttc" id="agroup__sorting_html_ga135e4c638e3bcf548bd122b5f49a3e72"><div class="ttname"><a href="../../d5/d4c/group__sorting.html#ga135e4c638e3bcf548bd122b5f49a3e72">displayElements</a></div><div class="ttdeci">static void displayElements(const std::vector&lt; T &gt; &amp;arr)</div><div class="ttdoc">Utility function used for printing the elements. Prints elements of the array after they're sorted us...</div><div class="ttdef"><b>Definition:</b> wiggle_sort.cpp:85</div></div>
<div class="ttc" id="arand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a></div><div class="ttdeci">T rand(T... args)</div></div>
<div class="ttc" id="asrand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a></div><div class="ttdeci">T srand(T... args)</div></div>
@@ -519,7 +576,7 @@ Here is the call graph for this function:</div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -2,6 +2,7 @@ var group__sorting =
[
[ "merge_sort.cpp", "d5/df4/merge__sort_8cpp.html", null ],
[ "wiggle_sort.cpp", "d1/dcc/wiggle__sort_8cpp.html", null ],
[ "sorting", "d5/d91/namespacesorting.html", null ],
[ "displayElements", "d5/d4c/group__sorting.html#ga135e4c638e3bcf548bd122b5f49a3e72", null ],
[ "heapSort", "d5/d4c/group__sorting.html#ga29d28b140174dbdde7c9f5157758435f", null ],
[ "main", "d5/d4c/group__sorting.html#gae66f6b31b5ad750f1fe042a706a4e3d4", null ],

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: test Pages: 1 -->
<svg width="166pt" height="180pt"

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -1,4 +1,4 @@
<map id="mergeSort" name="mergeSort">
<area shape="rect" id="node1" title=" " alt="" coords="5,5,89,32"/>
<area shape="rect" id="node2" href="$d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73" title=" " alt="" coords="137,5,197,32"/>
<area shape="rect" id="node1" title=" " alt="" coords="5,29,89,56"/>
<area shape="rect" id="node2" href="$d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73" title=" " alt="" coords="137,29,197,56"/>
</map>

View File

@@ -1 +1 @@
79bf9141a6580825262267deef7601e1
33a909d64e74e94c0c84658d6f7d9227

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: mergeSort Pages: 1 -->
<svg width="152pt" height="28pt"
viewBox="0.00 0.00 152.00 28.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 24)">
<svg width="152pt" height="46pt"
viewBox="0.00 0.00 152.00 46.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 42)">
<title>mergeSort</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-24 148,-24 148,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-42 148,-42 148,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
@@ -18,6 +18,12 @@
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M17.63,-19.76C10.88,-28.57 15.5,-38 31.5,-38 41.5,-38 47.05,-34.31 48.17,-29.4"/>
<polygon fill="midnightblue" stroke="midnightblue" points="51.52,-28.39 45.37,-19.76 44.79,-30.34 51.52,-28.39"/>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: Member List</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -90,23 +90,22 @@ $(document).ready(function(){initNavTree('d6/d45/structciphers_1_1elliptic__curv
</div>
<div class="header">
<div class="headertitle">
<div class="title">ciphers::elliptic_curve_key_exchange::Point Member List</div> </div>
<div class="headertitle"><div class="title">ciphers::elliptic_curve_key_exchange::Point Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html#a8235ac3f9400bd3c0364fc99a27f3eb8">operator&lt;&lt;</a>(std::ostream &amp;op, const Point &amp;p)</td><td class="entry"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html#a5084e9ca27837662c31d4dc003815446">operator==</a>(const Point &amp;p)</td><td class="entry"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html#af2142b27241b28f835e8ce78d7d6463c">operator&lt;&lt;</a></td><td class="entry"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html#a5084e9ca27837662c31d4dc003815446">operator==</a>(const Point &amp;p)</td><td class="entry"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>x</b> (defined in <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a>)</td><td class="entry"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>y</b> (defined in <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a>)</td><td class="entry"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>y</b> (defined in <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a>)</td><td class="entry"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: Member List</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d0/d58/classgraph_1_1_rooted_tree.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -90,31 +90,30 @@ $(document).ready(function(){initNavTree('d0/d58/classgraph_1_1_rooted_tree.html
</div>
<div class="header">
<div class="headertitle">
<div class="title">graph::RootedTree Member List</div> </div>
<div class="headertitle"><div class="title">graph::RootedTree Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html">graph::RootedTree</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(T u, T v, bool bidir=true)</td><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html#acebf0505d625b043bb9c8c27c7a8def0">adjacency_list</a></td><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html#ab1a1a96cd4cddf0d4feb02855c4c16af">breadth_first_search</a>(T src)</td><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>Graph</b>()=default (defined in <a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a>)</td><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html#acebf0505d625b043bb9c8c27c7a8def0">adjacency_list</a></td><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981">breadth_first_search</a>(T src)</td><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>Graph</b>()=default (defined in <a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a>)</td><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html#a8839fa14bff19d2deab4a618447c13e5">Graph</a>(size_t N, const std::vector&lt; std::pair&lt; int, int &gt; &gt; &amp;undirected_edges)</td><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a2ee3ad1161ac2532da30c3e22c265ad3">level</a></td><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html">graph::RootedTree</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a2ee3ad1161ac2532da30c3e22c265ad3">level</a></td><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html">graph::RootedTree</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html#a59940c462861f2fcf4951d1b6c084e6a">neighbors</a></td><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html#a8930d1470d132b19e430d1c71f94c904">number_of_vertices</a>() const</td><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html#a8930d1470d132b19e430d1c71f94c904">number_of_vertices</a>() const</td><td class="entry"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a3831583a91914988897a4cc8748fda43">parent</a></td><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html">graph::RootedTree</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ae6928f3ebd491541e9570e746b877c1e">populate_parents</a>()</td><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html">graph::RootedTree</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">protected</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ae6928f3ebd491541e9570e746b877c1e">populate_parents</a>()</td><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html">graph::RootedTree</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">protected</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">root</a></td><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html">graph::RootedTree</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html#aacdeecac857623e9fbfe92590f3c504d">RootedTree</a>(const std::vector&lt; std::pair&lt; int, int &gt; &gt; &amp;undirected_edges, int root_)</td><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html">graph::RootedTree</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html#aacdeecac857623e9fbfe92590f3c504d">RootedTree</a>(const std::vector&lt; std::pair&lt; int, int &gt; &gt; &amp;undirected_edges, int root_)</td><td class="entry"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html">graph::RootedTree</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: TestCases::log Pages: 1 -->
<svg width="180pt" height="28pt"

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: TestCases::testCase_2 Pages: 1 -->
<svg width="335pt" height="104pt"

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: TestCases::testCase_1 Pages: 1 -->
<svg width="335pt" height="104pt"

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: TestCases::testCase_3 Pages: 1 -->
<svg width="335pt" height="104pt"

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: TestCases::runTests Pages: 1 -->
<svg width="478pt" height="142pt"

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: range_queries/persistent_seg_tree_lazy_prop.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d58/persistent__seg__tree__lazy__prop_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -94,12 +94,11 @@ $(document).ready(function(){initNavTree('d5/d58/persistent__seg__tree__lazy__pr
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">persistent_seg_tree_lazy_prop.cpp File Reference</div> </div>
<div class="headertitle"><div class="title">persistent_seg_tree_lazy_prop.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<p><a href="https://en.wikipedia.org/wiki/Persistent_data_structure">Persistent segment tree with range updates (lazy propagation)</a>
<p><a href="https://en.wikipedia.org/wiki/Persistent_data_structure" target="_blank">Persistent segment tree with range updates (lazy propagation)</a>
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;memory&gt;</code><br />
@@ -111,7 +110,7 @@ Include dependency graph for persistent_seg_tree_lazy_prop.cpp:</div>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
<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="../../d8/d28/classrange__queries_1_1per_seg_tree.html">range_queries::perSegTree</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Range query here is range sum, but the code can be modified to make different queries like range max or min. <a href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#details">More...</a><br /></td></tr>
@@ -119,13 +118,13 @@ 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="../../d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html">range_queries::perSegTree::Node</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:dd/d69/namespacerange__queries"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d69/namespacerange__queries.html">range_queries</a></td></tr>
<tr class="memitem:dd/d69/namespacerange__queries"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d69/namespacerange__queries.html">range_queries</a></td></tr>
<tr class="memdesc:dd/d69/namespacerange__queries"><td class="mdescLeft">&#160;</td><td class="mdescRight">Algorithms and Data Structures that support range queries and updates. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d58/persistent__seg__tree__lazy__prop_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test implementations. <a href="../../d5/d58/persistent__seg__tree__lazy__prop_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">More...</a><br /></td></tr>
@@ -135,11 +134,11 @@ Functions</h2></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a href="https://en.wikipedia.org/wiki/Persistent_data_structure">Persistent segment tree with range updates (lazy propagation)</a> </p>
<p>A normal segment tree facilitates making point updates and range queries in logarithmic time. Lazy propagation preserves the logarithmic time with range updates. So, a segment tree with lazy propagation enables doing range updates and range queries in logarithmic time, but it doesn't save any information about itself before the last update. A persistent data structure always preserves the previous version of itself when it is modified. That is, a new version of the segment tree is generated after every update. It saves all previous versions of itself (before every update) to facilitate doing range queries in any version. More memory is used ,but the logarithmic time is preserved because the new version points to the same nodes, that the previous version points to, that are not affected by the update. That is, only the nodes that are affected by the update and their ancestors are copied. The rest is copied using lazy propagation in the next queries. Thus preserving the logarithmic time because the number of nodes copied after any update is logarithmic.</p>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/MSedra">Magdy Sedra</a> </dd></dl>
<div class="textblock"><p ><a href="https://en.wikipedia.org/wiki/Persistent_data_structure" target="_blank">Persistent segment tree with range updates (lazy propagation)</a> </p>
<p >A normal segment tree facilitates making point updates and range queries in logarithmic time. Lazy propagation preserves the logarithmic time with range updates. So, a segment tree with lazy propagation enables doing range updates and range queries in logarithmic time, but it doesn't save any information about itself before the last update. A persistent data structure always preserves the previous version of itself when it is modified. That is, a new version of the segment tree is generated after every update. It saves all previous versions of itself (before every update) to facilitate doing range queries in any version. More memory is used ,but the logarithmic time is preserved because the new version points to the same nodes, that the previous version points to, that are not affected by the update. That is, only the nodes that are affected by the update and their ancestors are copied. The rest is copied using lazy propagation in the next queries. Thus preserving the logarithmic time because the number of nodes copied after any update is logarithmic.</p>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/MSedra" target="_blank">Magdy Sedra</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
@@ -157,21 +156,21 @@ Functions</h2></td></tr>
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; {</div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; <a class="code" href="../../d5/d58/persistent__seg__tree__lazy__prop_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> {</div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> <a class="code hl_function" href="../../d5/d58/persistent__seg__tree__lazy__prop_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span>}</div>
<div class="ttc" id="apersistent__seg__tree__lazy__prop_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../d5/d58/persistent__seg__tree__lazy__prop_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Test implementations.</div><div class="ttdef"><b>Definition:</b> persistent_seg_tree_lazy_prop.cpp:268</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d5/d58/persistent__seg__tree__lazy__prop_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="100%" height="525"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d5/d58/persistent__seg__tree__lazy__prop_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="100%" height="579"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
</div>
<a id="aa8dca7b867074164d5f45b0f3851269d"></a>
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8dca7b867074164d5f45b0f3851269d">&#9670;&nbsp;</a></span>test()</h2>
<div class="memitem">
@@ -196,63 +195,63 @@ Here is the call graph for this function:</div>
<p>Test implementations. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; {</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int64_t&gt;</a> arr = {-5, 2, 3, 11, -2, 7, 0, 1};</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; <a class="code" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html">range_queries::perSegTree</a> tree;</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Elements before any updates are {&quot;</span>;</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; arr.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>(); ++i) {</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; arr[i];</div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <span class="keywordflow">if</span> (i != arr.size() - 1) {</div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;,&quot;</span>;</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; }</div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; }</div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;}\n&quot;</span>;</div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; tree.<a class="code" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a67d8371bc998c67d53e8f64db4f52767">construct</a>(</div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; arr); <span class="comment">// constructing the original segment tree (version = 0)</span></div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Querying range sum on version 0 from index 2 to 4 = 3+11-2 = &quot;</span></div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; &lt;&lt; tree.<a class="code" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4">query</a>(2, 4, 0) &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; &lt;&lt; <span class="stringliteral">&quot;Subtract 7 from all elements from index 1 to index 5 inclusive\n&quot;</span>;</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; tree.<a class="code" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#af16c0c87b29119f066041d6e71ab50e0">update</a>(1, 5, -7); <span class="comment">// subtracting 7 from index 1 to index 5</span></div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Elements of the segment tree whose version = 1 (after 1 &quot;</span></div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; <span class="stringliteral">&quot;update) are {&quot;</span>;</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; arr.size(); ++i) {</div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; tree.<a class="code" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4">query</a>(i, i, 1);</div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; <span class="keywordflow">if</span> (i != arr.size() - 1) {</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;,&quot;</span>;</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; }</div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; }</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;}\n&quot;</span>;</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Add 10 to all elements from index 0 to index 7 inclusive\n&quot;</span>;</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; tree.<a class="code" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#af16c0c87b29119f066041d6e71ab50e0">update</a>(0, 7, 10); <span class="comment">// adding 10 to all elements</span></div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Elements of the segment tree whose version = 2 (after 2 &quot;</span></div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <span class="stringliteral">&quot;updates) are {&quot;</span>;</div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; arr.size(); ++i) {</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; tree.<a class="code" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4">query</a>(i, i, 2);</div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; <span class="keywordflow">if</span> (i != arr.size() - 1) {</div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;,&quot;</span>;</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; }</div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; }</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;}\n&quot;</span>;</div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Number of segment trees (versions) now = &quot;</span> &lt;&lt; tree.<a class="code" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a0fe4e431f3e09c274ecd7d2d58dcb865">size</a>()</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Querying range sum on version 0 from index 3 to 5 = 11-2+7 = &quot;</span></div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; &lt;&lt; tree.<a class="code" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4">query</a>(3, 5, 0) &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Querying range sum on version 1 from index 3 to 5 = 4-9+0 = &quot;</span></div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; &lt;&lt; tree.<a class="code" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4">query</a>(3, 5, 1) &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> {</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int64_t&gt;</a> arr = {-5, 2, 3, 11, -2, 7, 0, 1};</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <a class="code hl_class" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html">range_queries::perSegTree</a> tree;</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</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;Elements before any updates are {&quot;</span>;</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>(); ++i) {</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; arr[i];</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <span class="keywordflow">if</span> (i != arr.size() - 1) {</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</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;,&quot;</span>;</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> }</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> }</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</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;}\n&quot;</span>;</div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> tree.<a class="code hl_function" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a6d3f2465a7c5803a1ff16c5378bcc5e4">construct</a>(</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> arr); <span class="comment">// constructing the original segment tree (version = 0)</span></div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</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;Querying range sum on version 0 from index 2 to 4 = 3+11-2 = &quot;</span></div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> &lt;&lt; tree.<a class="code hl_function" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4">query</a>(2, 4, 0) &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> &lt;&lt; <span class="stringliteral">&quot;Subtract 7 from all elements from index 1 to index 5 inclusive\n&quot;</span>;</div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> tree.<a class="code hl_function" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a24487eda25123bc4d112e8430821a6c6">update</a>(1, 5, -7); <span class="comment">// subtracting 7 from index 1 to index 5</span></div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</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;Elements of the segment tree whose version = 1 (after 1 &quot;</span></div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> <span class="stringliteral">&quot;update) are {&quot;</span>;</div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; arr.size(); ++i) {</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; tree.<a class="code hl_function" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4">query</a>(i, i, 1);</div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> <span class="keywordflow">if</span> (i != arr.size() - 1) {</div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</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;,&quot;</span>;</div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> }</div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> }</div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</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;}\n&quot;</span>;</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</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;Add 10 to all elements from index 0 to index 7 inclusive\n&quot;</span>;</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> tree.<a class="code hl_function" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a24487eda25123bc4d112e8430821a6c6">update</a>(0, 7, 10); <span class="comment">// adding 10 to all elements</span></div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</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;Elements of the segment tree whose version = 2 (after 2 &quot;</span></div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> <span class="stringliteral">&quot;updates) are {&quot;</span>;</div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; arr.size(); ++i) {</div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; tree.<a class="code hl_function" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4">query</a>(i, i, 2);</div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> <span class="keywordflow">if</span> (i != arr.size() - 1) {</div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</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;,&quot;</span>;</div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> }</div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> }</div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</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;}\n&quot;</span>;</div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</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;Number of segment trees (versions) now = &quot;</span> &lt;&lt; tree.<a class="code hl_function" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a0fe4e431f3e09c274ecd7d2d58dcb865">size</a>()</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</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;Querying range sum on version 0 from index 3 to 5 = 11-2+7 = &quot;</span></div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> &lt;&lt; tree.<a class="code hl_function" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4">query</a>(3, 5, 0) &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</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;Querying range sum on version 1 from index 3 to 5 = 4-9+0 = &quot;</span></div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> &lt;&lt; tree.<a class="code hl_function" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4">query</a>(3, 5, 1) &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</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="aclassrange__queries_1_1per_seg_tree_html"><div class="ttname"><a href="../../d8/d28/classrange__queries_1_1per_seg_tree.html">range_queries::perSegTree</a></div><div class="ttdoc">Range query here is range sum, but the code can be modified to make different queries like range max ...</div><div class="ttdef"><b>Definition:</b> persistent_seg_tree_lazy_prop.cpp:39</div></div>
<div class="ttc" id="aclassrange__queries_1_1per_seg_tree_html_a0fe4e431f3e09c274ecd7d2d58dcb865"><div class="ttname"><a href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a0fe4e431f3e09c274ecd7d2d58dcb865">range_queries::perSegTree::size</a></div><div class="ttdeci">uint32_t size()</div><div class="ttdoc">Getting the number of versions after updates so far which is equal to the size of the pointers vector...</div><div class="ttdef"><b>Definition:</b> persistent_seg_tree_lazy_prop.cpp:255</div></div>
<div class="ttc" id="aclassrange__queries_1_1per_seg_tree_html_a67d8371bc998c67d53e8f64db4f52767"><div class="ttname"><a href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a67d8371bc998c67d53e8f64db4f52767">range_queries::perSegTree::construct</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; construct(const uint32_t &amp;i, const uint32_t &amp;j)</div><div class="ttdoc">Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum...</div><div class="ttdef"><b>Definition:</b> persistent_seg_tree_lazy_prop.cpp:106</div></div>
<div class="ttc" id="aclassrange__queries_1_1per_seg_tree_html_a24487eda25123bc4d112e8430821a6c6"><div class="ttname"><a href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a24487eda25123bc4d112e8430821a6c6">range_queries::perSegTree::update</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; update(const uint32_t &amp;i, const uint32_t &amp;j, const uint32_t &amp;l, const uint32_t &amp;r, const int64_t &amp;value, std::shared_ptr&lt; Node &gt; const &amp;curr)</div><div class="ttdoc">Doing range update, checking at every node if it has some value to be propagated. All nodes affected ...</div><div class="ttdef"><b>Definition:</b> persistent_seg_tree_lazy_prop.cpp:135</div></div>
<div class="ttc" id="aclassrange__queries_1_1per_seg_tree_html_a6d3f2465a7c5803a1ff16c5378bcc5e4"><div class="ttname"><a href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a6d3f2465a7c5803a1ff16c5378bcc5e4">range_queries::perSegTree::construct</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; construct(const uint32_t &amp;i, const uint32_t &amp;j)</div><div class="ttdoc">Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum...</div><div class="ttdef"><b>Definition:</b> persistent_seg_tree_lazy_prop.cpp:106</div></div>
<div class="ttc" id="aclassrange__queries_1_1per_seg_tree_html_ae8ae4b1835e5e8aec32f68c5059ed4d4"><div class="ttname"><a href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4">range_queries::perSegTree::query</a></div><div class="ttdeci">int64_t query(const uint32_t &amp;i, const uint32_t &amp;j, const uint32_t &amp;l, const uint32_t &amp;r, std::shared_ptr&lt; Node &gt; const &amp;curr)</div><div class="ttdoc">Querying the range from index l to index r, checking at every node if it has some value to be propaga...</div><div class="ttdef"><b>Definition:</b> persistent_seg_tree_lazy_prop.cpp:171</div></div>
<div class="ttc" id="aclassrange__queries_1_1per_seg_tree_html_af16c0c87b29119f066041d6e71ab50e0"><div class="ttname"><a href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#af16c0c87b29119f066041d6e71ab50e0">range_queries::perSegTree::update</a></div><div class="ttdeci">std::shared_ptr&lt; Node &gt; update(const uint32_t &amp;i, const uint32_t &amp;j, const uint32_t &amp;l, const uint32_t &amp;r, const int64_t &amp;value, std::shared_ptr&lt; Node &gt; const &amp;curr)</div><div class="ttdoc">Doing range update, checking at every node if it has some value to be propagated. All nodes affected ...</div><div class="ttdef"><b>Definition:</b> persistent_seg_tree_lazy_prop.cpp:135</div></div>
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(T... args)</div></div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt; int64_t &gt;</a></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"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d5/d58/persistent__seg__tree__lazy__prop_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="100%" height="525"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d5/d58/persistent__seg__tree__lazy__prop_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="100%" height="579"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
@@ -264,7 +263,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_074119ce3a874b57120c49a0cc4bb5ad.html">range_queries</a></li><li class="navelem"><a class="el" href="../../d5/d58/persistent__seg__tree__lazy__prop_8cpp.html">persistent_seg_tree_lazy_prop.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,7 +1,7 @@
var persistent__seg__tree__lazy__prop_8cpp =
[
[ "perSegTree", "d8/d28/classrange__queries_1_1per_seg_tree.html", "d8/d28/classrange__queries_1_1per_seg_tree" ],
[ "Node", "d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html", "d5/d66/classrange__queries_1_1per_seg_tree_1_1_node" ],
[ "range_queries::perSegTree", "d8/d28/classrange__queries_1_1per_seg_tree.html", "d8/d28/classrange__queries_1_1per_seg_tree" ],
[ "range_queries::perSegTree::Node", "d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html", "d5/d66/classrange__queries_1_1per_seg_tree_1_1_node" ],
[ "main", "d5/d58/persistent__seg__tree__lazy__prop_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
[ "test", "d5/d58/persistent__seg__tree__lazy__prop_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]
];

View File

@@ -1,10 +1,10 @@
<map id="test" name="test">
<area shape="rect" id="node1" title="Test implementations." alt="" coords="5,137,49,163"/>
<area shape="rect" id="node2" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#a67d8371bc998c67d53e8f64db4f52767" title="Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum..." alt="" coords="97,5,281,47"/>
<area shape="rect" id="node3" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4" title="Querying the range from index l to index r, checking at every node if it has some value to be propaga..." alt="" coords="97,188,281,229"/>
<area shape="rect" id="node6" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#a0fe4e431f3e09c274ecd7d2d58dcb865" title="Getting the number of versions after updates so far which is equal to the size of the pointers vector..." alt="" coords="97,71,281,112"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="364,107,479,134"/>
<area shape="rect" id="node8" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#af16c0c87b29119f066041d6e71ab50e0" title="Doing range update, checking at every node if it has some value to be propagated. All nodes affected ..." alt="" coords="97,253,281,295"/>
<area shape="rect" id="node4" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#ace7f57935b3bb9446f11c239fd89ae79" title="If there is some value to be propagated to the passed node, value is added to the node and the childr..." alt="" coords="329,195,513,236"/>
<area shape="rect" id="node5" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#acacb937f95a078a236a4a58f9630a045" title="Creating a new node with the same values of curr node." alt="" coords="561,224,745,265"/>
<area shape="rect" id="node1" title="Test implementations." alt="" coords="5,191,49,218"/>
<area shape="rect" id="node2" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#a6d3f2465a7c5803a1ff16c5378bcc5e4" title="Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum..." alt="" coords="97,29,281,71"/>
<area shape="rect" id="node3" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4" title="Querying the range from index l to index r, checking at every node if it has some value to be propaga..." alt="" coords="97,119,281,160"/>
<area shape="rect" id="node6" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#a0fe4e431f3e09c274ecd7d2d58dcb865" title="Getting the number of versions after updates so far which is equal to the size of the pointers vector..." alt="" coords="97,184,281,225"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="132,250,247,277"/>
<area shape="rect" id="node8" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#a24487eda25123bc4d112e8430821a6c6" title="Doing range update, checking at every node if it has some value to be propagated. All nodes affected ..." alt="" coords="97,325,281,367"/>
<area shape="rect" id="node4" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#ace7f57935b3bb9446f11c239fd89ae79" title="If there is some value to be propagated to the passed node, value is added to the node and the childr..." alt="" coords="329,267,513,308"/>
<area shape="rect" id="node5" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#a0cec4b77d264521717cf9b0482c45817" title="Creating a new node with the same values of curr node." alt="" coords="561,296,745,337"/>
</map>

View File

@@ -1 +1 @@
ec856ef8be7199a44c3ec6193965f4dc
853d97163e3d210d69c130ead5f4b73f

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: test Pages: 1 -->
<!--zoomable 225 -->
<!--zoomable 279 -->
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" onload="init(evt)">
<style type="text/css"><![CDATA[
.edge:hover path { stroke: red; }
@@ -47,90 +47,90 @@ if (edges && edges.length) {
<script type="text/javascript">
var viewWidth = 563;
var viewHeight = 225;
var viewHeight = 279;
var sectionId = 'dynsection-2';
</script>
<script xlink:href="../../svgpan.js"/>
<svg id="graph" class="graph">
<g id="viewport">
<title>test</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-221 559,-221 559,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-275 559,-275 559,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Test implementations.">
<polygon fill="#bfbfbf" stroke="black" points="0,-99 0,-118 33,-118 33,-99 0,-99"/>
<text text-anchor="middle" x="16.5" y="-106" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
<polygon fill="#bfbfbf" stroke="black" points="0,-112 0,-131 33,-131 33,-112 0,-112"/>
<text text-anchor="middle" x="16.5" y="-119" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a67d8371bc998c67d53e8f64db4f52767" target="_top" xlink:title="Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum...">
<polygon fill="white" stroke="black" points="69,-186.5 69,-216.5 207,-216.5 207,-186.5 69,-186.5"/>
<text text-anchor="start" x="77" y="-204.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-193.5" font-family="Helvetica,sans-Serif" font-size="10.00">::construct</text>
<g id="a_node2"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a6d3f2465a7c5803a1ff16c5378bcc5e4" target="_top" xlink:title="Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum...">
<polygon fill="white" stroke="black" points="69,-222.5 69,-252.5 207,-252.5 207,-222.5 69,-222.5"/>
<text text-anchor="start" x="77" y="-240.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-229.5" font-family="Helvetica,sans-Serif" font-size="10.00">::construct</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M22.43,-118.42C30.3,-133.3 47.09,-161.37 69,-177.5 70.88,-178.89 72.86,-180.2 74.89,-181.44"/>
<polygon fill="midnightblue" stroke="midnightblue" points="73.7,-184.77 84.16,-186.44 77.02,-178.61 73.7,-184.77"/>
<path fill="none" stroke="midnightblue" d="M20.32,-131.05C26.27,-149.59 41.84,-190.63 69,-213.5 70.51,-214.77 72.09,-215.97 73.73,-217.12"/>
<polygon fill="midnightblue" stroke="midnightblue" points="71.96,-220.14 82.32,-222.33 75.58,-214.15 71.96,-220.14"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4" target="_top" xlink:title="Querying the range from index l to index r, checking at every node if it has some value to be propaga...">
<polygon fill="white" stroke="black" points="69,-49.5 69,-79.5 207,-79.5 207,-49.5 69,-49.5"/>
<text text-anchor="start" x="77" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-56.5" font-family="Helvetica,sans-Serif" font-size="10.00">::query</text>
<polygon fill="white" stroke="black" points="69,-155.5 69,-185.5 207,-185.5 207,-155.5 69,-155.5"/>
<text text-anchor="start" x="77" y="-173.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-162.5" font-family="Helvetica,sans-Serif" font-size="10.00">::query</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M33.12,-102.75C46.76,-97.73 67.33,-90.15 86.58,-83.07"/>
<polygon fill="midnightblue" stroke="midnightblue" points="88,-86.27 96.18,-79.53 85.58,-79.7 88,-86.27"/>
<path fill="none" stroke="midnightblue" d="M33.07,-129.62C43.18,-134.76 56.71,-141.37 69,-146.5 73.39,-148.33 77.97,-150.15 82.6,-151.92"/>
<polygon fill="midnightblue" stroke="midnightblue" points="81.51,-155.25 92.1,-155.46 83.95,-148.69 81.51,-155.25"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a0fe4e431f3e09c274ecd7d2d58dcb865" target="_top" xlink:title="Getting the number of versions after updates so far which is equal to the size of the pointers vector...">
<polygon fill="white" stroke="black" points="69,-137.5 69,-167.5 207,-167.5 207,-137.5 69,-137.5"/>
<text text-anchor="start" x="77" y="-155.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-144.5" font-family="Helvetica,sans-Serif" font-size="10.00">::size</text>
<polygon fill="white" stroke="black" points="69,-106.5 69,-136.5 207,-136.5 207,-106.5 69,-106.5"/>
<text text-anchor="start" x="77" y="-124.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-113.5" font-family="Helvetica,sans-Serif" font-size="10.00">::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<g id="edge7" class="edge">
<title>Node1&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M33.12,-114.25C46.76,-119.27 67.33,-126.85 86.58,-133.93"/>
<polygon fill="midnightblue" stroke="midnightblue" points="85.58,-137.3 96.18,-137.47 88,-130.73 85.58,-137.3"/>
<path fill="none" stroke="midnightblue" d="M33.12,-121.5C40.17,-121.5 49.06,-121.5 58.66,-121.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="58.88,-125 68.88,-121.5 58.88,-118 58.88,-125"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="269,-121 269,-140 355,-140 355,-121 269,-121"/>
<text text-anchor="middle" x="312" y="-128" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
<polygon fill="white" stroke="black" points="95,-68 95,-87 181,-87 181,-68 95,-68"/>
<text text-anchor="middle" x="138" y="-75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node7 -->
<g id="edge7" class="edge">
<g id="edge8" class="edge">
<title>Node1&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M33.28,-109.68C75.18,-112.82 190.7,-121.48 258.83,-126.59"/>
<polygon fill="midnightblue" stroke="midnightblue" points="258.7,-130.09 268.93,-127.35 259.22,-123.11 258.7,-130.09"/>
<path fill="none" stroke="midnightblue" d="M33.02,-113.52C43.1,-108.53 56.63,-102.17 69,-97.5 76.04,-94.84 83.61,-92.31 91.03,-90"/>
<polygon fill="midnightblue" stroke="midnightblue" points="92.11,-93.33 100.67,-87.09 90.09,-86.63 92.11,-93.33"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#af16c0c87b29119f066041d6e71ab50e0" target="_top" xlink:title="Doing range update, checking at every node if it has some value to be propagated. All nodes affected ...">
<g id="a_node8"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a24487eda25123bc4d112e8430821a6c6" target="_top" xlink:title="Doing range update, checking at every node if it has some value to be propagated. All nodes affected ...">
<polygon fill="white" stroke="black" points="69,-0.5 69,-30.5 207,-30.5 207,-0.5 69,-0.5"/>
<text text-anchor="start" x="77" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::update</text>
@@ -138,10 +138,22 @@ var sectionId = 'dynsection-2';
</g>
</g>
<!-- Node1&#45;&gt;Node8 -->
<g id="edge8" class="edge">
<g id="edge9" class="edge">
<title>Node1&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M22.43,-98.58C30.3,-83.7 47.09,-55.63 69,-39.5 70.88,-38.11 72.86,-36.8 74.89,-35.56"/>
<polygon fill="midnightblue" stroke="midnightblue" points="77.02,-38.39 84.16,-30.56 73.7,-32.23 77.02,-38.39"/>
<path fill="none" stroke="midnightblue" d="M23.99,-111.72C33.02,-98.58 50.38,-74.98 69,-58.5 78.4,-50.18 89.57,-42.41 100.12,-35.82"/>
<polygon fill="midnightblue" stroke="midnightblue" points="102.04,-38.75 108.78,-30.57 98.42,-32.76 102.04,-38.75"/>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M117.09,-252.66C112.04,-262.06 119.02,-271 138,-271 149.57,-271 156.68,-267.68 159.32,-262.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="162.81,-262.51 158.91,-252.66 155.81,-262.79 162.81,-262.51"/>
</g>
<!-- Node3&#45;&gt;Node3 -->
<g id="edge6" class="edge">
<title>Node3&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M117.09,-185.66C112.04,-195.06 119.02,-204 138,-204 149.57,-204 156.68,-200.68 159.32,-195.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="162.81,-195.51 158.91,-185.66 155.81,-195.79 162.81,-195.51"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
@@ -154,15 +166,15 @@ var sectionId = 'dynsection-2';
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<g id="edge4" class="edge">
<title>Node3&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M207.47,-62.51C215.73,-62.27 224.22,-62.02 232.6,-61.78"/>
<polygon fill="midnightblue" stroke="midnightblue" points="232.87,-65.27 242.76,-61.48 232.66,-58.28 232.87,-65.27"/>
<path fill="none" stroke="midnightblue" d="M188.59,-155.36C194.94,-152.74 201.24,-149.79 207,-146.5 238.24,-128.7 269.22,-101.17 289.13,-81.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="291.79,-84.16 296.45,-74.65 286.87,-79.17 291.79,-84.16"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#acacb937f95a078a236a4a58f9630a045" target="_top" xlink:title="Creating a new node with the same values of curr node.">
<g id="a_node5"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a0cec4b77d264521717cf9b0482c45817" target="_top" xlink:title="Creating a new node with the same values of curr node.">
<polygon fill="white" stroke="black" points="417,-22.5 417,-52.5 555,-52.5 555,-22.5 417,-22.5"/>
<text text-anchor="start" x="425" y="-40.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="486" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">::newKid</text>
@@ -170,29 +182,29 @@ var sectionId = 'dynsection-2';
</g>
</g>
<!-- Node4&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<g id="edge5" class="edge">
<title>Node4&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M381.47,-50.74C389.73,-49.69 398.22,-48.6 406.6,-47.53"/>
<polygon fill="midnightblue" stroke="midnightblue" points="407.29,-50.97 416.76,-46.23 406.4,-44.03 407.29,-50.97"/>
</g>
<!-- Node6&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node6&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M207.47,-143.74C224.46,-141.57 242.39,-139.28 258.48,-137.22"/>
<polygon fill="midnightblue" stroke="midnightblue" points="259.28,-140.64 268.75,-135.9 258.39,-133.7 259.28,-140.64"/>
</g>
<!-- Node8&#45;&gt;Node4 -->
<g id="edge9" class="edge">
<g id="edge10" class="edge">
<title>Node8&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M197.71,-30.52C212.02,-34.18 227.46,-38.13 242.19,-41.9"/>
<polygon fill="midnightblue" stroke="midnightblue" points="241.71,-45.39 252.26,-44.47 243.44,-38.6 241.71,-45.39"/>
</g>
<!-- Node8&#45;&gt;Node5 -->
<g id="edge10" class="edge">
<g id="edge11" class="edge">
<title>Node8&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M207.36,-19.85C264.7,-23.49 346.61,-28.7 406.6,-32.52"/>
<polygon fill="midnightblue" stroke="midnightblue" points="406.58,-36.02 416.78,-33.16 407.03,-29.03 406.58,-36.02"/>
</g>
<!-- Node8&#45;&gt;Node8 -->
<g id="edge12" class="edge">
<title>Node8&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M117.09,-30.66C112.04,-40.06 119.02,-49 138,-49 149.57,-49 156.68,-45.68 159.32,-40.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="162.81,-40.51 158.91,-30.66 155.81,-40.79 162.81,-40.51"/>
</g>
</g>
</svg>
<g id="navigator" transform="translate(0 0)" fill="#404254">

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,90 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: test Pages: 1 -->
<svg width="563pt" height="225pt"
viewBox="0.00 0.00 563.00 225.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 221)">
<svg width="563pt" height="279pt"
viewBox="0.00 0.00 563.00 279.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 275)">
<title>test</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-221 559,-221 559,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-275 559,-275 559,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Test implementations.">
<polygon fill="#bfbfbf" stroke="black" points="0,-99 0,-118 33,-118 33,-99 0,-99"/>
<text text-anchor="middle" x="16.5" y="-106" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
<polygon fill="#bfbfbf" stroke="black" points="0,-112 0,-131 33,-131 33,-112 0,-112"/>
<text text-anchor="middle" x="16.5" y="-119" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a67d8371bc998c67d53e8f64db4f52767" target="_top" xlink:title="Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum...">
<polygon fill="white" stroke="black" points="69,-186.5 69,-216.5 207,-216.5 207,-186.5 69,-186.5"/>
<text text-anchor="start" x="77" y="-204.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-193.5" font-family="Helvetica,sans-Serif" font-size="10.00">::construct</text>
<g id="a_node2"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a6d3f2465a7c5803a1ff16c5378bcc5e4" target="_top" xlink:title="Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum...">
<polygon fill="white" stroke="black" points="69,-222.5 69,-252.5 207,-252.5 207,-222.5 69,-222.5"/>
<text text-anchor="start" x="77" y="-240.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-229.5" font-family="Helvetica,sans-Serif" font-size="10.00">::construct</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M22.43,-118.42C30.3,-133.3 47.09,-161.37 69,-177.5 70.88,-178.89 72.86,-180.2 74.89,-181.44"/>
<polygon fill="midnightblue" stroke="midnightblue" points="73.7,-184.77 84.16,-186.44 77.02,-178.61 73.7,-184.77"/>
<path fill="none" stroke="midnightblue" d="M20.32,-131.05C26.27,-149.59 41.84,-190.63 69,-213.5 70.51,-214.77 72.09,-215.97 73.73,-217.12"/>
<polygon fill="midnightblue" stroke="midnightblue" points="71.96,-220.14 82.32,-222.33 75.58,-214.15 71.96,-220.14"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4" target="_top" xlink:title="Querying the range from index l to index r, checking at every node if it has some value to be propaga...">
<polygon fill="white" stroke="black" points="69,-49.5 69,-79.5 207,-79.5 207,-49.5 69,-49.5"/>
<text text-anchor="start" x="77" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-56.5" font-family="Helvetica,sans-Serif" font-size="10.00">::query</text>
<polygon fill="white" stroke="black" points="69,-155.5 69,-185.5 207,-185.5 207,-155.5 69,-155.5"/>
<text text-anchor="start" x="77" y="-173.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-162.5" font-family="Helvetica,sans-Serif" font-size="10.00">::query</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M33.12,-102.75C46.76,-97.73 67.33,-90.15 86.58,-83.07"/>
<polygon fill="midnightblue" stroke="midnightblue" points="88,-86.27 96.18,-79.53 85.58,-79.7 88,-86.27"/>
<path fill="none" stroke="midnightblue" d="M33.07,-129.62C43.18,-134.76 56.71,-141.37 69,-146.5 73.39,-148.33 77.97,-150.15 82.6,-151.92"/>
<polygon fill="midnightblue" stroke="midnightblue" points="81.51,-155.25 92.1,-155.46 83.95,-148.69 81.51,-155.25"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a0fe4e431f3e09c274ecd7d2d58dcb865" target="_top" xlink:title="Getting the number of versions after updates so far which is equal to the size of the pointers vector...">
<polygon fill="white" stroke="black" points="69,-137.5 69,-167.5 207,-167.5 207,-137.5 69,-137.5"/>
<text text-anchor="start" x="77" y="-155.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-144.5" font-family="Helvetica,sans-Serif" font-size="10.00">::size</text>
<polygon fill="white" stroke="black" points="69,-106.5 69,-136.5 207,-136.5 207,-106.5 69,-106.5"/>
<text text-anchor="start" x="77" y="-124.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-113.5" font-family="Helvetica,sans-Serif" font-size="10.00">::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<g id="edge7" class="edge">
<title>Node1&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M33.12,-114.25C46.76,-119.27 67.33,-126.85 86.58,-133.93"/>
<polygon fill="midnightblue" stroke="midnightblue" points="85.58,-137.3 96.18,-137.47 88,-130.73 85.58,-137.3"/>
<path fill="none" stroke="midnightblue" d="M33.12,-121.5C40.17,-121.5 49.06,-121.5 58.66,-121.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="58.88,-125 68.88,-121.5 58.88,-118 58.88,-125"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="269,-121 269,-140 355,-140 355,-121 269,-121"/>
<text text-anchor="middle" x="312" y="-128" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
<polygon fill="white" stroke="black" points="95,-68 95,-87 181,-87 181,-68 95,-68"/>
<text text-anchor="middle" x="138" y="-75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node7 -->
<g id="edge7" class="edge">
<g id="edge8" class="edge">
<title>Node1&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M33.28,-109.68C75.18,-112.82 190.7,-121.48 258.83,-126.59"/>
<polygon fill="midnightblue" stroke="midnightblue" points="258.7,-130.09 268.93,-127.35 259.22,-123.11 258.7,-130.09"/>
<path fill="none" stroke="midnightblue" d="M33.02,-113.52C43.1,-108.53 56.63,-102.17 69,-97.5 76.04,-94.84 83.61,-92.31 91.03,-90"/>
<polygon fill="midnightblue" stroke="midnightblue" points="92.11,-93.33 100.67,-87.09 90.09,-86.63 92.11,-93.33"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#af16c0c87b29119f066041d6e71ab50e0" target="_top" xlink:title="Doing range update, checking at every node if it has some value to be propagated. All nodes affected ...">
<g id="a_node8"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a24487eda25123bc4d112e8430821a6c6" target="_top" xlink:title="Doing range update, checking at every node if it has some value to be propagated. All nodes affected ...">
<polygon fill="white" stroke="black" points="69,-0.5 69,-30.5 207,-30.5 207,-0.5 69,-0.5"/>
<text text-anchor="start" x="77" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="138" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::update</text>
@@ -92,10 +92,22 @@
</g>
</g>
<!-- Node1&#45;&gt;Node8 -->
<g id="edge8" class="edge">
<g id="edge9" class="edge">
<title>Node1&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M22.43,-98.58C30.3,-83.7 47.09,-55.63 69,-39.5 70.88,-38.11 72.86,-36.8 74.89,-35.56"/>
<polygon fill="midnightblue" stroke="midnightblue" points="77.02,-38.39 84.16,-30.56 73.7,-32.23 77.02,-38.39"/>
<path fill="none" stroke="midnightblue" d="M23.99,-111.72C33.02,-98.58 50.38,-74.98 69,-58.5 78.4,-50.18 89.57,-42.41 100.12,-35.82"/>
<polygon fill="midnightblue" stroke="midnightblue" points="102.04,-38.75 108.78,-30.57 98.42,-32.76 102.04,-38.75"/>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M117.09,-252.66C112.04,-262.06 119.02,-271 138,-271 149.57,-271 156.68,-267.68 159.32,-262.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="162.81,-262.51 158.91,-252.66 155.81,-262.79 162.81,-262.51"/>
</g>
<!-- Node3&#45;&gt;Node3 -->
<g id="edge6" class="edge">
<title>Node3&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M117.09,-185.66C112.04,-195.06 119.02,-204 138,-204 149.57,-204 156.68,-200.68 159.32,-195.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="162.81,-195.51 158.91,-185.66 155.81,-195.79 162.81,-195.51"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
@@ -108,15 +120,15 @@
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<g id="edge4" class="edge">
<title>Node3&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M207.47,-62.51C215.73,-62.27 224.22,-62.02 232.6,-61.78"/>
<polygon fill="midnightblue" stroke="midnightblue" points="232.87,-65.27 242.76,-61.48 232.66,-58.28 232.87,-65.27"/>
<path fill="none" stroke="midnightblue" d="M188.59,-155.36C194.94,-152.74 201.24,-149.79 207,-146.5 238.24,-128.7 269.22,-101.17 289.13,-81.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="291.79,-84.16 296.45,-74.65 286.87,-79.17 291.79,-84.16"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#acacb937f95a078a236a4a58f9630a045" target="_top" xlink:title="Creating a new node with the same values of curr node.">
<g id="a_node5"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a0cec4b77d264521717cf9b0482c45817" target="_top" xlink:title="Creating a new node with the same values of curr node.">
<polygon fill="white" stroke="black" points="417,-22.5 417,-52.5 555,-52.5 555,-22.5 417,-22.5"/>
<text text-anchor="start" x="425" y="-40.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="486" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">::newKid</text>
@@ -124,28 +136,28 @@
</g>
</g>
<!-- Node4&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<g id="edge5" class="edge">
<title>Node4&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M381.47,-50.74C389.73,-49.69 398.22,-48.6 406.6,-47.53"/>
<polygon fill="midnightblue" stroke="midnightblue" points="407.29,-50.97 416.76,-46.23 406.4,-44.03 407.29,-50.97"/>
</g>
<!-- Node6&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node6&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M207.47,-143.74C224.46,-141.57 242.39,-139.28 258.48,-137.22"/>
<polygon fill="midnightblue" stroke="midnightblue" points="259.28,-140.64 268.75,-135.9 258.39,-133.7 259.28,-140.64"/>
</g>
<!-- Node8&#45;&gt;Node4 -->
<g id="edge9" class="edge">
<g id="edge10" class="edge">
<title>Node8&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M197.71,-30.52C212.02,-34.18 227.46,-38.13 242.19,-41.9"/>
<polygon fill="midnightblue" stroke="midnightblue" points="241.71,-45.39 252.26,-44.47 243.44,-38.6 241.71,-45.39"/>
</g>
<!-- Node8&#45;&gt;Node5 -->
<g id="edge10" class="edge">
<g id="edge11" class="edge">
<title>Node8&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M207.36,-19.85C264.7,-23.49 346.61,-28.7 406.6,-32.52"/>
<polygon fill="midnightblue" stroke="midnightblue" points="406.58,-36.02 416.78,-33.16 407.03,-29.03 406.58,-36.02"/>
</g>
<!-- Node8&#45;&gt;Node8 -->
<g id="edge12" class="edge">
<title>Node8&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M117.09,-30.66C112.04,-40.06 119.02,-49 138,-49 149.57,-49 156.68,-45.68 159.32,-40.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="162.81,-40.51 158.91,-30.66 155.81,-40.79 162.81,-40.51"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -1,11 +1,11 @@
<map id="main" name="main">
<area shape="rect" id="node1" title="Main function." alt="" coords="5,137,56,163"/>
<area shape="rect" id="node2" href="$d5/d58/persistent__seg__tree__lazy__prop_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Test implementations." alt="" coords="104,137,148,163"/>
<area shape="rect" id="node3" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#a67d8371bc998c67d53e8f64db4f52767" title="Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum..." alt="" coords="196,5,380,47"/>
<area shape="rect" id="node4" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4" title="Querying the range from index l to index r, checking at every node if it has some value to be propaga..." alt="" coords="196,188,380,229"/>
<area shape="rect" id="node7" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#a0fe4e431f3e09c274ecd7d2d58dcb865" title="Getting the number of versions after updates so far which is equal to the size of the pointers vector..." alt="" coords="196,71,380,112"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="463,107,577,134"/>
<area shape="rect" id="node9" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#af16c0c87b29119f066041d6e71ab50e0" title="Doing range update, checking at every node if it has some value to be propagated. All nodes affected ..." alt="" coords="196,253,380,295"/>
<area shape="rect" id="node5" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#ace7f57935b3bb9446f11c239fd89ae79" title="If there is some value to be propagated to the passed node, value is added to the node and the childr..." alt="" coords="428,195,612,236"/>
<area shape="rect" id="node6" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#acacb937f95a078a236a4a58f9630a045" title="Creating a new node with the same values of curr node." alt="" coords="660,224,844,265"/>
<area shape="rect" id="node1" title="Main function." alt="" coords="5,191,56,218"/>
<area shape="rect" id="node2" href="$d5/d58/persistent__seg__tree__lazy__prop_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Test implementations." alt="" coords="104,191,148,218"/>
<area shape="rect" id="node3" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#a6d3f2465a7c5803a1ff16c5378bcc5e4" title="Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum..." alt="" coords="196,29,380,71"/>
<area shape="rect" id="node4" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4" title="Querying the range from index l to index r, checking at every node if it has some value to be propaga..." alt="" coords="196,119,380,160"/>
<area shape="rect" id="node7" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#a0fe4e431f3e09c274ecd7d2d58dcb865" title="Getting the number of versions after updates so far which is equal to the size of the pointers vector..." alt="" coords="196,184,380,225"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="231,250,345,277"/>
<area shape="rect" id="node9" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#a24487eda25123bc4d112e8430821a6c6" title="Doing range update, checking at every node if it has some value to be propagated. All nodes affected ..." alt="" coords="196,325,380,367"/>
<area shape="rect" id="node5" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#ace7f57935b3bb9446f11c239fd89ae79" title="If there is some value to be propagated to the passed node, value is added to the node and the childr..." alt="" coords="428,267,612,308"/>
<area shape="rect" id="node6" href="$d8/d28/classrange__queries_1_1per_seg_tree.html#a0cec4b77d264521717cf9b0482c45817" title="Creating a new node with the same values of curr node." alt="" coords="660,296,844,337"/>
</map>

View File

@@ -1 +1 @@
6300b967ba7d550335a604dc2b2d8664
c4b8b90c89a979269ac1be8f3abb11e3

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: main Pages: 1 -->
<!--zoomable 225 -->
<!--zoomable 279 -->
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" onload="init(evt)">
<style type="text/css"><![CDATA[
.edge:hover path { stroke: red; }
@@ -47,20 +47,20 @@ if (edges && edges.length) {
<script type="text/javascript">
var viewWidth = 637;
var viewHeight = 225;
var viewHeight = 279;
var sectionId = 'dynsection-1';
</script>
<script xlink:href="../../svgpan.js"/>
<svg id="graph" class="graph">
<g id="viewport">
<title>main</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-221 633,-221 633,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-275 633,-275 633,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Main function.">
<polygon fill="#bfbfbf" stroke="black" points="0,-99 0,-118 38,-118 38,-99 0,-99"/>
<text text-anchor="middle" x="19" y="-106" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
<polygon fill="#bfbfbf" stroke="black" points="0,-112 0,-131 38,-131 38,-112 0,-112"/>
<text text-anchor="middle" x="19" y="-119" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
@@ -68,84 +68,84 @@ var sectionId = 'dynsection-1';
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d5/d58/persistent__seg__tree__lazy__prop_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Test implementations.">
<polygon fill="white" stroke="black" points="74,-99 74,-118 107,-118 107,-99 74,-99"/>
<text text-anchor="middle" x="90.5" y="-106" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
<polygon fill="white" stroke="black" points="74,-112 74,-131 107,-131 107,-112 74,-112"/>
<text text-anchor="middle" x="90.5" y="-119" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M38.26,-108.5C46.07,-108.5 55.31,-108.5 63.79,-108.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="63.95,-112 73.95,-108.5 63.95,-105 63.95,-112"/>
<path fill="none" stroke="midnightblue" d="M38.26,-121.5C46.07,-121.5 55.31,-121.5 63.79,-121.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="63.95,-125 73.95,-121.5 63.95,-118 63.95,-125"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a67d8371bc998c67d53e8f64db4f52767" target="_top" xlink:title="Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum...">
<polygon fill="white" stroke="black" points="143,-186.5 143,-216.5 281,-216.5 281,-186.5 143,-186.5"/>
<text text-anchor="start" x="151" y="-204.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-193.5" font-family="Helvetica,sans-Serif" font-size="10.00">::construct</text>
<g id="a_node3"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a6d3f2465a7c5803a1ff16c5378bcc5e4" target="_top" xlink:title="Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum...">
<polygon fill="white" stroke="black" points="143,-222.5 143,-252.5 281,-252.5 281,-222.5 143,-222.5"/>
<text text-anchor="start" x="151" y="-240.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-229.5" font-family="Helvetica,sans-Serif" font-size="10.00">::construct</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M96.43,-118.42C104.3,-133.3 121.09,-161.37 143,-177.5 144.88,-178.89 146.86,-180.2 148.89,-181.44"/>
<polygon fill="midnightblue" stroke="midnightblue" points="147.7,-184.77 158.16,-186.44 151.02,-178.61 147.7,-184.77"/>
<path fill="none" stroke="midnightblue" d="M94.32,-131.05C100.27,-149.59 115.84,-190.63 143,-213.5 144.51,-214.77 146.09,-215.97 147.73,-217.12"/>
<polygon fill="midnightblue" stroke="midnightblue" points="145.96,-220.14 156.32,-222.33 149.58,-214.15 145.96,-220.14"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4" target="_top" xlink:title="Querying the range from index l to index r, checking at every node if it has some value to be propaga...">
<polygon fill="white" stroke="black" points="143,-49.5 143,-79.5 281,-79.5 281,-49.5 143,-49.5"/>
<text text-anchor="start" x="151" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-56.5" font-family="Helvetica,sans-Serif" font-size="10.00">::query</text>
<polygon fill="white" stroke="black" points="143,-155.5 143,-185.5 281,-185.5 281,-155.5 143,-155.5"/>
<text text-anchor="start" x="151" y="-173.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-162.5" font-family="Helvetica,sans-Serif" font-size="10.00">::query</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<g id="edge4" class="edge">
<title>Node2&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M107.12,-102.75C120.76,-97.73 141.33,-90.15 160.58,-83.07"/>
<polygon fill="midnightblue" stroke="midnightblue" points="162,-86.27 170.18,-79.53 159.58,-79.7 162,-86.27"/>
<path fill="none" stroke="midnightblue" d="M107.07,-129.62C117.18,-134.76 130.71,-141.37 143,-146.5 147.39,-148.33 151.97,-150.15 156.6,-151.92"/>
<polygon fill="midnightblue" stroke="midnightblue" points="155.51,-155.25 166.1,-155.46 157.95,-148.69 155.51,-155.25"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a0fe4e431f3e09c274ecd7d2d58dcb865" target="_top" xlink:title="Getting the number of versions after updates so far which is equal to the size of the pointers vector...">
<polygon fill="white" stroke="black" points="143,-137.5 143,-167.5 281,-167.5 281,-137.5 143,-137.5"/>
<text text-anchor="start" x="151" y="-155.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-144.5" font-family="Helvetica,sans-Serif" font-size="10.00">::size</text>
<polygon fill="white" stroke="black" points="143,-106.5 143,-136.5 281,-136.5 281,-106.5 143,-106.5"/>
<text text-anchor="start" x="151" y="-124.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-113.5" font-family="Helvetica,sans-Serif" font-size="10.00">::size</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<g id="edge8" class="edge">
<title>Node2&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M107.12,-114.25C120.76,-119.27 141.33,-126.85 160.58,-133.93"/>
<polygon fill="midnightblue" stroke="midnightblue" points="159.58,-137.3 170.18,-137.47 162,-130.73 159.58,-137.3"/>
<path fill="none" stroke="midnightblue" d="M107.12,-121.5C114.17,-121.5 123.06,-121.5 132.66,-121.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="132.88,-125 142.88,-121.5 132.88,-118 132.88,-125"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="343,-121 343,-140 429,-140 429,-121 343,-121"/>
<text text-anchor="middle" x="386" y="-128" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
<polygon fill="white" stroke="black" points="169,-68 169,-87 255,-87 255,-68 169,-68"/>
<text text-anchor="middle" x="212" y="-75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node8 -->
<g id="edge8" class="edge">
<g id="edge9" class="edge">
<title>Node2&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M107.28,-109.68C149.18,-112.82 264.7,-121.48 332.83,-126.59"/>
<polygon fill="midnightblue" stroke="midnightblue" points="332.7,-130.09 342.93,-127.35 333.22,-123.11 332.7,-130.09"/>
<path fill="none" stroke="midnightblue" d="M107.02,-113.52C117.1,-108.53 130.63,-102.17 143,-97.5 150.04,-94.84 157.61,-92.31 165.03,-90"/>
<polygon fill="midnightblue" stroke="midnightblue" points="166.11,-93.33 174.67,-87.09 164.09,-86.63 166.11,-93.33"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#af16c0c87b29119f066041d6e71ab50e0" target="_top" xlink:title="Doing range update, checking at every node if it has some value to be propagated. All nodes affected ...">
<g id="a_node9"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a24487eda25123bc4d112e8430821a6c6" target="_top" xlink:title="Doing range update, checking at every node if it has some value to be propagated. All nodes affected ...">
<polygon fill="white" stroke="black" points="143,-0.5 143,-30.5 281,-30.5 281,-0.5 143,-0.5"/>
<text text-anchor="start" x="151" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::update</text>
@@ -153,10 +153,22 @@ var sectionId = 'dynsection-1';
</g>
</g>
<!-- Node2&#45;&gt;Node9 -->
<g id="edge9" class="edge">
<g id="edge10" class="edge">
<title>Node2&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M96.43,-98.58C104.3,-83.7 121.09,-55.63 143,-39.5 144.88,-38.11 146.86,-36.8 148.89,-35.56"/>
<polygon fill="midnightblue" stroke="midnightblue" points="151.02,-38.39 158.16,-30.56 147.7,-32.23 151.02,-38.39"/>
<path fill="none" stroke="midnightblue" d="M97.99,-111.72C107.02,-98.58 124.38,-74.98 143,-58.5 152.4,-50.18 163.57,-42.41 174.12,-35.82"/>
<polygon fill="midnightblue" stroke="midnightblue" points="176.04,-38.75 182.78,-30.57 172.42,-32.76 176.04,-38.75"/>
</g>
<!-- Node3&#45;&gt;Node3 -->
<g id="edge3" class="edge">
<title>Node3&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M191.09,-252.66C186.04,-262.06 193.02,-271 212,-271 223.57,-271 230.68,-267.68 233.32,-262.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="236.81,-262.51 232.91,-252.66 229.81,-262.79 236.81,-262.51"/>
</g>
<!-- Node4&#45;&gt;Node4 -->
<g id="edge7" class="edge">
<title>Node4&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M191.09,-185.66C186.04,-195.06 193.02,-204 212,-204 223.57,-204 230.68,-200.68 233.32,-195.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="236.81,-195.51 232.91,-185.66 229.81,-195.79 236.81,-195.51"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
@@ -169,15 +181,15 @@ var sectionId = 'dynsection-1';
</g>
</g>
<!-- Node4&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<g id="edge5" class="edge">
<title>Node4&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M281.47,-62.51C289.73,-62.27 298.22,-62.02 306.6,-61.78"/>
<polygon fill="midnightblue" stroke="midnightblue" points="306.87,-65.27 316.76,-61.48 306.66,-58.28 306.87,-65.27"/>
<path fill="none" stroke="midnightblue" d="M262.59,-155.36C268.94,-152.74 275.24,-149.79 281,-146.5 312.24,-128.7 343.22,-101.17 363.13,-81.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="365.79,-84.16 370.45,-74.65 360.87,-79.17 365.79,-84.16"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#acacb937f95a078a236a4a58f9630a045" target="_top" xlink:title="Creating a new node with the same values of curr node.">
<g id="a_node6"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a0cec4b77d264521717cf9b0482c45817" target="_top" xlink:title="Creating a new node with the same values of curr node.">
<polygon fill="white" stroke="black" points="491,-22.5 491,-52.5 629,-52.5 629,-22.5 491,-22.5"/>
<text text-anchor="start" x="499" y="-40.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="560" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">::newKid</text>
@@ -185,29 +197,29 @@ var sectionId = 'dynsection-1';
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<g id="edge6" class="edge">
<title>Node5&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M455.47,-50.74C463.73,-49.69 472.22,-48.6 480.6,-47.53"/>
<polygon fill="midnightblue" stroke="midnightblue" points="481.29,-50.97 490.76,-46.23 480.4,-44.03 481.29,-50.97"/>
</g>
<!-- Node7&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node7&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M281.47,-143.74C298.46,-141.57 316.39,-139.28 332.48,-137.22"/>
<polygon fill="midnightblue" stroke="midnightblue" points="333.28,-140.64 342.75,-135.9 332.39,-133.7 333.28,-140.64"/>
</g>
<!-- Node9&#45;&gt;Node5 -->
<g id="edge10" class="edge">
<g id="edge11" class="edge">
<title>Node9&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M271.71,-30.52C286.02,-34.18 301.46,-38.13 316.19,-41.9"/>
<polygon fill="midnightblue" stroke="midnightblue" points="315.71,-45.39 326.26,-44.47 317.44,-38.6 315.71,-45.39"/>
</g>
<!-- Node9&#45;&gt;Node6 -->
<g id="edge11" class="edge">
<g id="edge12" class="edge">
<title>Node9&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M281.36,-19.85C338.7,-23.49 420.61,-28.7 480.6,-32.52"/>
<polygon fill="midnightblue" stroke="midnightblue" points="480.58,-36.02 490.78,-33.16 481.03,-29.03 480.58,-36.02"/>
</g>
<!-- Node9&#45;&gt;Node9 -->
<g id="edge13" class="edge">
<title>Node9&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M191.09,-30.66C186.04,-40.06 193.02,-49 212,-49 223.57,-49 230.68,-45.68 233.32,-40.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="236.81,-40.51 232.91,-30.66 229.81,-40.79 236.81,-40.51"/>
</g>
</g>
</svg>
<g id="navigator" transform="translate(0 0)" fill="#404254">

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: main Pages: 1 -->
<svg width="637pt" height="225pt"
viewBox="0.00 0.00 637.00 225.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 221)">
<svg width="637pt" height="279pt"
viewBox="0.00 0.00 637.00 279.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 275)">
<title>main</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-221 633,-221 633,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-275 633,-275 633,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Main function.">
<polygon fill="#bfbfbf" stroke="black" points="0,-99 0,-118 38,-118 38,-99 0,-99"/>
<text text-anchor="middle" x="19" y="-106" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
<polygon fill="#bfbfbf" stroke="black" points="0,-112 0,-131 38,-131 38,-112 0,-112"/>
<text text-anchor="middle" x="19" y="-119" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
@@ -22,84 +22,84 @@
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d5/d58/persistent__seg__tree__lazy__prop_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Test implementations.">
<polygon fill="white" stroke="black" points="74,-99 74,-118 107,-118 107,-99 74,-99"/>
<text text-anchor="middle" x="90.5" y="-106" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
<polygon fill="white" stroke="black" points="74,-112 74,-131 107,-131 107,-112 74,-112"/>
<text text-anchor="middle" x="90.5" y="-119" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M38.26,-108.5C46.07,-108.5 55.31,-108.5 63.79,-108.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="63.95,-112 73.95,-108.5 63.95,-105 63.95,-112"/>
<path fill="none" stroke="midnightblue" d="M38.26,-121.5C46.07,-121.5 55.31,-121.5 63.79,-121.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="63.95,-125 73.95,-121.5 63.95,-118 63.95,-125"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a67d8371bc998c67d53e8f64db4f52767" target="_top" xlink:title="Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum...">
<polygon fill="white" stroke="black" points="143,-186.5 143,-216.5 281,-216.5 281,-186.5 143,-186.5"/>
<text text-anchor="start" x="151" y="-204.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-193.5" font-family="Helvetica,sans-Serif" font-size="10.00">::construct</text>
<g id="a_node3"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a6d3f2465a7c5803a1ff16c5378bcc5e4" target="_top" xlink:title="Constructing the segment tree with the early passed vector. Every call creates a node to hold the sum...">
<polygon fill="white" stroke="black" points="143,-222.5 143,-252.5 281,-252.5 281,-222.5 143,-222.5"/>
<text text-anchor="start" x="151" y="-240.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-229.5" font-family="Helvetica,sans-Serif" font-size="10.00">::construct</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M96.43,-118.42C104.3,-133.3 121.09,-161.37 143,-177.5 144.88,-178.89 146.86,-180.2 148.89,-181.44"/>
<polygon fill="midnightblue" stroke="midnightblue" points="147.7,-184.77 158.16,-186.44 151.02,-178.61 147.7,-184.77"/>
<path fill="none" stroke="midnightblue" d="M94.32,-131.05C100.27,-149.59 115.84,-190.63 143,-213.5 144.51,-214.77 146.09,-215.97 147.73,-217.12"/>
<polygon fill="midnightblue" stroke="midnightblue" points="145.96,-220.14 156.32,-222.33 149.58,-214.15 145.96,-220.14"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#ae8ae4b1835e5e8aec32f68c5059ed4d4" target="_top" xlink:title="Querying the range from index l to index r, checking at every node if it has some value to be propaga...">
<polygon fill="white" stroke="black" points="143,-49.5 143,-79.5 281,-79.5 281,-49.5 143,-49.5"/>
<text text-anchor="start" x="151" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-56.5" font-family="Helvetica,sans-Serif" font-size="10.00">::query</text>
<polygon fill="white" stroke="black" points="143,-155.5 143,-185.5 281,-185.5 281,-155.5 143,-155.5"/>
<text text-anchor="start" x="151" y="-173.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-162.5" font-family="Helvetica,sans-Serif" font-size="10.00">::query</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<g id="edge4" class="edge">
<title>Node2&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M107.12,-102.75C120.76,-97.73 141.33,-90.15 160.58,-83.07"/>
<polygon fill="midnightblue" stroke="midnightblue" points="162,-86.27 170.18,-79.53 159.58,-79.7 162,-86.27"/>
<path fill="none" stroke="midnightblue" d="M107.07,-129.62C117.18,-134.76 130.71,-141.37 143,-146.5 147.39,-148.33 151.97,-150.15 156.6,-151.92"/>
<polygon fill="midnightblue" stroke="midnightblue" points="155.51,-155.25 166.1,-155.46 157.95,-148.69 155.51,-155.25"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a0fe4e431f3e09c274ecd7d2d58dcb865" target="_top" xlink:title="Getting the number of versions after updates so far which is equal to the size of the pointers vector...">
<polygon fill="white" stroke="black" points="143,-137.5 143,-167.5 281,-167.5 281,-137.5 143,-137.5"/>
<text text-anchor="start" x="151" y="-155.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-144.5" font-family="Helvetica,sans-Serif" font-size="10.00">::size</text>
<polygon fill="white" stroke="black" points="143,-106.5 143,-136.5 281,-136.5 281,-106.5 143,-106.5"/>
<text text-anchor="start" x="151" y="-124.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-113.5" font-family="Helvetica,sans-Serif" font-size="10.00">::size</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<g id="edge8" class="edge">
<title>Node2&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M107.12,-114.25C120.76,-119.27 141.33,-126.85 160.58,-133.93"/>
<polygon fill="midnightblue" stroke="midnightblue" points="159.58,-137.3 170.18,-137.47 162,-130.73 159.58,-137.3"/>
<path fill="none" stroke="midnightblue" d="M107.12,-121.5C114.17,-121.5 123.06,-121.5 132.66,-121.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="132.88,-125 142.88,-121.5 132.88,-118 132.88,-125"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="343,-121 343,-140 429,-140 429,-121 343,-121"/>
<text text-anchor="middle" x="386" y="-128" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
<polygon fill="white" stroke="black" points="169,-68 169,-87 255,-87 255,-68 169,-68"/>
<text text-anchor="middle" x="212" y="-75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node8 -->
<g id="edge8" class="edge">
<g id="edge9" class="edge">
<title>Node2&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M107.28,-109.68C149.18,-112.82 264.7,-121.48 332.83,-126.59"/>
<polygon fill="midnightblue" stroke="midnightblue" points="332.7,-130.09 342.93,-127.35 333.22,-123.11 332.7,-130.09"/>
<path fill="none" stroke="midnightblue" d="M107.02,-113.52C117.1,-108.53 130.63,-102.17 143,-97.5 150.04,-94.84 157.61,-92.31 165.03,-90"/>
<polygon fill="midnightblue" stroke="midnightblue" points="166.11,-93.33 174.67,-87.09 164.09,-86.63 166.11,-93.33"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#af16c0c87b29119f066041d6e71ab50e0" target="_top" xlink:title="Doing range update, checking at every node if it has some value to be propagated. All nodes affected ...">
<g id="a_node9"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a24487eda25123bc4d112e8430821a6c6" target="_top" xlink:title="Doing range update, checking at every node if it has some value to be propagated. All nodes affected ...">
<polygon fill="white" stroke="black" points="143,-0.5 143,-30.5 281,-30.5 281,-0.5 143,-0.5"/>
<text text-anchor="start" x="151" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="212" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::update</text>
@@ -107,10 +107,22 @@
</g>
</g>
<!-- Node2&#45;&gt;Node9 -->
<g id="edge9" class="edge">
<g id="edge10" class="edge">
<title>Node2&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M96.43,-98.58C104.3,-83.7 121.09,-55.63 143,-39.5 144.88,-38.11 146.86,-36.8 148.89,-35.56"/>
<polygon fill="midnightblue" stroke="midnightblue" points="151.02,-38.39 158.16,-30.56 147.7,-32.23 151.02,-38.39"/>
<path fill="none" stroke="midnightblue" d="M97.99,-111.72C107.02,-98.58 124.38,-74.98 143,-58.5 152.4,-50.18 163.57,-42.41 174.12,-35.82"/>
<polygon fill="midnightblue" stroke="midnightblue" points="176.04,-38.75 182.78,-30.57 172.42,-32.76 176.04,-38.75"/>
</g>
<!-- Node3&#45;&gt;Node3 -->
<g id="edge3" class="edge">
<title>Node3&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M191.09,-252.66C186.04,-262.06 193.02,-271 212,-271 223.57,-271 230.68,-267.68 233.32,-262.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="236.81,-262.51 232.91,-252.66 229.81,-262.79 236.81,-262.51"/>
</g>
<!-- Node4&#45;&gt;Node4 -->
<g id="edge7" class="edge">
<title>Node4&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M191.09,-185.66C186.04,-195.06 193.02,-204 212,-204 223.57,-204 230.68,-200.68 233.32,-195.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="236.81,-195.51 232.91,-185.66 229.81,-195.79 236.81,-195.51"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
@@ -123,15 +135,15 @@
</g>
</g>
<!-- Node4&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<g id="edge5" class="edge">
<title>Node4&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M281.47,-62.51C289.73,-62.27 298.22,-62.02 306.6,-61.78"/>
<polygon fill="midnightblue" stroke="midnightblue" points="306.87,-65.27 316.76,-61.48 306.66,-58.28 306.87,-65.27"/>
<path fill="none" stroke="midnightblue" d="M262.59,-155.36C268.94,-152.74 275.24,-149.79 281,-146.5 312.24,-128.7 343.22,-101.17 363.13,-81.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="365.79,-84.16 370.45,-74.65 360.87,-79.17 365.79,-84.16"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#acacb937f95a078a236a4a58f9630a045" target="_top" xlink:title="Creating a new node with the same values of curr node.">
<g id="a_node6"><a xlink:href="../../d8/d28/classrange__queries_1_1per_seg_tree.html#a0cec4b77d264521717cf9b0482c45817" target="_top" xlink:title="Creating a new node with the same values of curr node.">
<polygon fill="white" stroke="black" points="491,-22.5 491,-52.5 629,-52.5 629,-22.5 491,-22.5"/>
<text text-anchor="start" x="499" y="-40.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="560" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">::newKid</text>
@@ -139,28 +151,28 @@
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<g id="edge6" class="edge">
<title>Node5&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M455.47,-50.74C463.73,-49.69 472.22,-48.6 480.6,-47.53"/>
<polygon fill="midnightblue" stroke="midnightblue" points="481.29,-50.97 490.76,-46.23 480.4,-44.03 481.29,-50.97"/>
</g>
<!-- Node7&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node7&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M281.47,-143.74C298.46,-141.57 316.39,-139.28 332.48,-137.22"/>
<polygon fill="midnightblue" stroke="midnightblue" points="333.28,-140.64 342.75,-135.9 332.39,-133.7 333.28,-140.64"/>
</g>
<!-- Node9&#45;&gt;Node5 -->
<g id="edge10" class="edge">
<g id="edge11" class="edge">
<title>Node9&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M271.71,-30.52C286.02,-34.18 301.46,-38.13 316.19,-41.9"/>
<polygon fill="midnightblue" stroke="midnightblue" points="315.71,-45.39 326.26,-44.47 317.44,-38.6 315.71,-45.39"/>
</g>
<!-- Node9&#45;&gt;Node6 -->
<g id="edge11" class="edge">
<g id="edge12" class="edge">
<title>Node9&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M281.36,-19.85C338.7,-23.49 420.61,-28.7 480.6,-32.52"/>
<polygon fill="midnightblue" stroke="midnightblue" points="480.58,-36.02 490.78,-33.16 481.03,-29.03 480.58,-36.02"/>
</g>
<!-- Node9&#45;&gt;Node9 -->
<g id="edge13" class="edge">
<title>Node9&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M191.09,-30.66C186.04,-40.06 193.02,-49 212,-49 223.57,-49 230.68,-45.68 233.32,-40.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="236.81,-40.51 232.91,-30.66 229.81,-40.79 236.81,-40.51"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: sorting/random_pivot_quick_sort.cpp Pages: 1 -->
<svg width="379pt" height="95pt"

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: geometry Namespace Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d5f/namespacegeometry.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -90,22 +90,21 @@ $(document).ready(function(){initNavTree('d5/d5f/namespacegeometry.html','../../
</div>
<div class="header">
<div class="headertitle">
<div class="title">geometry Namespace Reference</div> </div>
<div class="headertitle"><div class="title">geometry Namespace Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Geometry algorithms.
<a href="../../d5/d5f/namespacegeometry.html#details">More...</a></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Geometry algorithms. </p>
<div class="textblock"><p >Geometry algorithms. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d5/d5f/namespacegeometry.html">geometry</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,7 +1,7 @@
var namespacegeometry =
[
[ "jarvis", null, [
[ "Point", "d9/d5a/structgeometry_1_1jarvis_1_1_point.html", "d9/d5a/structgeometry_1_1jarvis_1_1_point" ],
[ "Convexhull", "d4/dde/classgeometry_1_1jarvis_1_1_convexhull.html", "d4/dde/classgeometry_1_1jarvis_1_1_convexhull" ]
[ "Convexhull", "d4/dde/classgeometry_1_1jarvis_1_1_convexhull.html", "d4/dde/classgeometry_1_1jarvis_1_1_convexhull" ],
[ "Point", "d9/d5a/structgeometry_1_1jarvis_1_1_point.html", null ]
] ]
];

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: range_queries::perSegTree::Node Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -93,31 +93,24 @@ $(document).ready(function(){initNavTree('d5/d66/classrange__queries_1_1per_seg_
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="../../d5/dca/classrange__queries_1_1per_seg_tree_1_1_node-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">range_queries::perSegTree::Node Class Reference</div> </div>
<div class="headertitle"><div class="title">range_queries::perSegTree::Node Class Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Collaboration diagram for range_queries::perSegTree::Node:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../de/d61/classrange__queries_1_1per_seg_tree_1_1_node__coll__graph.svg" width="195" height="186"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ab3e7bf5a91911c17907b30b250108013"><td class="memItemLeft" align="right" valign="top"><a id="ab3e7bf5a91911c17907b30b250108013"></a>
<tr class="memitem:ab3e7bf5a91911c17907b30b250108013"><td class="memItemLeft" align="right" valign="top"><a id="ab3e7bf5a91911c17907b30b250108013" name="ab3e7bf5a91911c17907b30b250108013"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="../../d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>left</b> = nullptr</td></tr>
<tr class="separator:ab3e7bf5a91911c17907b30b250108013"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9adb4639a0797e94a3e556b6b902c088"><td class="memItemLeft" align="right" valign="top"><a id="a9adb4639a0797e94a3e556b6b902c088"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="../../d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html#a9adb4639a0797e94a3e556b6b902c088">right</a> = nullptr</td></tr>
<tr class="memitem:a9adb4639a0797e94a3e556b6b902c088"><td class="memItemLeft" align="right" valign="top"><a id="a9adb4639a0797e94a3e556b6b902c088" name="a9adb4639a0797e94a3e556b6b902c088"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="../../d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>right</b> = nullptr</td></tr>
<tr class="memdesc:a9adb4639a0797e94a3e556b6b902c088"><td class="mdescLeft">&#160;</td><td class="mdescRight">pointer to the left node <br /></td></tr>
<tr class="separator:a9adb4639a0797e94a3e556b6b902c088"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc044f787c90b815773726d7fdfdaccf"><td class="memItemLeft" align="right" valign="top"><a id="acc044f787c90b815773726d7fdfdaccf"></a>
int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html#acc044f787c90b815773726d7fdfdaccf">val</a> = 0</td></tr>
<tr class="memitem:acc044f787c90b815773726d7fdfdaccf"><td class="memItemLeft" align="right" valign="top"><a id="acc044f787c90b815773726d7fdfdaccf" name="acc044f787c90b815773726d7fdfdaccf"></a>
int64_t&#160;</td><td class="memItemRight" valign="bottom"><b>val</b> = 0</td></tr>
<tr class="memdesc:acc044f787c90b815773726d7fdfdaccf"><td class="mdescLeft">&#160;</td><td class="mdescRight">pointer to the right node <br /></td></tr>
<tr class="separator:acc044f787c90b815773726d7fdfdaccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adeb7de2a7341362c3c6edf4d48476656"><td class="memItemLeft" align="right" valign="top"><a id="adeb7de2a7341362c3c6edf4d48476656"></a>
<tr class="memitem:adeb7de2a7341362c3c6edf4d48476656"><td class="memItemLeft" align="right" valign="top"><a id="adeb7de2a7341362c3c6edf4d48476656" name="adeb7de2a7341362c3c6edf4d48476656"></a>
int64_t&#160;</td><td class="memItemRight" valign="bottom"><b>prop</b> = 0</td></tr>
<tr class="separator:adeb7de2a7341362c3c6edf4d48476656"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
@@ -130,7 +123,7 @@ int64_t&#160;</td><td class="memItemRight" valign="bottom"><b>prop</b> = 0</td><
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dd/d69/namespacerange__queries.html">range_queries</a></li><li class="navelem"><a class="el" href="../../d8/d28/classrange__queries_1_1per_seg_tree.html">perSegTree</a></li><li class="navelem"><a class="el" href="../../d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html">Node</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,7 +1,5 @@
var classrange__queries_1_1per_seg_tree_1_1_node =
[
[ "left", "d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html#ab3e7bf5a91911c17907b30b250108013", null ],
[ "prop", "d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html#adeb7de2a7341362c3c6edf4d48476656", null ],
[ "right", "d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html#a9adb4639a0797e94a3e556b6b902c088", null ],
[ "val", "d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html#acc044f787c90b815773726d7fdfdaccf", null ]
];

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: probability/bayes_theorem.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d67/bayes__theorem_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -92,12 +92,11 @@ $(document).ready(function(){initNavTree('d5/d67/bayes__theorem_8cpp.html','../.
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">bayes_theorem.cpp File Reference</div> </div>
<div class="headertitle"><div class="title">bayes_theorem.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<p><a href="https://en.wikipedia.org/wiki/Bayes%27_theorem">Bayes' theorem</a>
<p><a href="https://en.wikipedia.org/wiki/Bayes%27_theorem" target="_blank">Bayes' theorem</a>
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;iostream&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
@@ -107,7 +106,7 @@ Include dependency graph for bayes_theorem.cpp:</div>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a655bfe51252468d232dc639a340656ba"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d67/bayes__theorem_8cpp.html#a655bfe51252468d232dc639a340656ba">bayes_AgivenB</a> (double BgivenA, double A, double B)</td></tr>
<tr class="separator:a655bfe51252468d232dc639a340656ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -117,11 +116,11 @@ Functions</h2></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a href="https://en.wikipedia.org/wiki/Bayes%27_theorem">Bayes' theorem</a> </p>
<p>Bayes' theorem allows one to find \(P(A|B)\) given \(P(B|A)\) or \(P(B|A)\) given \(P(A|B)\) and \(P(A)\) and \(P(B)\).<br />
<div class="textblock"><p ><a href="https://en.wikipedia.org/wiki/Bayes%27_theorem" target="_blank">Bayes' theorem</a> </p>
<p >Bayes' theorem allows one to find \(P(A|B)\) given \(P(B|A)\) or \(P(B|A)\) given \(P(A|B)\) and \(P(A)\) and \(P(B)\).<br />
Note that \(P(A|B)\) is read 'The probability of A given that the event B has occured'. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a655bfe51252468d232dc639a340656ba"></a>
<a id="a655bfe51252468d232dc639a340656ba" name="a655bfe51252468d232dc639a340656ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a655bfe51252468d232dc639a340656ba">&#9670;&nbsp;</a></span>bayes_AgivenB()</h2>
<div class="memitem">
@@ -152,14 +151,14 @@ Note that \(P(A|B)\) is read 'The probability of A given that the event B has oc
</tr>
</table>
</div><div class="memdoc">
<p>returns P(A|B) </p>
<div class="fragment"><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160; {</div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; <span class="keywordflow">return</span> (BgivenA * A) / B;</div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;}</div>
<p >returns P(A|B) </p>
<div class="fragment"><div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> {</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keywordflow">return</span> (BgivenA * A) / B;</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="abb4f22dc05887c2259fdfc55c687598f"></a>
<a id="abb4f22dc05887c2259fdfc55c687598f" name="abb4f22dc05887c2259fdfc55c687598f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb4f22dc05887c2259fdfc55c687598f">&#9670;&nbsp;</a></span>bayes_BgivenA()</h2>
<div class="memitem">
@@ -190,14 +189,14 @@ Note that \(P(A|B)\) is read 'The probability of A given that the event B has oc
</tr>
</table>
</div><div class="memdoc">
<p>returns P(B|A) </p>
<div class="fragment"><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; {</div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; <span class="keywordflow">return</span> (AgivenB * B) / A;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;}</div>
<p >returns P(B|A) </p>
<div class="fragment"><div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> {</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordflow">return</span> (AgivenB * B) / A;</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
@@ -212,16 +211,16 @@ Note that \(P(A|B)\) is read 'The probability of A given that the event B has oc
</tr>
</table>
</div><div class="memdoc">
<p>Main function </p>
<div class="fragment"><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; {</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; <span class="keywordtype">double</span> A = 0.01;</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="keywordtype">double</span> B = 0.1;</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; <span class="keywordtype">double</span> BgivenA = 0.9;</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="keywordtype">double</span> AgivenB = <a class="code" href="../../d5/d67/bayes__theorem_8cpp.html#a655bfe51252468d232dc639a340656ba">bayes_AgivenB</a>(BgivenA, A, B);</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;A given B = &quot;</span> &lt;&lt; AgivenB &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;B given A = &quot;</span> &lt;&lt; <a class="code" href="../../d5/d67/bayes__theorem_8cpp.html#abb4f22dc05887c2259fdfc55c687598f">bayes_BgivenA</a>(AgivenB, A, B) &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;}</div>
<p >Main function </p>
<div class="fragment"><div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordtype">double</span> A = 0.01;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordtype">double</span> B = 0.1;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordtype">double</span> BgivenA = 0.9;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordtype">double</span> AgivenB = <a class="code hl_function" href="../../d5/d67/bayes__theorem_8cpp.html#a655bfe51252468d232dc639a340656ba">bayes_AgivenB</a>(BgivenA, A, B);</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</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;A given B = &quot;</span> &lt;&lt; AgivenB &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"><a id="l00032" name="l00032"></a><span class="lineno"> 32</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;B given A = &quot;</span> &lt;&lt; <a class="code hl_function" href="../../d5/d67/bayes__theorem_8cpp.html#abb4f22dc05887c2259fdfc55c687598f">bayes_BgivenA</a>(AgivenB, A, B) &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"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</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="abayes__theorem_8cpp_html_a655bfe51252468d232dc639a340656ba"><div class="ttname"><a href="../../d5/d67/bayes__theorem_8cpp.html#a655bfe51252468d232dc639a340656ba">bayes_AgivenB</a></div><div class="ttdeci">double bayes_AgivenB(double BgivenA, double A, double B)</div><div class="ttdef"><b>Definition:</b> bayes_theorem.cpp:14</div></div>
<div class="ttc" id="abayes__theorem_8cpp_html_abb4f22dc05887c2259fdfc55c687598f"><div class="ttname"><a href="../../d5/d67/bayes__theorem_8cpp.html#abb4f22dc05887c2259fdfc55c687598f">bayes_BgivenA</a></div><div class="ttdeci">double bayes_BgivenA(double AgivenB, double A, double B)</div><div class="ttdef"><b>Definition:</b> bayes_theorem.cpp:20</div></div>
@@ -241,7 +240,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_82e494173a87936756866de2fa774307.html">probability</a></li><li class="navelem"><a class="el" href="../../d5/d67/bayes__theorem_8cpp.html">bayes_theorem.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: main Pages: 1 -->
<svg width="168pt" height="104pt"

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: math/complex_numbers.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d67/complex__numbers_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -93,8 +93,7 @@ $(document).ready(function(){initNavTree('d5/d67/complex__numbers_8cpp.html','..
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">complex_numbers.cpp File Reference</div> </div>
<div class="headertitle"><div class="title">complex_numbers.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
@@ -113,23 +112,22 @@ Include dependency graph for complex_numbers.cpp:</div>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
<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="../../da/d5a/class_complex.html">Complex</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Class <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> to represent complex numbers as a field. <a href="../../da/d5a/class_complex.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a5a73e9d4e68af8cedb95bd0864054b89"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d67/complex__numbers_8cpp.html#a5a73e9d4e68af8cedb95bd0864054b89">operator==</a> (const <a class="el" href="../../da/d5a/class_complex.html">Complex</a> &amp;a, const <a class="el" href="../../da/d5a/class_complex.html">Complex</a> &amp;b)</td></tr>
<tr class="memdesc:a5a73e9d4e68af8cedb95bd0864054b89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Operator overload of '==' on <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> class. Logical Equal overload for our <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> class. <a href="../../d5/d67/complex__numbers_8cpp.html#a5a73e9d4e68af8cedb95bd0864054b89">More...</a><br /></td></tr>
<tr class="separator:a5a73e9d4e68af8cedb95bd0864054b89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af738b2a6921f0a6868bb7c5b4c0d18e0"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d67/complex__numbers_8cpp.html#af738b2a6921f0a6868bb7c5b4c0d18e0">operator&lt;&lt;</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a> &amp;os, const <a class="el" href="../../da/d5a/class_complex.html">Complex</a> &amp;num)</td></tr>
<tr class="memdesc:af738b2a6921f0a6868bb7c5b4c0d18e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Operator overload of '&lt;&lt;' of ostream for <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> class. Overloaded insersion operator to accommodate the printing of our complex number in their standard form. <a href="../../d5/d67/complex__numbers_8cpp.html#af738b2a6921f0a6868bb7c5b4c0d18e0">More...</a><br /></td></tr>
<tr class="separator:af738b2a6921f0a6868bb7c5b4c0d18e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d4d5b8250b50703de888514c8e7a7a0"><td class="memItemLeft" align="right" valign="top"><a id="a5d4d5b8250b50703de888514c8e7a7a0"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a> ()</td></tr>
<tr class="memdesc:a5d4d5b8250b50703de888514c8e7a7a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to get random numbers to generate our complex numbers for test. <br /></td></tr>
<tr class="memitem:a44d5f25b573e870accdf26fd32b8484d"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d67/complex__numbers_8cpp.html#a44d5f25b573e870accdf26fd32b8484d">operator&lt;&lt;</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a> &amp;os, const <a class="el" href="../../da/d5a/class_complex.html">Complex</a> &amp;num)</td></tr>
<tr class="memdesc:a44d5f25b573e870accdf26fd32b8484d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Operator overload of '&lt;&lt;' of ostream for <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> class. Overloaded insersion operator to accommodate the printing of our complex number in their standard form. <a href="../../d5/d67/complex__numbers_8cpp.html#a44d5f25b573e870accdf26fd32b8484d">More...</a><br /></td></tr>
<tr class="separator:a44d5f25b573e870accdf26fd32b8484d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d4d5b8250b50703de888514c8e7a7a0"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a> ()</td></tr>
<tr class="memdesc:a5d4d5b8250b50703de888514c8e7a7a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to get random numbers to generate our complex numbers for test. <a href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">More...</a><br /></td></tr>
<tr class="separator:a5d4d5b8250b50703de888514c8e7a7a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88ec9ad42717780d6caaff9d3d6977f9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d67/complex__numbers_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a> ()</td></tr>
<tr class="separator:a88ec9ad42717780d6caaff9d3d6977f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -137,11 +135,38 @@ double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="..
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An implementation of <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> Number as Objects. </p>
<div class="textblock"><p >An implementation of <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> Number as Objects. </p>
<dl class="section author"><dt>Author</dt><dd>tjgurwara99</dd></dl>
<p>A basic implementation of <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> Number field as a class with operators overloaded to accommodate (mathematical) field operations. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<a id="a5d4d5b8250b50703de888514c8e7a7a0" name="a5d4d5b8250b50703de888514c8e7a7a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d4d5b8250b50703de888514c8e7a7a0">&#9670;&nbsp;</a></span>get_rand()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double get_rand </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Function to get random numbers to generate our complex numbers for test. </p>
<div class="fragment"><div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span>{ <span class="keywordflow">return</span> (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 100 - 50) / 100.f; }</div>
<div class="ttc" id="arand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a></div><div class="ttdeci">T rand(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="../../d5/d67/complex__numbers_8cpp_a5d4d5b8250b50703de888514c8e7a7a0_cgraph.svg" width="207" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
@@ -156,11 +181,11 @@ double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="..
</tr>
</table>
</div><div class="memdoc">
<p>Main function </p>
<div class="fragment"><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; {</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <a class="code" href="../../d5/d67/complex__numbers_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a>();</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160;}</div>
<p >Main function </p>
<div class="fragment"><div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> {</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a>();</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span>}</div>
<div class="ttc" id="acomplex__numbers_8cpp_html_a88ec9ad42717780d6caaff9d3d6977f9"><div class="ttname"><a href="../../d5/d67/complex__numbers_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a></div><div class="ttdeci">void tests()</div><div class="ttdef"><b>Definition:</b> complex_numbers.cpp:206</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -171,14 +196,14 @@ Here is the call graph for this function:</div>
</div>
</div>
<a id="af738b2a6921f0a6868bb7c5b4c0d18e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af738b2a6921f0a6868bb7c5b4c0d18e0">&#9670;&nbsp;</a></span>operator&lt;&lt;()</h2>
<a id="a44d5f25b573e870accdf26fd32b8484d" name="a44d5f25b573e870accdf26fd32b8484d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44d5f25b573e870accdf26fd32b8484d">&#9670;&nbsp;</a></span>operator&lt;&lt;()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a>&amp; operator&lt;&lt; </td>
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a> &amp; operator&lt;&lt; </td>
<td>(</td>
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a> &amp;&#160;</td>
<td class="paramname"><em>os</em>, </td>
@@ -205,28 +230,28 @@ Here is the call graph for this function:</div>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; {</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; os &lt;&lt; <span class="stringliteral">&quot;(&quot;</span> &lt;&lt; num.<a class="code" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>();</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="keywordflow">if</span> (num.<a class="code" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>() &lt; 0) {</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; os &lt;&lt; <span class="stringliteral">&quot; - &quot;</span> &lt;&lt; -num.<a class="code" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>();</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; os &lt;&lt; <span class="stringliteral">&quot; + &quot;</span> &lt;&lt; num.<a class="code" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>();</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; }</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; os &lt;&lt; <span class="stringliteral">&quot;i)&quot;</span>;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keywordflow">return</span> os;</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> {</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> os &lt;&lt; <span class="stringliteral">&quot;(&quot;</span> &lt;&lt; num.<a class="code hl_function" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>();</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="keywordflow">if</span> (num.<a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>() &lt; 0) {</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> os &lt;&lt; <span class="stringliteral">&quot; - &quot;</span> &lt;&lt; -num.<a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>();</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> os &lt;&lt; <span class="stringliteral">&quot; + &quot;</span> &lt;&lt; num.<a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>();</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> }</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> os &lt;&lt; <span class="stringliteral">&quot;i)&quot;</span>;</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <span class="keywordflow">return</span> os;</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span>}</div>
<div class="ttc" id="aclass_complex_html_a312e4b19146128408fb06e0150b0faf6"><div class="ttname"><a href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">Complex::real</a></div><div class="ttdeci">double real() const</div><div class="ttdoc">Member function to get real value of our complex number. Member function (getter) to access the class...</div><div class="ttdef"><b>Definition:</b> complex_numbers.cpp:64</div></div>
<div class="ttc" id="aclass_complex_html_af8aacf982e2e6c142921bc850f6dc974"><div class="ttname"><a href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">Complex::imag</a></div><div class="ttdeci">double imag() const</div><div class="ttdoc">Member function to get imaginary value of our complex number. Member function (getter) to access the ...</div><div class="ttdef"><b>Definition:</b> complex_numbers.cpp:70</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="../../d5/d67/complex__numbers_8cpp_af738b2a6921f0a6868bb7c5b4c0d18e0_cgraph.svg" width="256" height="88"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d5/d67/complex__numbers_8cpp_a44d5f25b573e870accdf26fd32b8484d_cgraph.svg" width="256" height="88"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="a5a73e9d4e68af8cedb95bd0864054b89"></a>
<a id="a5a73e9d4e68af8cedb95bd0864054b89" name="a5a73e9d4e68af8cedb95bd0864054b89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a73e9d4e68af8cedb95bd0864054b89">&#9670;&nbsp;</a></span>operator==()</h2>
<div class="memitem">
@@ -263,9 +288,9 @@ Here is the call graph for this function:</div>
<dl class="section return"><dt>Returns</dt><dd>'True' If real and imaginary parts of a and b are same </dd>
<dd>
'False' Otherwise. </dd></dl>
<div class="fragment"><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; {</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="keywordflow">return</span> a.real() == b.<a class="code" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>() &amp;&amp; a.imag() == b.<a class="code" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>();</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> {</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="keywordflow">return</span> a.real() == b.<a class="code hl_function" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>() &amp;&amp; a.imag() == b.<a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>();</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span>}</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -275,7 +300,7 @@ Here is the call graph for this function:</div>
</div>
</div>
<a id="a88ec9ad42717780d6caaff9d3d6977f9"></a>
<a id="a88ec9ad42717780d6caaff9d3d6977f9" name="a88ec9ad42717780d6caaff9d3d6977f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88ec9ad42717780d6caaff9d3d6977f9">&#9670;&nbsp;</a></span>tests()</h2>
<div class="memitem">
@@ -289,65 +314,65 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p>Tests Function </p>
<div class="fragment"><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; {</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a>(<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a>(<span class="keyword">nullptr</span>));</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; <span class="keywordtype">double</span> x1 = <a class="code" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>(), y1 = <a class="code" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>(), x2 = <a class="code" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>(), y2 = <a class="code" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>();</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <a class="code" href="../../da/d5a/class_complex.html">Complex</a> num1(x1, y1), num2(x2, y2);</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex.html">std::complex&lt;double&gt;</a> cnum1(x1, y1), cnum2(x2, y2);</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; <a class="code" href="../../da/d5a/class_complex.html">Complex</a> <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex.html">std::complex&lt;double&gt;</a> expected;</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <span class="comment">// Test for addition</span></div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = num1 + num2;</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; expected = cnum1 + cnum2;</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;1 + 1i + 1 + 1i is equal to 2 + 2i but the addition doesn&#39;t &quot;</span></div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <span class="stringliteral">&quot;add up \n&quot;</span>,</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; (<a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.real() == expected.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/real.html">real</a>() &amp;&amp;</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.imag() == expected.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/imag.html">imag</a>())));</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;First test passes.&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <span class="comment">// Test for subtraction</span></div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = num1 - num2;</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; expected = cnum1 - cnum2;</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;1 + 1i - 1 - 1i is equal to 0 but the program says &quot;</span></div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <span class="stringliteral">&quot;otherwise. \n&quot;</span>,</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; (<a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.real() == expected.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/real.html">real</a>() &amp;&amp;</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.imag() == expected.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/imag.html">imag</a>())));</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Second test passes.&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; <span class="comment">// Test for multiplication</span></div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = num1 * num2;</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; expected = cnum1 * cnum2;</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) * (1 + 1i) is equal to 2i but the program says &quot;</span></div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; <span class="stringliteral">&quot;otherwise. \n&quot;</span>,</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; (<a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.real() == expected.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/real.html">real</a>() &amp;&amp;</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.imag() == expected.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/imag.html">imag</a>())));</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Third test passes.&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; <span class="comment">// Test for division</span></div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = num1 / num2;</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; expected = cnum1 / cnum2;</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) / (1 + 1i) is equal to 1 but the program says &quot;</span></div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <span class="stringliteral">&quot;otherwise.\n&quot;</span>,</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; (<a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.real() == expected.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/real.html">real</a>() &amp;&amp;</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.imag() == expected.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/imag.html">imag</a>())));</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Fourth test passes.&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="comment">// Test for conjugates</span></div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = ~num1;</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; expected = std::conj(cnum1);</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) has a conjugate which is equal to (1 - 1i) but the &quot;</span></div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; <span class="stringliteral">&quot;program says otherwise.\n&quot;</span>,</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; (<a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.real() == expected.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/real.html">real</a>() &amp;&amp;</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.imag() == expected.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/imag.html">imag</a>())));</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Fifth test passes.\n&quot;</span>;</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <span class="comment">// Test for Argument of our complex number</span></div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) has argument PI / 4 but the program differs from &quot;</span></div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <span class="stringliteral">&quot;the std::complex result.\n&quot;</span>,</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; (num1.arg() == std::arg(cnum1))));</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Sixth test passes.\n&quot;</span>;</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; <span class="comment">// Test for absolute value of our complex number</span></div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) has absolute value sqrt(2) but the program differs &quot;</span></div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; <span class="stringliteral">&quot;from the std::complex result. \n&quot;</span>,</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; (num1.abs() == std::abs(cnum1))));</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Seventh test passes.\n&quot;</span>;</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160;}</div>
<p >Tests Function </p>
<div class="fragment"><div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> {</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a>(<span class="keyword">nullptr</span>));</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keywordtype">double</span> x1 = <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>(), y1 = <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>(), x2 = <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>(), y2 = <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>();</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <a class="code hl_class" href="../../da/d5a/class_complex.html">Complex</a> num1(x1, y1), num2(x2, y2);</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex.html">std::complex&lt;double&gt;</a> cnum1(x1, y1), cnum2(x2, y2);</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <a class="code hl_class" href="../../da/d5a/class_complex.html">Complex</a> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex.html">std::complex&lt;double&gt;</a> expected;</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="comment">// Test for addition</span></div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = num1 + num2;</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> expected = cnum1 + cnum2;</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;1 + 1i + 1 + 1i is equal to 2 + 2i but the addition doesn&#39;t &quot;</span></div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="stringliteral">&quot;add up \n&quot;</span>,</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> (<a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.real() == expected.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/real.html">real</a>() &amp;&amp;</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.imag() == expected.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/imag.html">imag</a>())));</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</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;First test passes.&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"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="comment">// Test for subtraction</span></div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = num1 - num2;</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> expected = cnum1 - cnum2;</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;1 + 1i - 1 - 1i is equal to 0 but the program says &quot;</span></div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="stringliteral">&quot;otherwise. \n&quot;</span>,</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> (<a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.real() == expected.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/real.html">real</a>() &amp;&amp;</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.imag() == expected.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/imag.html">imag</a>())));</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</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;Second test passes.&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"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="comment">// Test for multiplication</span></div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = num1 * num2;</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> expected = cnum1 * cnum2;</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) * (1 + 1i) is equal to 2i but the program says &quot;</span></div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> <span class="stringliteral">&quot;otherwise. \n&quot;</span>,</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> (<a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.real() == expected.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/real.html">real</a>() &amp;&amp;</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.imag() == expected.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/imag.html">imag</a>())));</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</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;Third test passes.&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"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="comment">// Test for division</span></div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = num1 / num2;</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> expected = cnum1 / cnum2;</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) / (1 + 1i) is equal to 1 but the program says &quot;</span></div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> <span class="stringliteral">&quot;otherwise.\n&quot;</span>,</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> (<a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.real() == expected.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/real.html">real</a>() &amp;&amp;</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.imag() == expected.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/imag.html">imag</a>())));</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</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;Fourth test passes.&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"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> <span class="comment">// Test for conjugates</span></div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = ~num1;</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> expected = std::conj(cnum1);</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) has a conjugate which is equal to (1 - 1i) but the &quot;</span></div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="stringliteral">&quot;program says otherwise.\n&quot;</span>,</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> (<a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.real() == expected.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/real.html">real</a>() &amp;&amp;</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.imag() == expected.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/complex/imag.html">imag</a>())));</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</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;Fifth test passes.\n&quot;</span>;</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> <span class="comment">// Test for Argument of our complex number</span></div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) has argument PI / 4 but the program differs from &quot;</span></div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> <span class="stringliteral">&quot;the std::complex result.\n&quot;</span>,</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> (num1.arg() == std::arg(cnum1))));</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</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;Sixth test passes.\n&quot;</span>;</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> <span class="comment">// Test for absolute value of our complex number</span></div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) has absolute value sqrt(2) but the program differs &quot;</span></div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> <span class="stringliteral">&quot;from the std::complex result. \n&quot;</span>,</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> (num1.abs() == std::abs(cnum1))));</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</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;Seventh test passes.\n&quot;</span>;</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</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="aclass_complex_html"><div class="ttname"><a href="../../da/d5a/class_complex.html">Complex</a></div><div class="ttdoc">Class Complex to represent complex numbers as a field.</div><div class="ttdef"><b>Definition:</b> complex_numbers.cpp:20</div></div>
<div class="ttc" id="acomplex__numbers_8cpp_html_a5d4d5b8250b50703de888514c8e7a7a0"><div class="ttname"><a href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a></div><div class="ttdeci">double get_rand()</div><div class="ttdoc">Function to get random numbers to generate our complex numbers for test.</div><div class="ttdef"><b>Definition:</b> complex_numbers.cpp:201</div></div>
@@ -373,7 +398,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_296d53ceaeaa7e099814a6def439fe8a.html">math</a></li><li class="navelem"><a class="el" href="../../d5/d67/complex__numbers_8cpp.html">complex_numbers.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -3,7 +3,7 @@ var complex__numbers_8cpp =
[ "Complex", "da/d5a/class_complex.html", "da/d5a/class_complex" ],
[ "get_rand", "d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0", null ],
[ "main", "d5/d67/complex__numbers_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
[ "operator<<", "d5/d67/complex__numbers_8cpp.html#af738b2a6921f0a6868bb7c5b4c0d18e0", null ],
[ "operator<<", "d5/d67/complex__numbers_8cpp.html#a44d5f25b573e870accdf26fd32b8484d", null ],
[ "operator==", "d5/d67/complex__numbers_8cpp.html#a5a73e9d4e68af8cedb95bd0864054b89", null ],
[ "tests", "d5/d67/complex__numbers_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9", null ]
];

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: operator&lt;&lt; Pages: 1 -->
<svg width="192pt" height="66pt"

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: operator== Pages: 1 -->
<svg width="192pt" height="66pt"

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,4 @@
<map id="get_rand" name="get_rand">
<area shape="rect" id="node1" title="Function to get random numbers to generate our complex numbers for test." alt="" coords="5,5,80,32"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand.html#" title=" " alt="" coords="128,5,201,32"/>
</map>

View File

@@ -0,0 +1 @@
e0c8903587f96676ded7713bd2100f25

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: get_rand Pages: 1 -->
<svg width="155pt" height="28pt"
viewBox="0.00 0.00 155.00 28.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 24)">
<title>get_rand</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-24 151,-24 151,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Function to get random numbers to generate our complex numbers for test.">
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-19.5 56,-19.5 56,-0.5 0,-0.5"/>
<text text-anchor="middle" x="28" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">get_rand</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="92,-0.5 92,-19.5 147,-19.5 147,-0.5 92,-0.5"/>
<text text-anchor="middle" x="119.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::rand</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M56.34,-10C64.38,-10 73.31,-10 81.83,-10"/>
<polygon fill="midnightblue" stroke="midnightblue" points="81.94,-13.5 91.94,-10 81.94,-6.5 81.94,-13.5"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: tests Pages: 1 -->
<svg width="273pt" height="218pt"

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: main Pages: 1 -->
<svg width="347pt" height="218pt"

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: math/largest_power.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d7a/largest__power_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -93,8 +93,7 @@ $(document).ready(function(){initNavTree('d5/d7a/largest__power_8cpp.html','../.
<div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">largest_power.cpp File Reference</div> </div>
<div class="headertitle"><div class="title">largest_power.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
@@ -109,13 +108,13 @@ Include dependency graph for largest_power.cpp:</div>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:dd/d47/namespacemath"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d47/namespacemath.html">math</a></td></tr>
<tr class="memitem:dd/d47/namespacemath"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d47/namespacemath.html">math</a></td></tr>
<tr class="memdesc:dd/d47/namespacemath"><td class="mdescLeft">&#160;</td><td class="mdescRight">for IO operations <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:afa39ec943a4836c878e1614fd89b146f"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">math::largestPower</a> (uint32_t n, const uint16_t &amp;p)</td></tr>
<tr class="memdesc:afa39ec943a4836c878e1614fd89b146f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to calculate largest power. <a href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">More...</a><br /></td></tr>
@@ -128,11 +127,11 @@ Functions</h2></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Algorithm to find largest x such that p^x divides n! (factorial) using Legendre's Formula. </p>
<p>Given an integer n and a prime number p, the task is to find the largest x such that p^x (p raised to power x) divides n! (factorial). This will be done using Legendre's formula: x = [n/(p^1)] + [n/(p^2)] + [n/(p^3)] + \ldots + 1 </p><dl class="section see"><dt>See also</dt><dd>more on <a href="https://math.stackexchange.com/questions/141196/highest-power-of-a-prime-p-dividing-n">https://math.stackexchange.com/questions/141196/highest-power-of-a-prime-p-dividing-n</a> </dd></dl>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/uday6670">uday6670</a> </dd></dl>
<div class="textblock"><p >Algorithm to find largest x such that p^x divides n! (factorial) using Legendre's Formula. </p>
<p >Given an integer n and a prime number p, the task is to find the largest x such that p^x (p raised to power x) divides n! (factorial). This will be done using Legendre's formula: x = [n/(p^1)] + [n/(p^2)] + [n/(p^3)] + \ldots + 1 </p><dl class="section see"><dt>See also</dt><dd>more on <a href="https://math.stackexchange.com/questions/141196/highest-power-of-a-prime-p-dividing-n">https://math.stackexchange.com/questions/141196/highest-power-of-a-prime-p-dividing-n</a> </dd></dl>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/uday6670" target="_blank">uday6670</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
@@ -150,10 +149,10 @@ Functions</h2></td></tr>
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;{ </div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <a class="code" href="../../d5/d7a/largest__power_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// execute the tests</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;} </div>
<div class="fragment"><div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span>{ </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <a class="code hl_function" href="../../d5/d7a/largest__power_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// execute the tests</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>} </div>
<div class="ttc" id="alargest__power_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../d5/d7a/largest__power_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Function for testing largestPower function. test cases and assert statement.</div><div class="ttdef"><b>Definition:</b> largest_power.cpp:47</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -164,7 +163,7 @@ Here is the call graph for this function:</div>
</div>
</div>
<a id="aa8dca7b867074164d5f45b0f3851269d"></a>
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8dca7b867074164d5f45b0f3851269d">&#9670;&nbsp;</a></span>test()</h2>
<div class="memitem">
@@ -189,27 +188,27 @@ Here is the call graph for this function:</div>
<p>Function for testing largestPower function. test cases and assert statement. </p>
<dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
<div class="fragment"><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;{</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; uint8_t test_case_1 = <a class="code" href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">math::largestPower</a>(5,2);</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; assert(test_case_1==3);</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a>&lt;&lt;<span class="stringliteral">&quot;Test 1 Passed!&quot;</span>&lt;&lt;<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; </div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; uint16_t test_case_2 = <a class="code" href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">math::largestPower</a>(10,3);</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; assert(test_case_2==4);</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a>&lt;&lt;<span class="stringliteral">&quot;Test 2 Passed!&quot;</span>&lt;&lt;<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; uint32_t test_case_3 = <a class="code" href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">math::largestPower</a>(25,5);</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; assert(test_case_3==6);</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a>&lt;&lt;<span class="stringliteral">&quot;Test 3 Passed!&quot;</span>&lt;&lt;<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; uint32_t test_case_4 = <a class="code" href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">math::largestPower</a>(27,2);</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; assert(test_case_4==23);</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a>&lt;&lt;<span class="stringliteral">&quot;Test 4 Passed!&quot;</span>&lt;&lt;<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; uint16_t test_case_5 = <a class="code" href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">math::largestPower</a>(7,3);</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; assert(test_case_5==2);</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a>&lt;&lt;<span class="stringliteral">&quot;Test 5 Passed!&quot;</span>&lt;&lt;<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;} </div>
<div class="fragment"><div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>{</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> uint8_t test_case_1 = <a class="code hl_function" href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">math::largestPower</a>(5,2);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> assert(test_case_1==3);</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</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;Test 1 Passed!&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"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> uint16_t test_case_2 = <a class="code hl_function" href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">math::largestPower</a>(10,3);</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> assert(test_case_2==4);</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</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;Test 2 Passed!&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"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> uint32_t test_case_3 = <a class="code hl_function" href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">math::largestPower</a>(25,5);</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> assert(test_case_3==6);</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</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;Test 3 Passed!&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"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> uint32_t test_case_4 = <a class="code hl_function" href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">math::largestPower</a>(27,2);</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> assert(test_case_4==23);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</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;Test 4 Passed!&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"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> uint16_t test_case_5 = <a class="code hl_function" href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">math::largestPower</a>(7,3);</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> assert(test_case_5==2);</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</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;Test 5 Passed!&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"><a id="l00068" name="l00068"></a><span class="lineno"> 68</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="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 class="ttc" id="anamespacemath_html_afa39ec943a4836c878e1614fd89b146f"><div class="ttname"><a href="../../dd/d47/namespacemath.html#afa39ec943a4836c878e1614fd89b146f">math::largestPower</a></div><div class="ttdeci">uint64_t largestPower(uint32_t n, const uint16_t &amp;p)</div><div class="ttdoc">Function to calculate largest power.</div><div class="ttdef"><b>Definition:</b> largest_power.cpp:26</div></div>
@@ -228,7 +227,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_296d53ceaeaa7e099814a6def439fe8a.html">math</a></li><li class="navelem"><a class="el" href="../../d5/d7a/largest__power_8cpp.html">largest_power.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: test Pages: 1 -->
<svg width="180pt" height="66pt"

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: main Pages: 1 -->
<svg width="254pt" height="66pt"

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: math/lcm_sum.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d83/lcm__sum_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -93,8 +93,7 @@ $(document).ready(function(){initNavTree('d5/d83/lcm__sum_8cpp.html','../../');
<div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">lcm_sum.cpp File Reference</div> </div>
<div class="headertitle"><div class="title">lcm_sum.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
@@ -110,13 +109,13 @@ Include dependency graph for lcm_sum.cpp:</div>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:dd/d47/namespacemath"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d47/namespacemath.html">math</a></td></tr>
<tr class="memitem:dd/d47/namespacemath"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d47/namespacemath.html">math</a></td></tr>
<tr class="memdesc:dd/d47/namespacemath"><td class="mdescLeft">&#160;</td><td class="mdescRight">for IO operations <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a04065193d190d605e1f0d0d93a87e244"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d47/namespacemath.html#a04065193d190d605e1f0d0d93a87e244">math::lcmSum</a> (const uint16_t &amp;num)</td></tr>
<tr class="separator:a04065193d190d605e1f0d0d93a87e244"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -127,13 +126,13 @@ Functions</h2></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An algorithm to calculate the sum of LCM: \(\mathrm{LCM}(1,n) + \mathrm{LCM}(2,n) + \ldots + \mathrm{LCM}(n,n)\). </p>
<p>An algorithm to calculate the sum of LCM: \(\mathrm{LCM}(1,n) + \mathrm{LCM}(2,n) + \ldots + \mathrm{LCM}(n,n)\) where \(\mathrm{LCM}(i,n)\) denotes the Least Common Multiple of the integers i and n. For n greater than or equal to 1. The value of the sum is calculated by formula: </p><p class="formulaDsp">
<div class="textblock"><p >An algorithm to calculate the sum of LCM: \(\mathrm{LCM}(1,n) + \mathrm{LCM}(2,n) + \ldots + \mathrm{LCM}(n,n)\). </p>
<p >An algorithm to calculate the sum of LCM: \(\mathrm{LCM}(1,n) + \mathrm{LCM}(2,n) + \ldots + \mathrm{LCM}(n,n)\) where \(\mathrm{LCM}(i,n)\) denotes the Least Common Multiple of the integers i and n. For n greater than or equal to 1. The value of the sum is calculated by formula: </p><p class="formulaDsp">
\[ \sum\mathrm{LCM}(i, n) = \frac{1}{2} \left[\left(\sum (d * \mathrm{ETF}(d)) + 1\right) * n\right] \]
</p>
<p> where \mathrm{ETF}(i) represents Euler totient function of i. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/chestamittal">Chesta Mittal</a> </dd></dl>
<p> where \mathrm{ETF}(i) represents Euler totient function of i. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/chestamittal" target="_blank">Chesta Mittal</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
@@ -151,10 +150,10 @@ Functions</h2></td></tr>
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; {</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <a class="code" href="../../d5/d83/lcm__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// execute the tests</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <a class="code hl_function" href="../../d5/d83/lcm__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// execute the tests</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span>}</div>
<div class="ttc" id="alcm__sum_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../d5/d83/lcm__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdef"><b>Definition:</b> lcm_sum.cpp:65</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -165,7 +164,7 @@ Here is the call graph for this function:</div>
</div>
</div>
<a id="aa8dca7b867074164d5f45b0f3851269d"></a>
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8dca7b867074164d5f45b0f3851269d">&#9670;&nbsp;</a></span>test()</h2>
<div class="memitem">
@@ -187,33 +186,33 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p>Function for testing lcmSum function. test cases and assert statement. </p><dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
<div class="fragment"><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; {</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; uint64_t n = 2;</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; uint64_t test_1 = <a class="code" href="../../dd/d47/namespacemath.html#a04065193d190d605e1f0d0d93a87e244">math::lcmSum</a>(n);</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; assert(test_1 == 4);</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Passed Test 1!&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; n = 5;</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; uint64_t test_2 = <a class="code" href="../../dd/d47/namespacemath.html#a04065193d190d605e1f0d0d93a87e244">math::lcmSum</a>(n);</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; assert(test_2 == 55);</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Passed Test 2!&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; n = 10;</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; uint64_t test_3 = <a class="code" href="../../dd/d47/namespacemath.html#a04065193d190d605e1f0d0d93a87e244">math::lcmSum</a>(n);</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; assert(test_3 == 320);</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Passed Test 3!&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; n = 11;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; uint64_t test_4 = <a class="code" href="../../dd/d47/namespacemath.html#a04065193d190d605e1f0d0d93a87e244">math::lcmSum</a>(n);</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; assert(test_4 == 616);</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Passed Test 4!&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; n = 15;</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; uint64_t test_5 = <a class="code" href="../../dd/d47/namespacemath.html#a04065193d190d605e1f0d0d93a87e244">math::lcmSum</a>(n);</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; assert(test_5 == 1110);</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Passed Test 5!&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;}</div>
<p >Function for testing lcmSum function. test cases and assert statement. </p><dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
<div class="fragment"><div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> {</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> uint64_t n = 2;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> uint64_t test_1 = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a04065193d190d605e1f0d0d93a87e244">math::lcmSum</a>(n);</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> assert(test_1 == 4);</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</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;Passed Test 1!&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"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> n = 5;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> uint64_t test_2 = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a04065193d190d605e1f0d0d93a87e244">math::lcmSum</a>(n);</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> assert(test_2 == 55);</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</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;Passed Test 2!&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"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> n = 10;</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> uint64_t test_3 = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a04065193d190d605e1f0d0d93a87e244">math::lcmSum</a>(n);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> assert(test_3 == 320);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</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;Passed Test 3!&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"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> n = 11;</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> uint64_t test_4 = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a04065193d190d605e1f0d0d93a87e244">math::lcmSum</a>(n);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> assert(test_4 == 616);</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</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;Passed Test 4!&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"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> n = 15;</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> uint64_t test_5 = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a04065193d190d605e1f0d0d93a87e244">math::lcmSum</a>(n);</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> assert(test_5 == 1110);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</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;Passed Test 5!&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"><a id="l00090" name="l00090"></a><span class="lineno"> 90</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="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 class="ttc" id="anamespacemath_html_a04065193d190d605e1f0d0d93a87e244"><div class="ttname"><a href="../../dd/d47/namespacemath.html#a04065193d190d605e1f0d0d93a87e244">math::lcmSum</a></div><div class="ttdeci">uint64_t lcmSum(const uint16_t &amp;num)</div><div class="ttdef"><b>Definition:</b> lcm_sum.cpp:29</div></div>
@@ -232,7 +231,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_296d53ceaeaa7e099814a6def439fe8a.html">math</a></li><li class="navelem"><a class="el" href="../../d5/d83/lcm__sum_8cpp.html">lcm_sum.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: test Pages: 1 -->
<svg width="157pt" height="66pt"

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: main Pages: 1 -->
<svg width="231pt" height="66pt"

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: ciphers/xor_cipher.cpp Pages: 1 -->
<svg width="189pt" height="84pt"

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: Backtracking</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d88/md__d_i_r_e_c_t_o_r_y.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -89,389 +89,389 @@ $(document).ready(function(){initNavTree('d5/d88/md__d_i_r_e_c_t_o_r_y.html','..
</iframe>
</div>
<div class="PageDoc"><div class="header">
<div class="headertitle">
<div class="title">Backtracking </div> </div>
<div><div class="header">
<div class="headertitle"><div class="title">Backtracking </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/graph_coloring.cpp">Graph Coloring</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/knight_tour.cpp">Knight Tour</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/magic_sequence.cpp">Magic Sequence</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/minimax.cpp">Minimax</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/n_queens.cpp">N Queens</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/n_queens_all_solution_optimised.cpp">N Queens All Solution Optimised</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/nqueen_print_all_solutions.cpp">Nqueen Print All Solutions</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/rat_maze.cpp">Rat Maze</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/subarray_sum.cpp">Subarray Sum</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/subset_sum.cpp">Subset Sum</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/sudoku_solve.cpp">Sudoku Solve</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/wildcard_matching.cpp">Wildcard Matching</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/graph_coloring.cpp" target="_blank">Graph Coloring</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/knight_tour.cpp" target="_blank">Knight Tour</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/magic_sequence.cpp" target="_blank">Magic Sequence</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/minimax.cpp" target="_blank">Minimax</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/n_queens.cpp" target="_blank">N Queens</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/n_queens_all_solution_optimised.cpp" target="_blank">N Queens All Solution Optimised</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/nqueen_print_all_solutions.cpp" target="_blank">Nqueen Print All Solutions</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/rat_maze.cpp" target="_blank">Rat Maze</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/subarray_sum.cpp" target="_blank">Subarray Sum</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/subset_sum.cpp" target="_blank">Subset Sum</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/sudoku_solve.cpp" target="_blank">Sudoku Solve</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/backtracking/wildcard_matching.cpp" target="_blank">Wildcard Matching</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md37"></a>
Bit Manipulation</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/bit_manipulation/count_of_set_bits.cpp">Count Of Set Bits</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp">Count Of Trailing Ciphers In Factorial N</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/bit_manipulation/hamming_distance.cpp">Hamming Distance</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/bit_manipulation/count_of_set_bits.cpp" target="_blank">Count Of Set Bits</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp" target="_blank">Count Of Trailing Ciphers In Factorial N</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/bit_manipulation/hamming_distance.cpp" target="_blank">Hamming Distance</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md38"></a>
Ciphers</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/base64_encoding.cpp">Base64 Encoding</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/caesar_cipher.cpp">Caesar Cipher</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/elliptic_curve_key_exchange.cpp">Elliptic Curve Key Exchange</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/hill_cipher.cpp">Hill Cipher</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/morse_code.cpp">Morse Code</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/uint128_t.hpp">Uint128 T</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/uint256_t.hpp">Uint256 T</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/vigenere_cipher.cpp">Vigenere Cipher</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/xor_cipher.cpp">Xor Cipher</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/base64_encoding.cpp" target="_blank">Base64 Encoding</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/caesar_cipher.cpp" target="_blank">Caesar Cipher</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/elliptic_curve_key_exchange.cpp" target="_blank">Elliptic Curve Key Exchange</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/hill_cipher.cpp" target="_blank">Hill Cipher</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/morse_code.cpp" target="_blank">Morse Code</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/uint128_t.hpp" target="_blank">Uint128 T</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/uint256_t.hpp" target="_blank">Uint256 T</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/vigenere_cipher.cpp" target="_blank">Vigenere Cipher</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/ciphers/xor_cipher.cpp" target="_blank">Xor Cipher</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md39"></a>
Data Structures</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/avltree.cpp">Avltree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/binary_search_tree.cpp">Binary Search Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/binary_search_tree2.cpp">Binary Search Tree2</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/binaryheap.cpp">Binaryheap</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/circular_queue_using_linked_list.cpp">Circular Queue Using Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/avltree.cpp" target="_blank">Avltree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/binary_search_tree.cpp" target="_blank">Binary Search Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/binary_search_tree2.cpp" target="_blank">Binary Search Tree2</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/binaryheap.cpp" target="_blank">Binaryheap</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/circular_queue_using_linked_list.cpp" target="_blank">Circular Queue Using Linked List</a></li>
<li>Cll<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/cll/cll.cpp">Cll</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/cll/cll.h">Cll</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/cll/main_cll.cpp">Main Cll</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/cll/cll.cpp" target="_blank">Cll</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/cll/cll.h" target="_blank">Cll</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/cll/main_cll.cpp" target="_blank">Main Cll</a></li>
</ul>
</li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/disjoint_set.cpp">Disjoint Set</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/doubly_linked_list.cpp">Doubly Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/linked_list.cpp">Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/linkedlist_implentation_usingarray.cpp">Linkedlist Implentation Usingarray</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/list_array.cpp">List Array</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/morrisinorder.cpp">Morrisinorder</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue.h">Queue</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue_using_array.cpp">Queue Using Array</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue_using_array2.cpp">Queue Using Array2</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue_using_linked_list.cpp">Queue Using Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue_using_linkedlist.cpp">Queue Using Linkedlist</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue_using_two_stacks.cpp">Queue Using Two Stacks</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/rb_tree.cpp">Rb Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/skip_list.cpp">Skip List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/sparse_table.cpp">Sparse Table</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/stack.h">Stack</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/stack_using_array.cpp">Stack Using Array</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/stack_using_linked_list.cpp">Stack Using Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/test_queue.cpp">Test Queue</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/test_stack.cpp">Test Stack</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/test_stack_students.cpp">Test Stack Students</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/tree.cpp">Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/tree_234.cpp">Tree 234</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/trie_modern.cpp">Trie Modern</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/trie_tree.cpp">Trie Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/trie_using_hashmap.cpp">Trie Using Hashmap</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/disjoint_set.cpp" target="_blank">Disjoint Set</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/doubly_linked_list.cpp" target="_blank">Doubly Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/linked_list.cpp" target="_blank">Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/linkedlist_implentation_usingarray.cpp" target="_blank">Linkedlist Implentation Usingarray</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/list_array.cpp" target="_blank">List Array</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/morrisinorder.cpp" target="_blank">Morrisinorder</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue.h" target="_blank">Queue</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue_using_array.cpp" target="_blank">Queue Using Array</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue_using_array2.cpp" target="_blank">Queue Using Array2</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue_using_linked_list.cpp" target="_blank">Queue Using Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue_using_linkedlist.cpp" target="_blank">Queue Using Linkedlist</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/queue_using_two_stacks.cpp" target="_blank">Queue Using Two Stacks</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/rb_tree.cpp" target="_blank">Rb Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/skip_list.cpp" target="_blank">Skip List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/sparse_table.cpp" target="_blank">Sparse Table</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/stack.h" target="_blank">Stack</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/stack_using_array.cpp" target="_blank">Stack Using Array</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/stack_using_linked_list.cpp" target="_blank">Stack Using Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/test_queue.cpp" target="_blank">Test Queue</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/test_stack.cpp" target="_blank">Test Stack</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/test_stack_students.cpp" target="_blank">Test Stack Students</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/tree.cpp" target="_blank">Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/tree_234.cpp" target="_blank">Tree 234</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/trie_modern.cpp" target="_blank">Trie Modern</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/trie_tree.cpp" target="_blank">Trie Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/data_structures/trie_using_hashmap.cpp" target="_blank">Trie Using Hashmap</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md40"></a>
Divide And Conquer</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/divide_and_conquer/karatsuba_algorithm_for_fast_multiplication.cpp">Karatsuba Algorithm For Fast Multiplication</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/divide_and_conquer/karatsuba_algorithm_for_fast_multiplication.cpp" target="_blank">Karatsuba Algorithm For Fast Multiplication</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md41"></a>
Dynamic Programming</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/0_1_knapsack.cpp">0 1 Knapsack</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/abbreviation.cpp">Abbreviation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/armstrong_number.cpp">Armstrong Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/bellman_ford.cpp">Bellman Ford</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/catalan_numbers.cpp">Catalan Numbers</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/coin_change.cpp">Coin Change</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/coin_change_topdown.cpp">Coin Change Topdown</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/cut_rod.cpp">Cut Rod</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/edit_distance.cpp">Edit Distance</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/egg_dropping_puzzle.cpp">Egg Dropping Puzzle</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/fibonacci_bottom_up.cpp">Fibonacci Bottom Up</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/floyd_warshall.cpp">Floyd Warshall</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/house_robber.cpp">House Robber</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/kadane.cpp">Kadane</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/kadane2.cpp">Kadane2</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/longest_common_string.cpp">Longest Common String</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/longest_common_subsequence.cpp">Longest Common Subsequence</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/longest_increasing_subsequence.cpp">Longest Increasing Subsequence</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/longest_increasing_subsequence_(nlogn).cpp">Longest Increasing Subsequence (Nlogn)</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/longest_palindromic_subsequence.cpp">Longest Palindromic Subsequence</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/matrix_chain_multiplication.cpp">Matrix Chain Multiplication</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/minimum_edit_distance.cpp">Minimum Edit Distance</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/palindrome_partitioning.cpp">Palindrome Partitioning</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/searching_of_element_in_dynamic_array.cpp">Searching Of Element In Dynamic Array</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/shortest_common_supersequence.cpp">Shortest Common Supersequence</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/tree_height.cpp">Tree Height</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/word_break.cpp">Word Break</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/0_1_knapsack.cpp" target="_blank">0 1 Knapsack</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/abbreviation.cpp" target="_blank">Abbreviation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/armstrong_number.cpp" target="_blank">Armstrong Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/bellman_ford.cpp" target="_blank">Bellman Ford</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/catalan_numbers.cpp" target="_blank">Catalan Numbers</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/coin_change.cpp" target="_blank">Coin Change</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/coin_change_topdown.cpp" target="_blank">Coin Change Topdown</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/cut_rod.cpp" target="_blank">Cut Rod</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/edit_distance.cpp" target="_blank">Edit Distance</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/egg_dropping_puzzle.cpp" target="_blank">Egg Dropping Puzzle</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/fibonacci_bottom_up.cpp" target="_blank">Fibonacci Bottom Up</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/floyd_warshall.cpp" target="_blank">Floyd Warshall</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/house_robber.cpp" target="_blank">House Robber</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/kadane.cpp" target="_blank">Kadane</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/kadane2.cpp" target="_blank">Kadane2</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/longest_common_string.cpp" target="_blank">Longest Common String</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/longest_common_subsequence.cpp" target="_blank">Longest Common Subsequence</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/longest_increasing_subsequence.cpp" target="_blank">Longest Increasing Subsequence</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/longest_increasing_subsequence_(nlogn).cpp" target="_blank">Longest Increasing Subsequence (Nlogn)</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/longest_palindromic_subsequence.cpp" target="_blank">Longest Palindromic Subsequence</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/matrix_chain_multiplication.cpp" target="_blank">Matrix Chain Multiplication</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/minimum_edit_distance.cpp" target="_blank">Minimum Edit Distance</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/palindrome_partitioning.cpp" target="_blank">Palindrome Partitioning</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/searching_of_element_in_dynamic_array.cpp" target="_blank">Searching Of Element In Dynamic Array</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/shortest_common_supersequence.cpp" target="_blank">Shortest Common Supersequence</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/tree_height.cpp" target="_blank">Tree Height</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/word_break.cpp" target="_blank">Word Break</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md42"></a>
Geometry</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/geometry/jarvis_algorithm.cpp">Jarvis Algorithm</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/geometry/line_segment_intersection.cpp">Line Segment Intersection</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/geometry/jarvis_algorithm.cpp" target="_blank">Jarvis Algorithm</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/geometry/line_segment_intersection.cpp" target="_blank">Line Segment Intersection</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md43"></a>
Graph</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/bidirectional_dijkstra.cpp">Bidirectional Dijkstra</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/breadth_first_search.cpp">Breadth First Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/bridge_finding_with_tarjan_algorithm.cpp">Bridge Finding With Tarjan Algorithm</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/connected_components.cpp">Connected Components</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/connected_components_with_dsu.cpp">Connected Components With Dsu</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/cycle_check_directed_graph.cpp">Cycle Check Directed Graph</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/depth_first_search.cpp">Depth First Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/depth_first_search_with_stack.cpp">Depth First Search With Stack</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/dijkstra.cpp">Dijkstra</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/hamiltons_cycle.cpp">Hamiltons Cycle</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/hopcroft_karp.cpp">Hopcroft Karp</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/is_graph_bipartite.cpp">Is Graph Bipartite</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/kosaraju.cpp">Kosaraju</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/kruskal.cpp">Kruskal</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/lowest_common_ancestor.cpp">Lowest Common Ancestor</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/max_flow_with_ford_fulkerson_and_edmond_karp_algo.cpp">Max Flow With Ford Fulkerson And Edmond Karp Algo</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/prim.cpp">Prim</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/topological_sort.cpp">Topological Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/topological_sort_by_kahns_algo.cpp">Topological Sort By Kahns Algo</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/bidirectional_dijkstra.cpp" target="_blank">Bidirectional Dijkstra</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/breadth_first_search.cpp" target="_blank">Breadth First Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/bridge_finding_with_tarjan_algorithm.cpp" target="_blank">Bridge Finding With Tarjan Algorithm</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/connected_components.cpp" target="_blank">Connected Components</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/connected_components_with_dsu.cpp" target="_blank">Connected Components With Dsu</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/cycle_check_directed_graph.cpp" target="_blank">Cycle Check Directed Graph</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/depth_first_search.cpp" target="_blank">Depth First Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/depth_first_search_with_stack.cpp" target="_blank">Depth First Search With Stack</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/dijkstra.cpp" target="_blank">Dijkstra</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/hamiltons_cycle.cpp" target="_blank">Hamiltons Cycle</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/hopcroft_karp.cpp" target="_blank">Hopcroft Karp</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/is_graph_bipartite.cpp" target="_blank">Is Graph Bipartite</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/kosaraju.cpp" target="_blank">Kosaraju</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/kruskal.cpp" target="_blank">Kruskal</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/lowest_common_ancestor.cpp" target="_blank">Lowest Common Ancestor</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/max_flow_with_ford_fulkerson_and_edmond_karp_algo.cpp" target="_blank">Max Flow With Ford Fulkerson And Edmond Karp Algo</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/prim.cpp" target="_blank">Prim</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/topological_sort.cpp" target="_blank">Topological Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graph/topological_sort_by_kahns_algo.cpp" target="_blank">Topological Sort By Kahns Algo</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md44"></a>
Graphics</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graphics/spirograph.cpp">Spirograph</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/graphics/spirograph.cpp" target="_blank">Spirograph</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md45"></a>
Greedy Algorithms</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/dijkstra.cpp">Dijkstra</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/huffman.cpp">Huffman</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/jumpgame.cpp">Jumpgame</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/knapsack.cpp">Knapsack</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/kruskals_minimum_spanning_tree.cpp">Kruskals Minimum Spanning Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/prims_minimum_spanning_tree.cpp">Prims Minimum Spanning Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/dijkstra.cpp" target="_blank">Dijkstra</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/huffman.cpp" target="_blank">Huffman</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/jumpgame.cpp" target="_blank">Jumpgame</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/knapsack.cpp" target="_blank">Knapsack</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/kruskals_minimum_spanning_tree.cpp" target="_blank">Kruskals Minimum Spanning Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/greedy_algorithms/prims_minimum_spanning_tree.cpp" target="_blank">Prims Minimum Spanning Tree</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md46"></a>
Hashing</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/chaining.cpp">Chaining</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/double_hash_hash_table.cpp">Double Hash Hash Table</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/linear_probing_hash_table.cpp">Linear Probing Hash Table</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/quadratic_probing_hash_table.cpp">Quadratic Probing Hash Table</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/chaining.cpp" target="_blank">Chaining</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/double_hash_hash_table.cpp" target="_blank">Double Hash Hash Table</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/linear_probing_hash_table.cpp" target="_blank">Linear Probing Hash Table</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/hashing/quadratic_probing_hash_table.cpp" target="_blank">Quadratic Probing Hash Table</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md47"></a>
Linear Algebra</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/linear_algebra/gram_schmidt.cpp">Gram Schmidt</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/linear_algebra/gram_schmidt.cpp" target="_blank">Gram Schmidt</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md48"></a>
Machine Learning</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/a_star_search.cpp">A Star Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/adaline_learning.cpp">Adaline Learning</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/kohonen_som_topology.cpp">Kohonen Som Topology</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/kohonen_som_trace.cpp">Kohonen Som Trace</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/neural_network.cpp">Neural Network</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/ordinary_least_squares_regressor.cpp">Ordinary Least Squares Regressor</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/vector_ops.hpp">Vector Ops</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/a_star_search.cpp" target="_blank">A Star Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/adaline_learning.cpp" target="_blank">Adaline Learning</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/kohonen_som_topology.cpp" target="_blank">Kohonen Som Topology</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/kohonen_som_trace.cpp" target="_blank">Kohonen Som Trace</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/neural_network.cpp" target="_blank">Neural Network</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/ordinary_least_squares_regressor.cpp" target="_blank">Ordinary Least Squares Regressor</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/vector_ops.hpp" target="_blank">Vector Ops</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md49"></a>
Math</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/armstrong_number.cpp">Armstrong Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/binary_exponent.cpp">Binary Exponent</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/binomial_calculate.cpp">Binomial Calculate</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/check_amicable_pair.cpp">Check Amicable Pair</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/check_factorial.cpp">Check Factorial</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/check_prime.cpp">Check Prime</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/complex_numbers.cpp">Complex Numbers</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/double_factorial.cpp">Double Factorial</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/eulers_totient_function.cpp">Eulers Totient Function</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/extended_euclid_algorithm.cpp">Extended Euclid Algorithm</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/factorial.cpp">Factorial</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/fast_power.cpp">Fast Power</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/fibonacci.cpp">Fibonacci</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/fibonacci_fast.cpp">Fibonacci Fast</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/fibonacci_large.cpp">Fibonacci Large</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/fibonacci_matrix_exponentiation.cpp">Fibonacci Matrix Exponentiation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/fibonacci_sum.cpp">Fibonacci Sum</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/gcd_iterative_euclidean.cpp">Gcd Iterative Euclidean</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/gcd_of_n_numbers.cpp">Gcd Of N Numbers</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/gcd_recursive_euclidean.cpp">Gcd Recursive Euclidean</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/integral_approximation.cpp">Integral Approximation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/inv_sqrt.cpp">Inv Sqrt</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/large_factorial.cpp">Large Factorial</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/large_number.h">Large Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/largest_power.cpp">Largest Power</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/lcm_sum.cpp">Lcm Sum</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/least_common_multiple.cpp">Least Common Multiple</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/linear_recurrence_matrix.cpp">Linear Recurrence Matrix</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/magic_number.cpp">Magic Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/miller_rabin.cpp">Miller Rabin</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/modular_division.cpp">Modular Division</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/modular_exponentiation.cpp">Modular Exponentiation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/modular_inverse_fermat_little_theorem.cpp">Modular Inverse Fermat Little Theorem</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/n_bonacci.cpp">N Bonacci</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/n_choose_r.cpp">N Choose R</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/ncr_modulo_p.cpp">Ncr Modulo P</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/number_of_positive_divisors.cpp">Number Of Positive Divisors</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/power_for_huge_numbers.cpp">Power For Huge Numbers</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/power_of_two.cpp">Power Of Two</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/prime_factorization.cpp">Prime Factorization</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/prime_numbers.cpp">Prime Numbers</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/primes_up_to_billion.cpp">Primes Up To Billion</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/realtime_stats.cpp">Realtime Stats</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/sieve_of_eratosthenes.cpp">Sieve Of Eratosthenes</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/sqrt_double.cpp">Sqrt Double</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/string_fibonacci.cpp">String Fibonacci</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/sum_of_binomial_coefficient.cpp">Sum Of Binomial Coefficient</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/sum_of_digits.cpp">Sum Of Digits</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/vector_cross_product.cpp">Vector Cross Product</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/armstrong_number.cpp" target="_blank">Armstrong Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/binary_exponent.cpp" target="_blank">Binary Exponent</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/binomial_calculate.cpp" target="_blank">Binomial Calculate</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/check_amicable_pair.cpp" target="_blank">Check Amicable Pair</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/check_factorial.cpp" target="_blank">Check Factorial</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/check_prime.cpp" target="_blank">Check Prime</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/complex_numbers.cpp" target="_blank">Complex Numbers</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/double_factorial.cpp" target="_blank">Double Factorial</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/eulers_totient_function.cpp" target="_blank">Eulers Totient Function</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/extended_euclid_algorithm.cpp" target="_blank">Extended Euclid Algorithm</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/factorial.cpp" target="_blank">Factorial</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/fast_power.cpp" target="_blank">Fast Power</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/fibonacci.cpp" target="_blank">Fibonacci</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/fibonacci_fast.cpp" target="_blank">Fibonacci Fast</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/fibonacci_large.cpp" target="_blank">Fibonacci Large</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/fibonacci_matrix_exponentiation.cpp" target="_blank">Fibonacci Matrix Exponentiation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/fibonacci_sum.cpp" target="_blank">Fibonacci Sum</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/finding_number_of_digits_in_a_number.cpp" target="_blank">Finding Number Of Digits In A Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/gcd_iterative_euclidean.cpp" target="_blank">Gcd Iterative Euclidean</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/gcd_of_n_numbers.cpp" target="_blank">Gcd Of N Numbers</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/gcd_recursive_euclidean.cpp" target="_blank">Gcd Recursive Euclidean</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/integral_approximation.cpp" target="_blank">Integral Approximation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/inv_sqrt.cpp" target="_blank">Inv Sqrt</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/large_factorial.cpp" target="_blank">Large Factorial</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/large_number.h" target="_blank">Large Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/largest_power.cpp" target="_blank">Largest Power</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/lcm_sum.cpp" target="_blank">Lcm Sum</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/least_common_multiple.cpp" target="_blank">Least Common Multiple</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/linear_recurrence_matrix.cpp" target="_blank">Linear Recurrence Matrix</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/magic_number.cpp" target="_blank">Magic Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/miller_rabin.cpp" target="_blank">Miller Rabin</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/modular_division.cpp" target="_blank">Modular Division</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/modular_exponentiation.cpp" target="_blank">Modular Exponentiation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/modular_inverse_fermat_little_theorem.cpp" target="_blank">Modular Inverse Fermat Little Theorem</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/n_bonacci.cpp" target="_blank">N Bonacci</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/n_choose_r.cpp" target="_blank">N Choose R</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/ncr_modulo_p.cpp" target="_blank">Ncr Modulo P</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/number_of_positive_divisors.cpp" target="_blank">Number Of Positive Divisors</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/power_for_huge_numbers.cpp" target="_blank">Power For Huge Numbers</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/power_of_two.cpp" target="_blank">Power Of Two</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/prime_factorization.cpp" target="_blank">Prime Factorization</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/prime_numbers.cpp" target="_blank">Prime Numbers</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/primes_up_to_billion.cpp" target="_blank">Primes Up To Billion</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/realtime_stats.cpp" target="_blank">Realtime Stats</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/sieve_of_eratosthenes.cpp" target="_blank">Sieve Of Eratosthenes</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/sqrt_double.cpp" target="_blank">Sqrt Double</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/string_fibonacci.cpp" target="_blank">String Fibonacci</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/sum_of_binomial_coefficient.cpp" target="_blank">Sum Of Binomial Coefficient</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/sum_of_digits.cpp" target="_blank">Sum Of Digits</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/vector_cross_product.cpp" target="_blank">Vector Cross Product</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md50"></a>
Numerical Methods</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/bisection_method.cpp">Bisection Method</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/brent_method_extrema.cpp">Brent Method Extrema</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/durand_kerner_roots.cpp">Durand Kerner Roots</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/false_position.cpp">False Position</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/gaussian_elimination.cpp">Gaussian Elimination</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/golden_search_extrema.cpp">Golden Search Extrema</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/lu_decompose.cpp">Lu Decompose</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/lu_decomposition.h">Lu Decomposition</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/newton_raphson_method.cpp">Newton Raphson Method</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/ode_forward_euler.cpp">Ode Forward Euler</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/ode_midpoint_euler.cpp">Ode Midpoint Euler</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/ode_semi_implicit_euler.cpp">Ode Semi Implicit Euler</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/qr_decompose.h">Qr Decompose</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/qr_decomposition.cpp">Qr Decomposition</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/qr_eigen_values.cpp">Qr Eigen Values</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/rungekutta.cpp">Rungekutta</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/successive_approximation.cpp">Successive Approximation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/bisection_method.cpp" target="_blank">Bisection Method</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/brent_method_extrema.cpp" target="_blank">Brent Method Extrema</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/durand_kerner_roots.cpp" target="_blank">Durand Kerner Roots</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/false_position.cpp" target="_blank">False Position</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/gaussian_elimination.cpp" target="_blank">Gaussian Elimination</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/golden_search_extrema.cpp" target="_blank">Golden Search Extrema</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/lu_decompose.cpp" target="_blank">Lu Decompose</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/lu_decomposition.h" target="_blank">Lu Decomposition</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/newton_raphson_method.cpp" target="_blank">Newton Raphson Method</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/ode_forward_euler.cpp" target="_blank">Ode Forward Euler</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/ode_midpoint_euler.cpp" target="_blank">Ode Midpoint Euler</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/ode_semi_implicit_euler.cpp" target="_blank">Ode Semi Implicit Euler</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/qr_decompose.h" target="_blank">Qr Decompose</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/qr_decomposition.cpp" target="_blank">Qr Decomposition</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/qr_eigen_values.cpp" target="_blank">Qr Eigen Values</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/rungekutta.cpp" target="_blank">Rungekutta</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/numerical_methods/successive_approximation.cpp" target="_blank">Successive Approximation</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md51"></a>
Operations On Datastructures</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/array_left_rotation.cpp">Array Left Rotation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/array_right_rotation.cpp">Array Right Rotation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/circular_linked_list.cpp">Circular Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/circular_queue_using_array.cpp">Circular Queue Using Array</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/get_size_of_linked_list.cpp">Get Size Of Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/inorder_successor_of_bst.cpp">Inorder Successor Of Bst</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/intersection_of_2_arrays.cpp">Intersection Of 2 Arrays</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/reverse_a_linked_list_using_recusion.cpp">Reverse A Linked List Using Recusion</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/selectionsortlinkedlist.cpp">Selectionsortlinkedlist</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/trie_multiple_search.cpp">Trie Multiple Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/union_of_2_arrays.cpp">Union Of 2 Arrays</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/array_left_rotation.cpp" target="_blank">Array Left Rotation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/array_right_rotation.cpp" target="_blank">Array Right Rotation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/circular_linked_list.cpp" target="_blank">Circular Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/circular_queue_using_array.cpp" target="_blank">Circular Queue Using Array</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/get_size_of_linked_list.cpp" target="_blank">Get Size Of Linked List</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/inorder_successor_of_bst.cpp" target="_blank">Inorder Successor Of Bst</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/intersection_of_2_arrays.cpp" target="_blank">Intersection Of 2 Arrays</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/reverse_a_linked_list_using_recusion.cpp" target="_blank">Reverse A Linked List Using Recusion</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/selectionsortlinkedlist.cpp" target="_blank">Selectionsortlinkedlist</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/trie_multiple_search.cpp" target="_blank">Trie Multiple Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/operations_on_datastructures/union_of_2_arrays.cpp" target="_blank">Union Of 2 Arrays</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md52"></a>
Others</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/buzz_number.cpp">Buzz Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/decimal_to_binary.cpp">Decimal To Binary</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/decimal_to_hexadecimal.cpp">Decimal To Hexadecimal</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/decimal_to_roman_numeral.cpp">Decimal To Roman Numeral</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/fast_integer_input.cpp">Fast Integer Input</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/happy_number.cpp">Happy Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/iterative_tree_traversals.cpp">Iterative Tree Traversals</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/lru_cache.cpp">Lru Cache</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/matrix_exponentiation.cpp">Matrix Exponentiation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/palindrome_of_number.cpp">Palindrome Of Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/paranthesis_matching.cpp">Paranthesis Matching</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/pascal_triangle.cpp">Pascal Triangle</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/postfix_evaluation.cpp">Postfix Evaluation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/primality_test.cpp">Primality Test</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/smallest_circle.cpp">Smallest Circle</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/sparse_matrix.cpp">Sparse Matrix</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/spiral_print.cpp">Spiral Print</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/stairs_pattern.cpp">Stairs Pattern</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/tower_of_hanoi.cpp">Tower Of Hanoi</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/vector_important_functions.cpp">Vector Important Functions</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/buzz_number.cpp" target="_blank">Buzz Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/decimal_to_binary.cpp" target="_blank">Decimal To Binary</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/decimal_to_hexadecimal.cpp" target="_blank">Decimal To Hexadecimal</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/decimal_to_roman_numeral.cpp" target="_blank">Decimal To Roman Numeral</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/fast_integer_input.cpp" target="_blank">Fast Integer Input</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/happy_number.cpp" target="_blank">Happy Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/iterative_tree_traversals.cpp" target="_blank">Iterative Tree Traversals</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/lru_cache.cpp" target="_blank">Lru Cache</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/matrix_exponentiation.cpp" target="_blank">Matrix Exponentiation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/palindrome_of_number.cpp" target="_blank">Palindrome Of Number</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/paranthesis_matching.cpp" target="_blank">Paranthesis Matching</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/pascal_triangle.cpp" target="_blank">Pascal Triangle</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/postfix_evaluation.cpp" target="_blank">Postfix Evaluation</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/primality_test.cpp" target="_blank">Primality Test</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/smallest_circle.cpp" target="_blank">Smallest Circle</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/sparse_matrix.cpp" target="_blank">Sparse Matrix</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/spiral_print.cpp" target="_blank">Spiral Print</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/stairs_pattern.cpp" target="_blank">Stairs Pattern</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/tower_of_hanoi.cpp" target="_blank">Tower Of Hanoi</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/others/vector_important_functions.cpp" target="_blank">Vector Important Functions</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md53"></a>
Probability</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/addition_rule.cpp">Addition Rule</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/bayes_theorem.cpp">Bayes Theorem</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/binomial_dist.cpp">Binomial Dist</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/poisson_dist.cpp">Poisson Dist</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/addition_rule.cpp" target="_blank">Addition Rule</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/bayes_theorem.cpp" target="_blank">Bayes Theorem</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/binomial_dist.cpp" target="_blank">Binomial Dist</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/probability/poisson_dist.cpp" target="_blank">Poisson Dist</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md54"></a>
Range Queries</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/fenwick_tree.cpp">Fenwick Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/heavy_light_decomposition.cpp">Heavy Light Decomposition</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/mo.cpp">Mo</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/persistent_seg_tree_lazy_prop.cpp">Persistent Seg Tree Lazy Prop</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/segtree.cpp">Segtree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/sparse_table.cpp">Sparse Table</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/fenwick_tree.cpp" target="_blank">Fenwick Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/heavy_light_decomposition.cpp" target="_blank">Heavy Light Decomposition</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/mo.cpp" target="_blank">Mo</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/persistent_seg_tree_lazy_prop.cpp" target="_blank">Persistent Seg Tree Lazy Prop</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/segtree.cpp" target="_blank">Segtree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/sparse_table.cpp" target="_blank">Sparse Table</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md55"></a>
Search</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/binary_search.cpp">Binary Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/exponential_search.cpp">Exponential Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/fibonacci_search.cpp">Fibonacci Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/floyd_cycle_detection_algo.cpp">Floyd Cycle Detection Algo</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/hash_search.cpp">Hash Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/interpolation_search.cpp">Interpolation Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/interpolation_search2.cpp">Interpolation Search2</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/jump_search.cpp">Jump Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/linear_search.cpp">Linear Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/median_search.cpp">Median Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/saddleback_search.cpp">Saddleback Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/sublist_search.cpp">Sublist Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/ternary_search.cpp">Ternary Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/text_search.cpp">Text Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/binary_search.cpp" target="_blank">Binary Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/exponential_search.cpp" target="_blank">Exponential Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/fibonacci_search.cpp" target="_blank">Fibonacci Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/floyd_cycle_detection_algo.cpp" target="_blank">Floyd Cycle Detection Algo</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/hash_search.cpp" target="_blank">Hash Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/interpolation_search.cpp" target="_blank">Interpolation Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/interpolation_search2.cpp" target="_blank">Interpolation Search2</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/jump_search.cpp" target="_blank">Jump Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/linear_search.cpp" target="_blank">Linear Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/median_search.cpp" target="_blank">Median Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/saddleback_search.cpp" target="_blank">Saddleback Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/sublist_search.cpp" target="_blank">Sublist Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/ternary_search.cpp" target="_blank">Ternary Search</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/text_search.cpp" target="_blank">Text Search</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md56"></a>
Sorting</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bead_sort.cpp">Bead Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bitonic_sort.cpp">Bitonic Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bogo_sort.cpp">Bogo Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bubble_sort.cpp">Bubble Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bucket_sort.cpp">Bucket Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/cocktail_selection_sort.cpp">Cocktail Selection Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/comb_sort.cpp">Comb Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/count_inversions.cpp">Count Inversions</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/counting_sort.cpp">Counting Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/counting_sort_string.cpp">Counting Sort String</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/cycle_sort.cpp">Cycle Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/dnf_sort.cpp">Dnf Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/gnome_sort.cpp">Gnome Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/heap_sort.cpp">Heap Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/insertion_sort.cpp">Insertion Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/library_sort.cpp">Library Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/merge_insertion_sort.cpp">Merge Insertion Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/merge_sort.cpp">Merge Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/non_recursive_merge_sort.cpp">Non Recursive Merge Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/numeric_string_sort.cpp">Numeric String Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/odd_even_sort.cpp">Odd Even Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/pancake_sort.cpp">Pancake Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/pigeonhole_sort.cpp">Pigeonhole Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/quick_sort.cpp">Quick Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/quick_sort_3.cpp">Quick Sort 3</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/radix_sort.cpp">Radix Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/radix_sort2.cpp">Radix Sort2</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/random_pivot_quick_sort.cpp">Random Pivot Quick Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/recursive_bubble_sort.cpp">Recursive Bubble Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/selection_sort.cpp">Selection Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/shell_sort.cpp">Shell Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/shell_sort2.cpp">Shell Sort2</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/slow_sort.cpp">Slow Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/strand_sort.cpp">Strand Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/swap_sort.cpp">Swap Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/tim_sort.cpp">Tim Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/wave_sort.cpp">Wave Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/wiggle_sort.cpp">Wiggle Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bead_sort.cpp" target="_blank">Bead Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bitonic_sort.cpp" target="_blank">Bitonic Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bogo_sort.cpp" target="_blank">Bogo Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bubble_sort.cpp" target="_blank">Bubble Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bucket_sort.cpp" target="_blank">Bucket Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/cocktail_selection_sort.cpp" target="_blank">Cocktail Selection Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/comb_sort.cpp" target="_blank">Comb Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/count_inversions.cpp" target="_blank">Count Inversions</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/counting_sort.cpp" target="_blank">Counting Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/counting_sort_string.cpp" target="_blank">Counting Sort String</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/cycle_sort.cpp" target="_blank">Cycle Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/dnf_sort.cpp" target="_blank">Dnf Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/gnome_sort.cpp" target="_blank">Gnome Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/heap_sort.cpp" target="_blank">Heap Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/insertion_sort.cpp" target="_blank">Insertion Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/library_sort.cpp" target="_blank">Library Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/merge_insertion_sort.cpp" target="_blank">Merge Insertion Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/merge_sort.cpp" target="_blank">Merge Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/non_recursive_merge_sort.cpp" target="_blank">Non Recursive Merge Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/numeric_string_sort.cpp" target="_blank">Numeric String Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/odd_even_sort.cpp" target="_blank">Odd Even Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/pancake_sort.cpp" target="_blank">Pancake Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/pigeonhole_sort.cpp" target="_blank">Pigeonhole Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/quick_sort.cpp" target="_blank">Quick Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/quick_sort_3.cpp" target="_blank">Quick Sort 3</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/radix_sort.cpp" target="_blank">Radix Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/radix_sort2.cpp" target="_blank">Radix Sort2</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/random_pivot_quick_sort.cpp" target="_blank">Random Pivot Quick Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/recursive_bubble_sort.cpp" target="_blank">Recursive Bubble Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/selection_sort.cpp" target="_blank">Selection Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/shell_sort.cpp" target="_blank">Shell Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/shell_sort2.cpp" target="_blank">Shell Sort2</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/slow_sort.cpp" target="_blank">Slow Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/strand_sort.cpp" target="_blank">Strand Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/swap_sort.cpp" target="_blank">Swap Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/tim_sort.cpp" target="_blank">Tim Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/wave_sort.cpp" target="_blank">Wave Sort</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/wiggle_sort.cpp" target="_blank">Wiggle Sort</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md57"></a>
Strings</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/brute_force_string_searching.cpp">Brute Force String Searching</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/horspool.cpp">Horspool</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/knuth_morris_pratt.cpp">Knuth Morris Pratt</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/manacher_algorithm.cpp">Manacher Algorithm</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/rabin_karp.cpp">Rabin Karp</a> </li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/brute_force_string_searching.cpp" target="_blank">Brute Force String Searching</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/horspool.cpp" target="_blank">Horspool</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/knuth_morris_pratt.cpp" target="_blank">Knuth Morris Pratt</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/manacher_algorithm.cpp" target="_blank">Manacher Algorithm</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/strings/rabin_karp.cpp" target="_blank">Rabin Karp</a> </li>
</ul>
</div></div><!-- contents -->
</div><!-- PageDoc -->
@@ -479,7 +479,7 @@ Strings</h1>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: palindrome_partitioning Namespace Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d89/namespacepalindrome__partitioning.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -90,22 +90,21 @@ $(document).ready(function(){initNavTree('d5/d89/namespacepalindrome__partitioni
</div>
<div class="header">
<div class="headertitle">
<div class="title">palindrome_partitioning Namespace Reference</div> </div>
<div class="headertitle"><div class="title">palindrome_partitioning Namespace Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Functions for <a href="https://leetcode.com/problems/palindrome-partitioning-ii/">Palindrome Partitioning</a> algorithm.
<p>Functions for <a href="https://leetcode.com/problems/palindrome-partitioning-ii/" target="_blank">Palindrome Partitioning</a> algorithm.
<a href="../../d5/d89/namespacepalindrome__partitioning.html#details">More...</a></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Functions for <a href="https://leetcode.com/problems/palindrome-partitioning-ii/">Palindrome Partitioning</a> algorithm. </p>
<div class="textblock"><p >Functions for <a href="https://leetcode.com/problems/palindrome-partitioning-ii/" target="_blank">Palindrome Partitioning</a> algorithm. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d5/d89/namespacepalindrome__partitioning.html">palindrome_partitioning</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: others::postfix_expression::Stack Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d8a/classothers_1_1postfix__expression_1_1_stack.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -93,33 +93,26 @@ $(document).ready(function(){initNavTree('d5/d8a/classothers_1_1postfix__express
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="../../d3/d9f/classothers_1_1postfix__expression_1_1_stack-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">others::postfix_expression::Stack Class Reference</div> </div>
<div class="headertitle"><div class="title">others::postfix_expression::Stack Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Creates an array to be used as stack for storing values.
<a href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for others::postfix_expression::Stack:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../de/d8e/classothers_1_1postfix__expression_1_1_stack__coll__graph.svg" width="188" height="142"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:af06360122e20ce2ba32c574a27a20ba1"><td class="memItemLeft" align="right" valign="top"><a id="af06360122e20ce2ba32c574a27a20ba1"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>&lt; float, 20 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html#af06360122e20ce2ba32c574a27a20ba1">stack</a> {}</td></tr>
<tr class="memitem:af06360122e20ce2ba32c574a27a20ba1"><td class="memItemLeft" align="right" valign="top"><a id="af06360122e20ce2ba32c574a27a20ba1" name="af06360122e20ce2ba32c574a27a20ba1"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>&lt; float, 20 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>stack</b> {}</td></tr>
<tr class="memdesc:af06360122e20ce2ba32c574a27a20ba1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Array which will be used to store numbers in the input. <br /></td></tr>
<tr class="separator:af06360122e20ce2ba32c574a27a20ba1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ae98710503b894b843d01cb69d5490c"><td class="memItemLeft" align="right" valign="top"><a id="a6ae98710503b894b843d01cb69d5490c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html#a6ae98710503b894b843d01cb69d5490c">stackTop</a> = -1</td></tr>
<tr class="memitem:a6ae98710503b894b843d01cb69d5490c"><td class="memItemLeft" align="right" valign="top"><a id="a6ae98710503b894b843d01cb69d5490c" name="a6ae98710503b894b843d01cb69d5490c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>stackTop</b> = -1</td></tr>
<tr class="memdesc:a6ae98710503b894b843d01cb69d5490c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents the index of the last value added to array. -1 means array is empty. <br /></td></tr>
<tr class="separator:a6ae98710503b894b843d01cb69d5490c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Creates an array to be used as stack for storing values. </p>
<div class="textblock"><p >Creates an array to be used as stack for storing values. </p>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>others/<a class="el" href="../../d7/d75/postfix__evaluation_8cpp.html">postfix_evaluation.cpp</a></li>
</ul>
@@ -129,7 +122,7 @@ int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../..
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d0/d6f/namespaceothers.html">others</a></li><li class="navelem"><b>postfix_expression</b></li><li class="navelem"><a class="el" href="../../d5/d8a/classothers_1_1postfix__expression_1_1_stack.html">Stack</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -2,8 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: data_structures/trie_using_hashmap.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -17,9 +17,9 @@
<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"],
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</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>
@@ -32,8 +32,7 @@
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
@@ -42,21 +41,22 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
@@ -70,7 +70,7 @@ $(function() {
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d5/d8a/trie__using__hashmap_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
@@ -94,12 +94,11 @@ $(document).ready(function(){initNavTree('d5/d8a/trie__using__hashmap_8cpp.html'
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">trie_using_hashmap.cpp File Reference</div> </div>
<div class="headertitle"><div class="title">trie_using_hashmap.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Implementation of <a href="https://en.wikipedia.org/wiki/Trie">Trie</a> data structure using HashMap for different characters and method for predicting words based on prefix.
<p>Implementation of <a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie</a> data structure using HashMap for different characters and method for predicting words based on prefix.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cassert&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
@@ -114,7 +113,7 @@ Include dependency graph for trie_using_hashmap.cpp:</div>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
<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="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html" title="Trie class, implementation of trie using hashmap in each trie node for all the characters of char16_t...">Trie</a> class, implementation of trie using hashmap in each trie node for all the characters of char16_t(UTF-16)type with methods to insert, delete, search, start with and to recommend words based on a given prefix. <a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#details">More...</a><br /></td></tr>
@@ -123,16 +122,16 @@ Classes</h2></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">struct representing a trie node. <a href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:d5/d3c/namespacedata__structures"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d3c/namespacedata__structures.html">data_structures</a></td></tr>
<tr class="memitem:d5/d3c/namespacedata__structures"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d3c/namespacedata__structures.html">data_structures</a></td></tr>
<tr class="memdesc:d5/d3c/namespacedata__structures"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data Structures algorithms. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d7/d0a/namespacetrie__using__hashmap"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d0a/namespacetrie__using__hashmap.html">trie_using_hashmap</a></td></tr>
<tr class="memdesc:d7/d0a/namespacetrie__using__hashmap"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions for <a href="https://en.wikipedia.org/wiki/Trie">Trie</a> data structure using hashmap implementation. <br /></td></tr>
<tr class="memitem:d7/d0a/namespacetrie__using__hashmap"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d0a/namespacetrie__using__hashmap.html">trie_using_hashmap</a></td></tr>
<tr class="memdesc:d7/d0a/namespacetrie__using__hashmap"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions for <a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie</a> data structure using hashmap implementation. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Self-test implementations. <a href="../../d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">More...</a><br /></td></tr>
@@ -142,11 +141,11 @@ Functions</h2></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Implementation of <a href="https://en.wikipedia.org/wiki/Trie">Trie</a> data structure using HashMap for different characters and method for predicting words based on prefix. </p>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/bharath000">Venkata Bharath</a></dd></dl>
<div class="textblock"><p >Implementation of <a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie</a> data structure using HashMap for different characters and method for predicting words based on prefix. </p>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/bharath000" target="_blank">Venkata Bharath</a></dd></dl>
<p>The <a class="el" href="../../dd/d2f/class_trie.html">Trie</a> data structure is implemented using unordered map to use memory optimally, predict_words method is developed to recommend words based on a given prefix along with other methods insert, delete, search, startwith in trie. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../dc/d93/trie__modern_8cpp.html" title="A basic implementation of trie class to store only lower-case strings.">trie_modern.cpp</a> for difference </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>
<div class="memitem">
@@ -164,10 +163,10 @@ Functions</h2></td></tr>
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; {</div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160; <a class="code" href="../../d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementaions</span></div>
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> {</div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> <a class="code hl_function" href="../../d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementaions</span></div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span>}</div>
<div class="ttc" id="atrie__using__hashmap_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition:</b> trie_using_hashmap.cpp:221</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -178,7 +177,7 @@ Here is the call graph for this function:</div>
</div>
</div>
<a id="aa8dca7b867074164d5f45b0f3851269d"></a>
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8dca7b867074164d5f45b0f3851269d">&#9670;&nbsp;</a></span>test()</h2>
<div class="memitem">
@@ -203,129 +202,129 @@ Here is the call graph for this function:</div>
<p>Self-test implementations. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; {</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a> obj;</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; <span class="comment">// Inserting data into trie using the insert</span></div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <span class="comment">// method and testing it with search method</span></div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;app&quot;</span>);</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;abscond&quot;</span>);</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;about&quot;</span>);</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;apps&quot;</span>);</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;apen&quot;</span>);</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;apples&quot;</span>);</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;apple&quot;</span>);</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;approach&quot;</span>);</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;bus&quot;</span>);</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;buses&quot;</span>);</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;Apple&quot;</span>);</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;Bounce&quot;</span>);</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; </div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; assert(!obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;appy&quot;</span>));</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;appy is not a word in trie&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; </div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; assert(!obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;car&quot;</span>));</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;car is not a word in trie&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;app&quot;</span>));</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;apple&quot;</span>));</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;apples&quot;</span>));</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;apps&quot;</span>));</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;apen&quot;</span>));</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;approach&quot;</span>));</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;about&quot;</span>));</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;abscond&quot;</span>));</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;bus&quot;</span>));</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;buses&quot;</span>));</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;Bounce&quot;</span>));</div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;Apple&quot;</span>));</div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; </div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;All the Inserted words are present in the trie&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; </div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; <span class="comment">// test for startwith prefix method</span></div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; assert(!obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;approachs&quot;</span>));</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;approach&quot;</span>));</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;about&quot;</span>));</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; assert(!obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;appy&quot;</span>));</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;abscond&quot;</span>));</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;bus&quot;</span>));</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;buses&quot;</span>));</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;Bounce&quot;</span>));</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;Apple&quot;</span>));</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;abs&quot;</span>));</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;b&quot;</span>));</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;bus&quot;</span>));</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;Bo&quot;</span>));</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;A&quot;</span>));</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; assert(!obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;Ca&quot;</span>));</div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; </div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; assert(!obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;C&quot;</span>));</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; </div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;All the tests passed for startwith method&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; </div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; <span class="comment">// test for predict_words/recommendation of words based on a given prefix</span></div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; </div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;std::string&gt;</a> pred_words = obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17">predict_words</a>(<span class="stringliteral">&quot;a&quot;</span>);</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; </div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; str : obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17">predict_words</a>(<span class="stringliteral">&quot;a&quot;</span>)) {</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; str &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; }</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; assert(pred_words.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() == 8);</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Returned all words that start with prefix a &quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; pred_words = obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17">predict_words</a>(<span class="stringliteral">&quot;app&quot;</span>);</div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; str : pred_words) {</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; str &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; }</div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; </div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; assert(pred_words.size() == 5);</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Returned all words that start with prefix app &quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; pred_words = obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17">predict_words</a>(<span class="stringliteral">&quot;A&quot;</span>);</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; </div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; str : pred_words) {</div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; str &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; }</div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; </div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; assert(pred_words.size() == 1);</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Returned all words that start with prefix A &quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; pred_words = obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17">predict_words</a>(<span class="stringliteral">&quot;bu&quot;</span>);</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; </div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; str : pred_words) {</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; str &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; }</div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; </div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; assert(pred_words.size() == 2);</div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Returned all words that start with prefix bu &quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; </div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="comment">// tests for delete method</span></div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; </div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75">delete_word</a>(<span class="stringliteral">&quot;app&quot;</span>);</div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; assert(!obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;app&quot;</span>));</div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;word app is deleted sucessful&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; </div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; pred_words = obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17">predict_words</a>(<span class="stringliteral">&quot;app&quot;</span>);</div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; str : pred_words) {</div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; str &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; }</div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; assert(pred_words.size() == 4);</div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;app is deleted sucessful&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; </div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; <span class="comment">// test case for Chinese language</span></div>
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160; </div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;苹果&quot;</span>);</div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; assert(obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;&quot;</span>));</div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; pred_words = obj.<a class="code" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17">predict_words</a>(<span class="stringliteral">&quot;h&quot;</span>);</div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; </div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; assert(pred_words.size() == 0);</div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;No word starts with prefix h in trie&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; </div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;All tests passed&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160;}</div>
<div class="fragment"><div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> {</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <a class="code hl_class" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a> obj;</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="comment">// Inserting data into trie using the insert</span></div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <span class="comment">// method and testing it with search method</span></div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;app&quot;</span>);</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;abscond&quot;</span>);</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;about&quot;</span>);</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;apps&quot;</span>);</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;apen&quot;</span>);</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;apples&quot;</span>);</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;apple&quot;</span>);</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;approach&quot;</span>);</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;bus&quot;</span>);</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;buses&quot;</span>);</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;Apple&quot;</span>);</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;Bounce&quot;</span>);</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> </div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;appy&quot;</span>));</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</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;appy is not a word in trie&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"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> </div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;car&quot;</span>));</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</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;car is not a word in trie&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"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;app&quot;</span>));</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;apple&quot;</span>));</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;apples&quot;</span>));</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;apps&quot;</span>));</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;apen&quot;</span>));</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;approach&quot;</span>));</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;about&quot;</span>));</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;abscond&quot;</span>));</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;bus&quot;</span>));</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;buses&quot;</span>));</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;Bounce&quot;</span>));</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;Apple&quot;</span>));</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> </div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</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;All the Inserted words are present in the trie&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"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> </div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> <span class="comment">// test for startwith prefix method</span></div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;approachs&quot;</span>));</div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;approach&quot;</span>));</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;about&quot;</span>));</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;appy&quot;</span>));</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;abscond&quot;</span>));</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;bus&quot;</span>));</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;buses&quot;</span>));</div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;Bounce&quot;</span>));</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;Apple&quot;</span>));</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;abs&quot;</span>));</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;b&quot;</span>));</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;bus&quot;</span>));</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;Bo&quot;</span>));</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;A&quot;</span>));</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;Ca&quot;</span>));</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> </div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;C&quot;</span>));</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> </div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</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;All the tests passed for startwith method&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"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> </div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> <span class="comment">// test for predict_words/recommendation of words based on a given prefix</span></div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> </div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;std::string&gt;</a> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">&quot;a&quot;</span>);</div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> </div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; str : obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">&quot;a&quot;</span>)) {</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; str &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"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> }</div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> assert(pred_words.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() == 8);</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</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;Returned all words that start with prefix a &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"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">&quot;app&quot;</span>);</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> </div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; str : pred_words) {</div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; str &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"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> }</div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> </div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> assert(pred_words.size() == 5);</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</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;Returned all words that start with prefix app &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"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">&quot;A&quot;</span>);</div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> </div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; str : pred_words) {</div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; str &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"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> }</div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> </div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> assert(pred_words.size() == 1);</div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</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;Returned all words that start with prefix A &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"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">&quot;bu&quot;</span>);</div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> </div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; str : pred_words) {</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; str &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"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> }</div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> </div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> assert(pred_words.size() == 2);</div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</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;Returned all words that start with prefix bu &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"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> </div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> <span class="comment">// tests for delete method</span></div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> </div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75">delete_word</a>(<span class="stringliteral">&quot;app&quot;</span>);</div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">&quot;app&quot;</span>));</div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</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;word app is deleted sucessful&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"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> </div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">&quot;app&quot;</span>);</div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; str : pred_words) {</div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; str &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"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> }</div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> assert(pred_words.size() == 4);</div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</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;app is deleted sucessful&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"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> </div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> <span class="comment">// test case for Chinese language</span></div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> </div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">&quot;苹果&quot;</span>);</div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">&quot;&quot;</span>));</div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">&quot;h&quot;</span>);</div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> </div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> assert(pred_words.size() == 0);</div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</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;No word starts with prefix h in trie&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"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> </div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</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;All tests passed&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"><a id="l00336" name="l00336"></a><span class="lineno"> 336</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="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></div><div class="ttdoc">Trie class, implementation of trie using hashmap in each trie node for all the characters of char16_t...</div><div class="ttdef"><b>Definition:</b> trie_using_hashmap.cpp:39</div></div>
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_abcae0a4456e7f583ce716e3ef466dfd2"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">data_structures::trie_using_hashmap::Trie::insert</a></div><div class="ttdeci">void insert(const std::string &amp;word)</div><div class="ttdoc">insert the string into the trie</div><div class="ttdef"><b>Definition:</b> trie_using_hashmap.cpp:62</div></div>
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_ac0bf3d6791cba144b3f539835d835e75"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75">data_structures::trie_using_hashmap::Trie::delete_word</a></div><div class="ttdeci">void delete_word(std::string word)</div><div class="ttdoc">delete a word/string from a trie</div><div class="ttdef"><b>Definition:</b> trie_using_hashmap.cpp:122</div></div>
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_acbfd4a79adb242022fa2829740328c17"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17">data_structures::trie_using_hashmap::Trie::predict_words</a></div><div class="ttdeci">std::vector&lt; std::string &gt; predict_words(const std::string &amp;prefix)</div><div class="ttdoc">predict/recommend a word that starts with a given prefix</div><div class="ttdef"><b>Definition:</b> trie_using_hashmap.cpp:188</div></div>
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_ad71eb24207c28b546631802dba97310f"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">data_structures::trie_using_hashmap::Trie::search</a></div><div class="ttdeci">bool search(const std::string &amp;word)</div><div class="ttdoc">search a word/string inside the trie</div><div class="ttdef"><b>Definition:</b> trie_using_hashmap.cpp:82</div></div>
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_ae15fdc7f2b5023992d87a711d78566c4"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">data_structures::trie_using_hashmap::Trie::predict_words</a></div><div class="ttdeci">std::vector&lt; std::string &gt; predict_words(const std::string &amp;prefix)</div><div class="ttdoc">predict/recommend a word that starts with a given prefix</div><div class="ttdef"><b>Definition:</b> trie_using_hashmap.cpp:188</div></div>
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_af3aee573fbabd2c1510c0f74f842dd17"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">data_structures::trie_using_hashmap::Trie::startwith</a></div><div class="ttdeci">bool startwith(const std::string &amp;prefix)</div><div class="ttdoc">search a word/string that starts with a given prefix</div><div class="ttdef"><b>Definition:</b> trie_using_hashmap.cpp:107</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 class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(T... args)</div></div>
@@ -333,7 +332,7 @@ Here is the call graph for this function:</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="../../d5/d8a/trie__using__hashmap_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="662" height="563"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d5/d8a/trie__using__hashmap_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="662" height="570"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
@@ -345,7 +344,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html">data_structures</a></li><li class="navelem"><a class="el" href="../../d5/d8a/trie__using__hashmap_8cpp.html">trie_using_hashmap.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>

View File

@@ -1,7 +1,7 @@
var trie__using__hashmap_8cpp =
[
[ "Trie", "d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html", "d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie" ],
[ "Node", "d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html", "d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node" ],
[ "data_structures::trie_using_hashmap::Trie", "d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html", "d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie" ],
[ "data_structures::trie_using_hashmap::Trie::Node", "d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html", "d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node" ],
[ "main", "d5/d8a/trie__using__hashmap_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
[ "test", "d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]
];

View File

@@ -1,17 +1,17 @@
<map id="test" name="test">
<area shape="rect" id="node1" title="Self&#45;test implementations." alt="" coords="5,305,49,332"/>
<area shape="rect" id="node2" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75" title="delete a word/string from a trie" alt="" coords="97,80,251,136"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="138,160,210,187"/>
<area shape="rect" id="node9" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2" title="insert the string into the trie" alt="" coords="97,211,251,267"/>
<area shape="rect" id="node10" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17" title="predict/recommend a word that starts with a given prefix" alt="" coords="97,291,251,347"/>
<area shape="rect" id="node13" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f" title="search a word/string inside the trie" alt="" coords="97,371,251,427"/>
<area shape="rect" id="node14" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="117,451,231,477"/>
<area shape="rect" id="node15" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17" title="search a word/string that starts with a given prefix" alt="" coords="97,501,251,557"/>
<area shape="rect" id="node1" title="Self&#45;test implementations." alt="" coords="5,312,49,339"/>
<area shape="rect" id="node2" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75" title="delete a word/string from a trie" alt="" coords="97,87,251,143"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="138,167,210,193"/>
<area shape="rect" id="node9" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2" title="insert the string into the trie" alt="" coords="97,217,251,273"/>
<area shape="rect" id="node10" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4" title="predict/recommend a word that starts with a given prefix" alt="" coords="97,297,251,353"/>
<area shape="rect" id="node13" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f" title="search a word/string inside the trie" alt="" coords="97,377,251,433"/>
<area shape="rect" id="node14" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="117,457,231,484"/>
<area shape="rect" id="node15" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17" title="search a word/string that starts with a given prefix" alt="" coords="97,508,251,564"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/back.html#" title=" " alt="" coords="317,5,433,32"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/stack/pop.html#" title=" " alt="" coords="321,56,429,83"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/pop_back.html#" title=" " alt="" coords="505,176,651,203"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/pop_back.html#" title=" " alt="" coords="505,183,651,209"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/stack/push.html#" title=" " alt="" coords="318,157,433,184"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/stack/top.html#" title=" " alt="" coords="323,208,427,235"/>
<area shape="rect" id="node11" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a5f501b7f1240a58bc082187f22c2fe17" title="helper function to predict/recommend words that starts with a given prefix from the end of prefix&#39;s n..." alt="" coords="299,269,452,325"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="500,284,656,311"/>
<area shape="rect" id="node11" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd" title="helper function to predict/recommend words that starts with a given prefix from the end of prefix&#39;s n..." alt="" coords="299,288,452,344"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="500,303,656,329"/>
</map>

View File

@@ -1 +1 @@
036d35e65a9702b1a82f192b9f754006
e2aeb03c14efefbfa0edfc42808d894c

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: test Pages: 1 -->
<svg width="496pt" height="422pt"
viewBox="0.00 0.00 496.00 422.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 418)">
<svg width="496pt" height="427pt"
viewBox="0.00 0.00 496.00 427.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 423)">
<title>test</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-418 492,-418 492,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-423 492,-423 492,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
@@ -70,7 +70,7 @@
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17" target="_top" xlink:title="predict/recommend a word that starts with a given prefix">
<g id="a_node10"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4" target="_top" xlink:title="predict/recommend a word that starts with a given prefix">
<polygon fill="white" stroke="black" points="69,-158.5 69,-199.5 184,-199.5 184,-158.5 69,-158.5"/>
<text text-anchor="start" x="77" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
<text text-anchor="start" x="77" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
@@ -96,7 +96,7 @@
</g>
</g>
<!-- Node1&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<g id="edge14" class="edge">
<title>Node1&#45;&gt;Node13</title>
<path fill="none" stroke="midnightblue" d="M33.19,-169.65C43.34,-163.65 56.88,-155.74 69,-149 71.68,-147.51 74.44,-145.99 77.23,-144.47"/>
<polygon fill="midnightblue" stroke="midnightblue" points="79.06,-147.46 86.18,-139.62 75.72,-141.3 79.06,-147.46"/>
@@ -111,7 +111,7 @@
</g>
</g>
<!-- Node1&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<g id="edge15" class="edge">
<title>Node1&#45;&gt;Node14</title>
<path fill="none" stroke="midnightblue" d="M20.44,-169.34C26.52,-151.01 42.15,-111.06 69,-89 71.14,-87.24 73.45,-85.65 75.86,-84.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="77.67,-87.2 85,-79.55 74.5,-80.96 77.67,-87.2"/>
@@ -128,7 +128,7 @@
</g>
</g>
<!-- Node1&#45;&gt;Node15 -->
<g id="edge15" class="edge">
<g id="edge16" class="edge">
<title>Node1&#45;&gt;Node15</title>
<path fill="none" stroke="midnightblue" d="M19.03,-169.46C23.15,-146.45 36.48,-87.15 69,-51 69.88,-50.02 70.79,-49.08 71.74,-48.15"/>
<polygon fill="midnightblue" stroke="midnightblue" points="74.18,-50.68 79.6,-41.57 69.69,-45.31 74.18,-50.68"/>
@@ -137,31 +137,31 @@
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="234,-394.5 234,-413.5 321,-413.5 321,-394.5 234,-394.5"/>
<text text-anchor="middle" x="277.5" y="-401.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::back</text>
<polygon fill="white" stroke="black" points="234,-399.5 234,-418.5 321,-418.5 321,-399.5 234,-399.5"/>
<text text-anchor="middle" x="277.5" y="-406.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::back</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M164.23,-357.72C180.95,-366.72 201.18,-377.01 220,-385 225.06,-387.15 230.45,-389.22 235.82,-391.16"/>
<polygon fill="midnightblue" stroke="midnightblue" points="234.79,-394.51 245.39,-394.49 237.1,-387.9 234.79,-394.51"/>
<path fill="none" stroke="midnightblue" d="M160.07,-357.75C177.43,-368.27 199.4,-380.74 220,-390 224.72,-392.12 229.74,-394.14 234.78,-396.01"/>
<polygon fill="midnightblue" stroke="midnightblue" points="233.81,-399.38 244.4,-399.42 236.15,-392.78 233.81,-399.38"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/pop.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="237,-356.5 237,-375.5 318,-375.5 318,-356.5 237,-356.5"/>
<text text-anchor="middle" x="277.5" y="-363.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::pop</text>
<polygon fill="white" stroke="black" points="237,-361.5 237,-380.5 318,-380.5 318,-361.5 237,-361.5"/>
<text text-anchor="middle" x="277.5" y="-368.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::pop</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node2&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M184.26,-348.05C198.15,-350.75 212.92,-353.62 226.47,-356.26"/>
<polygon fill="midnightblue" stroke="midnightblue" points="226.08,-359.75 236.56,-358.23 227.41,-352.88 226.08,-359.75"/>
<path fill="none" stroke="midnightblue" d="M184.26,-349.95C198.15,-353.12 212.92,-356.49 226.47,-359.58"/>
<polygon fill="midnightblue" stroke="midnightblue" points="226.03,-363.07 236.56,-361.89 227.59,-356.25 226.03,-363.07"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
@@ -175,76 +175,82 @@
<!-- Node2&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node2&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M184,-332.53C226.06,-328.45 284.64,-321.15 335,-309 355.76,-303.99 378.35,-296.09 396.12,-289.28"/>
<polygon fill="midnightblue" stroke="midnightblue" points="397.42,-292.53 405.46,-285.63 394.87,-286.01 397.42,-292.53"/>
<path fill="none" stroke="midnightblue" d="M184.17,-334.93C226.31,-332.38 284.93,-326.69 335,-314 357.5,-308.3 381.75,-298.32 399.91,-290.02"/>
<polygon fill="midnightblue" stroke="midnightblue" points="401.75,-293.03 409.33,-285.62 398.79,-286.68 401.75,-293.03"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/push.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="234.5,-280.5 234.5,-299.5 320.5,-299.5 320.5,-280.5 234.5,-280.5"/>
<text text-anchor="middle" x="277.5" y="-287.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::push</text>
<polygon fill="white" stroke="black" points="234.5,-285.5 234.5,-304.5 320.5,-304.5 320.5,-285.5 234.5,-285.5"/>
<text text-anchor="middle" x="277.5" y="-292.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::push</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node2&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M184.26,-319.1C201.69,-313.6 220.5,-307.66 236.56,-302.6"/>
<polygon fill="midnightblue" stroke="midnightblue" points="237.68,-305.91 246.17,-299.57 235.58,-299.24 237.68,-305.91"/>
<path fill="none" stroke="midnightblue" d="M184.26,-321C200.45,-316.44 217.83,-311.54 233.08,-307.24"/>
<polygon fill="midnightblue" stroke="midnightblue" points="234.1,-310.59 242.77,-304.51 232.2,-303.85 234.1,-310.59"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/top.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="238.5,-242.5 238.5,-261.5 316.5,-261.5 316.5,-242.5 238.5,-242.5"/>
<text text-anchor="middle" x="277.5" y="-249.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::top</text>
<polygon fill="white" stroke="black" points="238.5,-247.5 238.5,-266.5 316.5,-266.5 316.5,-247.5 238.5,-247.5"/>
<text text-anchor="middle" x="277.5" y="-254.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::top</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node2&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M169.7,-316.4C174.66,-313.46 179.54,-310.3 184,-307 202.19,-293.55 200.77,-282.92 220,-271 223.32,-268.94 226.89,-267.08 230.56,-265.4"/>
<polygon fill="midnightblue" stroke="midnightblue" points="231.9,-268.63 239.82,-261.58 229.24,-262.16 231.9,-268.63"/>
<path fill="none" stroke="midnightblue" d="M168.87,-316.42C174.07,-313.43 179.23,-310.26 184,-307 201.43,-295.09 201.65,-286.45 220,-276 223.69,-273.9 227.65,-271.98 231.7,-270.24"/>
<polygon fill="midnightblue" stroke="midnightblue" points="233.19,-273.42 241.23,-266.52 230.64,-266.9 233.19,-273.42"/>
</g>
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a5f501b7f1240a58bc082187f22c2fe17" target="_top" xlink:title="helper function to predict/recommend words that starts with a given prefix from the end of prefix&#39;s n...">
<polygon fill="white" stroke="black" points="220,-174.5 220,-215.5 335,-215.5 335,-174.5 220,-174.5"/>
<text text-anchor="start" x="228" y="-203.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
<text text-anchor="start" x="228" y="-192.5" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
<text text-anchor="middle" x="277.5" y="-181.5" font-family="Helvetica,sans-Serif" font-size="10.00">::get_all_words</text>
<g id="a_node11"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd" target="_top" xlink:title="helper function to predict/recommend words that starts with a given prefix from the end of prefix&#39;s n...">
<polygon fill="white" stroke="black" points="220,-165.5 220,-206.5 335,-206.5 335,-165.5 220,-165.5"/>
<text text-anchor="start" x="228" y="-194.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
<text text-anchor="start" x="228" y="-183.5" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
<text text-anchor="middle" x="277.5" y="-172.5" font-family="Helvetica,sans-Serif" font-size="10.00">::get_all_words</text>
</a>
</g>
</g>
<!-- Node10&#45;&gt;Node11 -->
<g id="edge10" class="edge">
<title>Node10&#45;&gt;Node11</title>
<path fill="none" stroke="midnightblue" d="M184.26,-185.09C192.65,-186 201.36,-186.93 209.93,-187.85"/>
<polygon fill="midnightblue" stroke="midnightblue" points="209.59,-191.33 219.9,-188.92 210.33,-184.37 209.59,-191.33"/>
<path fill="none" stroke="midnightblue" d="M184.26,-181.67C192.56,-182.06 201.17,-182.46 209.65,-182.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="209.75,-186.37 219.9,-183.34 210.08,-179.38 209.75,-186.37"/>
</g>
<!-- Node11&#45;&gt;Node5 -->
<g id="edge11" class="edge">
<g id="edge12" class="edge">
<title>Node11&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M316.74,-215.65C343.29,-229.99 378,-248.73 401.65,-261.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="400.28,-264.74 410.74,-266.41 403.61,-258.58 400.28,-264.74"/>
<path fill="none" stroke="midnightblue" d="M312.91,-206.65C340.68,-223.31 379.06,-246.34 403.83,-261.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="402.24,-264.32 412.61,-266.47 405.84,-258.32 402.24,-264.32"/>
</g>
<!-- Node11&#45;&gt;Node11 -->
<g id="edge11" class="edge">
<title>Node11&#45;&gt;Node11</title>
<path fill="none" stroke="midnightblue" d="M249.93,-206.86C246.92,-216.54 256.11,-225 277.5,-225 290.87,-225 299.47,-221.7 303.31,-216.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="306.78,-217.32 305.07,-206.86 299.89,-216.1 306.78,-217.32"/>
</g>
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="371,-185.5 371,-204.5 488,-204.5 488,-185.5 371,-185.5"/>
<text text-anchor="middle" x="429.5" y="-192.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
<polygon fill="white" stroke="black" points="371,-176.5 371,-195.5 488,-195.5 488,-176.5 371,-176.5"/>
<text text-anchor="middle" x="429.5" y="-183.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>
</g>
</g>
<!-- Node11&#45;&gt;Node12 -->
<g id="edge12" class="edge">
<g id="edge13" class="edge">
<title>Node11&#45;&gt;Node12</title>
<path fill="none" stroke="midnightblue" d="M335.21,-195C343.47,-195 352.04,-195 360.49,-195"/>
<polygon fill="midnightblue" stroke="midnightblue" points="360.71,-198.5 370.71,-195 360.71,-191.5 360.71,-198.5"/>
<path fill="none" stroke="midnightblue" d="M335.21,-186C343.47,-186 352.04,-186 360.49,-186"/>
<polygon fill="midnightblue" stroke="midnightblue" points="360.71,-189.5 370.71,-186 360.71,-182.5 360.71,-189.5"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,18 +1,18 @@
<map id="main" name="main">
<area shape="rect" id="node1" title="Main function." alt="" coords="5,305,56,332"/>
<area shape="rect" id="node2" href="$d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Self&#45;test implementations." alt="" coords="104,305,148,332"/>
<area shape="rect" id="node3" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75" title="delete a word/string from a trie" alt="" coords="196,80,349,136"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="237,160,309,187"/>
<area shape="rect" id="node10" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2" title="insert the string into the trie" alt="" coords="196,211,349,267"/>
<area shape="rect" id="node11" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17" title="predict/recommend a word that starts with a given prefix" alt="" coords="196,291,349,347"/>
<area shape="rect" id="node14" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f" title="search a word/string inside the trie" alt="" coords="196,371,349,427"/>
<area shape="rect" id="node15" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="215,451,330,477"/>
<area shape="rect" id="node16" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17" title="search a word/string that starts with a given prefix" alt="" coords="196,501,349,557"/>
<area shape="rect" id="node1" title="Main function." alt="" coords="5,312,56,339"/>
<area shape="rect" id="node2" href="$d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Self&#45;test implementations." alt="" coords="104,312,148,339"/>
<area shape="rect" id="node3" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75" title="delete a word/string from a trie" alt="" coords="196,87,349,143"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="237,167,309,193"/>
<area shape="rect" id="node10" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2" title="insert the string into the trie" alt="" coords="196,217,349,273"/>
<area shape="rect" id="node11" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4" title="predict/recommend a word that starts with a given prefix" alt="" coords="196,297,349,353"/>
<area shape="rect" id="node14" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f" title="search a word/string inside the trie" alt="" coords="196,377,349,433"/>
<area shape="rect" id="node15" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="215,457,330,484"/>
<area shape="rect" id="node16" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17" title="search a word/string that starts with a given prefix" alt="" coords="196,508,349,564"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/back.html#" title=" " alt="" coords="416,5,532,32"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/stack/pop.html#" title=" " alt="" coords="420,56,528,83"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/pop_back.html#" title=" " alt="" coords="604,176,749,203"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/pop_back.html#" title=" " alt="" coords="604,183,749,209"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/stack/push.html#" title=" " alt="" coords="417,157,531,184"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/stack/top.html#" title=" " alt="" coords="422,208,526,235"/>
<area shape="rect" id="node12" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a5f501b7f1240a58bc082187f22c2fe17" title="helper function to predict/recommend words that starts with a given prefix from the end of prefix&#39;s n..." alt="" coords="397,269,551,325"/>
<area shape="rect" id="node13" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="599,284,755,311"/>
<area shape="rect" id="node12" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd" title="helper function to predict/recommend words that starts with a given prefix from the end of prefix&#39;s n..." alt="" coords="397,288,551,344"/>
<area shape="rect" id="node13" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="599,303,755,329"/>
</map>

View File

@@ -1 +1 @@
4f77aec0813f394b01ef57eea663cdba
30186015d7a87832e4198768bf73df6d

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: main Pages: 1 -->
<!--zoomable 422 -->
<!--zoomable 427 -->
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" onload="init(evt)">
<style type="text/css"><![CDATA[
.edge:hover path { stroke: red; }
@@ -47,14 +47,14 @@ if (edges && edges.length) {
<script type="text/javascript">
var viewWidth = 570;
var viewHeight = 422;
var viewHeight = 427;
var sectionId = 'dynsection-1';
</script>
<script xlink:href="../../svgpan.js"/>
<svg id="graph" class="graph">
<g id="viewport">
<title>main</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-418 566,-418 566,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-423 566,-423 566,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
@@ -131,7 +131,7 @@ var sectionId = 'dynsection-1';
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17" target="_top" xlink:title="predict/recommend a word that starts with a given prefix">
<g id="a_node11"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4" target="_top" xlink:title="predict/recommend a word that starts with a given prefix">
<polygon fill="white" stroke="black" points="143,-158.5 143,-199.5 258,-199.5 258,-158.5 143,-158.5"/>
<text text-anchor="start" x="151" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
<text text-anchor="start" x="151" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
@@ -157,7 +157,7 @@ var sectionId = 'dynsection-1';
</g>
</g>
<!-- Node2&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<g id="edge15" class="edge">
<title>Node2&#45;&gt;Node14</title>
<path fill="none" stroke="midnightblue" d="M107.19,-169.65C117.34,-163.65 130.88,-155.74 143,-149 145.68,-147.51 148.44,-145.99 151.23,-144.47"/>
<polygon fill="midnightblue" stroke="midnightblue" points="153.06,-147.46 160.18,-139.62 149.72,-141.3 153.06,-147.46"/>
@@ -172,7 +172,7 @@ var sectionId = 'dynsection-1';
</g>
</g>
<!-- Node2&#45;&gt;Node15 -->
<g id="edge15" class="edge">
<g id="edge16" class="edge">
<title>Node2&#45;&gt;Node15</title>
<path fill="none" stroke="midnightblue" d="M94.44,-169.34C100.52,-151.01 116.15,-111.06 143,-89 145.14,-87.24 147.45,-85.65 149.86,-84.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="151.67,-87.2 159,-79.55 148.5,-80.96 151.67,-87.2"/>
@@ -189,7 +189,7 @@ var sectionId = 'dynsection-1';
</g>
</g>
<!-- Node2&#45;&gt;Node16 -->
<g id="edge16" class="edge">
<g id="edge17" class="edge">
<title>Node2&#45;&gt;Node16</title>
<path fill="none" stroke="midnightblue" d="M93.03,-169.46C97.15,-146.45 110.48,-87.15 143,-51 143.88,-50.02 144.79,-49.08 145.74,-48.15"/>
<polygon fill="midnightblue" stroke="midnightblue" points="148.18,-50.68 153.6,-41.57 143.69,-45.31 148.18,-50.68"/>
@@ -198,31 +198,31 @@ var sectionId = 'dynsection-1';
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="308,-394.5 308,-413.5 395,-413.5 395,-394.5 308,-394.5"/>
<text text-anchor="middle" x="351.5" y="-401.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::back</text>
<polygon fill="white" stroke="black" points="308,-399.5 308,-418.5 395,-418.5 395,-399.5 308,-399.5"/>
<text text-anchor="middle" x="351.5" y="-406.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::back</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node3&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M238.23,-357.72C254.95,-366.72 275.18,-377.01 294,-385 299.06,-387.15 304.45,-389.22 309.82,-391.16"/>
<polygon fill="midnightblue" stroke="midnightblue" points="308.79,-394.51 319.39,-394.49 311.1,-387.9 308.79,-394.51"/>
<path fill="none" stroke="midnightblue" d="M234.07,-357.75C251.43,-368.27 273.4,-380.74 294,-390 298.72,-392.12 303.74,-394.14 308.78,-396.01"/>
<polygon fill="midnightblue" stroke="midnightblue" points="307.81,-399.38 318.4,-399.42 310.15,-392.78 307.81,-399.38"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/pop.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="311,-356.5 311,-375.5 392,-375.5 392,-356.5 311,-356.5"/>
<text text-anchor="middle" x="351.5" y="-363.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::pop</text>
<polygon fill="white" stroke="black" points="311,-361.5 311,-380.5 392,-380.5 392,-361.5 311,-361.5"/>
<text text-anchor="middle" x="351.5" y="-368.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::pop</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node3&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M258.26,-348.05C272.15,-350.75 286.92,-353.62 300.47,-356.26"/>
<polygon fill="midnightblue" stroke="midnightblue" points="300.08,-359.75 310.56,-358.23 301.41,-352.88 300.08,-359.75"/>
<path fill="none" stroke="midnightblue" d="M258.26,-349.95C272.15,-353.12 286.92,-356.49 300.47,-359.58"/>
<polygon fill="midnightblue" stroke="midnightblue" points="300.03,-363.07 310.56,-361.89 301.59,-356.25 300.03,-363.07"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
@@ -236,76 +236,82 @@ var sectionId = 'dynsection-1';
<!-- Node3&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node3&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M258,-332.53C300.06,-328.45 358.64,-321.15 409,-309 429.76,-303.99 452.35,-296.09 470.12,-289.28"/>
<polygon fill="midnightblue" stroke="midnightblue" points="471.42,-292.53 479.46,-285.63 468.87,-286.01 471.42,-292.53"/>
<path fill="none" stroke="midnightblue" d="M258.17,-334.93C300.31,-332.38 358.93,-326.69 409,-314 431.5,-308.3 455.75,-298.32 473.91,-290.02"/>
<polygon fill="midnightblue" stroke="midnightblue" points="475.75,-293.03 483.33,-285.62 472.79,-286.68 475.75,-293.03"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/push.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="308.5,-280.5 308.5,-299.5 394.5,-299.5 394.5,-280.5 308.5,-280.5"/>
<text text-anchor="middle" x="351.5" y="-287.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::push</text>
<polygon fill="white" stroke="black" points="308.5,-285.5 308.5,-304.5 394.5,-304.5 394.5,-285.5 308.5,-285.5"/>
<text text-anchor="middle" x="351.5" y="-292.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::push</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node3&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M258.26,-319.1C275.69,-313.6 294.5,-307.66 310.56,-302.6"/>
<polygon fill="midnightblue" stroke="midnightblue" points="311.68,-305.91 320.17,-299.57 309.58,-299.24 311.68,-305.91"/>
<path fill="none" stroke="midnightblue" d="M258.26,-321C274.45,-316.44 291.83,-311.54 307.08,-307.24"/>
<polygon fill="midnightblue" stroke="midnightblue" points="308.1,-310.59 316.77,-304.51 306.2,-303.85 308.1,-310.59"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/top.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="312.5,-242.5 312.5,-261.5 390.5,-261.5 390.5,-242.5 312.5,-242.5"/>
<text text-anchor="middle" x="351.5" y="-249.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::top</text>
<polygon fill="white" stroke="black" points="312.5,-247.5 312.5,-266.5 390.5,-266.5 390.5,-247.5 312.5,-247.5"/>
<text text-anchor="middle" x="351.5" y="-254.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::top</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node3&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M243.7,-316.4C248.66,-313.46 253.54,-310.3 258,-307 276.19,-293.55 274.77,-282.92 294,-271 297.32,-268.94 300.89,-267.08 304.56,-265.4"/>
<polygon fill="midnightblue" stroke="midnightblue" points="305.9,-268.63 313.82,-261.58 303.24,-262.16 305.9,-268.63"/>
<path fill="none" stroke="midnightblue" d="M242.87,-316.42C248.07,-313.43 253.23,-310.26 258,-307 275.43,-295.09 275.65,-286.45 294,-276 297.69,-273.9 301.65,-271.98 305.7,-270.24"/>
<polygon fill="midnightblue" stroke="midnightblue" points="307.19,-273.42 315.23,-266.52 304.64,-266.9 307.19,-273.42"/>
</g>
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a5f501b7f1240a58bc082187f22c2fe17" target="_top" xlink:title="helper function to predict/recommend words that starts with a given prefix from the end of prefix&#39;s n...">
<polygon fill="white" stroke="black" points="294,-174.5 294,-215.5 409,-215.5 409,-174.5 294,-174.5"/>
<text text-anchor="start" x="302" y="-203.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
<text text-anchor="start" x="302" y="-192.5" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
<text text-anchor="middle" x="351.5" y="-181.5" font-family="Helvetica,sans-Serif" font-size="10.00">::get_all_words</text>
<g id="a_node12"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd" target="_top" xlink:title="helper function to predict/recommend words that starts with a given prefix from the end of prefix&#39;s n...">
<polygon fill="white" stroke="black" points="294,-165.5 294,-206.5 409,-206.5 409,-165.5 294,-165.5"/>
<text text-anchor="start" x="302" y="-194.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
<text text-anchor="start" x="302" y="-183.5" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
<text text-anchor="middle" x="351.5" y="-172.5" font-family="Helvetica,sans-Serif" font-size="10.00">::get_all_words</text>
</a>
</g>
</g>
<!-- Node11&#45;&gt;Node12 -->
<g id="edge11" class="edge">
<title>Node11&#45;&gt;Node12</title>
<path fill="none" stroke="midnightblue" d="M258.26,-185.09C266.65,-186 275.36,-186.93 283.93,-187.85"/>
<polygon fill="midnightblue" stroke="midnightblue" points="283.59,-191.33 293.9,-188.92 284.33,-184.37 283.59,-191.33"/>
<path fill="none" stroke="midnightblue" d="M258.26,-181.67C266.56,-182.06 275.17,-182.46 283.65,-182.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="283.75,-186.37 293.9,-183.34 284.08,-179.38 283.75,-186.37"/>
</g>
<!-- Node12&#45;&gt;Node6 -->
<g id="edge12" class="edge">
<g id="edge13" class="edge">
<title>Node12&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M390.74,-215.65C417.29,-229.99 452,-248.73 475.65,-261.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="474.28,-264.74 484.74,-266.41 477.61,-258.58 474.28,-264.74"/>
<path fill="none" stroke="midnightblue" d="M386.91,-206.65C414.68,-223.31 453.06,-246.34 477.83,-261.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="476.24,-264.32 486.61,-266.47 479.84,-258.32 476.24,-264.32"/>
</g>
<!-- Node12&#45;&gt;Node12 -->
<g id="edge12" class="edge">
<title>Node12&#45;&gt;Node12</title>
<path fill="none" stroke="midnightblue" d="M323.93,-206.86C320.92,-216.54 330.11,-225 351.5,-225 364.87,-225 373.47,-221.7 377.31,-216.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="380.78,-217.32 379.07,-206.86 373.89,-216.1 380.78,-217.32"/>
</g>
<!-- Node13 -->
<g id="node13" class="node">
<title>Node13</title>
<g id="a_node13"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="445,-185.5 445,-204.5 562,-204.5 562,-185.5 445,-185.5"/>
<text text-anchor="middle" x="503.5" y="-192.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
<polygon fill="white" stroke="black" points="445,-176.5 445,-195.5 562,-195.5 562,-176.5 445,-176.5"/>
<text text-anchor="middle" x="503.5" y="-183.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>
</g>
</g>
<!-- Node12&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<g id="edge14" class="edge">
<title>Node12&#45;&gt;Node13</title>
<path fill="none" stroke="midnightblue" d="M409.21,-195C417.47,-195 426.04,-195 434.49,-195"/>
<polygon fill="midnightblue" stroke="midnightblue" points="434.71,-198.5 444.71,-195 434.71,-191.5 434.71,-198.5"/>
<path fill="none" stroke="midnightblue" d="M409.21,-186C417.47,-186 426.04,-186 434.49,-186"/>
<polygon fill="midnightblue" stroke="midnightblue" points="434.71,-189.5 444.71,-186 434.71,-182.5 434.71,-189.5"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: main Pages: 1 -->
<svg width="570pt" height="422pt"
viewBox="0.00 0.00 570.00 422.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 418)">
<svg width="570pt" height="427pt"
viewBox="0.00 0.00 570.00 427.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 423)">
<title>main</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-418 566,-418 566,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-423 566,-423 566,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
@@ -85,7 +85,7 @@
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#acbfd4a79adb242022fa2829740328c17" target="_top" xlink:title="predict/recommend a word that starts with a given prefix">
<g id="a_node11"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4" target="_top" xlink:title="predict/recommend a word that starts with a given prefix">
<polygon fill="white" stroke="black" points="143,-158.5 143,-199.5 258,-199.5 258,-158.5 143,-158.5"/>
<text text-anchor="start" x="151" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
<text text-anchor="start" x="151" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
@@ -111,7 +111,7 @@
</g>
</g>
<!-- Node2&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<g id="edge15" class="edge">
<title>Node2&#45;&gt;Node14</title>
<path fill="none" stroke="midnightblue" d="M107.19,-169.65C117.34,-163.65 130.88,-155.74 143,-149 145.68,-147.51 148.44,-145.99 151.23,-144.47"/>
<polygon fill="midnightblue" stroke="midnightblue" points="153.06,-147.46 160.18,-139.62 149.72,-141.3 153.06,-147.46"/>
@@ -126,7 +126,7 @@
</g>
</g>
<!-- Node2&#45;&gt;Node15 -->
<g id="edge15" class="edge">
<g id="edge16" class="edge">
<title>Node2&#45;&gt;Node15</title>
<path fill="none" stroke="midnightblue" d="M94.44,-169.34C100.52,-151.01 116.15,-111.06 143,-89 145.14,-87.24 147.45,-85.65 149.86,-84.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="151.67,-87.2 159,-79.55 148.5,-80.96 151.67,-87.2"/>
@@ -143,7 +143,7 @@
</g>
</g>
<!-- Node2&#45;&gt;Node16 -->
<g id="edge16" class="edge">
<g id="edge17" class="edge">
<title>Node2&#45;&gt;Node16</title>
<path fill="none" stroke="midnightblue" d="M93.03,-169.46C97.15,-146.45 110.48,-87.15 143,-51 143.88,-50.02 144.79,-49.08 145.74,-48.15"/>
<polygon fill="midnightblue" stroke="midnightblue" points="148.18,-50.68 153.6,-41.57 143.69,-45.31 148.18,-50.68"/>
@@ -152,31 +152,31 @@
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="308,-394.5 308,-413.5 395,-413.5 395,-394.5 308,-394.5"/>
<text text-anchor="middle" x="351.5" y="-401.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::back</text>
<polygon fill="white" stroke="black" points="308,-399.5 308,-418.5 395,-418.5 395,-399.5 308,-399.5"/>
<text text-anchor="middle" x="351.5" y="-406.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::back</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node3&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M238.23,-357.72C254.95,-366.72 275.18,-377.01 294,-385 299.06,-387.15 304.45,-389.22 309.82,-391.16"/>
<polygon fill="midnightblue" stroke="midnightblue" points="308.79,-394.51 319.39,-394.49 311.1,-387.9 308.79,-394.51"/>
<path fill="none" stroke="midnightblue" d="M234.07,-357.75C251.43,-368.27 273.4,-380.74 294,-390 298.72,-392.12 303.74,-394.14 308.78,-396.01"/>
<polygon fill="midnightblue" stroke="midnightblue" points="307.81,-399.38 318.4,-399.42 310.15,-392.78 307.81,-399.38"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/pop.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="311,-356.5 311,-375.5 392,-375.5 392,-356.5 311,-356.5"/>
<text text-anchor="middle" x="351.5" y="-363.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::pop</text>
<polygon fill="white" stroke="black" points="311,-361.5 311,-380.5 392,-380.5 392,-361.5 311,-361.5"/>
<text text-anchor="middle" x="351.5" y="-368.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::pop</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node3&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M258.26,-348.05C272.15,-350.75 286.92,-353.62 300.47,-356.26"/>
<polygon fill="midnightblue" stroke="midnightblue" points="300.08,-359.75 310.56,-358.23 301.41,-352.88 300.08,-359.75"/>
<path fill="none" stroke="midnightblue" d="M258.26,-349.95C272.15,-353.12 286.92,-356.49 300.47,-359.58"/>
<polygon fill="midnightblue" stroke="midnightblue" points="300.03,-363.07 310.56,-361.89 301.59,-356.25 300.03,-363.07"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
@@ -190,76 +190,82 @@
<!-- Node3&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node3&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M258,-332.53C300.06,-328.45 358.64,-321.15 409,-309 429.76,-303.99 452.35,-296.09 470.12,-289.28"/>
<polygon fill="midnightblue" stroke="midnightblue" points="471.42,-292.53 479.46,-285.63 468.87,-286.01 471.42,-292.53"/>
<path fill="none" stroke="midnightblue" d="M258.17,-334.93C300.31,-332.38 358.93,-326.69 409,-314 431.5,-308.3 455.75,-298.32 473.91,-290.02"/>
<polygon fill="midnightblue" stroke="midnightblue" points="475.75,-293.03 483.33,-285.62 472.79,-286.68 475.75,-293.03"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/push.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="308.5,-280.5 308.5,-299.5 394.5,-299.5 394.5,-280.5 308.5,-280.5"/>
<text text-anchor="middle" x="351.5" y="-287.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::push</text>
<polygon fill="white" stroke="black" points="308.5,-285.5 308.5,-304.5 394.5,-304.5 394.5,-285.5 308.5,-285.5"/>
<text text-anchor="middle" x="351.5" y="-292.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::push</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node3&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M258.26,-319.1C275.69,-313.6 294.5,-307.66 310.56,-302.6"/>
<polygon fill="midnightblue" stroke="midnightblue" points="311.68,-305.91 320.17,-299.57 309.58,-299.24 311.68,-305.91"/>
<path fill="none" stroke="midnightblue" d="M258.26,-321C274.45,-316.44 291.83,-311.54 307.08,-307.24"/>
<polygon fill="midnightblue" stroke="midnightblue" points="308.1,-310.59 316.77,-304.51 306.2,-303.85 308.1,-310.59"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/top.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="312.5,-242.5 312.5,-261.5 390.5,-261.5 390.5,-242.5 312.5,-242.5"/>
<text text-anchor="middle" x="351.5" y="-249.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::top</text>
<polygon fill="white" stroke="black" points="312.5,-247.5 312.5,-266.5 390.5,-266.5 390.5,-247.5 312.5,-247.5"/>
<text text-anchor="middle" x="351.5" y="-254.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::top</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node3&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M243.7,-316.4C248.66,-313.46 253.54,-310.3 258,-307 276.19,-293.55 274.77,-282.92 294,-271 297.32,-268.94 300.89,-267.08 304.56,-265.4"/>
<polygon fill="midnightblue" stroke="midnightblue" points="305.9,-268.63 313.82,-261.58 303.24,-262.16 305.9,-268.63"/>
<path fill="none" stroke="midnightblue" d="M242.87,-316.42C248.07,-313.43 253.23,-310.26 258,-307 275.43,-295.09 275.65,-286.45 294,-276 297.69,-273.9 301.65,-271.98 305.7,-270.24"/>
<polygon fill="midnightblue" stroke="midnightblue" points="307.19,-273.42 315.23,-266.52 304.64,-266.9 307.19,-273.42"/>
</g>
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a5f501b7f1240a58bc082187f22c2fe17" target="_top" xlink:title="helper function to predict/recommend words that starts with a given prefix from the end of prefix&#39;s n...">
<polygon fill="white" stroke="black" points="294,-174.5 294,-215.5 409,-215.5 409,-174.5 294,-174.5"/>
<text text-anchor="start" x="302" y="-203.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
<text text-anchor="start" x="302" y="-192.5" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
<text text-anchor="middle" x="351.5" y="-181.5" font-family="Helvetica,sans-Serif" font-size="10.00">::get_all_words</text>
<g id="a_node12"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd" target="_top" xlink:title="helper function to predict/recommend words that starts with a given prefix from the end of prefix&#39;s n...">
<polygon fill="white" stroke="black" points="294,-165.5 294,-206.5 409,-206.5 409,-165.5 294,-165.5"/>
<text text-anchor="start" x="302" y="-194.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
<text text-anchor="start" x="302" y="-183.5" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
<text text-anchor="middle" x="351.5" y="-172.5" font-family="Helvetica,sans-Serif" font-size="10.00">::get_all_words</text>
</a>
</g>
</g>
<!-- Node11&#45;&gt;Node12 -->
<g id="edge11" class="edge">
<title>Node11&#45;&gt;Node12</title>
<path fill="none" stroke="midnightblue" d="M258.26,-185.09C266.65,-186 275.36,-186.93 283.93,-187.85"/>
<polygon fill="midnightblue" stroke="midnightblue" points="283.59,-191.33 293.9,-188.92 284.33,-184.37 283.59,-191.33"/>
<path fill="none" stroke="midnightblue" d="M258.26,-181.67C266.56,-182.06 275.17,-182.46 283.65,-182.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="283.75,-186.37 293.9,-183.34 284.08,-179.38 283.75,-186.37"/>
</g>
<!-- Node12&#45;&gt;Node6 -->
<g id="edge12" class="edge">
<g id="edge13" class="edge">
<title>Node12&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M390.74,-215.65C417.29,-229.99 452,-248.73 475.65,-261.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="474.28,-264.74 484.74,-266.41 477.61,-258.58 474.28,-264.74"/>
<path fill="none" stroke="midnightblue" d="M386.91,-206.65C414.68,-223.31 453.06,-246.34 477.83,-261.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="476.24,-264.32 486.61,-266.47 479.84,-258.32 476.24,-264.32"/>
</g>
<!-- Node12&#45;&gt;Node12 -->
<g id="edge12" class="edge">
<title>Node12&#45;&gt;Node12</title>
<path fill="none" stroke="midnightblue" d="M323.93,-206.86C320.92,-216.54 330.11,-225 351.5,-225 364.87,-225 373.47,-221.7 377.31,-216.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="380.78,-217.32 379.07,-206.86 373.89,-216.1 380.78,-217.32"/>
</g>
<!-- Node13 -->
<g id="node13" class="node">
<title>Node13</title>
<g id="a_node13"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="445,-185.5 445,-204.5 562,-204.5 562,-185.5 445,-185.5"/>
<text text-anchor="middle" x="503.5" y="-192.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
<polygon fill="white" stroke="black" points="445,-176.5 445,-195.5 562,-195.5 562,-176.5 445,-176.5"/>
<text text-anchor="middle" x="503.5" y="-183.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>
</g>
</g>
<!-- Node12&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<g id="edge14" class="edge">
<title>Node12&#45;&gt;Node13</title>
<path fill="none" stroke="midnightblue" d="M409.21,-195C417.47,-195 426.04,-195 434.49,-195"/>
<polygon fill="midnightblue" stroke="midnightblue" points="434.71,-198.5 444.71,-195 434.71,-191.5 434.71,-198.5"/>
<path fill="none" stroke="midnightblue" d="M409.21,-186C417.47,-186 426.04,-186 434.49,-186"/>
<polygon fill="midnightblue" stroke="midnightblue" points="434.71,-189.5 444.71,-186 434.71,-182.5 434.71,-189.5"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
<!-- Generated by graphviz version 2.49.0 (20210828.1703)
-->
<!-- Title: math/least_common_multiple.cpp Pages: 1 -->
<svg width="173pt" height="84pt"

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Some files were not shown because too many files have changed in this diff Show More