Documentation for 0931d530ae
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: MinHeap Class Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -144,7 +144,7 @@ int </td><td class="memItemRight" valign="bottom"><b>heap_size</b></td></tr
|
||||
<tr class="separator:ae4d358bf063bb196a1945b3fb99b4913"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >A class for Min Heap </p>
|
||||
<div class="textblock"><p>A class for Min Heap </p>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="a078cb888e642bb1f95dd0e03f0a35820" name="a078cb888e642bb1f95dd0e03f0a35820"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a078cb888e642bb1f95dd0e03f0a35820">◆ </a></span>MinHeap()</h2>
|
||||
@@ -169,7 +169,7 @@ int </td><td class="memItemRight" valign="bottom"><b>heap_size</b></td></tr
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Constructor: Builds a heap from a given array a[] of given size </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>Constructor: Builds a heap from a given array a[] of given size </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">capacity</td><td>initial heap capacity </td></tr>
|
||||
</table>
|
||||
@@ -238,8 +238,8 @@ int </td><td class="memItemRight" valign="bottom"><b>heap_size</b></td></tr
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Decreases key value of key at index i to new_val</p>
|
||||
<p >Decreases value of key at index 'i' to new_val. It is assumed that new_val is smaller than harr[i]. </p>
|
||||
<p>Decreases key value of key at index i to new_val</p>
|
||||
<p>Decreases value of key at index 'i' to new_val. It is assumed that new_val is smaller than harr[i]. </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 76</span> {</div>
|
||||
<div class="line"><span class="lineno"> 77</span> <a class="code hl_variable" href="../../d2/d05/class_min_heap.html#a34a93a87967308eb516328c0aca3c48e">harr</a>[i] = new_val;</div>
|
||||
<div class="line"><span class="lineno"> 78</span> <span class="keywordflow">while</span> (i != 0 && <a class="code hl_variable" href="../../d2/d05/class_min_heap.html#a34a93a87967308eb516328c0aca3c48e">harr</a>[parent(i)] > <a class="code hl_variable" href="../../d2/d05/class_min_heap.html#a34a93a87967308eb516328c0aca3c48e">harr</a>[i]) {</div>
|
||||
@@ -272,8 +272,8 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Deletes a key stored at index i</p>
|
||||
<p >This function deletes key at index i. It first reduced value to minus infinite, then calls <a class="el" href="../../d2/d05/class_min_heap.html#a4014f1edaed0bd7db0c0d2ca53228980">extractMin()</a> </p>
|
||||
<p>Deletes a key stored at index i</p>
|
||||
<p>This function deletes key at index i. It first reduced value to minus infinite, then calls <a class="el" href="../../d2/d05/class_min_heap.html#a4014f1edaed0bd7db0c0d2ca53228980">extractMin()</a> </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 105</span> {</div>
|
||||
<div class="line"><span class="lineno"> 106</span> <a class="code hl_function" href="../../d2/d05/class_min_heap.html#aa7f726cc6327955d22871592227432f5">decreaseKey</a>(i, INT_MIN);</div>
|
||||
<div class="line"><span class="lineno"> 107</span> <a class="code hl_function" href="../../d2/d05/class_min_heap.html#a4014f1edaed0bd7db0c0d2ca53228980">extractMin</a>();</div>
|
||||
@@ -303,7 +303,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >to extract the root which is the minimum element </p>
|
||||
<p>to extract the root which is the minimum element </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 85</span> {</div>
|
||||
<div class="line"><span class="lineno"> 86</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d2/d05/class_min_heap.html#ae4d358bf063bb196a1945b3fb99b4913">heap_size</a> <= 0)</div>
|
||||
<div class="line"><span class="lineno"> 87</span> <span class="keywordflow">return</span> INT_MAX;</div>
|
||||
@@ -352,7 +352,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Returns the minimum key (key at root) from min heap </p>
|
||||
<p>Returns the minimum key (key at root) from min heap </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 43</span>{ <span class="keywordflow">return</span> <a class="code hl_variable" href="../../d2/d05/class_min_heap.html#a34a93a87967308eb516328c0aca3c48e">harr</a>[0]; }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
@@ -372,7 +372,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Inserts a new key 'k' </p>
|
||||
<p>Inserts a new key 'k' </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 55</span> {</div>
|
||||
<div class="line"><span class="lineno"> 56</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d2/d05/class_min_heap.html#ae4d358bf063bb196a1945b3fb99b4913">heap_size</a> == <a class="code hl_variable" href="../../d2/d05/class_min_heap.html#a88b4aa3e66392a3eabbf2517a9a79a02">capacity</a>) {</div>
|
||||
<div class="line"><span class="lineno"> 57</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\nOverflow: Could not insertKey\n"</span>;</div>
|
||||
@@ -424,7 +424,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >to get index of left child of node at index i </p>
|
||||
<p>to get index of left child of node at index i </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 31</span>{ <span class="keywordflow">return</span> (2 * i + 1); }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
@@ -444,8 +444,8 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >to heapify a subtree with the root at given index</p>
|
||||
<p >A recursive method to heapify a subtree with the root at given index This method assumes that the subtrees are already heapified </p>
|
||||
<p>to heapify a subtree with the root at given index</p>
|
||||
<p>A recursive method to heapify a subtree with the root at given index This method assumes that the subtrees are already heapified </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 113</span> {</div>
|
||||
<div class="line"><span class="lineno"> 114</span> <span class="keywordtype">int</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a6d8df83a6f26ce24a75d3b358b7f5b8a">l</a> = <a class="code hl_function" href="../../d2/d05/class_min_heap.html#aa8c6c141e3de664819686aa637e1afca">left</a>(i);</div>
|
||||
<div class="line"><span class="lineno"> 115</span> <span class="keywordtype">int</span> r = <a class="code hl_function" href="../../d2/d05/class_min_heap.html#ac760b85cf90265b8d674b942a43fb70e">right</a>(i);</div>
|
||||
@@ -521,7 +521,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >to get index of right child of node at index i </p>
|
||||
<p>to get index of right child of node at index i </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 34</span>{ <span class="keywordflow">return</span> (2 * i + 2); }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
@@ -535,7 +535,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="../../d2/d05/class_min_heap.html">MinHeap</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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: MinHeap::deleteKey Pages: 1 -->
|
||||
<!--zoomable 114 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: MinHeap::deleteKey Pages: 1 -->
|
||||
<svg width="527pt" height="114pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: MinHeap::extractMin Pages: 1 -->
|
||||
<svg width="378pt" height="101pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: MinHeap::decreaseKey Pages: 1 -->
|
||||
<svg width="222pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: MinHeap::MinHeapify Pages: 1 -->
|
||||
<svg width="235pt" height="101pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: MinHeap::insertKey Pages: 1 -->
|
||||
<svg width="206pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: math/fast_power.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -130,13 +130,13 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Faster computation for \(a^b\). </p>
|
||||
<p >Program that computes \(a^b\) in \(O(logN)\) time. It is based on formula that:</p><ol type="1">
|
||||
<div class="textblock"><p>Faster computation for \(a^b\). </p>
|
||||
<p>Program that computes \(a^b\) in \(O(logN)\) time. It is based on formula that:</p><ol type="1">
|
||||
<li>if \(b\) is even: \(a^b = a^\frac{b}{2} \cdot a^\frac{b}{2} = {a^\frac{b}{2}}^2\)</li>
|
||||
<li>if \(b\) is odd: \(a^b = a^\frac{b-1}{2}
|
||||
\cdot a^\frac{b-1}{2} \cdot a = {a^\frac{b-1}{2}}^2 \cdot a\)</li>
|
||||
</ol>
|
||||
<p >We can compute \(a^b\) recursively using above algorithm. </p>
|
||||
<p>We can compute \(a^b\) recursively using above algorithm. </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a0d4e3f0099a6975b74a314a35bd0f94d" name="a0d4e3f0099a6975b74a314a35bd0f94d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a0d4e3f0099a6975b74a314a35bd0f94d">◆ </a></span>fast_power_linear()</h2>
|
||||
@@ -165,7 +165,7 @@ template<typename T > </div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Same algorithm with little different formula. It still calculates in \(O(\log N)\) </p>
|
||||
<p>Same algorithm with little different formula. It still calculates in \(O(\log N)\) </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 50</span> {</div>
|
||||
<div class="line"><span class="lineno"> 51</span> <span class="comment">// negative power. a^b = 1 / (a^-b)</span></div>
|
||||
<div class="line"><span class="lineno"> 52</span> <span class="keywordflow">if</span> (b < 0)</div>
|
||||
@@ -218,7 +218,7 @@ template<typename T > </div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >algorithm implementation for \(a^b\) </p>
|
||||
<p>algorithm implementation for \(a^b\) </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 26</span> {</div>
|
||||
<div class="line"><span class="lineno"> 27</span> <span class="comment">// negative power. a^b = 1 / (a^-b)</span></div>
|
||||
<div class="line"><span class="lineno"> 28</span> <span class="keywordflow">if</span> (b < 0)</div>
|
||||
@@ -262,7 +262,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Main function </p>
|
||||
<p>Main function </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 68</span> {</div>
|
||||
<div class="line"><span class="lineno"> 69</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"><span class="lineno"> 70</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/ios_base/sync_with_stdio.html">std::ios_base::sync_with_stdio</a>(<span class="keyword">false</span>);</div>
|
||||
@@ -312,7 +312,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="../../d2/d0b/fast__power_8cpp.html">fast_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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: fast_power_linear Pages: 1 -->
|
||||
<svg width="101pt" height="45pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: fast_power_recursive Pages: 1 -->
|
||||
<svg width="118pt" height="45pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="192pt" height="334pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: ciphers/vigenere_cipher.cpp Pages: 1 -->
|
||||
<svg width="189pt" height="82pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: sorting/gnome_sort.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -137,12 +137,12 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </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/Gnome_sort" target="_blank">gnome sort</a> algorithm. </p>
|
||||
<div class="textblock"><p>Implementation of <a href="https://en.wikipedia.org/wiki/Gnome_sort" target="_blank">gnome sort</a> algorithm. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/beqakd" target="_blank">beqakd</a> </dd>
|
||||
<dd>
|
||||
<a href="https://github.com/kvedala" target="_blank">Krishna Vedala</a></dd></dl>
|
||||
<p>Gnome sort algorithm is not the best one but it is widely used. The algorithm iteratively checks the order of pairs in the array. If they are on right order it moves to the next successive pair, otherwise it swaps elements. This operation is repeated until no more swaps are made thus indicating the values to be in ascending order.</p>
|
||||
<p >The time Complexity of the algorithm is \(O(n^2)\) and in some cases it can be \(O(n)\). </p>
|
||||
<p>The time Complexity of the algorithm is \(O(n^2)\) and in some cases it can be \(O(n)\). </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
@@ -159,7 +159,7 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Our main function with example of sort method. </p>
|
||||
<p>Our main function with example of sort method. </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 130</span> {</div>
|
||||
<div class="line"><span class="lineno"> 131</span> <a class="code hl_function" href="../../d2/d21/gnome__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>();</div>
|
||||
<div class="line"><span class="lineno"> 132</span> <span class="keywordflow">return</span> 0;</div>
|
||||
@@ -196,7 +196,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Test function </p>
|
||||
<p>Test function </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 85</span> {</div>
|
||||
<div class="line"><span class="lineno"> 86</span> <span class="comment">// Example 1. Creating array of int,</span></div>
|
||||
<div class="line"><span class="lineno"> 87</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 1 - as a C-array..."</span>;</div>
|
||||
@@ -262,7 +262,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_bb1b521853a9c46347182a9d10420771.html">sorting</a></li><li class="navelem"><a class="el" href="../../d2/d21/gnome__sort_8cpp.html">gnome_sort.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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="271pt" height="249pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="345pt" height="249pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: search/jump_search.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -123,7 +123,7 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >C++ program to implement <a href="https://en.wikipedia.org/wiki/Jump_search" target="_blank">Jump Search</a> </p>
|
||||
<div class="textblock"><p>C++ program to implement <a href="https://en.wikipedia.org/wiki/Jump_search" target="_blank">Jump Search</a> </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ab49fd8f401bfc71f63b74711390cccf0" name="ab49fd8f401bfc71f63b74711390cccf0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab49fd8f401bfc71f63b74711390cccf0">◆ </a></span>jumpSearch()</h2>
|
||||
@@ -156,7 +156,7 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >jump search implementation </p>
|
||||
<p>jump search implementation </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 12</span> {</div>
|
||||
<div class="line"><span class="lineno"> 13</span> <span class="comment">// Finding block size to be jumped</span></div>
|
||||
<div class="line"><span class="lineno"> 14</span> <span class="keywordtype">int</span> step = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html">std::sqrt</a>(n);</div>
|
||||
@@ -237,7 +237,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="../../d2/d22/jump__search_8cpp.html">jump_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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: jumpSearch Pages: 1 -->
|
||||
<svg width="165pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: machine_learning/neural_network.cpp Pages: 1 -->
|
||||
<!--zoomable 148 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: machine_learning/neural_network.cpp Pages: 1 -->
|
||||
<svg width="687pt" height="148pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: probability/addition_rule.cpp Pages: 1 -->
|
||||
<svg width="106pt" height="93pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: sorting/count_inversions.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -130,34 +130,34 @@ Namespaces</h2></td></tr>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:aad643c14734394e784a75169cb58132f"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:aad643c14734394e784a75169cb58132f"><td class="memTemplItemLeft" align="right" valign="top">uint32_t </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d2/d26/count__inversions_8cpp.html#aad643c14734394e784a75169cb58132f">sorting::inversion::merge</a> (T *arr, T *temp, uint32_t left, uint32_t mid, uint32_t right)</td></tr>
|
||||
<tr class="memdesc:aad643c14734394e784a75169cb58132f"><td class="mdescLeft"> </td><td class="mdescRight">Function to merge two sub-arrays. <a href="../../d2/d26/count__inversions_8cpp.html#aad643c14734394e784a75169cb58132f">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:aad643c14734394e784a75169cb58132f"><td class="mdescLeft"> </td><td class="mdescRight">Function to merge two sub-arrays. <br /></td></tr>
|
||||
<tr class="separator:aad643c14734394e784a75169cb58132f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae97a486e14101c4822ea8dc47f0d1661"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:ae97a486e14101c4822ea8dc47f0d1661"><td class="memTemplItemLeft" align="right" valign="top">uint32_t </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d2/d26/count__inversions_8cpp.html#ae97a486e14101c4822ea8dc47f0d1661">sorting::inversion::mergeSort</a> (T *arr, T *temp, uint32_t left, uint32_t right)</td></tr>
|
||||
<tr class="memdesc:ae97a486e14101c4822ea8dc47f0d1661"><td class="mdescLeft"> </td><td class="mdescRight">Implement merge Sort and count inverions while merging. <a href="../../d2/d26/count__inversions_8cpp.html#ae97a486e14101c4822ea8dc47f0d1661">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae97a486e14101c4822ea8dc47f0d1661"><td class="mdescLeft"> </td><td class="mdescRight">Implement merge Sort and count inverions while merging. <br /></td></tr>
|
||||
<tr class="separator:ae97a486e14101c4822ea8dc47f0d1661"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3332498eabf6579ef059c0d0e9f4ec80"><td class="memTemplParams" colspan="2">template<class T > </td></tr>
|
||||
<tr class="memitem:a3332498eabf6579ef059c0d0e9f4ec80"><td class="memTemplItemLeft" align="right" valign="top">uint32_t </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d2/d26/count__inversions_8cpp.html#a3332498eabf6579ef059c0d0e9f4ec80">sorting::inversion::countInversion</a> (T *arr, const uint32_t size)</td></tr>
|
||||
<tr class="memdesc:a3332498eabf6579ef059c0d0e9f4ec80"><td class="mdescLeft"> </td><td class="mdescRight">Function <a class="el" href="../../d2/d26/count__inversions_8cpp.html#a3332498eabf6579ef059c0d0e9f4ec80" title="Function countInversion() returns the number of inversion present in the input array....">countInversion()</a> returns the number of inversion present in the input array. Inversions are an estimate of how close or far off the array is to being sorted. <a href="../../d2/d26/count__inversions_8cpp.html#a3332498eabf6579ef059c0d0e9f4ec80">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a3332498eabf6579ef059c0d0e9f4ec80"><td class="mdescLeft"> </td><td class="mdescRight">Function <a class="el" href="../../d2/d26/count__inversions_8cpp.html#a3332498eabf6579ef059c0d0e9f4ec80" title="Function countInversion() returns the number of inversion present in the input array....">countInversion()</a> returns the number of inversion present in the input array. Inversions are an estimate of how close or far off the array is to being sorted. <br /></td></tr>
|
||||
<tr class="separator:a3332498eabf6579ef059c0d0e9f4ec80"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a851ca6a0391d14fb49a97d55e4377497"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:a851ca6a0391d14fb49a97d55e4377497"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d2/d26/count__inversions_8cpp.html#a851ca6a0391d14fb49a97d55e4377497">sorting::inversion::show</a> (T *arr, const uint32_t array_size)</td></tr>
|
||||
<tr class="memdesc:a851ca6a0391d14fb49a97d55e4377497"><td class="mdescLeft"> </td><td class="mdescRight">UTILITY function to print array. <a href="../../d2/d26/count__inversions_8cpp.html#a851ca6a0391d14fb49a97d55e4377497">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a851ca6a0391d14fb49a97d55e4377497"><td class="mdescLeft"> </td><td class="mdescRight">UTILITY function to print array. <br /></td></tr>
|
||||
<tr class="separator:a851ca6a0391d14fb49a97d55e4377497"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d26/count__inversions_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Test implementations. <a href="../../d2/d26/count__inversions_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Test implementations. <br /></td></tr>
|
||||
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d26/count__inversions_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <a href="../../d2/d26/count__inversions_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <br /></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Counting Inversions using <a href="https://en.wikipedia.org/wiki/Merge_sort" target="_blank">Merge Sort</a> </p>
|
||||
<p >Program to count the number of inversions in an array using merge-sort.</p>
|
||||
<p >The count of inversions help to determine how close the array is to be sorted in ASCENDING order.</p>
|
||||
<p >two elements a[i] and a[j] form an inversion if <code>a[i]</code> > <code>a[j]</code> and i < j</p>
|
||||
<p >Time Complexity --> <code>O(n.log n)</code></p>
|
||||
<p >Space Complexity --> <code>O(n)</code> ; additional array <code>temp[1..n]</code> </p>
|
||||
<div class="textblock"><p>Counting Inversions using <a href="https://en.wikipedia.org/wiki/Merge_sort" target="_blank">Merge Sort</a> </p>
|
||||
<p>Program to count the number of inversions in an array using merge-sort.</p>
|
||||
<p>The count of inversions help to determine how close the array is to be sorted in ASCENDING order.</p>
|
||||
<p>two elements a[i] and a[j] form an inversion if <code>a[i]</code> > <code>a[j]</code> and i < j</p>
|
||||
<p>Time Complexity --> <code>O(n.log n)</code></p>
|
||||
<p>Space Complexity --> <code>O(n)</code> ; additional array <code>temp[1..n]</code> </p>
|
||||
<h3><a class="anchor" id="autotoc_md110"></a>
|
||||
Algorithm</h3>
|
||||
<ol type="1">
|
||||
@@ -198,7 +198,7 @@ template<class T > </div>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Function countInversion() returns the number of inversion present in the input array. Inversions are an estimate of how close or far off the array is to being sorted. </p>
|
||||
<p >Number of inversions in a sorted array is 0. Number of inversion in an array[1...n] sorted in non-ascending order is n(n-1)/2, since each pair of elements contitute an inversion.</p>
|
||||
<p>Number of inversions in a sorted array is 0. Number of inversion in an array[1...n] sorted in non-ascending order is n(n-1)/2, since each pair of elements contitute an inversion.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">arr</td><td>- array, data member of std::vector<int>, input for counting inversions </td></tr>
|
||||
@@ -307,8 +307,8 @@ template<typename T > </div>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Function to merge two sub-arrays. </p>
|
||||
<p ><a class="el" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge()</a> function is called from <a class="el" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort()</a> to merge the array after it split for sorting by the <a class="el" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort()</a> funtion.</p>
|
||||
<p >In this case the merge fuction will also count and return inversions detected when merging the sub arrays.</p>
|
||||
<p><a class="el" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge()</a> function is called from <a class="el" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort()</a> to merge the array after it split for sorting by the <a class="el" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort()</a> funtion.</p>
|
||||
<p>In this case the merge fuction will also count and return inversions detected when merging the sub arrays.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">arr</td><td>input array, data-menber of vector </td></tr>
|
||||
@@ -395,7 +395,7 @@ template<typename T > </div>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Implement merge Sort and count inverions while merging. </p>
|
||||
<p >The <a class="el" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort()</a> function implements Merge Sort, a Divide and conquer algorithm, it divides the input array into two halves and calls itself for each sub-array and then calls the <a class="el" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge()</a> function to merge the two halves.</p>
|
||||
<p>The <a class="el" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort()</a> function implements Merge Sort, a Divide and conquer algorithm, it divides the input array into two halves and calls itself for each sub-array and then calls the <a class="el" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge()</a> function 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>
|
||||
@@ -553,7 +553,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_bb1b521853a9c46347182a9d10420771.html">sorting</a></li><li class="navelem"><a class="el" href="../../d2/d26/count__inversions_8cpp.html">count_inversions.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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: sorting::inversion::countInversion Pages: 1 -->
|
||||
<svg width="236pt" height="168pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="165pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="239pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: sorting::inversion::mergeSort Pages: 1 -->
|
||||
<svg width="99pt" height="56pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: math/approximate_pi.cpp Pages: 1 -->
|
||||
<svg width="188pt" height="82pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: tower Struct Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -116,7 +116,7 @@ int </td><td class="memItemRight" valign="bottom"><b>top</b></td></tr>
|
||||
<tr class="separator:acb535964abd34c47678a4ade0628223d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Define the state of tower </p>
|
||||
<div class="textblock"><p>Define the state of tower </p>
|
||||
</div><hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>others/<a class="el" href="../../db/d3c/tower__of__hanoi_8cpp.html">tower_of_hanoi.cpp</a></li>
|
||||
</ul>
|
||||
@@ -126,7 +126,7 @@ int </td><td class="memItemRight" valign="bottom"><b>top</b></td></tr>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../d2/d2c/structtower.html">tower</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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<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"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -110,7 +110,7 @@ $(document).ready(function(){initNavTree('d9/d5a/structgeometry_1_1jarvis_1_1_po
|
||||
<!-- 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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: sorting/pancake_sort.cpp Pages: 1 -->
|
||||
<svg width="266pt" height="82pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: qr_algorithm Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -130,7 +130,7 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:a28e2fa3e803abaea6c568dc45d69d8cc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Functions to compute <a href="https://en.wikipedia.org/wiki/QR_decomposition" target="_blank">QR decomposition</a> of any rectangular matrix. </p>
|
||||
<div class="textblock"><p>Functions to compute <a href="https://en.wikipedia.org/wiki/QR_decomposition" target="_blank">QR decomposition</a> of any rectangular matrix. </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a28e2fa3e803abaea6c568dc45d69d8cc" name="a28e2fa3e803abaea6c568dc45d69d8cc"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a28e2fa3e803abaea6c568dc45d69d8cc">◆ </a></span>eigen_values()</h2>
|
||||
@@ -157,7 +157,7 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Compute eigen values using iterative shifted QR decomposition algorithm as follows:</p><ol type="1">
|
||||
<p>Compute eigen values using iterative shifted QR decomposition algorithm as follows:</p><ol type="1">
|
||||
<li>Use last diagonal element of A as eigen value approximation \(c\)</li>
|
||||
<li>Shift diagonals of matrix \(A' = A - cI\)</li>
|
||||
<li>Decompose matrix \(A'=QR\)</li>
|
||||
@@ -292,7 +292,7 @@ template<typename T > </div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >operator to print a matrix </p>
|
||||
<p>operator to print a matrix </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 34</span> {</div>
|
||||
<div class="line"><span class="lineno"> 35</span> <span class="keyword">const</span> <span class="keywordtype">int</span> width = 12;</div>
|
||||
<div class="line"><span class="lineno"> 36</span> <span class="keyword">const</span> <span class="keywordtype">char</span> separator = <span class="charliteral">' '</span>;</div>
|
||||
@@ -348,7 +348,7 @@ template<typename T > </div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >operator to print a vector </p>
|
||||
<p>operator to print a vector </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 53</span> {</div>
|
||||
<div class="line"><span class="lineno"> 54</span> <span class="keyword">const</span> <span class="keywordtype">int</span> width = 10;</div>
|
||||
<div class="line"><span class="lineno"> 55</span> <span class="keyword">const</span> <span class="keywordtype">char</span> separator = <span class="charliteral">' '</span>;</div>
|
||||
@@ -403,7 +403,7 @@ template<typename T > </div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Decompose matrix \(A\) using <a href="https://en.wikipedia.org/wiki/QR_decomposition" target="_blank">Gram-Schmidt process</a>.</p>
|
||||
<p>Decompose matrix \(A\) using <a href="https://en.wikipedia.org/wiki/QR_decomposition" target="_blank">Gram-Schmidt process</a>.</p>
|
||||
<p class="formulaDsp">
|
||||
\begin{eqnarray*}
|
||||
\text{given that}\quad A &=&
|
||||
@@ -542,8 +542,8 @@ template<typename T > </div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Compute dot product of two vectors of equal lengths</p>
|
||||
<p >If \(\vec{a}=\left[a_0,a_1,a_2,...,a_L\right]\) and \(\vec{b}=\left[b_0,b_1,b_1,...,b_L\right]\) then \(\vec{a}\cdot\vec{b}=\displaystyle\sum_{i=0}^L a_i\times b_i\)</p>
|
||||
<p>Compute dot product of two vectors of equal lengths</p>
|
||||
<p>If \(\vec{a}=\left[a_0,a_1,a_2,...,a_L\right]\) and \(\vec{b}=\left[b_0,b_1,b_1,...,b_L\right]\) then \(\vec{a}\cdot\vec{b}=\displaystyle\sum_{i=0}^L a_i\times b_i\)</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>\(\vec{a}\cdot\vec{b}\) </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 76</span> {</div>
|
||||
<div class="line"><span class="lineno"> 77</span> <span class="keywordflow">return</span> (a * b).sum();</div>
|
||||
@@ -579,8 +579,8 @@ template<typename T > </div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Compute magnitude of vector.</p>
|
||||
<p >If \(\vec{a}=\left[a_0,a_1,a_2,...,a_L\right]\) then \(\left|\vec{a}\right|=\sqrt{\displaystyle\sum_{i=0}^L a_i^2}\)</p>
|
||||
<p>Compute magnitude of vector.</p>
|
||||
<p>If \(\vec{a}=\left[a_0,a_1,a_2,...,a_L\right]\) then \(\left|\vec{a}\right|=\sqrt{\displaystyle\sum_{i=0}^L a_i^2}\)</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>\(\left|\vec{a}\right|\) </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 92</span> {</div>
|
||||
<div class="line"><span class="lineno"> 93</span> <span class="keywordtype">double</span> dot = <a class="code hl_function" href="../../d2/d3b/namespaceqr__algorithm.html#a8ea313a1a1b5f9d0e3e332c29c6446ec">vector_dot</a>(a, a);</div>
|
||||
@@ -624,11 +624,11 @@ template<typename T > </div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Compute projection of vector \(\vec{a}\) on \(\vec{b}\) defined as </p><p class="formulaDsp">
|
||||
<p>Compute projection of vector \(\vec{a}\) on \(\vec{b}\) defined as </p><p class="formulaDsp">
|
||||
\[\text{proj}_\vec{b}\vec{a}=\frac{\vec{a}\cdot\vec{b}}{\left|\vec{b}\right|^2}\vec{b}\]
|
||||
</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>NULL if error, otherwise pointer to output </dd></dl>
|
||||
<p >check for division by zero using machine epsilon</p>
|
||||
<p>check for division by zero using machine epsilon</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 105</span> {</div>
|
||||
<div class="line"><span class="lineno"> 106</span> <span class="keywordtype">double</span> num = <a class="code hl_function" href="../../d2/d3b/namespaceqr__algorithm.html#a8ea313a1a1b5f9d0e3e332c29c6446ec">vector_dot</a>(a, b);</div>
|
||||
<div class="line"><span class="lineno"> 107</span> <span class="keywordtype">double</span> deno = <a class="code hl_function" href="../../d2/d3b/namespaceqr__algorithm.html#a8ea313a1a1b5f9d0e3e332c29c6446ec">vector_dot</a>(b, b);</div>
|
||||
@@ -658,7 +658,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="../../d2/d3b/namespaceqr__algorithm.html">qr_algorithm</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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: qr_algorithm::operator<< Pages: 1 -->
|
||||
<svg width="378pt" height="187pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: qr_algorithm::eigen_values Pages: 1 -->
|
||||
<!--zoomable 100 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: qr_algorithm::eigen_values Pages: 1 -->
|
||||
<svg width="604pt" height="100pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: qr_algorithm::vector_proj Pages: 1 -->
|
||||
<svg width="290pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: qr_algorithm::qr_decompose Pages: 1 -->
|
||||
<svg width="469pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: qr_algorithm::vector_mag Pages: 1 -->
|
||||
<svg width="293pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: qr_algorithm::operator<< Pages: 1 -->
|
||||
<svg width="378pt" height="220pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: range_queries/segtree.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -119,24 +119,24 @@ Include dependency graph for segtree.cpp:</div>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ae752659b7c1719d68fdb2ca538a93696"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d45/segtree_8cpp.html#ae752659b7c1719d68fdb2ca538a93696">ConsTree</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int64_t > &arr, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int64_t > *segtree, uint64_t low, uint64_t high, uint64_t pos)</td></tr>
|
||||
<tr class="memdesc:ae752659b7c1719d68fdb2ca538a93696"><td class="mdescLeft"> </td><td class="mdescRight">for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> <a href="../../d2/d45/segtree_8cpp.html#ae752659b7c1719d68fdb2ca538a93696">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae752659b7c1719d68fdb2ca538a93696"><td class="mdescLeft"> </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:ae752659b7c1719d68fdb2ca538a93696"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a423a97ea0c7ea6e33b5844a6858d902d"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d45/segtree_8cpp.html#a423a97ea0c7ea6e33b5844a6858d902d">query</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int64_t > *segtree, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int64_t > *lazy, uint64_t qlow, uint64_t qhigh, uint64_t low, uint64_t high, uint64_t pos)</td></tr>
|
||||
<tr class="memdesc:a423a97ea0c7ea6e33b5844a6858d902d"><td class="mdescLeft"> </td><td class="mdescRight">Returns the sum of all elements in a range. <a href="../../d2/d45/segtree_8cpp.html#a423a97ea0c7ea6e33b5844a6858d902d">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a423a97ea0c7ea6e33b5844a6858d902d"><td class="mdescLeft"> </td><td class="mdescRight">Returns the sum of all elements in a range. <br /></td></tr>
|
||||
<tr class="separator:a423a97ea0c7ea6e33b5844a6858d902d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:abd3e818681fb2e29cf08f4f60f82c8e0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d45/segtree_8cpp.html#abd3e818681fb2e29cf08f4f60f82c8e0">update</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int64_t > *segtree, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int64_t > *lazy, int64_t start, int64_t end, int64_t delta, uint64_t low, uint64_t high, uint64_t pos)</td></tr>
|
||||
<tr class="memdesc:abd3e818681fb2e29cf08f4f60f82c8e0"><td class="mdescLeft"> </td><td class="mdescRight">Updates a range of the segment tree. <a href="../../d2/d45/segtree_8cpp.html#abd3e818681fb2e29cf08f4f60f82c8e0">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:abd3e818681fb2e29cf08f4f60f82c8e0"><td class="mdescLeft"> </td><td class="mdescRight">Updates a range of the segment tree. <br /></td></tr>
|
||||
<tr class="separator:abd3e818681fb2e29cf08f4f60f82c8e0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d45/segtree_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Self-test implementation. <a href="../../d2/d45/segtree_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Self-test implementation. <br /></td></tr>
|
||||
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d45/segtree_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <a href="../../d2/d45/segtree_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <br /></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Implementation of [Segment Tree] (<a href="https://en.wikipedia.org/wiki/Segment_tree">https://en.wikipedia.org/wiki/Segment_tree</a>) data structure. </p>
|
||||
<p >A segment tree, also known as a statistic tree, is a tree data structure used for storing information about intervals, or segments. Its classical version allows querying which of the stored segments contain a given point, but our modification allows us to perform (query) any binary operation on any range in the array in O(logN) time. Here, we have used addition (+). For range updates, we have used lazy propagation.</p>
|
||||
<div class="textblock"><p>Implementation of [Segment Tree] (<a href="https://en.wikipedia.org/wiki/Segment_tree">https://en.wikipedia.org/wiki/Segment_tree</a>) data structure. </p>
|
||||
<p>A segment tree, also known as a statistic tree, is a tree data structure used for storing information about intervals, or segments. Its classical version allows querying which of the stored segments contain a given point, but our modification allows us to perform (query) any binary operation on any range in the array in O(logN) time. Here, we have used addition (+). For range updates, we have used lazy propagation.</p>
|
||||
<ul>
|
||||
<li>Space Complexity : O(NlogN) <br />
|
||||
</li>
|
||||
@@ -194,8 +194,8 @@ Functions</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> </p>
|
||||
<p >for assert for log2 for IO operations</p>
|
||||
<p >Constructs the initial segment tree</p>
|
||||
<p>for assert for log2 for IO operations</p>
|
||||
<p>Constructs the initial segment tree</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">arr</td><td>input to construct the tree out of </td></tr>
|
||||
@@ -590,7 +590,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="../../d2/d45/segtree_8cpp.html">segtree.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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="136pt" height="100pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: update Pages: 1 -->
|
||||
<svg width="54pt" height="45pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="210pt" height="105pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: ConsTree Pages: 1 -->
|
||||
<svg width="67pt" height="45pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: graphics/spirograph.cpp Pages: 1 -->
|
||||
<!--zoomable 82 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: graphics/spirograph.cpp Pages: 1 -->
|
||||
<svg width="509pt" height="82pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: sorting/heap_sort.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -132,10 +132,10 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </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/Heapsort" target="_blank">Heap Sort Algorithm (heap sort)</a> implementation </p>
|
||||
<div class="textblock"><p><a href="https://en.wikipedia.org/wiki/Heapsort" target="_blank">Heap Sort Algorithm (heap sort)</a> implementation </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="http://github.com/ayaankhan98" target="_blank">Ayaan Khan</a></dd></dl>
|
||||
<p>Heap-sort is a comparison-based sorting algorithm. Heap-sort can be thought of as an improved selection sort: like selection sort, heap sort divides its input into a sorted and an unsorted region, and it iteratively shrinks the unsorted region by extracting the largest element from it and inserting it into the sorted region. Unlike selection sort, heap sort does not waste time with a linear-time scan of the unsorted region; rather, heap sort maintains the unsorted region in a heap data structure to more quickly find the largest element in each step.</p>
|
||||
<p >Time Complexity - \(O(n \log(n))\) </p>
|
||||
<p>Time Complexity - \(O(n \log(n))\) </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
@@ -152,7 +152,7 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Main function </p>
|
||||
<p>Main function </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 120</span> {</div>
|
||||
<div class="line"><span class="lineno"> 121</span> <a class="code hl_function" href="../../d2/d52/heap__sort_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a>();</div>
|
||||
<div class="line"><span class="lineno"> 122</span> <span class="keywordflow">return</span> 0;</div>
|
||||
@@ -194,7 +194,7 @@ template<typename T > </div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Utility function to print the array after sorting.</p>
|
||||
<p>Utility function to print the array after sorting.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">arr</td><td>array to be printed </td></tr>
|
||||
@@ -224,7 +224,7 @@ template<typename T > </div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Test cases to test the program </p>
|
||||
<p>Test cases to test the program </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 99</span> {</div>
|
||||
<div class="line"><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> << <span class="stringliteral">"Test 1\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 101</span> <span class="keywordtype">int</span> arr[] = {-10, 78, -1, -6, 7, 4, 94, 5, 99, 0};</div>
|
||||
@@ -262,7 +262,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_bb1b521853a9c46347182a9d10420771.html">sorting</a></li><li class="navelem"><a class="el" href="../../d2/d52/heap__sort_8cpp.html">heap_sort.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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="248pt" height="101pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="322pt" height="101pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: operations_on_datastructures/circular_linked_list.cpp Pages: 1 -->
|
||||
<svg width="192pt" height="93pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: machine_learning/neural_network.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -171,15 +171,15 @@ Functions</h2></td></tr>
|
||||
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d58/neural__network_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
|
||||
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d58/neural__network_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <a href="../../d2/d58/neural__network_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <br /></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Implementation of [Multilayer Perceptron] (<a href="https://en.wikipedia.org/wiki/Multilayer_perceptron">https://en.wikipedia.org/wiki/Multilayer_perceptron</a>). </p>
|
||||
<div class="textblock"><p>Implementation of [Multilayer Perceptron] (<a href="https://en.wikipedia.org/wiki/Multilayer_perceptron">https://en.wikipedia.org/wiki/Multilayer_perceptron</a>). </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/imdeep2905" target="_blank">Deep Raval</a></dd></dl>
|
||||
<p >A multilayer perceptron (MLP) is a class of feedforward artificial neural network (ANN). The term MLP is used ambiguously, sometimes loosely to any feedforward ANN, sometimes strictly to refer to networks composed of multiple layers of perceptrons (with threshold activation). Multilayer perceptrons are sometimes colloquially referred to as "vanilla" neural networks, especially when they have a single hidden layer.</p>
|
||||
<p >An MLP consists of at least three layers of nodes: an input layer, a hidden layer and an output layer. Except for the input nodes, each node is a neuron that uses a nonlinear activation function. MLP utilizes a supervised learning technique called backpropagation for training. Its multiple layers and non-linear activation distinguish MLP from a linear perceptron. It can distinguish data that is not linearly separable.</p>
|
||||
<p >See <a href="https://en.wikipedia.org/wiki/Backpropagation" target="_blank">Backpropagation</a> for training algorithm.</p>
|
||||
<p>A multilayer perceptron (MLP) is a class of feedforward artificial neural network (ANN). The term MLP is used ambiguously, sometimes loosely to any feedforward ANN, sometimes strictly to refer to networks composed of multiple layers of perceptrons (with threshold activation). Multilayer perceptrons are sometimes colloquially referred to as "vanilla" neural networks, especially when they have a single hidden layer.</p>
|
||||
<p>An MLP consists of at least three layers of nodes: an input layer, a hidden layer and an output layer. Except for the input nodes, each node is a neuron that uses a nonlinear activation function. MLP utilizes a supervised learning technique called backpropagation for training. Its multiple layers and non-linear activation distinguish MLP from a linear perceptron. It can distinguish data that is not linearly separable.</p>
|
||||
<p>See <a href="https://en.wikipedia.org/wiki/Backpropagation" target="_blank">Backpropagation</a> for training algorithm.</p>
|
||||
<dl class="section note"><dt>Note</dt><dd>This implementation uses mini-batch gradient descent as optimizer and MSE as loss function. Bias is also not included. </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="aa69e95a34054d7989bf446f96b2ffaf9" name="aa69e95a34054d7989bf446f96b2ffaf9"></a>
|
||||
@@ -197,7 +197,7 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Derivative of relu function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>Derivative of relu function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">X</td><td>Value </td></tr>
|
||||
</table>
|
||||
@@ -229,7 +229,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Derivative of sigmoid function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>Derivative of sigmoid function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">X</td><td>Value </td></tr>
|
||||
</table>
|
||||
@@ -261,7 +261,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Derivative of Sigmoid function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>Derivative of Sigmoid function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">X</td><td>Value </td></tr>
|
||||
</table>
|
||||
@@ -293,7 +293,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Identity function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>Identity function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">X</td><td>Value </td></tr>
|
||||
</table>
|
||||
@@ -358,7 +358,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Relu function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>Relu function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">X</td><td>Value </td></tr>
|
||||
</table>
|
||||
@@ -391,7 +391,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Sigmoid function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>Sigmoid function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">X</td><td>Value </td></tr>
|
||||
</table>
|
||||
@@ -424,7 +424,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Square function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>Square function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">X</td><td>Value </td></tr>
|
||||
</table>
|
||||
@@ -456,7 +456,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Tanh function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>Tanh function </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">X</td><td>Value </td></tr>
|
||||
</table>
|
||||
@@ -495,7 +495,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Function to test neural network </p><dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
|
||||
<p>Function to test neural network </p><dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 805</span> {</div>
|
||||
<div class="line"><span class="lineno"> 806</span> <span class="comment">// Creating network with 3 layers for "iris.csv"</span></div>
|
||||
<div class="line"><span class="lineno"> 807</span> <a class="code hl_class" href="../../d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html">machine_learning::neural_network::NeuralNetwork</a> myNN =</div>
|
||||
@@ -539,7 +539,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_3343723ae086de42ee4ca9774da3a13f.html">machine_learning</a></li><li class="navelem"><a class="el" href="../../d2/d58/neural__network_8cpp.html">neural_network.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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: machine_learning::neural_network::activations::sigmoid Pages: 1 -->
|
||||
<svg width="221pt" height="67pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: machine_learning::neural_network::activations::dtanh Pages: 1 -->
|
||||
<svg width="148pt" height="56pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: machine_learning::neural_network::util_functions::identity_function Pages: 1 -->
|
||||
<svg width="133pt" height="67pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: machine_learning::neural_network::activations::tanh Pages: 1 -->
|
||||
<svg width="230pt" height="38pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: machine_learning::neural_network::util_functions::square Pages: 1 -->
|
||||
<svg width="133pt" height="67pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: machine_learning::neural_network::activations::dsigmoid Pages: 1 -->
|
||||
<svg width="133pt" height="67pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: machine_learning::neural_network::activations::drelu Pages: 1 -->
|
||||
<svg width="145pt" height="56pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<!--zoomable 1347 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="1039pt" height="1347pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<!--zoomable 1347 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="1113pt" height="1347pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: machine_learning::neural_network::activations::relu Pages: 1 -->
|
||||
<svg width="230pt" height="56pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: backtracking/subset_sum.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -128,18 +128,18 @@ Namespaces</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a7cb50d36a59427a33f64a266dac83d99"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d5a/subset__sum_8cpp.html#a7cb50d36a59427a33f64a266dac83d99">backtracking::subset_sum::number_of_subsets</a> (int32_t sum, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int32_t > &in_arr)</td></tr>
|
||||
<tr class="memdesc:a7cb50d36a59427a33f64a266dac83d99"><td class="mdescLeft"> </td><td class="mdescRight">The main function implements count of subsets. <a href="../../d2/d5a/subset__sum_8cpp.html#a7cb50d36a59427a33f64a266dac83d99">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a7cb50d36a59427a33f64a266dac83d99"><td class="mdescLeft"> </td><td class="mdescRight">The main function implements count of subsets. <br /></td></tr>
|
||||
<tr class="separator:a7cb50d36a59427a33f64a266dac83d99"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d5a/subset__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Test implementations. <a href="../../d2/d5a/subset__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Test implementations. <br /></td></tr>
|
||||
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d5a/subset__sum_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <a href="../../d2/d5a/subset__sum_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <br /></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </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://en.wikipedia.org/wiki/Subset_sum_problem" target="_blank">Subset Sum</a> problem. </p>
|
||||
<p >We are given an array and a sum value. The algorithm finds all the subsets of that array with sum equal to the given sum and return such subsets count. This approach will have exponential time complexity. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Swastyy" target="_blank">Swastika Gupta</a> </dd></dl>
|
||||
<div class="textblock"><p>Implementation of the <a href="https://en.wikipedia.org/wiki/Subset_sum_problem" target="_blank">Subset Sum</a> problem. </p>
|
||||
<p>We are given an array and a sum value. The algorithm finds all the subsets of that array with sum equal to the given sum and return such subsets count. This approach will have exponential time complexity. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Swastyy" target="_blank">Swastika Gupta</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
@@ -320,7 +320,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_c11585dfcef32a26e29098facab6c144.html">backtracking</a></li><li class="navelem"><a class="el" href="../../d2/d5a/subset__sum_8cpp.html">subset_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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: backtracking::subset_sum::number_of_subsets Pages: 1 -->
|
||||
<svg width="263pt" height="56pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="131pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="205pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: sorting/merge_sort.cpp Pages: 1 -->
|
||||
<svg width="124pt" height="82pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/word_break.cpp Pages: 1 -->
|
||||
<svg width="411pt" height="93pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: range_queries/prefix_sum_array.cpp Pages: 1 -->
|
||||
<svg width="192pt" height="93pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: ciphers/elliptic_curve_key_exchange.cpp Pages: 1 -->
|
||||
<svg width="356pt" height="203pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<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"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -118,7 +118,7 @@ $(document).ready(function(){initNavTree('da/d19/classprobability_1_1geometric__
|
||||
<!-- 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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: range_queries/persistent_seg_tree_lazy_prop.cpp Pages: 1 -->
|
||||
<svg width="194pt" height="93pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: search/median_search.cpp Pages: 1 -->
|
||||
<svg width="266pt" height="82pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: range_queries::heavy_light_decomposition::HLD< X > Class Template Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,56 +124,56 @@ Collaboration diagram for range_queries::heavy_light_decomposition::HLD< X &g
|
||||
<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:a6e486767434e44076c1ac374a22da726"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a6e486767434e44076c1ac374a22da726">HLD</a> (int nodes)</td></tr>
|
||||
<tr class="memdesc:a6e486767434e44076c1ac374a22da726"><td class="mdescLeft"> </td><td class="mdescRight">Class parameterized constructor. Resizes the and initilizes the data members. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a6e486767434e44076c1ac374a22da726">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a6e486767434e44076c1ac374a22da726"><td class="mdescLeft"> </td><td class="mdescRight">Class parameterized constructor. Resizes the and initilizes the data members. <br /></td></tr>
|
||||
<tr class="separator:a6e486767434e44076c1ac374a22da726"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae9e979edd69678b85665c01e2ee97828"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">init</a> ()</td></tr>
|
||||
<tr class="memdesc:ae9e979edd69678b85665c01e2ee97828"><td class="mdescLeft"> </td><td class="mdescRight">This function must be called after the tree adjacency list and node values are populated The function initializes the required parametes, and populates the segment tree. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae9e979edd69678b85665c01e2ee97828"><td class="mdescLeft"> </td><td class="mdescRight">This function must be called after the tree adjacency list and node values are populated The function initializes the required parametes, and populates the segment tree. <br /></td></tr>
|
||||
<tr class="separator:ae9e979edd69678b85665c01e2ee97828"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9f1cb54ed09fde931bf3220d75ee4c57"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57">update</a> (int <a class="el" href="../../d5/da1/structnode.html">node</a>, X val)</td></tr>
|
||||
<tr class="memdesc:a9f1cb54ed09fde931bf3220d75ee4c57"><td class="mdescLeft"> </td><td class="mdescRight">This function updates the value at node with val. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a9f1cb54ed09fde931bf3220d75ee4c57"><td class="mdescLeft"> </td><td class="mdescRight">This function updates the value at node with val. <br /></td></tr>
|
||||
<tr class="separator:a9f1cb54ed09fde931bf3220d75ee4c57"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a4dfbf5d9df825eeb63b294c6849bdcab"><td class="memItemLeft" align="right" valign="top">X </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab">query</a> (int a, int b)</td></tr>
|
||||
<tr class="memdesc:a4dfbf5d9df825eeb63b294c6849bdcab"><td class="mdescLeft"> </td><td class="mdescRight">This function returns the sum of node values in the simple path from from node_1 to node_2. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a4dfbf5d9df825eeb63b294c6849bdcab"><td class="mdescLeft"> </td><td class="mdescRight">This function returns the sum of node values in the simple path from from node_1 to node_2. <br /></td></tr>
|
||||
<tr class="separator:a4dfbf5d9df825eeb63b294c6849bdcab"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="inherit_header pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree')"><img src="../../closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree< X ></a></td></tr>
|
||||
<tr class="memitem:a835fb2bbb27307b8cacad9b287968bc1 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1">Tree</a> (int nodes)</td></tr>
|
||||
<tr class="memdesc:a835fb2bbb27307b8cacad9b287968bc1 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">Class parameterized constructor, resizes the and initializes the data members. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a835fb2bbb27307b8cacad9b287968bc1 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">Class parameterized constructor, resizes the and initializes the data members. <br /></td></tr>
|
||||
<tr class="separator:a835fb2bbb27307b8cacad9b287968bc1 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a79ab4601c4a95c0902ac04e779e5f54d inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d">add_edge</a> (const int u, const int v)</td></tr>
|
||||
<tr class="memdesc:a79ab4601c4a95c0902ac04e779e5f54d inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">Adds an undirected edge from node u to node v in the tree. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a79ab4601c4a95c0902ac04e779e5f54d inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">Adds an undirected edge from node u to node v in the tree. <br /></td></tr>
|
||||
<tr class="separator:a79ab4601c4a95c0902ac04e779e5f54d inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab916d554afa8ca5230b4310c2c69fae0 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">change_root</a> (int new_root)</td></tr>
|
||||
<tr class="memdesc:ab916d554afa8ca5230b4310c2c69fae0 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">Set the root for the tree. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ab916d554afa8ca5230b4310c2c69fae0 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">Set the root for the tree. <br /></td></tr>
|
||||
<tr class="separator:ab916d554afa8ca5230b4310c2c69fae0 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a04cd96efaba147b19d3afc769b90ff70 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">set_node_val</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< X > &node_val)</td></tr>
|
||||
<tr class="memdesc:a04cd96efaba147b19d3afc769b90ff70 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">Set the values for all the nodes. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a04cd96efaba147b19d3afc769b90ff70 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">Set the values for all the nodes. <br /></td></tr>
|
||||
<tr class="separator:a04cd96efaba147b19d3afc769b90ff70 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad22d760a5a33545a70e7ea5e1786c8dc inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">init</a> ()</td></tr>
|
||||
<tr class="memdesc:ad22d760a5a33545a70e7ea5e1786c8dc inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">This function must be called after the tree adjacency list and node values are populated The function initializes the required parameters, and populates the segment tree. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ad22d760a5a33545a70e7ea5e1786c8dc inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">This function must be called after the tree adjacency list and node values are populated The function initializes the required parameters, and populates the segment tree. <br /></td></tr>
|
||||
<tr class="separator:ad22d760a5a33545a70e7ea5e1786c8dc inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac7761255f2ba06b398b9aae5e4dce5f3 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">lift</a> (int *const p, int dist)</td></tr>
|
||||
<tr class="memdesc:ac7761255f2ba06b398b9aae5e4dce5f3 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">The function lifts a node, k units up the tree. The lifting is done in place, and the result is stored in the address pointed by p. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ac7761255f2ba06b398b9aae5e4dce5f3 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">The function lifts a node, k units up the tree. The lifting is done in place, and the result is stored in the address pointed by p. <br /></td></tr>
|
||||
<tr class="separator:ac7761255f2ba06b398b9aae5e4dce5f3 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8f7bca1746d40f21ad832fcea59aa6c6 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a8f7bca1746d40f21ad832fcea59aa6c6">kth_ancestor</a> (int p, const int &dist)</td></tr>
|
||||
<tr class="memdesc:a8f7bca1746d40f21ad832fcea59aa6c6 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">The function returns the kth ancestor of a node. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a8f7bca1746d40f21ad832fcea59aa6c6">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a8f7bca1746d40f21ad832fcea59aa6c6 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">The function returns the kth ancestor of a node. <br /></td></tr>
|
||||
<tr class="separator:a8f7bca1746d40f21ad832fcea59aa6c6 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae2b407e64aaf9878fbee7ee6efe9c7d4 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">lca</a> (int a, int b)</td></tr>
|
||||
<tr class="memdesc:ae2b407e64aaf9878fbee7ee6efe9c7d4 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">The function returns the least common ancestor of two nodes. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae2b407e64aaf9878fbee7ee6efe9c7d4 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">The function returns the least common ancestor of two nodes. <br /></td></tr>
|
||||
<tr class="separator:ae2b407e64aaf9878fbee7ee6efe9c7d4 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
|
||||
Private Member Functions</h2></td></tr>
|
||||
<tr class="memitem:af64848d6630c39d0f09ce2359cc7c4f8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8">dfs_hc</a> (int u, int p=-1)</td></tr>
|
||||
<tr class="memdesc:af64848d6630c39d0f09ce2359cc7c4f8"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to assign heavy child to each node (-1 for a leaf node) <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:af64848d6630c39d0f09ce2359cc7c4f8"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to assign heavy child to each node (-1 for a leaf node) <br /></td></tr>
|
||||
<tr class="separator:af64848d6630c39d0f09ce2359cc7c4f8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a2dfbda148aad0bfaba2ebfda9ebc915a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a">dfs_par</a> (int u, int p=-1)</td></tr>
|
||||
<tr class="memdesc:a2dfbda148aad0bfaba2ebfda9ebc915a"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to assign highest parent that can be reached though heavy chains. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a2dfbda148aad0bfaba2ebfda9ebc915a"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to assign highest parent that can be reached though heavy chains. <br /></td></tr>
|
||||
<tr class="separator:a2dfbda148aad0bfaba2ebfda9ebc915a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0579062b384e54b611b80c6337c7f2c8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8">dfs_labels</a> (int u, int p=-1)</td></tr>
|
||||
<tr class="memdesc:a0579062b384e54b611b80c6337c7f2c8"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to lable the nodes so that heavy chains have a contigous lable. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a0579062b384e54b611b80c6337c7f2c8"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to lable the nodes so that heavy chains have a contigous lable. <br /></td></tr>
|
||||
<tr class="separator:a0579062b384e54b611b80c6337c7f2c8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7d5b40c076347a6aabfb37a0590f2f24"><td class="memItemLeft" align="right" valign="top">X </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24">chain_query</a> (int a, int b)</td></tr>
|
||||
<tr class="memdesc:a7d5b40c076347a6aabfb37a0590f2f24"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to break down a path query into two chain queries. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a7d5b40c076347a6aabfb37a0590f2f24"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to break down a path query into two chain queries. <br /></td></tr>
|
||||
<tr class="separator:a7d5b40c076347a6aabfb37a0590f2f24"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
|
||||
@@ -197,7 +197,7 @@ int </td><td class="memItemRight" valign="bottom"><b>label</b></td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><div class="compoundTemplParams">template<typename X><br />
|
||||
class range_queries::heavy_light_decomposition::HLD< X ></div><p >The Heavy-Light Decomposition class. </p>
|
||||
class range_queries::heavy_light_decomposition::HLD< X ></div><p>The Heavy-Light Decomposition class. </p>
|
||||
<dl class="tparams"><dt>Template Parameters</dt><dd>
|
||||
<table class="tparams">
|
||||
<tr><td class="paramname">the</td><td>data type of the values stored in the tree nodes </td></tr>
|
||||
@@ -734,7 +734,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="../../dd/d69/namespacerange__queries.html">range_queries</a></li><li class="navelem"><b>heavy_light_decomposition</b></li><li class="navelem"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">HLD</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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::HLD::dfs_labels Pages: 1 -->
|
||||
<svg width="118pt" height="67pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::HLD::dfs_par Pages: 1 -->
|
||||
<svg width="118pt" height="67pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::HLD::query Pages: 1 -->
|
||||
<svg width="410pt" height="150pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::HLD::chain_query Pages: 1 -->
|
||||
<svg width="264pt" height="86pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::HLD::update Pages: 1 -->
|
||||
<svg width="264pt" height="49pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::HLD::init Pages: 1 -->
|
||||
<svg width="410pt" height="377pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::HLD::dfs_hc Pages: 1 -->
|
||||
<svg width="118pt" height="67pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: probability::windowed_median::WindowedMedian Pages: 1 -->
|
||||
<svg width="202pt" height="115pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: others::iterative_tree_traversals::Node Struct Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -129,7 +129,7 @@ struct <a class="el" href="../../d2/d9a/structothers_1_1iterative__tree__travers
|
||||
<tr class="separator:af19e39acfc18b823be9d4879a20e1143"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >defines the structure of a node of the tree </p>
|
||||
<div class="textblock"><p>defines the structure of a node of the tree </p>
|
||||
</div><hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>others/<a class="el" href="../../d8/d90/iterative__tree__traversals_8cpp.html">iterative_tree_traversals.cpp</a></li>
|
||||
</ul>
|
||||
@@ -139,7 +139,7 @@ struct <a class="el" href="../../d2/d9a/structothers_1_1iterative__tree__travers
|
||||
<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>iterative_tree_traversals</b></li><li class="navelem"><a class="el" href="../../d2/d9a/structothers_1_1iterative__tree__traversals_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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: find_non_repeating_integer Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -104,14 +104,14 @@ $(document).ready(function(){initNavTree('d2/da7/namespacefind__non__repeating__
|
||||
<p>Functions to find the non repeating integer in an array of repeating integers. <a href="https://leetcode.com/problems/single-number/" target="_blank">Single Number</a>
|
||||
<a href="../../d2/da7/namespacefind__non__repeating__integer.html#details">More...</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Functions to find the non repeating integer in an array of repeating integers. <a href="https://leetcode.com/problems/single-number/" target="_blank">Single Number</a> </p>
|
||||
<div class="textblock"><p>Functions to find the non repeating integer in an array of repeating integers. <a href="https://leetcode.com/problems/single-number/" target="_blank">Single Number</a> </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="../../d2/da7/namespacefind__non__repeating__integer.html">find_non_repeating_integer</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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: operations_on_datastructures::inorder_traversal_of_bst::Node Pages: 1 -->
|
||||
<svg width="201pt" height="38pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: stack_linkedList Class Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -260,7 +260,7 @@ Public Attributes</h2></td></tr>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../d2/dc4/classstack__linked_list.html">stack_linkedList</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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<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"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -112,7 +112,7 @@ $(document).ready(function(){initNavTree('d9/d12/classothers_1_1iterative__tree_
|
||||
<!-- 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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: statistics Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -114,14 +114,14 @@ Classes</h2></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Statistical algorithms. </p>
|
||||
<div class="textblock"><p>Statistical 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="../../d2/dcf/namespacestatistics.html">statistics</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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: std::is_integral< uint128_t > Struct Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -121,7 +121,7 @@ Collaboration diagram for std::is_integral< uint128_t >:</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="../../d2/dd4/structstd_1_1is__integral_3_01uint128__t_01_4.html">is_integral< uint128_t ></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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: numerical_methods/gaussian_elimination.cpp Pages: 1 -->
|
||||
<svg width="151pt" height="93pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: house_robber Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -104,14 +104,14 @@ $(document).ready(function(){initNavTree('d2/de1/namespacehouse__robber.html','.
|
||||
<p>Functions for the <a href="https://labuladong.gitbook.io/algo-en/i.-dynamic-programming/houserobber" target="_blank">House Robber</a> algorithm.
|
||||
<a href="../../d2/de1/namespacehouse__robber.html#details">More...</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Functions for the <a href="https://labuladong.gitbook.io/algo-en/i.-dynamic-programming/houserobber" target="_blank">House Robber</a> algorithm. </p>
|
||||
<div class="textblock"><p>Functions for the <a href="https://labuladong.gitbook.io/algo-en/i.-dynamic-programming/houserobber" target="_blank">House Robber</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="../../d2/de1/namespacehouse__robber.html">house_robber</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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<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"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -110,7 +110,7 @@ $(document).ready(function(){initNavTree('db/d19/structlinear__probing_1_1_entry
|
||||
<!-- 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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: runge_kutta Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -104,14 +104,14 @@ $(document).ready(function(){initNavTree('d2/de7/namespacerunge__kutta.html','..
|
||||
<p>Functions for <a href="https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods" target="_blank">Runge Kutta fourth order</a> method.
|
||||
<a href="../../d2/de7/namespacerunge__kutta.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/Runge%E2%80%93Kutta_methods" target="_blank">Runge Kutta fourth order</a> method. </p>
|
||||
<div class="textblock"><p>Functions for <a href="https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods" target="_blank">Runge Kutta fourth order</a> method. </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="../../d2/de7/namespacerunge__kutta.html">runge_kutta</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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: range_queries/heavy_light_decomposition.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -156,16 +156,16 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </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/Heavy_path_decomposition" target="_blank">Heavy Light Decomposition</a> implementation </p>
|
||||
<div class="textblock"><p><a href="https://en.wikipedia.org/wiki/Heavy_path_decomposition" target="_blank">Heavy Light Decomposition</a> implementation </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/aneee004" target="_blank">Aniruthan R</a></dd></dl>
|
||||
<p>Heavy-Light Decomposition is a technique on trees, that supports the following:</p><ol type="1">
|
||||
<li>Update node s, with a value v</li>
|
||||
<li>Return the (sum) of all node values on the simple path from a to b (sum) can also be replced with <a class="el" href="../../d7/d47/namespace_x_o_r.html" title="Functions for XOR cipher algorithm.">XOR</a>, OR, AND, min, or max</li>
|
||||
</ol>
|
||||
<p >The update is done in O(log n) time, and the query is done in O(log^2 n) time with HLD where, n is the number of nodes</p>
|
||||
<p >The template type is the data type of the value stored in the nodes. If a non-primitive data-type is used as a template, the coressponding operators must be overloaded.</p>
|
||||
<p >An HLD object can only be created with a constant number of nodes, and it cannot be changed later. Creaty an empty instance is not supported.</p>
|
||||
<p >To start answering updates and queries,</p><ol type="1">
|
||||
<p>The update is done in O(log n) time, and the query is done in O(log^2 n) time with HLD where, n is the number of nodes</p>
|
||||
<p>The template type is the data type of the value stored in the nodes. If a non-primitive data-type is used as a template, the coressponding operators must be overloaded.</p>
|
||||
<p>An HLD object can only be created with a constant number of nodes, and it cannot be changed later. Creaty an empty instance is not supported.</p>
|
||||
<p>To start answering updates and queries,</p><ol type="1">
|
||||
<li>Create an instance of HLD<X> object (obj), with the required data type.</li>
|
||||
<li>Read in the edge/parent information and update it with obj.add_edge(). Note: The edges addes must be 0 indexed.</li>
|
||||
<li>Create a vector with initial node values, and call set_node_val() with it.</li>
|
||||
@@ -173,7 +173,7 @@ Functions</h2></td></tr>
|
||||
<li>Call obj.update(node, new_val), to update the value at index 'node' to the new value. Note: node must be 0 indexed</li>
|
||||
<li>Call obj.query(a, b) to get the (sum) of node values in the simple path from a to b. Note: a and b, must be 0 indexed.</li>
|
||||
</ol>
|
||||
<p >Sample I/O at the bottom. </p><dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000011">Todo:</a></b></dt><dd>Support edge weight queries, by storing the edge weight value in it's child algorithm verified by testing in CSES path queries: <a href="https://cses.fi/problemset/task/1138">https://cses.fi/problemset/task/1138</a> </dd></dl>
|
||||
<p>Sample I/O at the bottom. </p><dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000011">Todo:</a></b></dt><dd>Support edge weight queries, by storing the edge weight value in it's child algorithm verified by testing in CSES path queries: <a href="https://cses.fi/problemset/task/1138">https://cses.fi/problemset/task/1138</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
@@ -190,7 +190,7 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Main function </p>
|
||||
<p>Main function </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 634</span> {</div>
|
||||
<div class="line"><span class="lineno"> 635</span> <a class="code hl_function" href="../../d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817">test_1</a>();</div>
|
||||
<div class="line"><span class="lineno"> 636</span> <a class="code hl_function" href="../../d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d">test_2</a>();</div>
|
||||
@@ -231,7 +231,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Test implementations </p><dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
|
||||
<p>Test implementations </p><dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 505</span> {</div>
|
||||
<div class="line"><span class="lineno"> 506</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 1:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 507</span> </div>
|
||||
@@ -307,7 +307,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Second test implementations </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<p>Second test implementations </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 549</span> {</div>
|
||||
<div class="line"><span class="lineno"> 550</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 2:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 551</span> </div>
|
||||
@@ -377,7 +377,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Third test implementations </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<p>Third test implementations </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 592</span> {</div>
|
||||
<div class="line"><span class="lineno"> 593</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 3:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 594</span> </div>
|
||||
@@ -431,7 +431,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="../../d2/de9/heavy__light__decomposition_8cpp.html">heavy_light_decomposition.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.5 </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.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_1 Pages: 1 -->
|
||||
<!--zoomable 578 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_1 Pages: 1 -->
|
||||
<svg width="496pt" height="578pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_2 Pages: 1 -->
|
||||
<!--zoomable 578 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_2 Pages: 1 -->
|
||||
<svg width="496pt" height="578pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<!--zoomable 708 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="570pt" height="708pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
@@ -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 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_3 Pages: 1 -->
|
||||
<!--zoomable 578 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |