Documentation for c26eea874d
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: graph::is_graph_bipartite::Graph Class Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -142,12 +142,12 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a6aef65b40347c4606662cad4dd2e14d3" id="r_a6aef65b40347c4606662cad4dd2e14d3"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a6aef65b40347c4606662cad4dd2e14d3">Graph</a> (int size)</td></tr>
|
||||
<tr class="memdesc:a6aef65b40347c4606662cad4dd2e14d3"><td class="mdescLeft"> </td><td class="mdescRight">Constructor that initializes the graph on creation. <br /></td></tr>
|
||||
<tr class="separator:a6aef65b40347c4606662cad4dd2e14d3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a816cda7e563198f778fd32e03992763b" id="r_a816cda7e563198f778fd32e03992763b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a816cda7e563198f778fd32e03992763b">addEdge</a> (int u, int v)</td></tr>
|
||||
<tr class="memdesc:a816cda7e563198f778fd32e03992763b"><td class="mdescLeft"> </td><td class="mdescRight">Function that add an edge between two nodes or vertices of graph. <br /></td></tr>
|
||||
<tr class="separator:a816cda7e563198f778fd32e03992763b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad475f8b838693812f7569a490729f373" id="r_ad475f8b838693812f7569a490729f373"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#ad475f8b838693812f7569a490729f373">is_bipartite</a> ()</td></tr>
|
||||
<tr class="memdesc:ad475f8b838693812f7569a490729f373"><td class="mdescLeft"> </td><td class="mdescRight">function to add edges to our graph <br /></td></tr>
|
||||
<tr class="separator:ad475f8b838693812f7569a490729f373"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad8c10df34357b2cd865c81e0c4f0bd8c" id="r_ad8c10df34357b2cd865c81e0c4f0bd8c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ad8c10df34357b2cd865c81e0c4f0bd8c">addEdge</a> (int u, int v)</td></tr>
|
||||
<tr class="memdesc:ad8c10df34357b2cd865c81e0c4f0bd8c"><td class="mdescLeft"> </td><td class="mdescRight">Function that add an edge between two nodes or vertices of graph. <br /></td></tr>
|
||||
<tr class="separator:ad8c10df34357b2cd865c81e0c4f0bd8c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9b0c6400693a5cfff971f768dd5ca5ca" id="r_a9b0c6400693a5cfff971f768dd5ca5ca"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#a9b0c6400693a5cfff971f768dd5ca5ca">is_bipartite</a> ()</td></tr>
|
||||
<tr class="memdesc:a9b0c6400693a5cfff971f768dd5ca5ca"><td class="mdescLeft"> </td><td class="mdescRight">function to add edges to our graph <br /></td></tr>
|
||||
<tr class="separator:a9b0c6400693a5cfff971f768dd5ca5ca"><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>
|
||||
Private Attributes</h2></td></tr>
|
||||
@@ -184,7 +184,7 @@ Private Attributes</h2></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel explicit">explicit</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -210,14 +210,14 @@ Private Attributes</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="a816cda7e563198f778fd32e03992763b" name="a816cda7e563198f778fd32e03992763b"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a816cda7e563198f778fd32e03992763b">◆ </a></span>addEdge()</h2>
|
||||
<a id="ad8c10df34357b2cd865c81e0c4f0bd8c" name="ad8c10df34357b2cd865c81e0c4f0bd8c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ad8c10df34357b2cd865c81e0c4f0bd8c">◆ </a></span>addEdge()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void graph::is_graph_bipartite::Graph::addEdge </td>
|
||||
<td class="memname">void Graph::addEdge </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>u</em></span>, </td>
|
||||
</tr>
|
||||
@@ -246,14 +246,14 @@ Private Attributes</h2></td></tr>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ad475f8b838693812f7569a490729f373" name="ad475f8b838693812f7569a490729f373"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ad475f8b838693812f7569a490729f373">◆ </a></span>is_bipartite()</h2>
|
||||
<a id="a9b0c6400693a5cfff971f768dd5ca5ca" name="a9b0c6400693a5cfff971f768dd5ca5ca"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a9b0c6400693a5cfff971f768dd5ca5ca">◆ </a></span>is_bipartite()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">bool graph::is_graph_bipartite::Graph::is_bipartite </td>
|
||||
<td class="memname">bool Graph::is_bipartite </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td></td>
|
||||
@@ -311,7 +311,7 @@ Private Attributes</h2></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -337,7 +337,7 @@ Private Attributes</h2></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -363,7 +363,7 @@ Private Attributes</h2></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -383,7 +383,7 @@ Private Attributes</h2></td></tr>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../df/dce/namespacegraph.html">graph</a></li><li class="navelem"><b>is_graph_bipartite</b></li><li class="navelem"><a class="el" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html">Graph</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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
var classgraph_1_1is__graph__bipartite_1_1_graph =
|
||||
[
|
||||
[ "Graph", "de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a6aef65b40347c4606662cad4dd2e14d3", null ],
|
||||
[ "addEdge", "de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a816cda7e563198f778fd32e03992763b", null ],
|
||||
[ "is_bipartite", "de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad475f8b838693812f7569a490729f373", null ],
|
||||
[ "addEdge", "de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c", null ],
|
||||
[ "is_bipartite", "de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9b0c6400693a5cfff971f768dd5ca5ca", null ],
|
||||
[ "adj", "de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f", null ],
|
||||
[ "n", "de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef", null ],
|
||||
[ "side", "de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6", null ]
|
||||
|
||||
@@ -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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: backtracking/knight_tour.cpp Pages: 1 -->
|
||||
<svg width="118pt" height="94pt"
|
||||
|
||||
|
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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: backtracking/knight_tour.cpp Pages: 1 -->
|
||||
<svg width="118pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: sorting/cycle_sort.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -154,7 +154,7 @@ Namespaces</h2></td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ae79a9d247691fce0d655fce75f1c04fa" id="r_ae79a9d247691fce0d655fce75f1c04fa"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:ae79a9d247691fce0d655fce75f1c04fa" id="r_ae79a9d247691fce0d655fce75f1c04fa"><td class="memTemplParams" colspan="2">template<typename T> </td></tr>
|
||||
<tr class="memitem:ae79a9d247691fce0d655fce75f1c04fa"><td class="memTemplItemLeft" align="right" valign="top">std::vector< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#ae79a9d247691fce0d655fce75f1c04fa">sorting::cycle_sort::cycleSort</a> (const std::vector< T > &in_arr)</td></tr>
|
||||
<tr class="memdesc:ae79a9d247691fce0d655fce75f1c04fa"><td class="mdescLeft"> </td><td class="mdescRight">The main function implements cycleSort. <br /></td></tr>
|
||||
<tr class="separator:ae79a9d247691fce0d655fce75f1c04fa"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -177,7 +177,7 @@ Functions</h2></td></tr>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
template<typename T> </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::vector< T > sorting::cycle_sort::cycleSort </td>
|
||||
@@ -299,7 +299,7 @@ template<typename T > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel static">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -349,7 +349,7 @@ template<typename T > </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="../../de/d07/cycle__sort_8cpp.html">cycle_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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var cycle__sort_8cpp =
|
||||
[
|
||||
[ "cycleSort", "de/d07/cycle__sort_8cpp.html#ae79a9d247691fce0d655fce75f1c04fa", null ],
|
||||
[ "sorting::cycle_sort::cycleSort", "de/d07/cycle__sort_8cpp.html#ae79a9d247691fce0d655fce75f1c04fa", null ],
|
||||
[ "main", "de/d07/cycle__sort_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "test", "de/d07/cycle__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]
|
||||
];
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: sorting/cycle_sort.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,13 +124,14 @@ $(function(){initNavTree('de/d07/cycle__sort_8cpp_source.html','../../'); initRe
|
||||
<div class="headertitle"><div class="title">cycle_sort.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../de/d07/cycle__sort_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../de/d07/cycle__sort_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include <algorithm></span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include <cassert></span> </div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <cstdint></span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include <iostream></span> </div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include <vector></span> </div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span></div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d5/d91/namespacesorting.html">sorting</a> {</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d4/dfb/namespacecycle__sort.html">cycle_sort</a> {</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
|
||||
@@ -185,21 +186,21 @@ $(function(){initNavTree('de/d07/cycle__sort_8cpp_source.html','../../'); initRe
|
||||
</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span>} <span class="comment">// namespace cycle_sort</span></div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span>} <span class="comment">// namespace sorting</span></div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span></div>
|
||||
<div class="foldopen" id="foldopen00092" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="../../de/d07/cycle__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d"> 92</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>() {</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="comment">// Test 1</span></div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="comment">// [4, 3, 2, 1] return [1, 2, 3, 4]</span></div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> std::vector<uint32_t> array1 = {4, 3, 2, 1};</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> std::cout << <span class="stringliteral">"Test 1... "</span>;</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> std::vector<uint32_t> arr1 = sorting::cycle_sort::cycleSort(array1);</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> std::vector<uint32_t> arr1 = <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#ae79a9d247691fce0d655fce75f1c04fa">sorting::cycle_sort::cycleSort</a>(array1);</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> assert(std::is_sorted(std::begin(arr1), std::end(arr1)));</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> std::cout << <span class="stringliteral">"passed"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="comment">// [4.3, -6.5, -7.4, 0, 2.7, 1.8] return [-7.4, -6.5, 0, 1.8, 2.7, 4.3]</span></div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> std::vector<double> array2 = {4.3, -6.5, -7.4, 0, 2.7, 1.8};</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> std::cout << <span class="stringliteral">"Test 2... "</span>;</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> std::vector<double> arr2 = sorting::cycle_sort::cycleSort(array2);</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> std::vector<double> arr2 = <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#ae79a9d247691fce0d655fce75f1c04fa">sorting::cycle_sort::cycleSort</a>(array2);</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> assert(std::is_sorted(std::begin(arr2), std::end(arr2)));</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> std::cout << <span class="stringliteral">"passed"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
|
||||
@@ -207,19 +208,19 @@ $(function(){initNavTree('de/d07/cycle__sort_8cpp_source.html','../../'); initRe
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="comment">// [3, 3, 3, 3] return [3, 3, 3, 3]</span></div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> std::vector<uint32_t> array3 = {3, 3, 3, 3};</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> std::cout << <span class="stringliteral">"Test 3... "</span>;</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> std::vector<uint32_t> arr3 = sorting::cycle_sort::cycleSort(array3);</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> std::vector<uint32_t> arr3 = <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#ae79a9d247691fce0d655fce75f1c04fa">sorting::cycle_sort::cycleSort</a>(array3);</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> assert(std::is_sorted(std::begin(arr3), std::end(arr3)));</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> std::cout << <span class="stringliteral">"passed"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="comment">// [9, 4, 6, 8, 14, 3] return [9, 4, 6, 8, 14, 3]</span></div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> std::vector<uint32_t> array4 = {3, 4, 6, 8, 9, 14};</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> std::cout << <span class="stringliteral">"Test 4... "</span>;</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> std::vector<uint32_t> arr4 = sorting::cycle_sort::cycleSort(array4);</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> std::vector<uint32_t> arr4 = <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#ae79a9d247691fce0d655fce75f1c04fa">sorting::cycle_sort::cycleSort</a>(array4);</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> assert(std::is_sorted(std::begin(arr4), std::end(arr4)));</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> std::cout << <span class="stringliteral">"passed"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span></div>
|
||||
<div class="foldopen" id="foldopen00128" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"><a class="line" href="../../de/d07/cycle__sort_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 128</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// execute the test</span></div>
|
||||
@@ -237,7 +238,7 @@ $(function(){initNavTree('de/d07/cycle__sort_8cpp_source.html','../../'); initRe
|
||||
<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="../../de/d07/cycle__sort_8cpp.html">cycle_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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: merge_insertion Namespace Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -135,7 +135,7 @@ $(function(){initNavTree('de/d0a/namespacemerge__insertion.html','../../'); init
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../de/d0a/namespacemerge__insertion.html">merge_insertion</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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: range_queries::fenwick_tree Class Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -140,19 +140,19 @@ Collaboration diagram for range_queries::fenwick_tree:</div>
|
||||
<table class="memberdecls">
|
||||
<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:a5ea37183524553bbf2234a36a44a4b9a" id="r_a5ea37183524553bbf2234a36a44a4b9a"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:a5ea37183524553bbf2234a36a44a4b9a" id="r_a5ea37183524553bbf2234a36a44a4b9a"><td class="memTemplParams" colspan="2">template<typename T> </td></tr>
|
||||
<tr class="memitem:a5ea37183524553bbf2234a36a44a4b9a"><td class="memTemplItemLeft" align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a5ea37183524553bbf2234a36a44a4b9a">fenwick_tree</a> (const std::vector< T > &arr)</td></tr>
|
||||
<tr class="memdesc:a5ea37183524553bbf2234a36a44a4b9a"><td class="mdescLeft"> </td><td class="mdescRight">Class Constructor. <br /></td></tr>
|
||||
<tr class="separator:a5ea37183524553bbf2234a36a44a4b9a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aef7ba885b91af093e9e514358fa0f36c" id="r_aef7ba885b91af093e9e514358fa0f36c"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:aef7ba885b91af093e9e514358fa0f36c" id="r_aef7ba885b91af093e9e514358fa0f36c"><td class="memTemplParams" colspan="2">template<typename T> </td></tr>
|
||||
<tr class="memitem:aef7ba885b91af093e9e514358fa0f36c"><td class="memTemplItemLeft" align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#aef7ba885b91af093e9e514358fa0f36c">fenwick_tree</a> (T x)</td></tr>
|
||||
<tr class="memdesc:aef7ba885b91af093e9e514358fa0f36c"><td class="mdescLeft"> </td><td class="mdescRight">Class Constructor. <br /></td></tr>
|
||||
<tr class="separator:aef7ba885b91af093e9e514358fa0f36c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a19dea5e88bbd7683a719030623315de9" id="r_a19dea5e88bbd7683a719030623315de9"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:a19dea5e88bbd7683a719030623315de9" id="r_a19dea5e88bbd7683a719030623315de9"><td class="memTemplParams" colspan="2">template<typename T> </td></tr>
|
||||
<tr class="memitem:a19dea5e88bbd7683a719030623315de9"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a19dea5e88bbd7683a719030623315de9">update</a> (T id, T val)</td></tr>
|
||||
<tr class="memdesc:a19dea5e88bbd7683a719030623315de9"><td class="mdescLeft"> </td><td class="mdescRight">Updates the value of an element in original array and accordingly updates the values in BIT array. <br /></td></tr>
|
||||
<tr class="separator:a19dea5e88bbd7683a719030623315de9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1fa0559d987fde0044761b17b35f5abd" id="r_a1fa0559d987fde0044761b17b35f5abd"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:a1fa0559d987fde0044761b17b35f5abd" id="r_a1fa0559d987fde0044761b17b35f5abd"><td class="memTemplParams" colspan="2">template<typename T> </td></tr>
|
||||
<tr class="memitem:a1fa0559d987fde0044761b17b35f5abd"><td class="memTemplItemLeft" align="right" valign="top">int </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a1fa0559d987fde0044761b17b35f5abd">sum</a> (T id)</td></tr>
|
||||
<tr class="memdesc:a1fa0559d987fde0044761b17b35f5abd"><td class="mdescLeft"> </td><td class="mdescRight">Returns the sum of elements in range from 0 to ID. <br /></td></tr>
|
||||
<tr class="separator:a1fa0559d987fde0044761b17b35f5abd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -186,7 +186,7 @@ Private Attributes</h2></td></tr>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
template<typename T> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
@@ -200,7 +200,7 @@ template<typename T > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel explicit">explicit</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -239,7 +239,7 @@ template<typename T > </div>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
template<typename T> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
@@ -253,7 +253,7 @@ template<typename T > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel explicit">explicit</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -297,7 +297,7 @@ template<typename T > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel private">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -322,7 +322,7 @@ template<typename T > </div>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
template<typename T> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
@@ -336,7 +336,7 @@ template<typename T > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -392,7 +392,7 @@ template<typename T > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -419,7 +419,7 @@ template<typename T > </div>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
template<typename T> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
@@ -437,7 +437,7 @@ template<typename T > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -485,7 +485,7 @@ template<typename T > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -512,7 +512,7 @@ template<typename T > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -532,7 +532,7 @@ template<typename T > </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"><a class="el" href="../../de/d0d/classrange__queries_1_1fenwick__tree.html">fenwick_tree</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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: search/fibonacci_search.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -262,8 +262,8 @@ Functions</h2></td></tr>
|
||||
<div class="line"><span class="lineno"> 125</span> assert(<a class="code hl_function" href="#a2aa09bef74ee063c1331de0883af4f4f">random_tests</a>());</div>
|
||||
<div class="line"><span class="lineno"> 126</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 127</span>}</div>
|
||||
<div class="ttc" id="afibonacci__search_8cpp_html_a2aa09bef74ee063c1331de0883af4f4f"><div class="ttname"><a href="#a2aa09bef74ee063c1331de0883af4f4f">random_tests</a></div><div class="ttdeci">bool random_tests()</div><div class="ttdoc">random tests which cover cases when we have one, multiple or zero occurences of the value we're looki...</div><div class="ttdef"><b>Definition</b> <a href="../../de/d0d/fibonacci__search_8cpp_source.html#l00096">fibonacci_search.cpp:96</a></div></div>
|
||||
<div class="ttc" id="afibonacci__search_8cpp_html_a5e144326104e57a3808aed7eb098db0d"><div class="ttname"><a href="#a5e144326104e57a3808aed7eb098db0d">no_occurence_tests</a></div><div class="ttdeci">bool no_occurence_tests()</div><div class="ttdoc">random tests for checking performance when an array doesn't contain an element</div><div class="ttdef"><b>Definition</b> <a href="../../de/d0d/fibonacci__search_8cpp_source.html#l00072">fibonacci_search.cpp:72</a></div></div>
|
||||
<div class="ttc" id="afibonacci__search_8cpp_html_a2aa09bef74ee063c1331de0883af4f4f"><div class="ttname"><a href="#a2aa09bef74ee063c1331de0883af4f4f">random_tests</a></div><div class="ttdeci">bool random_tests()</div><div class="ttdoc">random tests which cover cases when we have one, multiple or zero occurences of the value we're looki...</div><div class="ttdef"><b>Definition</b> <a href="../../de/d0d/fibonacci__search_8cpp_source.html#l00096">fibonacci_search.cpp:96</a></div></div>
|
||||
<div class="ttc" id="afibonacci__search_8cpp_html_a5e144326104e57a3808aed7eb098db0d"><div class="ttname"><a href="#a5e144326104e57a3808aed7eb098db0d">no_occurence_tests</a></div><div class="ttdeci">bool no_occurence_tests()</div><div class="ttdoc">random tests for checking performance when an array doesn't contain an element</div><div class="ttdef"><b>Definition</b> <a href="../../de/d0d/fibonacci__search_8cpp_source.html#l00072">fibonacci_search.cpp:72</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -358,7 +358,7 @@ Functions</h2></td></tr>
|
||||
<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="../../de/d0d/fibonacci__search_8cpp.html">fibonacci_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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: search/fibonacci_search.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,7 +124,8 @@ $(function(){initNavTree('de/d0d/fibonacci__search_8cpp_source.html','../../');
|
||||
<div class="headertitle"><div class="title">fibonacci_search.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../de/d0d/fibonacci__search_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../de/d0d/fibonacci__search_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include <iostream></span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include <vector></span> <span class="comment">// for std::vector class</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include <cassert></span> <span class="comment">// for assert</span></div>
|
||||
@@ -132,7 +133,7 @@ $(function(){initNavTree('de/d0d/fibonacci__search_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include <algorithm></span> <span class="comment">// for sorting</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span></div>
|
||||
<div class="foldopen" id="foldopen00023" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="../../de/d0d/fibonacci__search_8cpp.html#a0bc61b3903d9a53061bf31e5d110fe61"> 23</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#a0bc61b3903d9a53061bf31e5d110fe61">fibonacci_search</a>(<span class="keyword">const</span> std::vector<int> &arr, <span class="keywordtype">int</span> value){</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="comment">// initialize last and current members of Fibonacci sequence </span></div>
|
||||
@@ -180,7 +181,7 @@ $(function(){initNavTree('de/d0d/fibonacci__search_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">return</span> -1;</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span></div>
|
||||
<div class="foldopen" id="foldopen00072" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="../../de/d0d/fibonacci__search_8cpp.html#a5e144326104e57a3808aed7eb098db0d"> 72</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#a5e144326104e57a3808aed7eb098db0d">no_occurence_tests</a>(){</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordtype">bool</span> passed = <span class="keyword">true</span>;</div>
|
||||
@@ -203,7 +204,7 @@ $(function(){initNavTree('de/d0d/fibonacci__search_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordflow">return</span> passed;</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> </div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span></div>
|
||||
<div class="foldopen" id="foldopen00096" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="../../de/d0d/fibonacci__search_8cpp.html#a2aa09bef74ee063c1331de0883af4f4f"> 96</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#a2aa09bef74ee063c1331de0883af4f4f">random_tests</a>(){</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordtype">bool</span> passed = <span class="keyword">true</span>;</div>
|
||||
@@ -228,7 +229,7 @@ $(function(){initNavTree('de/d0d/fibonacci__search_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">return</span> passed;</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span></div>
|
||||
<div class="foldopen" id="foldopen00123" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"><a class="line" href="../../de/d0d/fibonacci__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 123</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> assert(<a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#a5e144326104e57a3808aed7eb098db0d">no_occurence_tests</a>());</div>
|
||||
@@ -237,8 +238,8 @@ $(function(){initNavTree('de/d0d/fibonacci__search_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span>}</div>
|
||||
</div>
|
||||
<div class="ttc" id="afibonacci__search_8cpp_html_a0bc61b3903d9a53061bf31e5d110fe61"><div class="ttname"><a href="../../de/d0d/fibonacci__search_8cpp.html#a0bc61b3903d9a53061bf31e5d110fe61">fibonacci_search</a></div><div class="ttdeci">int fibonacci_search(const std::vector< int > &arr, int value)</div><div class="ttdoc">using fibonacci search algorithm finds an index of a given element in a sorted array</div><div class="ttdef"><b>Definition</b> <a href="#l00023">fibonacci_search.cpp:23</a></div></div>
|
||||
<div class="ttc" id="afibonacci__search_8cpp_html_a2aa09bef74ee063c1331de0883af4f4f"><div class="ttname"><a href="../../de/d0d/fibonacci__search_8cpp.html#a2aa09bef74ee063c1331de0883af4f4f">random_tests</a></div><div class="ttdeci">bool random_tests()</div><div class="ttdoc">random tests which cover cases when we have one, multiple or zero occurences of the value we're looki...</div><div class="ttdef"><b>Definition</b> <a href="#l00096">fibonacci_search.cpp:96</a></div></div>
|
||||
<div class="ttc" id="afibonacci__search_8cpp_html_a5e144326104e57a3808aed7eb098db0d"><div class="ttname"><a href="../../de/d0d/fibonacci__search_8cpp.html#a5e144326104e57a3808aed7eb098db0d">no_occurence_tests</a></div><div class="ttdeci">bool no_occurence_tests()</div><div class="ttdoc">random tests for checking performance when an array doesn't contain an element</div><div class="ttdef"><b>Definition</b> <a href="#l00072">fibonacci_search.cpp:72</a></div></div>
|
||||
<div class="ttc" id="afibonacci__search_8cpp_html_a2aa09bef74ee063c1331de0883af4f4f"><div class="ttname"><a href="../../de/d0d/fibonacci__search_8cpp.html#a2aa09bef74ee063c1331de0883af4f4f">random_tests</a></div><div class="ttdeci">bool random_tests()</div><div class="ttdoc">random tests which cover cases when we have one, multiple or zero occurences of the value we're looki...</div><div class="ttdef"><b>Definition</b> <a href="#l00096">fibonacci_search.cpp:96</a></div></div>
|
||||
<div class="ttc" id="afibonacci__search_8cpp_html_a5e144326104e57a3808aed7eb098db0d"><div class="ttname"><a href="../../de/d0d/fibonacci__search_8cpp.html#a5e144326104e57a3808aed7eb098db0d">no_occurence_tests</a></div><div class="ttdeci">bool no_occurence_tests()</div><div class="ttdoc">random tests for checking performance when an array doesn't contain an element</div><div class="ttdef"><b>Definition</b> <a href="#l00072">fibonacci_search.cpp:72</a></div></div>
|
||||
<div class="ttc" id="afibonacci__search_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../de/d0d/fibonacci__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition</b> <a href="#l00123">fibonacci_search.cpp:123</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
@@ -246,7 +247,7 @@ $(function(){initNavTree('de/d0d/fibonacci__search_8cpp_source.html','../../');
|
||||
<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="../../de/d0d/fibonacci__search_8cpp.html">fibonacci_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.12.0 </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.13.2 </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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: numerical_methods/midpoint_integral_method.cpp Pages: 1 -->
|
||||
<svg width="444pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: numerical_methods/midpoint_integral_method.cpp Pages: 1 -->
|
||||
<svg width="444pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: math/armstrong_number.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,11 +124,11 @@ $(function(){initNavTree('de/d1e/armstrong__number_8cpp_source.html','../../');
|
||||
<div class="headertitle"><div class="title">armstrong_number.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include <cassert></span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include <cmath></span> </div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include <iostream></span> </div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span></div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="keywordtype">int</span> number_of_digits(<span class="keywordtype">int</span> num) {</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordtype">int</span> total_digits = 0;</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordflow">while</span> (num > 0) {</div>
|
||||
@@ -137,7 +137,7 @@ $(function(){initNavTree('de/d1e/armstrong__number_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> }</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordflow">return</span> total_digits;</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span>}</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span></div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="keywordtype">bool</span> <a class="code hl_function" href="../../dd/d24/namespacedynamic__programming.html#af046365a8d77a1267acc082f86135a26">is_armstrong</a>(<span class="keywordtype">int</span> number) {</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="comment">// If the number is less than 0, then it is not an armstrong number.</span></div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">if</span> (number < 0) {</div>
|
||||
@@ -157,7 +157,7 @@ $(function(){initNavTree('de/d1e/armstrong__number_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> }</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">return</span> number == <a class="code hl_function" href="../../d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35">sum</a>;</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span>}</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span></div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../dd/d1e/generate__parentheses_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>() {</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="comment">// is_armstrong(370) returns true.</span></div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> assert(<a class="code hl_function" href="../../dd/d24/namespacedynamic__programming.html#af046365a8d77a1267acc082f86135a26">is_armstrong</a>(370) == <span class="keyword">true</span>);</div>
|
||||
@@ -174,7 +174,7 @@ $(function(){initNavTree('de/d1e/armstrong__number_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> std::cout << <span class="stringliteral">"All tests have successfully passed!\n"</span>;</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span>}</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span></div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="keywordtype">int</span> <a class="code hl_function" href="../../dd/d1e/generate__parentheses_8cpp.html#gae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <a class="code hl_function" href="../../dd/d1e/generate__parentheses_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordflow">return</span> 0;</div>
|
||||
@@ -189,7 +189,7 @@ $(function(){initNavTree('de/d1e/armstrong__number_8cpp_source.html','../../');
|
||||
<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"><b>armstrong_number.cpp</b></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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: Member List</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -137,7 +137,7 @@ $(function(){initNavTree('d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.
|
||||
<!-- 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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: others::Cache::D_Node< T > Class Template Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -166,7 +166,7 @@ class others::Cache::D_Node< T ></div><p><a class="el" href="../../db/d8b/
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../dc/daa/lru__cache2_8cpp_source.html#l00042">42</a> of file <a class="el" href="../../dc/daa/lru__cache2_8cpp_source.html">lru_cache2.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d65/lfu__cache_8cpp_source.html#l00045">45</a> of file <a class="el" href="../../d9/d65/lfu__cache_8cpp_source.html">lfu_cache.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="adf7731f7bbf68c38e7188d7fd773e83f" name="adf7731f7bbf68c38e7188d7fd773e83f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#adf7731f7bbf68c38e7188d7fd773e83f">◆ </a></span>D_Node() <span class="overload">[1/2]</span></h2>
|
||||
@@ -174,7 +174,7 @@ class others::Cache::D_Node< T ></div><p><a class="el" href="../../db/d8b/
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
template<typename T> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
@@ -188,7 +188,7 @@ template<typename T > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel explicit">explicit</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -207,7 +207,7 @@ template<typename T > </div>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
template<typename T> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
@@ -221,7 +221,7 @@ template<typename T > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel explicit">explicit</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -238,7 +238,7 @@ template<typename T > </div>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
template<typename T> </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">T <a class="el" href="../../de/d21/classothers_1_1_cache_1_1_d___node.html">others::Cache::D_Node</a>< T >::data</td>
|
||||
@@ -258,7 +258,7 @@ template<typename T > </div>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
template<typename T> </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="../../de/d21/classothers_1_1_cache_1_1_d___node.html">D_Node</a>< T > * <a class="el" href="../../de/d21/classothers_1_1_cache_1_1_d___node.html">others::Cache::D_Node</a>< T >::next</td>
|
||||
@@ -278,7 +278,7 @@ template<typename T > </div>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
template<typename T> </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="../../de/d21/classothers_1_1_cache_1_1_d___node.html">D_Node</a>< T > * <a class="el" href="../../de/d21/classothers_1_1_cache_1_1_d___node.html">others::Cache::D_Node</a>< T >::prev</td>
|
||||
@@ -302,7 +302,7 @@ template<typename T > </div>
|
||||
<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"><a class="el" href="../../db/dde/namespaceothers_1_1_cache.html">Cache</a></li><li class="navelem"><a class="el" href="../../de/d21/classothers_1_1_cache_1_1_d___node.html">D_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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: data_structures/disjoint_set.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -155,9 +155,9 @@ Functions</h2></td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
|
||||
Variables</h2></td></tr>
|
||||
<tr class="memitem:a31ade23371565792a3434bc6f2e3bdef" id="r_a31ade23371565792a3434bc6f2e3bdef"><td class="memItemLeft" align="right" valign="top">vector< int > </td><td class="memItemRight" valign="bottom"><a class="el" href="#a31ade23371565792a3434bc6f2e3bdef">root</a></td></tr>
|
||||
<tr class="memitem:a31ade23371565792a3434bc6f2e3bdef" id="r_a31ade23371565792a3434bc6f2e3bdef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/dfc/classvector.html">vector</a>< int > </td><td class="memItemRight" valign="bottom"><a class="el" href="#a31ade23371565792a3434bc6f2e3bdef">root</a></td></tr>
|
||||
<tr class="separator:a31ade23371565792a3434bc6f2e3bdef"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9bbf7f3dcc785986a407cfb70f54e303" id="r_a9bbf7f3dcc785986a407cfb70f54e303"><td class="memItemLeft" align="right" valign="top">vector< int > </td><td class="memItemRight" valign="bottom"><a class="el" href="#a9bbf7f3dcc785986a407cfb70f54e303">rank</a></td></tr>
|
||||
<tr class="memitem:a9bbf7f3dcc785986a407cfb70f54e303" id="r_a9bbf7f3dcc785986a407cfb70f54e303"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/dfc/classvector.html">vector</a>< int > </td><td class="memItemRight" valign="bottom"><a class="el" href="#a9bbf7f3dcc785986a407cfb70f54e303">rank</a></td></tr>
|
||||
<tr class="separator:a9bbf7f3dcc785986a407cfb70f54e303"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
@@ -360,7 +360,7 @@ Variables</h2></td></tr>
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">vector<int> rank</td>
|
||||
<td class="memname"><a class="el" href="../../d7/dfc/classvector.html">vector</a><int> rank</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -376,7 +376,7 @@ Variables</h2></td></tr>
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">vector<int> root</td>
|
||||
<td class="memname"><a class="el" href="../../d7/dfc/classvector.html">vector</a><int> root</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -391,7 +391,7 @@ Variables</h2></td></tr>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html">data_structures</a></li><li class="navelem"><a class="el" href="../../de/d23/disjoint__set_8cpp.html">disjoint_set.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: data_structures/disjoint_set.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,7 +124,8 @@ $(function(){initNavTree('de/d23/disjoint__set_8cpp_source.html','../../'); init
|
||||
<div class="headertitle"><div class="title">disjoint_set.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../de/d23/disjoint__set_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../de/d23/disjoint__set_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include <iostream></span></div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include <vector></span></div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
|
||||
@@ -133,7 +134,7 @@ $(function(){initNavTree('de/d23/disjoint__set_8cpp_source.html','../../'); init
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="keyword">using </span>std::vector;</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>vector<int> root, rank;</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span></div>
|
||||
<div class="foldopen" id="foldopen00037" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="../../de/d23/disjoint__set_8cpp.html#a010965fc5f16cca5a62506afab24e4ec"> 37</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a010965fc5f16cca5a62506afab24e4ec">CreateSet</a>(<span class="keywordtype">int</span> n) {</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> root = vector<int>(n + 1);</div>
|
||||
@@ -143,7 +144,7 @@ $(function(){initNavTree('de/d23/disjoint__set_8cpp_source.html','../../'); init
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> }</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span></div>
|
||||
<div class="foldopen" id="foldopen00053" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"><a class="line" href="../../de/d23/disjoint__set_8cpp.html#a34b9ead0608e676d9ae5188672427cc8"> 53</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a34b9ead0608e676d9ae5188672427cc8">Find</a>(<span class="keywordtype">int</span> x) {</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">if</span> (root[x] == x) {</div>
|
||||
@@ -152,9 +153,9 @@ $(function(){initNavTree('de/d23/disjoint__set_8cpp_source.html','../../'); init
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordflow">return</span> root[x] = <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a34b9ead0608e676d9ae5188672427cc8">Find</a>(root[x]);</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span></div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="../../de/d23/disjoint__set_8cpp.html#a2fb0a7cd26a477e2d48ba7e0118bc985"> 67</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a2fb0a7cd26a477e2d48ba7e0118bc985">InSameUnion</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y) { <span class="keywordflow">return</span> <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a34b9ead0608e676d9ae5188672427cc8">Find</a>(x) == <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a34b9ead0608e676d9ae5188672427cc8">Find</a>(y); }</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span></div>
|
||||
<div class="foldopen" id="foldopen00078" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="../../de/d23/disjoint__set_8cpp.html#a44481bb75386fbb0f958a388d4b9f757"> 78</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a44481bb75386fbb0f958a388d4b9f757">Union</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y) {</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordtype">int</span> a = <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a34b9ead0608e676d9ae5188672427cc8">Find</a>(x), b = <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a34b9ead0608e676d9ae5188672427cc8">Find</a>(y);</div>
|
||||
@@ -170,7 +171,7 @@ $(function(){initNavTree('de/d23/disjoint__set_8cpp_source.html','../../'); init
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> }</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span></div>
|
||||
<div class="foldopen" id="foldopen00093" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="../../de/d23/disjoint__set_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 93</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="comment">// tests CreateSet & Find</span></div>
|
||||
@@ -207,7 +208,7 @@ $(function(){initNavTree('de/d23/disjoint__set_8cpp_source.html','../../'); init
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html">data_structures</a></li><li class="navelem"><a class="el" href="../../de/d23/disjoint__set_8cpp.html">disjoint_set.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.12.0 </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.13.2 </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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: bit_manipulation/power_of_2.cpp Pages: 1 -->
|
||||
<svg width="191pt" height="94pt"
|
||||
|
||||
|
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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: bit_manipulation/power_of_2.cpp Pages: 1 -->
|
||||
<svg width="191pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: data_structures/sparse_table.cpp Pages: 1 -->
|
||||
<svg width="247pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: data_structures/sparse_table.cpp Pages: 1 -->
|
||||
<svg width="247pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: data_structures/binary_search_tree2.cpp Pages: 1 -->
|
||||
<svg width="334pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: data_structures/binary_search_tree2.cpp Pages: 1 -->
|
||||
<svg width="334pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: operations_on_datastructures/circular_linked_list.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -150,6 +150,12 @@ Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">operations_on_datastructures::circular_linked_list::CircularLinkedList</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A class that implements a Circular Linked List. <a href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d53/classtests_1_1_circular_linked_list.html">tests::CircularLinkedList</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A class that implements a Circular Linked List. <a href="../../dc/d53/classtests_1_1_circular_linked_list.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d7c/structtests_1_1_node.html">tests::Node</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A <a class="el" href="../../d6/d7c/structtests_1_1_node.html" title="A Node struct that represents a single Node in a Binary Tree.">Node</a> struct that represents a single <a class="el" href="../../d6/d7c/structtests_1_1_node.html" title="A Node struct that represents a single Node in a Binary Tree.">Node</a> in a Binary Tree. <a href="../../d6/d7c/structtests_1_1_node.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
||||
Namespaces</h2></td></tr>
|
||||
@@ -238,7 +244,7 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel static">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -268,7 +274,7 @@ Functions</h2></td></tr>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_35422be6552f1b3672c1b6c4aba2da64.html">operations_on_datastructures</a></li><li class="navelem"><a class="el" href="../../de/d33/circular__linked__list_8cpp.html">circular_linked_list.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
12
de/d33/circular__linked__list_8cpp.js
vendored
@@ -2,11 +2,13 @@ var circular__linked__list_8cpp =
|
||||
[
|
||||
[ "operations_on_datastructures::circular_linked_list::Node", "da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html", "da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node" ],
|
||||
[ "operations_on_datastructures::circular_linked_list::CircularLinkedList", "d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html", "d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list" ],
|
||||
[ "tests::CircularLinkedList", "dc/d53/classtests_1_1_circular_linked_list.html", "dc/d53/classtests_1_1_circular_linked_list" ],
|
||||
[ "tests::Node", "d6/d7c/structtests_1_1_node.html", "d6/d7c/structtests_1_1_node" ],
|
||||
[ "main", "de/d33/circular__linked__list_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "test", "de/d33/circular__linked__list_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ],
|
||||
[ "test1", "de/d33/circular__linked__list_8cpp.html#a167c24bd817469ae47358d12e034f2d5", null ],
|
||||
[ "test2", "de/d33/circular__linked__list_8cpp.html#abdd77344d4af8fd56d14a5cabbf2f669", null ],
|
||||
[ "test3", "de/d33/circular__linked__list_8cpp.html#aa515639572647508b94986489aab6d76", null ],
|
||||
[ "test4", "de/d33/circular__linked__list_8cpp.html#a2b9769e44683dcb67fe1083ad91e134d", null ],
|
||||
[ "test5", "de/d33/circular__linked__list_8cpp.html#af7b81d7a1534216af6a36a80135beb86", null ]
|
||||
[ "tests::test1", "d9/df4/namespacetests.html#a167c24bd817469ae47358d12e034f2d5", null ],
|
||||
[ "tests::test2", "d9/df4/namespacetests.html#abdd77344d4af8fd56d14a5cabbf2f669", null ],
|
||||
[ "tests::test3", "d9/df4/namespacetests.html#aa515639572647508b94986489aab6d76", null ],
|
||||
[ "tests::test4", "d9/df4/namespacetests.html#a2b9769e44683dcb67fe1083ad91e134d", null ],
|
||||
[ "tests::test5", "d9/df4/namespacetests.html#af7b81d7a1534216af6a36a80135beb86", null ]
|
||||
];
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: operations_on_datastructures/circular_linked_list.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,36 +124,38 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="headertitle"><div class="title">circular_linked_list.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../de/d33/circular__linked__list_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../de/d33/circular__linked__list_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include <cassert></span> </div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include <iostream></span> </div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include <vector></span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../da/d6d/namespaceoperations__on__datastructures.html">operations_on_datastructures</a> {</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d4/dcd/namespacecircular__linked__list.html">circular_linked_list</a> {</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span></div>
|
||||
<div class="foldopen" id="foldopen00032" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html"> 32</a></span><span class="keyword">struct </span><a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a> {</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html"> 32</a></span><span class="keyword">struct </span><a class="code hl_function" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a005dc56b0c58350a13f4796b9b30b6c5">Node</a> {</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7461292b8b91aed86404d0ab019dfdd1"> 33</a></span> int64_t <a class="code hl_variable" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7461292b8b91aed86404d0ab019dfdd1">data</a>; </div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7c867b8e1034a6f5da490c8b8c09cb77"> 34</a></span> <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* <a class="code hl_variable" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7c867b8e1034a6f5da490c8b8c09cb77">next</a>; </div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7c867b8e1034a6f5da490c8b8c09cb77"> 34</a></span> <a class="code hl_function" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a005dc56b0c58350a13f4796b9b30b6c5">Node</a>* <a class="code hl_variable" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7c867b8e1034a6f5da490c8b8c09cb77">next</a>; </div>
|
||||
<div class="foldopen" id="foldopen00039" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a005dc56b0c58350a13f4796b9b30b6c5"> 39</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a005dc56b0c58350a13f4796b9b30b6c5">Node</a>(int64_t _data) {</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <a class="code hl_variable" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7461292b8b91aed86404d0ab019dfdd1">data</a> = _data; </div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <a class="code hl_variable" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7c867b8e1034a6f5da490c8b8c09cb77">next</a> = <span class="keyword">nullptr</span>; </div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span></div>
|
||||
<div class="foldopen" id="foldopen00048" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a12a06eef5ccaf667f319506eee655d95"> 48</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a12a06eef5ccaf667f319506eee655d95">Node</a>(int64_t _data, <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* _next) {</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a12a06eef5ccaf667f319506eee655d95"> 48</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a12a06eef5ccaf667f319506eee655d95">Node</a>(int64_t _data, <a class="code hl_function" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a005dc56b0c58350a13f4796b9b30b6c5">Node</a>* _next) {</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_variable" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7461292b8b91aed86404d0ab019dfdd1">data</a> = _data; </div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <a class="code hl_variable" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7c867b8e1034a6f5da490c8b8c09cb77">next</a> = _next; </div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span></div>
|
||||
<div class="foldopen" id="foldopen00057" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html"> 57</a></span><span class="keyword">class </span><a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">CircularLinkedList</a> {</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html"> 57</a></span><span class="keyword">class </span><a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#aa704319924f97fedfb41caf193a00888">CircularLinkedList</a> {</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13"> 59</a></span> <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>; </div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ab682f854f39582a20c9c4102f0482208"> 60</a></span> <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ab682f854f39582a20c9c4102f0482208">end</a>{}; </div>
|
||||
@@ -165,8 +167,9 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ab682f854f39582a20c9c4102f0482208">end</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span></div>
|
||||
<div class="foldopen" id="foldopen00073" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a142fa439b102c6f86341f421ddcfe0a1"> 73</a></span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a142fa439b102c6f86341f421ddcfe0a1">CircularLinkedList</a>(<span class="keyword">const</span> <a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">CircularLinkedList</a>& copy) {</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a142fa439b102c6f86341f421ddcfe0a1"> 73</a></span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a142fa439b102c6f86341f421ddcfe0a1">CircularLinkedList</a>(<span class="keyword">const</span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#aa704319924f97fedfb41caf193a00888">CircularLinkedList</a>& copy) {</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a398d6cc927a2c8e4a156ae2806f48986">erase</a>();</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> = copy.<a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>;</div>
|
||||
@@ -176,16 +179,18 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> }</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span></div>
|
||||
<div class="foldopen" id="foldopen00086" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#abde75f6ee432b0378d264da8c7c64db2"> 86</a></span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#abde75f6ee432b0378d264da8c7c64db2">CircularLinkedList</a>(<a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">CircularLinkedList</a>&& source) <span class="keyword">noexcept</span> {</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#abde75f6ee432b0378d264da8c7c64db2"> 86</a></span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#abde75f6ee432b0378d264da8c7c64db2">CircularLinkedList</a>(<a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#aa704319924f97fedfb41caf193a00888">CircularLinkedList</a>&& source) <span class="keyword">noexcept</span> {</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a> = source.root;</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ab682f854f39582a20c9c4102f0482208">end</a> = source.end;</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> source.root = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> source.end = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span></div>
|
||||
<div class="foldopen" id="foldopen00097" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a9cc37166f2f73763df39894b675f89c9"> 97</a></span> <a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">CircularLinkedList</a>& <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a9cc37166f2f73763df39894b675f89c9">operator=</a>(<span class="keyword">const</span> <a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">CircularLinkedList</a>& other) {</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a9cc37166f2f73763df39894b675f89c9"> 97</a></span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#aa704319924f97fedfb41caf193a00888">CircularLinkedList</a>& <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a9cc37166f2f73763df39894b675f89c9">operator=</a>(<span class="keyword">const</span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#aa704319924f97fedfb41caf193a00888">CircularLinkedList</a>& other) {</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a398d6cc927a2c8e4a156ae2806f48986">erase</a>();</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> = other.<a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>;</div>
|
||||
@@ -196,8 +201,9 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span></div>
|
||||
<div class="foldopen" id="foldopen00112" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a8f26dc32615abc5bab8ac458ef424bc5"> 112</a></span> <a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">CircularLinkedList</a>& <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a8f26dc32615abc5bab8ac458ef424bc5">operator=</a>(<a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">CircularLinkedList</a>&& other) <span class="keyword">noexcept</span> {</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a8f26dc32615abc5bab8ac458ef424bc5"> 112</a></span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#aa704319924f97fedfb41caf193a00888">CircularLinkedList</a>& <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a8f26dc32615abc5bab8ac458ef424bc5">operator=</a>(<a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#aa704319924f97fedfb41caf193a00888">CircularLinkedList</a>&& other) <span class="keyword">noexcept</span> {</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a> = other.root;</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ab682f854f39582a20c9c4102f0482208">end</a> = other.end;</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> other.root = <span class="keyword">nullptr</span>;</div>
|
||||
@@ -205,6 +211,7 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span></div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a46195fcf11b636064c7172cb74b55dd0"> 122</a></span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a46195fcf11b636064c7172cb74b55dd0">~CircularLinkedList</a>() { <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a398d6cc927a2c8e4a156ae2806f48986">erase</a>(); }</div>
|
||||
<div class="foldopen" id="foldopen00126" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a398d6cc927a2c8e4a156ae2806f48986"> 126</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a398d6cc927a2c8e4a156ae2806f48986">erase</a>() {</div>
|
||||
@@ -213,7 +220,7 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> }</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> = <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>;</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">do</span> {</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* temp = <a class="code hl_typedef" href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a>;</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* temp = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>;</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>->next;</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keyword">delete</span> (temp);</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> } <span class="keywordflow">while</span> (<a class="code hl_class" href="../../d5/da1/structnode.html">node</a> != <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>);</div>
|
||||
@@ -221,6 +228,7 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ab682f854f39582a20c9c4102f0482208">end</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span></div>
|
||||
<div class="foldopen" id="foldopen00146" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ac38565472a07d07f63ec0d2fd8a69d4d"> 146</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ac38565472a07d07f63ec0d2fd8a69d4d">insert</a>(<span class="keyword">const</span> std::vector<int64_t>& <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a53611ec1fef92eeeb875aea1bde1e4de">values</a>) {</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">for</span> (int64_t value : <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a53611ec1fef92eeeb875aea1bde1e4de">values</a>) {</div>
|
||||
@@ -228,25 +236,28 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> }</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span></div>
|
||||
<div class="foldopen" id="foldopen00158" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a3b7bbb0918c261bc216aef9e6dd39aa4"> 158</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a3b7bbb0918c261bc216aef9e6dd39aa4">insert</a>(int64_t <a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>) {</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> = <span class="keyword">new</span> <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>(<a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>, <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>);</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ac38565472a07d07f63ec0d2fd8a69d4d">insert</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a>);</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span></div>
|
||||
<div class="foldopen" id="foldopen00169" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a15150d6d933c58190c9c1dd7d22c51ae"> 169</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a15150d6d933c58190c9c1dd7d22c51ae">insert</a>(<a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>) {</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a> == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a> = <a class="code hl_typedef" href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a>; </div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a> = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>; </div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>->next = <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>; </div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ab682f854f39582a20c9c4102f0482208">end</a> = <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>; </div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ab682f854f39582a20c9c4102f0482208">end</a>-><a class="code hl_variable" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7c867b8e1034a6f5da490c8b8c09cb77">next</a> = <a class="code hl_typedef" href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a>; </div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ab682f854f39582a20c9c4102f0482208">end</a>->next = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>; </div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>->next = <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>; </div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ab682f854f39582a20c9c4102f0482208">end</a> = <a class="code hl_typedef" href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a>; </div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ab682f854f39582a20c9c4102f0482208">end</a> = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>; </div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> }</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span></div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ac341901e926b3fa3a796c64ca572f592"> 187</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ac341901e926b3fa3a796c64ca572f592">print</a>() { <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#ac341901e926b3fa3a796c64ca572f592">print</a>(<a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>); }</div>
|
||||
<div class="foldopen" id="foldopen00196" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a424b17ddc672b25fe0bd9dc8612fba21"> 196</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a424b17ddc672b25fe0bd9dc8612fba21">print</a>(<a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>) {</div>
|
||||
@@ -262,6 +273,7 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> std::cout << <span class="stringliteral">"\n"</span>;</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span></div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a53611ec1fef92eeeb875aea1bde1e4de"> 214</a></span> std::vector<int64_t> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a53611ec1fef92eeeb875aea1bde1e4de">values</a>() { <span class="keywordflow">return</span> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a53611ec1fef92eeeb875aea1bde1e4de">values</a>(<a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>); }</div>
|
||||
<div class="foldopen" id="foldopen00223" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"><a class="line" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a03a896b34d27fda69049827e0c4dab42"> 223</a></span> std::vector<int64_t> <a class="code hl_function" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a03a896b34d27fda69049827e0c4dab42">values</a>(<a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* <a class="code hl_variable" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html#a5d5cebd6bc906c60763fc6be10cfdd13">root</a>) {</div>
|
||||
@@ -283,15 +295,15 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span>} <span class="comment">// namespace circular_linked_list</span></div>
|
||||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> </div>
|
||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span>} <span class="comment">// namespace operations_on_datastructures</span></div>
|
||||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> </div>
|
||||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span></div>
|
||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d9/df4/namespacetests.html">tests</a> {</div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span><span class="keyword">using </span><a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">operations_on_datastructures::circular_linked_list::CircularLinkedList</a>;</div>
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span><span class="keyword">using </span><a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">operations_on_datastructures::circular_linked_list::Node</a>;</div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span><span class="keyword">using </span>operations_on_datastructures::circular_linked_list::CircularLinkedList;</div>
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span><span class="keyword">using </span>operations_on_datastructures::circular_linked_list::Node;</div>
|
||||
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d9/df4/namespacetests.html#a167c24bd817469ae47358d12e034f2d5">test1</a>() {</div>
|
||||
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> std::cout << <span class="stringliteral">"TEST CASE 1\n"</span>;</div>
|
||||
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> std::cout << <span class="stringliteral">"Intialized a = {2}\n"</span>;</div>
|
||||
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> std::cout << <span class="stringliteral">"Expected result: {2}\n"</span>;</div>
|
||||
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> CircularLinkedList a;</div>
|
||||
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> <a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">CircularLinkedList</a> a;</div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> std::vector<int64_t> res = {2};</div>
|
||||
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> a.insert(2);</div>
|
||||
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> assert(a.values() == res);</div>
|
||||
@@ -302,7 +314,7 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> std::cout << <span class="stringliteral">"TEST CASE 2\n"</span>;</div>
|
||||
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> std::cout << <span class="stringliteral">"Intialized a = {2, 5, 6}\n"</span>;</div>
|
||||
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> std::cout << <span class="stringliteral">"Expected result: {2, 5, 6}\n"</span>;</div>
|
||||
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> CircularLinkedList a;</div>
|
||||
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">CircularLinkedList</a> a;</div>
|
||||
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> std::vector<int64_t> res = {2, 5, 6};</div>
|
||||
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> a.insert(2);</div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> a.insert(5);</div>
|
||||
@@ -315,7 +327,7 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> std::cout << <span class="stringliteral">"TEST CASE 3\n"</span>;</div>
|
||||
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> std::cout << <span class="stringliteral">"Intialized a = {2, 7, 8, 3, 2, 6}\n"</span>;</div>
|
||||
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> std::cout << <span class="stringliteral">"Expected result: {2, 7, 8, 3, 2, 6}\n"</span>;</div>
|
||||
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> CircularLinkedList a;</div>
|
||||
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">CircularLinkedList</a> a;</div>
|
||||
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> std::vector<int64_t> res = {2, 7, 8, 3, 2, 6};</div>
|
||||
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> a.insert({2, 7, 8, 3, 2, 6});</div>
|
||||
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> a.print();</div>
|
||||
@@ -326,28 +338,28 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> std::cout << <span class="stringliteral">"TEST CASE 4\n"</span>;</div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> std::cout << <span class="stringliteral">"Intialized a = {2, 5}\n"</span>;</div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> std::cout << <span class="stringliteral">"Expected result: {5, 2}\n"</span>;</div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> CircularLinkedList a;</div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> <a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">CircularLinkedList</a> a;</div>
|
||||
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> std::vector<int64_t> res = {5, 2};</div>
|
||||
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> a.insert(2);</div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a>* start = <span class="keyword">new</span> <a class="code hl_class" href="../../db/d8b/struct_node.html">Node</a>(5); </div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>* start = <span class="keyword">new</span> <a class="code hl_struct" href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a>(5); </div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> a.insert(start);</div>
|
||||
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> assert(a.values(start) == res);</div>
|
||||
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> a.print(start);</div>
|
||||
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> std::cout << <span class="stringliteral">"TEST PASSED!\n\n"</span>;</div>
|
||||
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span>}</div>
|
||||
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> </div>
|
||||
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span></div>
|
||||
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d9/df4/namespacetests.html#af7b81d7a1534216af6a36a80135beb86">test5</a>() {</div>
|
||||
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> std::cout << <span class="stringliteral">"TEST CASE 5\n"</span>;</div>
|
||||
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> std::cout << <span class="stringliteral">"Intialized a = {}\n"</span>;</div>
|
||||
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> std::cout << <span class="stringliteral">"Expected result: Empty List!\n"</span>;</div>
|
||||
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> CircularLinkedList a;</div>
|
||||
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> <a class="code hl_class" href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">CircularLinkedList</a> a;</div>
|
||||
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> std::vector<int64_t> res = {};</div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> assert(a.values() == res);</div>
|
||||
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> a.print();</div>
|
||||
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> std::cout << <span class="stringliteral">"TEST PASSED!\n\n"</span>;</div>
|
||||
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span>}</div>
|
||||
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span>} <span class="comment">// namespace tests</span></div>
|
||||
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> </div>
|
||||
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span></div>
|
||||
<div class="foldopen" id="foldopen00333" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"><a class="line" href="../../de/d33/circular__linked__list_8cpp.html#aa8dca7b867074164d5f45b0f3851269d"> 333</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d33/circular__linked__list_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>() {</div>
|
||||
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> <a class="code hl_function" href="../../d9/df4/namespacetests.html#a167c24bd817469ae47358d12e034f2d5">tests::test1</a>();</div>
|
||||
@@ -357,14 +369,13 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> <a class="code hl_function" href="../../d9/df4/namespacetests.html#af7b81d7a1534216af6a36a80135beb86">tests::test5</a>();</div>
|
||||
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> </div>
|
||||
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span></div>
|
||||
<div class="foldopen" id="foldopen00345" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"><a class="line" href="../../de/d33/circular__linked__list_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 345</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../de/d33/circular__linked__list_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> <a class="code hl_function" href="../../de/d33/circular__linked__list_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span>}</div>
|
||||
</div>
|
||||
<div class="ttc" id="aavltree_8cpp_html_a74f0cf18a0e5b832d9994e2f2d022287"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a></div><div class="ttdeci">struct node { int data; int height; struct node *left; struct node *right;} node</div><div class="ttdoc">for std::queue</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00013">avltree.cpp:13</a></div></div>
|
||||
<div class="ttc" id="acircular__linked__list_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../de/d33/circular__linked__list_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Function to test the correctness of the Circular Linked List.</div><div class="ttdef"><b>Definition</b> <a href="#l00333">circular_linked_list.cpp:333</a></div></div>
|
||||
<div class="ttc" id="acircular__linked__list_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../de/d33/circular__linked__list_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">main function</div><div class="ttdef"><b>Definition</b> <a href="#l00345">circular_linked_list.cpp:345</a></div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list_html"><div class="ttname"><a href="../../d8/d7c/classoperations__on__datastructures_1_1circular__linked__list_1_1_circular_linked_list.html">operations_on_datastructures::circular_linked_list::CircularLinkedList</a></div><div class="ttdoc">A class that implements a Circular Linked List.</div><div class="ttdef"><b>Definition</b> <a href="#l00057">circular_linked_list.cpp:57</a></div></div>
|
||||
@@ -393,20 +404,19 @@ $(function(){initNavTree('de/d33/circular__linked__list_8cpp_source.html','../..
|
||||
<div class="ttc" id="anamespacetests_html_aa515639572647508b94986489aab6d76"><div class="ttname"><a href="../../d9/df4/namespacetests.html#aa515639572647508b94986489aab6d76">tests::test3</a></div><div class="ttdeci">void test3()</div><div class="ttdoc">A Test to check an invalid shift value.</div><div class="ttdef"><b>Definition</b> <a href="../../d9/d14/array__left__rotation_8cpp_source.html#l00105">array_left_rotation.cpp:105</a></div></div>
|
||||
<div class="ttc" id="anamespacetests_html_abdd77344d4af8fd56d14a5cabbf2f669"><div class="ttname"><a href="../../d9/df4/namespacetests.html#abdd77344d4af8fd56d14a5cabbf2f669">tests::test2</a></div><div class="ttdeci">void test2()</div><div class="ttdoc">A Test to check an empty vector.</div><div class="ttdef"><b>Definition</b> <a href="../../d9/d14/array__left__rotation_8cpp_source.html#l00090">array_left_rotation.cpp:90</a></div></div>
|
||||
<div class="ttc" id="anamespacetests_html_af7b81d7a1534216af6a36a80135beb86"><div class="ttname"><a href="../../d9/df4/namespacetests.html#af7b81d7a1534216af6a36a80135beb86">tests::test5</a></div><div class="ttdeci">void test5()</div><div class="ttdoc">A Test to check a shift of zero.</div><div class="ttdef"><b>Definition</b> <a href="../../d9/d14/array__left__rotation_8cpp_source.html#l00143">array_left_rotation.cpp:143</a></div></div>
|
||||
<div class="ttc" id="astruct_node_html"><div class="ttname"><a href="../../db/d8b/struct_node.html">Node</a></div><div class="ttdef"><b>Definition</b> <a href="../../d3/dce/linkedlist__implentation__usingarray_8cpp_source.html#l00014">linkedlist_implentation_usingarray.cpp:14</a></div></div>
|
||||
<div class="ttc" id="astructnode_html"><div class="ttname"><a href="../../d5/da1/structnode.html">node</a></div><div class="ttdef"><b>Definition</b> <a href="../../d3/d26/binary__search__tree_8cpp_source.html#l00011">binary_search_tree.cpp:11</a></div></div>
|
||||
<div class="ttc" id="astructoperations__on__datastructures_1_1circular__linked__list_1_1_node_html"><div class="ttname"><a href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">operations_on_datastructures::circular_linked_list::Node</a></div><div class="ttdoc">A Node struct that represents a single Node in a Binary Tree.</div><div class="ttdef"><b>Definition</b> <a href="#l00032">circular_linked_list.cpp:32</a></div></div>
|
||||
<div class="ttc" id="astructoperations__on__datastructures_1_1circular__linked__list_1_1_node_html_a005dc56b0c58350a13f4796b9b30b6c5"><div class="ttname"><a href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a005dc56b0c58350a13f4796b9b30b6c5">operations_on_datastructures::circular_linked_list::Node::Node</a></div><div class="ttdeci">Node(int64_t _data)</div><div class="ttdoc">Creates a new Node with some initial data.</div><div class="ttdef"><b>Definition</b> <a href="#l00039">circular_linked_list.cpp:39</a></div></div>
|
||||
<div class="ttc" id="astructoperations__on__datastructures_1_1circular__linked__list_1_1_node_html_a12a06eef5ccaf667f319506eee655d95"><div class="ttname"><a href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a12a06eef5ccaf667f319506eee655d95">operations_on_datastructures::circular_linked_list::Node::Node</a></div><div class="ttdeci">Node(int64_t _data, Node *_next)</div><div class="ttdoc">Creates a new Node with initial data and a successor.</div><div class="ttdef"><b>Definition</b> <a href="#l00048">circular_linked_list.cpp:48</a></div></div>
|
||||
<div class="ttc" id="astructoperations__on__datastructures_1_1circular__linked__list_1_1_node_html_a7461292b8b91aed86404d0ab019dfdd1"><div class="ttname"><a href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7461292b8b91aed86404d0ab019dfdd1">operations_on_datastructures::circular_linked_list::Node::data</a></div><div class="ttdeci">int64_t data</div><div class="ttdoc">The value of the Node.</div><div class="ttdef"><b>Definition</b> <a href="#l00033">circular_linked_list.cpp:33</a></div></div>
|
||||
<div class="ttc" id="astructoperations__on__datastructures_1_1circular__linked__list_1_1_node_html_a7c867b8e1034a6f5da490c8b8c09cb77"><div class="ttname"><a href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7c867b8e1034a6f5da490c8b8c09cb77">operations_on_datastructures::circular_linked_list::Node::next</a></div><div class="ttdeci">Node * next</div><div class="ttdoc">The Node's successor.</div><div class="ttdef"><b>Definition</b> <a href="#l00034">circular_linked_list.cpp:34</a></div></div>
|
||||
<div class="ttc" id="astructoperations__on__datastructures_1_1circular__linked__list_1_1_node_html_a7c867b8e1034a6f5da490c8b8c09cb77"><div class="ttname"><a href="../../da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html#a7c867b8e1034a6f5da490c8b8c09cb77">operations_on_datastructures::circular_linked_list::Node::next</a></div><div class="ttdeci">Node * next</div><div class="ttdoc">The Node's successor.</div><div class="ttdef"><b>Definition</b> <a href="#l00034">circular_linked_list.cpp:34</a></div></div>
|
||||
</div><!-- fragment --></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="../../dir_35422be6552f1b3672c1b6c4aba2da64.html">operations_on_datastructures</a></li><li class="navelem"><a class="el" href="../../de/d33/circular__linked__list_8cpp.html">circular_linked_list.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.12.0 </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.13.2 </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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: data_structures::linked_list::link Pages: 1 -->
|
||||
<svg width="123pt" height="128pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: data_structures::linked_list::link Pages: 1 -->
|
||||
<svg width="123pt" height="128pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: math/binary_exponent.cpp Pages: 1 -->
|
||||
<svg width="139pt" height="83pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: math/binary_exponent.cpp Pages: 1 -->
|
||||
<svg width="139pt" height="83pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: Member List</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -137,7 +137,7 @@ $(function(){initNavTree('dc/dd4/classdata__structures_1_1_bloom_filter.html','.
|
||||
<!-- 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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: n_bonacci Namespace Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -135,7 +135,7 @@ $(function(){initNavTree('de/d36/namespacen__bonacci.html','../../'); initResiza
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../de/d36/namespacen__bonacci.html">n_bonacci</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.12.0 </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.13.2 </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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/minimum_edit_distance.cpp Pages: 1 -->
|
||||
<svg width="252pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/minimum_edit_distance.cpp Pages: 1 -->
|
||||
<svg width="252pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: sorting/shell_sort.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -169,7 +169,7 @@ $(function(){initNavTree('de/d40/shell__sort_8cpp_source.html','../../'); initRe
|
||||
<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"><b>shell_sort.cpp</b></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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: karatsuba_algorithm Namespace Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -135,7 +135,7 @@ $(function(){initNavTree('de/d41/namespacekaratsuba__algorithm.html','../../');
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../de/d41/namespacekaratsuba__algorithm.html">karatsuba_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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: math/string_fibonacci.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -300,7 +300,7 @@ Functions</h2></td></tr>
|
||||
<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="../../de/d47/string__fibonacci_8cpp.html">string_fibonacci.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: math/string_fibonacci.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,7 +124,8 @@ $(function(){initNavTree('de/d47/string__fibonacci_8cpp_source.html','../../');
|
||||
<div class="headertitle"><div class="title">string_fibonacci.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../de/d47/string__fibonacci_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../de/d47/string__fibonacci_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include <cstdint></span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include <iostream></span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#ifdef _MSC_VER</span></div>
|
||||
@@ -132,7 +133,7 @@ $(function(){initNavTree('de/d47/string__fibonacci_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#else</span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <cstring></span> <span class="comment">// otherwise</span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span></div>
|
||||
<div class="foldopen" id="foldopen00025" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="../../de/d47/string__fibonacci_8cpp.html#a28052eee05d43c2ebc5147c52bd50c35"> 25</a></span>std::string <a class="code hl_function" href="../../de/d47/string__fibonacci_8cpp.html#a28052eee05d43c2ebc5147c52bd50c35">add</a>(std::string a, std::string b) {</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> std::string temp = <span class="stringliteral">""</span>;</div>
|
||||
@@ -175,7 +176,7 @@ $(function(){initNavTree('de/d47/string__fibonacci_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">return</span> temp;</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span></div>
|
||||
<div class="foldopen" id="foldopen00069" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="../../de/d47/string__fibonacci_8cpp.html#ad8055ee368a5d5b24de01bdde6bf8fca"> 69</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d47/string__fibonacci_8cpp.html#ad8055ee368a5d5b24de01bdde6bf8fca">fib_Accurate</a>(uint64_t n) {</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> std::string tmp = <span class="stringliteral">""</span>;</div>
|
||||
@@ -189,7 +190,7 @@ $(function(){initNavTree('de/d47/string__fibonacci_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> std::cout << fibMinus2;</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span></div>
|
||||
<div class="foldopen" id="foldopen00082" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="../../de/d47/string__fibonacci_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 82</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../de/d47/string__fibonacci_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordtype">int</span> n;</div>
|
||||
@@ -210,7 +211,7 @@ $(function(){initNavTree('de/d47/string__fibonacci_8cpp_source.html','../../');
|
||||
<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="../../de/d47/string__fibonacci_8cpp.html">string_fibonacci.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: Trie::TrieNode Struct Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -188,7 +188,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="../../dd/d2f/class_trie.html">Trie</a></li><li class="navelem"><a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: Compare< S, T, E > Class Template Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -160,7 +160,7 @@ class Compare< S, T, E ></div><p>Comparator class for priority queue. </p>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename S , typename T , typename E > </div>
|
||||
template<typename S, typename T, typename E> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
@@ -178,7 +178,7 @@ template<typename S , typename T , typename E > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -198,15 +198,16 @@ false if the tuples SHOULDN'T be swapped </dd></dl>
|
||||
<p class="definition">Definition at line <a class="el" href="../../df/d47/fcfs__scheduling_8cpp_source.html#l00076">76</a> of file <a class="el" href="../../df/d47/fcfs__scheduling_8cpp_source.html">fcfs_scheduling.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 77</span> {</div>
|
||||
<div class="line"><span class="lineno"> 78</span> <span class="comment">// Compare arrival times</span></div>
|
||||
<div class="line"><span class="lineno"> 79</span> <span class="keywordflow">if</span> (get<1>(t2) < get<1>(t1)) {</div>
|
||||
<div class="line"><span class="lineno"> 79</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="../../de/d4a/class_compare.html">get<1></a>(<a class="code hl_class" href="../../de/d4a/class_compare.html">t2</a>) < <a class="code hl_class" href="../../de/d4a/class_compare.html">get<1></a>(<a class="code hl_class" href="../../de/d4a/class_compare.html">t1</a>)) {</div>
|
||||
<div class="line"><span class="lineno"> 80</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 81</span> }</div>
|
||||
<div class="line"><span class="lineno"> 82</span> <span class="comment">// If arrival times are same, then compare Process IDs</span></div>
|
||||
<div class="line"><span class="lineno"> 83</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (get<1>(t2) == get<1>(t1)) {</div>
|
||||
<div class="line"><span class="lineno"> 84</span> <span class="keywordflow">return</span> get<0>(t2) < get<0>(t1);</div>
|
||||
<div class="line"><span class="lineno"> 83</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="../../de/d4a/class_compare.html">get<1></a>(<a class="code hl_class" href="../../de/d4a/class_compare.html">t2</a>) == <a class="code hl_class" href="../../de/d4a/class_compare.html">get<1></a>(<a class="code hl_class" href="../../de/d4a/class_compare.html">t1</a>)) {</div>
|
||||
<div class="line"><span class="lineno"> 84</span> <span class="keywordflow">return</span> <a class="code hl_class" href="../../de/d4a/class_compare.html">get<0></a>(<a class="code hl_class" href="../../de/d4a/class_compare.html">t2</a>) < <a class="code hl_class" href="../../de/d4a/class_compare.html">get<0></a>(<a class="code hl_class" href="../../de/d4a/class_compare.html">t1</a>);</div>
|
||||
<div class="line"><span class="lineno"> 85</span> }</div>
|
||||
<div class="line"><span class="lineno"> 86</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 87</span> }</div>
|
||||
<div class="ttc" id="aclass_compare_html"><div class="ttname"><a href="../../de/d4a/class_compare.html">Compare</a></div><div class="ttdoc">Comparator class for priority queue.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d47/fcfs__scheduling_8cpp_source.html#l00063">fcfs_scheduling.cpp:63</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -216,7 +217,7 @@ false if the tuples SHOULDN'T be swapped </dd></dl>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename S , typename T , typename E > </div>
|
||||
template<typename S, typename T, typename E> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
@@ -234,7 +235,7 @@ template<typename S , typename T , typename E > </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -254,12 +255,12 @@ false if the tuples SHOULDN'T be swapped </dd></dl>
|
||||
<p class="definition">Definition at line <a class="el" href="../../d7/d1a/non__preemptive__sjf__scheduling_8cpp_source.html#l00074">74</a> of file <a class="el" href="../../d7/d1a/non__preemptive__sjf__scheduling_8cpp_source.html">non_preemptive_sjf_scheduling.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 75</span> {</div>
|
||||
<div class="line"><span class="lineno"> 76</span> <span class="comment">// Compare burst times for SJF</span></div>
|
||||
<div class="line"><span class="lineno"> 77</span> <span class="keywordflow">if</span> (get<2>(t2) < get<2>(t1)) {</div>
|
||||
<div class="line"><span class="lineno"> 77</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="../../de/d4a/class_compare.html">get<2></a>(<a class="code hl_class" href="../../de/d4a/class_compare.html">t2</a>) < <a class="code hl_class" href="../../de/d4a/class_compare.html">get<2></a>(<a class="code hl_class" href="../../de/d4a/class_compare.html">t1</a>)) {</div>
|
||||
<div class="line"><span class="lineno"> 78</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 79</span> }</div>
|
||||
<div class="line"><span class="lineno"> 80</span> <span class="comment">// If burst times are the same, compare arrival times</span></div>
|
||||
<div class="line"><span class="lineno"> 81</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (get<2>(t2) == get<2>(t1)) {</div>
|
||||
<div class="line"><span class="lineno"> 82</span> <span class="keywordflow">return</span> get<1>(t2) < get<1>(t1);</div>
|
||||
<div class="line"><span class="lineno"> 81</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="../../de/d4a/class_compare.html">get<2></a>(<a class="code hl_class" href="../../de/d4a/class_compare.html">t2</a>) == <a class="code hl_class" href="../../de/d4a/class_compare.html">get<2></a>(<a class="code hl_class" href="../../de/d4a/class_compare.html">t1</a>)) {</div>
|
||||
<div class="line"><span class="lineno"> 82</span> <span class="keywordflow">return</span> <a class="code hl_class" href="../../de/d4a/class_compare.html">get<1></a>(<a class="code hl_class" href="../../de/d4a/class_compare.html">t2</a>) < <a class="code hl_class" href="../../de/d4a/class_compare.html">get<1></a>(<a class="code hl_class" href="../../de/d4a/class_compare.html">t1</a>);</div>
|
||||
<div class="line"><span class="lineno"> 83</span> }</div>
|
||||
<div class="line"><span class="lineno"> 84</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 85</span> }</div>
|
||||
@@ -276,7 +277,7 @@ false if the tuples SHOULDN'T be swapped </dd></dl>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../de/d4a/class_compare.html">Compare</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.12.0 </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.13.2 </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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::Tree< X > Pages: 1 -->
|
||||
<svg width="462pt" height="165pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::Tree< X > Pages: 1 -->
|
||||
<svg width="462pt" height="165pt"
|
||||
|
||||
|
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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: search/saddleback_search.cpp Pages: 1 -->
|
||||
<svg width="252pt" height="83pt"
|
||||
|
||||
|
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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: search/saddleback_search.cpp Pages: 1 -->
|
||||
<svg width="252pt" height="83pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: TestCase Pages: 1 -->
|
||||
<svg width="102pt" height="173pt"
|
||||
|
||||
|
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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: TestCase Pages: 1 -->
|
||||
<svg width="102pt" height="173pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: math/sum_of_binomial_coefficient.cpp Pages: 1 -->
|
||||
<svg width="191pt" height="94pt"
|
||||
|
||||
|
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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: math/sum_of_binomial_coefficient.cpp Pages: 1 -->
|
||||
<svg width="191pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: math/eulers_totient_function.cpp Pages: 1 -->
|
||||
<svg width="191pt" height="94pt"
|
||||
|
||||
|
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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: math/eulers_totient_function.cpp Pages: 1 -->
|
||||
<svg width="191pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: data_structures/queue_using_linkedlist.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -136,12 +136,12 @@ $(function(){initNavTree('de/d5b/queue__using__linkedlist_8cpp_source.html','../
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span>};</div>
|
||||
</div>
|
||||
<div class="foldopen" id="foldopen00010" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"><a class="line" href="../../d2/dc4/classstack__linked_list.html"> 10</a></span><span class="keyword">class </span><a class="code hl_class" href="../../d2/dc4/classstack__linked_list.html">stack_linkedList</a> {</div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"><a class="line" href="../../d2/dc4/classstack__linked_list.html"> 10</a></span><span class="keyword">class </span>stack_linkedList {</div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <a class="code hl_struct" href="../../d0/dff/structlinkedlist.html">linkedlist</a> *front;</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <a class="code hl_struct" href="../../d0/dff/structlinkedlist.html">linkedlist</a> *rear;</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <a class="code hl_class" href="../../d2/dc4/classstack__linked_list.html">stack_linkedList</a>() { front = rear = NULL; }</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> stack_linkedList() { front = rear = NULL; }</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keywordtype">void</span> enqueue(<span class="keywordtype">int</span>);</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keywordtype">int</span> dequeue();</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keywordtype">void</span> display();</div>
|
||||
@@ -160,7 +160,7 @@ $(function(){initNavTree('de/d5b/queue__using__linkedlist_8cpp_source.html','../
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> }</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span>}</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="keywordtype">int</span> stack_linkedList::dequeue() {</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <a class="code hl_struct" href="../../d0/dff/structlinkedlist.html">linkedlist</a> *temp;</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> linkedlist *temp;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordtype">int</span> ele;</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">if</span> (front == NULL)</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> std::cout << <span class="stringliteral">"\nStack is empty"</span>;</div>
|
||||
@@ -179,7 +179,7 @@ $(function(){initNavTree('de/d5b/queue__using__linkedlist_8cpp_source.html','../
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> std::cout << <span class="stringliteral">"\nStack is empty"</span>;</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <a class="code hl_struct" href="../../d0/dff/structlinkedlist.html">linkedlist</a> *temp;</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> linkedlist *temp;</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> temp = front;</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">while</span> (temp != NULL) {</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> std::cout << temp->data << <span class="stringliteral">" "</span>;</div>
|
||||
@@ -224,7 +224,7 @@ $(function(){initNavTree('de/d5b/queue__using__linkedlist_8cpp_source.html','../
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html">data_structures</a></li><li class="navelem"><b>queue_using_linkedlist.cpp</b></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.12.0 </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.13.2 </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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: range_queries::perSegTree::Node Pages: 1 -->
|
||||
<svg width="141pt" height="139pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: range_queries::perSegTree::Node Pages: 1 -->
|
||||
<svg width="141pt" height="139pt"
|
||||
|
||||
|
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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: strings/knuth_morris_pratt.cpp Pages: 1 -->
|
||||
<svg width="248pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: strings/knuth_morris_pratt.cpp Pages: 1 -->
|
||||
<svg width="248pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: strings/knuth_morris_pratt.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -161,6 +161,9 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:a483bb8ccf42aaf7375a83e91490eda1e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4" id="r_ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1e37af2f023495129cb57338c801209e" id="r_a1e37af2f023495129cb57338c801209e"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#a1e37af2f023495129cb57338c801209e">kmp</a> (const std::string &pattern, const std::string &text)</td></tr>
|
||||
<tr class="memdesc:a1e37af2f023495129cb57338c801209e"><td class="mdescLeft"> </td><td class="mdescRight">KMP algorithm to find a pattern in a text. <br /></td></tr>
|
||||
<tr class="separator:a1e37af2f023495129cb57338c801209e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>The <a href="https://en.wikipedia.org/wiki/Knuth–Morris–Pratt_algorithm" target="_blank">Knuth-Morris-Pratt Algorithm</a> for finding a pattern within a piece of text with complexity O(n + m) </p>
|
||||
@@ -172,6 +175,61 @@ Functions</h2></td></tr>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="../../de/d6a/knuth__morris__pratt_8cpp_source.html">knuth_morris_pratt.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a1e37af2f023495129cb57338c801209e" name="a1e37af2f023495129cb57338c801209e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1e37af2f023495129cb57338c801209e">◆ </a></span>kmp()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">size_t string_search::kmp </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const std::string &</td> <td class="paramname"><span class="paramname"><em>pattern</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string &</td> <td class="paramname"><span class="paramname"><em>text</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>KMP algorithm to find a pattern in a text. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">pattern</td><td>string pattern to search </td></tr>
|
||||
<tr><td class="paramname">text</td><td>text in which to search </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>the starting index of the pattern if found </dd>
|
||||
<dd>
|
||||
<code>std::string::npos</code> if not found </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../de/d6a/knuth__morris__pratt_8cpp_source.html#l00053">53</a> of file <a class="el" href="../../de/d6a/knuth__morris__pratt_8cpp_source.html">knuth_morris_pratt.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 53</span> {</div>
|
||||
<div class="line"><span class="lineno"> 54</span> <span class="keywordflow">if</span> (pattern.empty()) {</div>
|
||||
<div class="line"><span class="lineno"> 55</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 56</span> }</div>
|
||||
<div class="line"><span class="lineno"> 57</span> std::vector<size_t> failure = <a class="code hl_function" href="../../d9/d03/namespacestring__search.html#a83c72ff237cdf623e42d4295e0029bf9">getFailureArray</a>(pattern);</div>
|
||||
<div class="line"><span class="lineno"> 58</span> <span class="keywordtype">size_t</span> text_length = text.size();</div>
|
||||
<div class="line"><span class="lineno"> 59</span> <span class="keywordtype">size_t</span> pattern_length = pattern.size();</div>
|
||||
<div class="line"><span class="lineno"> 60</span> <span class="keywordtype">size_t</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> = 0;</div>
|
||||
<div class="line"><span class="lineno"> 61</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j < text_length; j++) {</div>
|
||||
<div class="line"><span class="lineno"> 62</span> <span class="keywordflow">while</span> (k != std::string::npos && pattern[k] != text[j]) {</div>
|
||||
<div class="line"><span class="lineno"> 63</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> = failure[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>];</div>
|
||||
<div class="line"><span class="lineno"> 64</span> }</div>
|
||||
<div class="line"><span class="lineno"> 65</span> <span class="keywordflow">if</span> (++k == pattern_length) {</div>
|
||||
<div class="line"><span class="lineno"> 66</span> <span class="keywordflow">return</span> j - <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> + 1;</div>
|
||||
<div class="line"><span class="lineno"> 67</span> }</div>
|
||||
<div class="line"><span class="lineno"> 68</span> }</div>
|
||||
<div class="line"><span class="lineno"> 69</span> <span class="keywordflow">return</span> std::string::npos;</div>
|
||||
<div class="line"><span class="lineno"> 70</span>}</div>
|
||||
<div class="ttc" id="acomposite__simpson__rule_8cpp_html_a1b74d828b33760094906797042b89442"><div class="ttname"><a href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">numerical_methods::simpson_method::k</a></div><div class="ttdeci">double k(double x)</div><div class="ttdoc">Another test function.</div><div class="ttdef"><b>Definition</b> <a href="../../d4/d18/composite__simpson__rule_8cpp_source.html#l00117">composite_simpson_rule.cpp:117</a></div></div>
|
||||
<div class="ttc" id="anamespacestring__search_html_a83c72ff237cdf623e42d4295e0029bf9"><div class="ttname"><a href="../../d9/d03/namespacestring__search.html#a83c72ff237cdf623e42d4295e0029bf9">string_search::getFailureArray</a></div><div class="ttdeci">std::vector< size_t > getFailureArray(const std::string &pattern)</div><div class="ttdoc">Generate the partial match table aka failure function for a pattern to search.</div><div class="ttdef"><b>Definition</b> <a href="../../de/d6a/knuth__morris__pratt_8cpp_source.html#l00032">knuth_morris_pratt.cpp:32</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
|
||||
@@ -214,7 +272,7 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel static">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -224,16 +282,17 @@ Functions</h2></td></tr>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../de/d6a/knuth__morris__pratt_8cpp_source.html#l00079">79</a> of file <a class="el" href="../../de/d6a/knuth__morris__pratt_8cpp_source.html">knuth_morris_pratt.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 79</span> {</div>
|
||||
<div class="line"><span class="lineno"> 80</span> assert(kmp(<span class="stringliteral">"abc1abc12l"</span>, <span class="stringliteral">"alskfjaldsabc1abc1abc12k2"</span>) == std::string::npos);</div>
|
||||
<div class="line"><span class="lineno"> 81</span> assert(kmp(<span class="stringliteral">"bca"</span>, <span class="stringliteral">"abcabc"</span>) == 1);</div>
|
||||
<div class="line"><span class="lineno"> 82</span> assert(kmp(<span class="stringliteral">"World"</span>, <span class="stringliteral">"helloWorld"</span>) == 5);</div>
|
||||
<div class="line"><span class="lineno"> 83</span> assert(kmp(<span class="stringliteral">"c++"</span>, <span class="stringliteral">"his_is_c++"</span>) == 7);</div>
|
||||
<div class="line"><span class="lineno"> 84</span> assert(kmp(<span class="stringliteral">"happy"</span>, <span class="stringliteral">"happy_coding"</span>) == 0);</div>
|
||||
<div class="line"><span class="lineno"> 85</span> assert(kmp(<span class="stringliteral">""</span>, <span class="stringliteral">"pattern is empty"</span>) == 0);</div>
|
||||
<div class="line"><span class="lineno"> 80</span> assert(<a class="code hl_function" href="#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="stringliteral">"abc1abc12l"</span>, <span class="stringliteral">"alskfjaldsabc1abc1abc12k2"</span>) == std::string::npos);</div>
|
||||
<div class="line"><span class="lineno"> 81</span> assert(<a class="code hl_function" href="#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="stringliteral">"bca"</span>, <span class="stringliteral">"abcabc"</span>) == 1);</div>
|
||||
<div class="line"><span class="lineno"> 82</span> assert(<a class="code hl_function" href="#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="stringliteral">"World"</span>, <span class="stringliteral">"helloWorld"</span>) == 5);</div>
|
||||
<div class="line"><span class="lineno"> 83</span> assert(<a class="code hl_function" href="#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="stringliteral">"c++"</span>, <span class="stringliteral">"his_is_c++"</span>) == 7);</div>
|
||||
<div class="line"><span class="lineno"> 84</span> assert(<a class="code hl_function" href="#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="stringliteral">"happy"</span>, <span class="stringliteral">"happy_coding"</span>) == 0);</div>
|
||||
<div class="line"><span class="lineno"> 85</span> assert(<a class="code hl_function" href="#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="stringliteral">""</span>, <span class="stringliteral">"pattern is empty"</span>) == 0);</div>
|
||||
<div class="line"><span class="lineno"> 86</span> </div>
|
||||
<div class="line"><span class="lineno"> 87</span> <span class="comment">// this lets the user know that the tests have passed</span></div>
|
||||
<div class="line"><span class="lineno"> 88</span> std::cout << <span class="stringliteral">"All KMP algorithm tests have successfully passed!\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 89</span>}</div>
|
||||
<div class="ttc" id="aknuth__morris__pratt_8cpp_html_a1e37af2f023495129cb57338c801209e"><div class="ttname"><a href="#a1e37af2f023495129cb57338c801209e">kmp</a></div><div class="ttdeci">size_t kmp(const std::string &pattern, const std::string &text)</div><div class="ttdoc">KMP algorithm to find a pattern in a text.</div><div class="ttdef"><b>Definition</b> <a href="../../de/d6a/knuth__morris__pratt_8cpp_source.html#l00053">knuth_morris_pratt.cpp:53</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -243,7 +302,7 @@ Functions</h2></td></tr>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_73a3cc5065b223eb41b02873c0e19f0e.html">strings</a></li><li class="navelem"><a class="el" href="../../de/d6a/knuth__morris__pratt_8cpp.html">knuth_morris_pratt.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
var knuth__morris__pratt_8cpp =
|
||||
[
|
||||
[ "getFailureArray", "de/d6a/knuth__morris__pratt_8cpp.html#a83c72ff237cdf623e42d4295e0029bf9", null ],
|
||||
[ "string_search::getFailureArray", "d9/d03/namespacestring__search.html#a83c72ff237cdf623e42d4295e0029bf9", null ],
|
||||
[ "kmp", "de/d6a/knuth__morris__pratt_8cpp.html#a1e37af2f023495129cb57338c801209e", null ],
|
||||
[ "string_search::kmp", "d9/d03/namespacestring__search.html#a1e37af2f023495129cb57338c801209e", null ],
|
||||
[ "tests", "de/d6a/knuth__morris__pratt_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e", null ]
|
||||
];
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: strings/knuth_morris_pratt.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,12 +124,13 @@ $(function(){initNavTree('de/d6a/knuth__morris__pratt_8cpp_source.html','../../'
|
||||
<div class="headertitle"><div class="title">knuth_morris_pratt.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../de/d6a/knuth__morris__pratt_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../de/d6a/knuth__morris__pratt_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <cassert></span> </div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include <iostream></span> </div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include <string></span> </div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include <vector></span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span></div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d9/d03/namespacestring__search.html">string_search</a> {</div>
|
||||
<div class="foldopen" id="foldopen00032" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="../../d9/d03/namespacestring__search.html#a83c72ff237cdf623e42d4295e0029bf9"> 32</a></span>std::vector<size_t> <a class="code hl_function" href="../../d9/d03/namespacestring__search.html#a83c72ff237cdf623e42d4295e0029bf9">getFailureArray</a>(<span class="keyword">const</span> std::string &pattern) {</div>
|
||||
@@ -146,7 +147,7 @@ $(function(){initNavTree('de/d6a/knuth__morris__pratt_8cpp_source.html','../../'
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">return</span> failure;</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span></div>
|
||||
<div class="foldopen" id="foldopen00053" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"><a class="line" href="../../d9/d03/namespacestring__search.html#a1e37af2f023495129cb57338c801209e"> 53</a></span><span class="keywordtype">size_t</span> <a class="code hl_function" href="../../d9/d03/namespacestring__search.html#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="keyword">const</span> std::string &pattern, <span class="keyword">const</span> std::string &text) {</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">if</span> (pattern.empty()) {</div>
|
||||
@@ -170,15 +171,15 @@ $(function(){initNavTree('de/d6a/knuth__morris__pratt_8cpp_source.html','../../'
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>} <span class="comment">// namespace string_search</span></div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="keyword">using </span><a class="code hl_function" href="../../d9/d03/namespacestring__search.html#a1e37af2f023495129cb57338c801209e">string_search::kmp</a>;</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span></div>
|
||||
<div class="foldopen" id="foldopen00079" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="../../de/d6a/knuth__morris__pratt_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e"> 79</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d6a/knuth__morris__pratt_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a>() {</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> assert(kmp(<span class="stringliteral">"abc1abc12l"</span>, <span class="stringliteral">"alskfjaldsabc1abc1abc12k2"</span>) == std::string::npos);</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> assert(kmp(<span class="stringliteral">"bca"</span>, <span class="stringliteral">"abcabc"</span>) == 1);</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> assert(kmp(<span class="stringliteral">"World"</span>, <span class="stringliteral">"helloWorld"</span>) == 5);</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> assert(kmp(<span class="stringliteral">"c++"</span>, <span class="stringliteral">"his_is_c++"</span>) == 7);</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> assert(kmp(<span class="stringliteral">"happy"</span>, <span class="stringliteral">"happy_coding"</span>) == 0);</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> assert(kmp(<span class="stringliteral">""</span>, <span class="stringliteral">"pattern is empty"</span>) == 0);</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> assert(<a class="code hl_function" href="../../de/d6a/knuth__morris__pratt_8cpp.html#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="stringliteral">"abc1abc12l"</span>, <span class="stringliteral">"alskfjaldsabc1abc1abc12k2"</span>) == std::string::npos);</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> assert(<a class="code hl_function" href="../../de/d6a/knuth__morris__pratt_8cpp.html#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="stringliteral">"bca"</span>, <span class="stringliteral">"abcabc"</span>) == 1);</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> assert(<a class="code hl_function" href="../../de/d6a/knuth__morris__pratt_8cpp.html#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="stringliteral">"World"</span>, <span class="stringliteral">"helloWorld"</span>) == 5);</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> assert(<a class="code hl_function" href="../../de/d6a/knuth__morris__pratt_8cpp.html#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="stringliteral">"c++"</span>, <span class="stringliteral">"his_is_c++"</span>) == 7);</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> assert(<a class="code hl_function" href="../../de/d6a/knuth__morris__pratt_8cpp.html#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="stringliteral">"happy"</span>, <span class="stringliteral">"happy_coding"</span>) == 0);</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> assert(<a class="code hl_function" href="../../de/d6a/knuth__morris__pratt_8cpp.html#a1e37af2f023495129cb57338c801209e">kmp</a>(<span class="stringliteral">""</span>, <span class="stringliteral">"pattern is empty"</span>) == 0);</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="comment">// this lets the user know that the tests have passed</span></div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> std::cout << <span class="stringliteral">"All KMP algorithm tests have successfully passed!\n"</span>;</div>
|
||||
@@ -194,6 +195,7 @@ $(function(){initNavTree('de/d6a/knuth__morris__pratt_8cpp_source.html','../../'
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span>}</div>
|
||||
<div class="ttc" id="agenerate__parentheses_8cpp_html_gae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../dd/d1e/generate__parentheses_8cpp.html#gae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">Main function.</div><div class="ttdef"><b>Definition</b> <a href="../../dd/d1e/generate__parentheses_8cpp_source.html#l00110">generate_parentheses.cpp:110</a></div></div>
|
||||
<div class="ttc" id="aknuth__morris__pratt_8cpp_html_a1e37af2f023495129cb57338c801209e"><div class="ttname"><a href="../../de/d6a/knuth__morris__pratt_8cpp.html#a1e37af2f023495129cb57338c801209e">kmp</a></div><div class="ttdeci">size_t kmp(const std::string &pattern, const std::string &text)</div><div class="ttdoc">KMP algorithm to find a pattern in a text.</div><div class="ttdef"><b>Definition</b> <a href="#l00053">knuth_morris_pratt.cpp:53</a></div></div>
|
||||
<div class="ttc" id="aknuth__morris__pratt_8cpp_html_a483bb8ccf42aaf7375a83e91490eda1e"><div class="ttname"><a href="../../de/d6a/knuth__morris__pratt_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a></div><div class="ttdeci">static void tests()</div><div class="ttdoc">self-test implementations</div><div class="ttdef"><b>Definition</b> <a href="#l00079">knuth_morris_pratt.cpp:79</a></div></div>
|
||||
<div class="ttc" id="anamespacestring__search_html"><div class="ttname"><a href="../../d9/d03/namespacestring__search.html">string_search</a></div><div class="ttdoc">String search algorithms.</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d7d/brute__force__string__searching_8cpp_source.html#l00013">brute_force_string_searching.cpp:13</a></div></div>
|
||||
<div class="ttc" id="anamespacestring__search_html_a1e37af2f023495129cb57338c801209e"><div class="ttname"><a href="../../d9/d03/namespacestring__search.html#a1e37af2f023495129cb57338c801209e">string_search::kmp</a></div><div class="ttdeci">size_t kmp(const std::string &pattern, const std::string &text)</div><div class="ttdoc">KMP algorithm to find a pattern in a text.</div><div class="ttdef"><b>Definition</b> <a href="#l00053">knuth_morris_pratt.cpp:53</a></div></div>
|
||||
@@ -204,7 +206,7 @@ $(function(){initNavTree('de/d6a/knuth__morris__pratt_8cpp_source.html','../../'
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_73a3cc5065b223eb41b02873c0e19f0e.html">strings</a></li><li class="navelem"><a class="el" href="../../de/d6a/knuth__morris__pratt_8cpp.html">knuth_morris_pratt.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: random_pivot_quick_sort Namespace Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -135,7 +135,7 @@ $(function(){initNavTree('de/d6b/namespacerandom__pivot__quick__sort.html','../.
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../de/d6b/namespacerandom__pivot__quick__sort.html">random_pivot_quick_sort</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.12.0 </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.13.2 </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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: others/palindrome_of_number.cpp Pages: 1 -->
|
||||
<svg width="199pt" height="94pt"
|
||||
|
||||
|
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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: others/palindrome_of_number.cpp Pages: 1 -->
|
||||
<svg width="199pt" height="94pt"
|
||||
|
||||
|
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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: others::Cache::D_Node< T > Pages: 1 -->
|
||||
<svg width="152pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: others::Cache::D_Node< T > Pages: 1 -->
|
||||
<svg width="152pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: probability/geometric_dist.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -312,7 +312,7 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel static">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -386,7 +386,7 @@ Functions</h2></td></tr>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_82e494173a87936756866de2fa774307.html">probability</a></li><li class="navelem"><a class="el" href="../../de/d72/geometric__dist_8cpp.html">geometric_dist.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
var geometric__dist_8cpp =
|
||||
[
|
||||
[ "probability::geometric_dist::geometric_distribution", "da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html", "da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution" ],
|
||||
[ "generate_uniform", "de/d72/geometric__dist_8cpp.html#a82964ca6180507deb5fafc71050012ba", null ],
|
||||
[ "probability::geometric_dist::generate_uniform", "de/d72/geometric__dist_8cpp.html#a82964ca6180507deb5fafc71050012ba", null ],
|
||||
[ "main", "de/d72/geometric__dist_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "sample_test", "de/d72/geometric__dist_8cpp.html#a70fd1cc5c3a2813f28683dc75dcd65b6", null ],
|
||||
[ "test", "de/d72/geometric__dist_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: probability/geometric_dist.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,7 +124,8 @@ $(function(){initNavTree('de/d72/geometric__dist_8cpp_source.html','../../'); in
|
||||
<div class="headertitle"><div class="title">geometric_dist.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../de/d72/geometric__dist_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../de/d72/geometric__dist_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include <cassert></span> </div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include <cmath></span> </div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#include <cstdint></span> </div>
|
||||
@@ -133,7 +134,7 @@ $(function(){initNavTree('de/d72/geometric__dist_8cpp_source.html','../../'); in
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#include <limits></span> </div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor">#include <random></span> </div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#include <vector></span> </div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span></div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d4/ded/namespaceprobability.html">probability</a> {</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../dd/d8a/namespacegeometric__dist.html">geometric_dist</a> {</div>
|
||||
<div class="foldopen" id="foldopen00048" data-start="{" data-end="}">
|
||||
@@ -141,39 +142,39 @@ $(function(){initNavTree('de/d72/geometric__dist_8cpp_source.html','../../'); in
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(rand()) / <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(RAND_MAX);</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span></div>
|
||||
<div class="foldopen" id="foldopen00055" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html"> 55</a></span><span class="keyword">class </span><a class="code hl_class" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html">geometric_distribution</a> {</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html"> 55</a></span><span class="keyword">class </span><a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aa12088ba133dd0910103db0eb0ef2797">geometric_distribution</a> {</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3"> 57</a></span> <span class="keywordtype">float</span> <a class="code hl_variable" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3">p</a>; </div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aa12088ba133dd0910103db0eb0ef2797"> 64</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aa12088ba133dd0910103db0eb0ef2797">geometric_distribution</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>& <a class="code hl_variable" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3">p</a>) : <a class="code hl_variable" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3">p</a>(<a class="code hl_variable" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3">p</a>) {}</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span></div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a41051365f8ac7700f2ed5880a6760413"> 71</a></span> <span class="keywordtype">float</span> <a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a41051365f8ac7700f2ed5880a6760413">expected_value</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 1.0f / <a class="code hl_variable" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3">p</a>; }</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span></div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aea8b0d649f0dc9a6f8baf3341a0b4960"> 77</a></span> <span class="keywordtype">float</span> <a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aea8b0d649f0dc9a6f8baf3341a0b4960">variance</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (1.0f - <a class="code hl_variable" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3">p</a>) / (<a class="code hl_variable" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3">p</a> * <a class="code hl_variable" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3">p</a>); }</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span></div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a0a10c512e13dd3a052e1c6d7f4d6f0f2"> 84</a></span> <span class="keywordtype">float</span> <a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a0a10c512e13dd3a052e1c6d7f4d6f0f2">standard_deviation</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> std::sqrt(<a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aea8b0d649f0dc9a6f8baf3341a0b4960">variance</a>()); }</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span></div>
|
||||
<div class="foldopen" id="foldopen00093" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aee973db9f0435e0cb4cc70f8eb3447a1"> 93</a></span> <span class="keywordtype">float</span> <a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aee973db9f0435e0cb4cc70f8eb3447a1">probability_density</a>(<span class="keyword">const</span> uint32_t& k)<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">return</span> std::pow((1.0f - <a class="code hl_variable" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3">p</a>), <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(k - 1)) * <a class="code hl_variable" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3">p</a>;</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> </div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span></div>
|
||||
<div class="foldopen" id="foldopen00104" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"><a class="line" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a08328dc7d62188427111f176b56a105a"> 104</a></span> <span class="keywordtype">float</span> <a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a08328dc7d62188427111f176b56a105a">cumulative_distribution</a>(<span class="keyword">const</span> uint32_t& k)<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">return</span> 1.0f - std::pow((1.0f - <a class="code hl_variable" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3">p</a>), <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(k));</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span></div>
|
||||
<div class="foldopen" id="foldopen00116" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"><a class="line" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aaf762e88c66918d7afda4234f28a7ddf"> 116</a></span> <span class="keywordtype">float</span> <a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aaf762e88c66918d7afda4234f28a7ddf">inverse_cumulative_distribution</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>& cdf)<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">return</span> std::log(1.0f - cdf) / std::log(1.0f - <a class="code hl_variable" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#ad5ed23a251dbe55ad1ed06bf1a465ad3">p</a>);</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span></div>
|
||||
<div class="foldopen" id="foldopen00125" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a8aae1cebcf42ed2332f1c7217c401aa3"> 125</a></span> uint32_t <a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a8aae1cebcf42ed2332f1c7217c401aa3">draw_sample</a>()<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordtype">float</span> uniform_sample = <a class="code hl_function" href="../../de/d72/geometric__dist_8cpp.html#a82964ca6180507deb5fafc71050012ba">generate_uniform</a>();</div>
|
||||
@@ -182,7 +183,7 @@ $(function(){initNavTree('de/d72/geometric__dist_8cpp_source.html','../../'); in
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> 1;</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span></div>
|
||||
<div class="foldopen" id="foldopen00145" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"><a class="line" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a4620163a196709484225774d87de6d69"> 145</a></span> <span class="keywordtype">float</span> <a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a4620163a196709484225774d87de6d69">range_tries</a>(<span class="keyword">const</span> uint32_t& min_tries = 1,</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keyword">const</span> uint32_t& max_tries =</div>
|
||||
@@ -198,7 +199,7 @@ $(function(){initNavTree('de/d72/geometric__dist_8cpp_source.html','../../'); in
|
||||
</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span>} <span class="comment">// namespace geometric_dist</span></div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span>} <span class="comment">// namespace probability</span></div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> </div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span></div>
|
||||
<div class="foldopen" id="foldopen00165" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"><a class="line" href="../../de/d72/geometric__dist_8cpp.html#a70fd1cc5c3a2813f28683dc75dcd65b6"> 165</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d72/geometric__dist_8cpp.html#a70fd1cc5c3a2813f28683dc75dcd65b6">sample_test</a>(</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keyword">const</span> <a class="code hl_class" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html">probability::geometric_dist::geometric_distribution</a>& dist) {</div>
|
||||
@@ -228,7 +229,7 @@ $(function(){initNavTree('de/d72/geometric__dist_8cpp_source.html','../../'); in
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> </div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span></div>
|
||||
<div class="foldopen" id="foldopen00197" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"><a class="line" href="../../de/d72/geometric__dist_8cpp.html#aa8dca7b867074164d5f45b0f3851269d"> 197</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d72/geometric__dist_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>() {</div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <a class="code hl_class" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html">probability::geometric_dist::geometric_distribution</a> dist(0.3);</div>
|
||||
@@ -285,7 +286,7 @@ $(function(){initNavTree('de/d72/geometric__dist_8cpp_source.html','../../'); in
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <a class="code hl_function" href="../../de/d72/geometric__dist_8cpp.html#a70fd1cc5c3a2813f28683dc75dcd65b6">sample_test</a>(dist);</div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> </div>
|
||||
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span></div>
|
||||
<div class="foldopen" id="foldopen00256" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"><a class="line" href="../../de/d72/geometric__dist_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 256</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../de/d72/geometric__dist_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> srand(time(<span class="keyword">nullptr</span>));</div>
|
||||
@@ -316,7 +317,7 @@ $(function(){initNavTree('de/d72/geometric__dist_8cpp_source.html','../../'); in
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_82e494173a87936756866de2fa774307.html">probability</a></li><li class="navelem"><a class="el" href="../../de/d72/geometric__dist_8cpp.html">geometric_dist.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: numerical_methods/qr_eigen_values.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -170,6 +170,9 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:a0283886819c7c140a023582b7269e2d0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627" id="r_a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
|
||||
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:adfbdf47277c8cfee229b05b72f1f7834" id="r_adfbdf47277c8cfee229b05b72f1f7834"><td class="memTemplParams" colspan="2">template<typename T> </td></tr>
|
||||
<tr class="memitem:adfbdf47277c8cfee229b05b72f1f7834"><td class="memTemplItemLeft" align="right" valign="top">std::ostream & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#adfbdf47277c8cfee229b05b72f1f7834">operator<<</a> (std::ostream &out, std::valarray< std::valarray< T > > const &v)</td></tr>
|
||||
<tr class="separator:adfbdf47277c8cfee229b05b72f1f7834"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Compute real eigen values and eigen vectors of a symmetric matrix using <a href="https://en.wikipedia.org/wiki/QR_decomposition" target="_blank">QR decomposition</a> method. </p>
|
||||
@@ -220,14 +223,14 @@ Functions</h2></td></tr>
|
||||
<p class="definition">Definition at line <a class="el" href="../../de/d75/qr__eigen__values_8cpp_source.html#l00028">28</a> of file <a class="el" href="../../de/d75/qr__eigen__values_8cpp_source.html">qr_eigen_values.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 28</span> {</div>
|
||||
<div class="line"><span class="lineno"> 29</span> <span class="keywordtype">int</span> i, j, tmp, lim2 = <a class="code hl_define" href="#aee57a411f07599034f5ceb8cc7d65b40">LIMS</a> >> 1;</div>
|
||||
<div class="line"><span class="lineno"> 30</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = A->size();</div>
|
||||
<div class="line"><span class="lineno"> 30</span> <span class="keywordtype">int</span> N = A->size();</div>
|
||||
<div class="line"><span class="lineno"> 31</span> </div>
|
||||
<div class="line"><span class="lineno"> 32</span><span class="preprocessor">#ifdef _OPENMP</span></div>
|
||||
<div class="line"><span class="lineno"> 33</span><span class="preprocessor">#pragma omp for</span></div>
|
||||
<div class="line"><span class="lineno"> 34</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><span class="lineno"> 35</span> <span class="keywordflow">for</span> (i = 0; i < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 35</span> <span class="keywordflow">for</span> (i = 0; i < N; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 36</span> A[0][i][i] = (std::rand() % <a class="code hl_define" href="#aee57a411f07599034f5ceb8cc7d65b40">LIMS</a>) - lim2;</div>
|
||||
<div class="line"><span class="lineno"> 37</span> <span class="keywordflow">for</span> (j = i + 1; j < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; j++) {</div>
|
||||
<div class="line"><span class="lineno"> 37</span> <span class="keywordflow">for</span> (j = i + 1; j < N; j++) {</div>
|
||||
<div class="line"><span class="lineno"> 38</span> tmp = (std::rand() % <a class="code hl_define" href="#aee57a411f07599034f5ceb8cc7d65b40">LIMS</a>) - lim2;</div>
|
||||
<div class="line"><span class="lineno"> 39</span> A[0][i][j] = tmp; <span class="comment">// summetrically distribute random values</span></div>
|
||||
<div class="line"><span class="lineno"> 40</span> A[0][j][i] = tmp;</div>
|
||||
@@ -235,7 +238,6 @@ Functions</h2></td></tr>
|
||||
<div class="line"><span class="lineno"> 42</span> }</div>
|
||||
<div class="line"><span class="lineno"> 43</span>}</div>
|
||||
<div class="ttc" id="aqr__eigen__values_8cpp_html_aee57a411f07599034f5ceb8cc7d65b40"><div class="ttname"><a href="#aee57a411f07599034f5ceb8cc7d65b40">LIMS</a></div><div class="ttdeci">#define LIMS</div><div class="ttdef"><b>Definition</b> <a href="../../de/d75/qr__eigen__values_8cpp_source.html#l00020">qr_eigen_values.cpp:20</a></div></div>
|
||||
<div class="ttc" id="asparse__table_8cpp_html_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><div class="ttname"><a href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a></div><div class="ttdeci">constexpr uint32_t N</div><div class="ttdoc">A struct to represent sparse table for min() as their invariant function, for the given array A....</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dab/sparse__table_8cpp_source.html#l00048">sparse_table.cpp:48</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -371,6 +373,46 @@ Functions</h2></td></tr>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="adfbdf47277c8cfee229b05b72f1f7834" name="adfbdf47277c8cfee229b05b72f1f7834"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#adfbdf47277c8cfee229b05b72f1f7834">◆ </a></span>operator<<()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T> </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::ostream & qr_algorithm::operator<< </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">std::ostream &</td> <td class="paramname"><span class="paramname"><em>out</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::valarray< std::valarray< T > > const &</td> <td class="paramname"><span class="paramname"><em>v</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>operator to print a matrix </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d4/d68/qr__decompose_8h_source.html#l00033">33</a> of file <a class="el" href="../../d4/d68/qr__decompose_8h_source.html">qr_decompose.h</a>.</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>
|
||||
<div class="line"><span class="lineno"> 37</span> </div>
|
||||
<div class="line"><span class="lineno"> 38</span> out.precision(4);</div>
|
||||
<div class="line"><span class="lineno"> 39</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row = 0; row < v.size(); row++) {</div>
|
||||
<div class="line"><span class="lineno"> 40</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> col = 0; col < v[row].size(); col++)</div>
|
||||
<div class="line"><span class="lineno"> 41</span> out << std::right << std::setw(width) << std::setfill(separator)</div>
|
||||
<div class="line"><span class="lineno"> 42</span> << v[row][col];</div>
|
||||
<div class="line"><span class="lineno"> 43</span> out << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 44</span> }</div>
|
||||
<div class="line"><span class="lineno"> 45</span> </div>
|
||||
<div class="line"><span class="lineno"> 46</span> <span class="keywordflow">return</span> out;</div>
|
||||
<div class="line"><span class="lineno"> 47</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a1440a7779ac56f47a3f355ce4a8c7da0" name="a1440a7779ac56f47a3f355ce4a8c7da0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1440a7779ac56f47a3f355ce4a8c7da0">◆ </a></span>test1()</h2>
|
||||
|
||||
@@ -483,7 +525,7 @@ Functions</h2></td></tr>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_9c6faab82c22511b50177aa2e38e2780.html">numerical_methods</a></li><li class="navelem"><a class="el" href="../../de/d75/qr__eigen__values_8cpp.html">qr_eigen_values.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -2,9 +2,10 @@ var qr__eigen__values_8cpp =
|
||||
[
|
||||
[ "LIMS", "de/d75/qr__eigen__values_8cpp.html#aee57a411f07599034f5ceb8cc7d65b40", null ],
|
||||
[ "create_matrix", "de/d75/qr__eigen__values_8cpp.html#a9bbf469d5525a816b0d6ca812119093d", null ],
|
||||
[ "eigen_values", "de/d75/qr__eigen__values_8cpp.html#a28e2fa3e803abaea6c568dc45d69d8cc", null ],
|
||||
[ "qr_algorithm::eigen_values", "d2/d3b/namespaceqr__algorithm.html#a28e2fa3e803abaea6c568dc45d69d8cc", null ],
|
||||
[ "main", "de/d75/qr__eigen__values_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627", null ],
|
||||
[ "mat_mul", "de/d75/qr__eigen__values_8cpp.html#abb8bf4c55e10685a5eb2ad3797fde1ae", null ],
|
||||
[ "operator<<", "de/d75/qr__eigen__values_8cpp.html#adfbdf47277c8cfee229b05b72f1f7834", null ],
|
||||
[ "test1", "de/d75/qr__eigen__values_8cpp.html#a1440a7779ac56f47a3f355ce4a8c7da0", null ],
|
||||
[ "test2", "de/d75/qr__eigen__values_8cpp.html#a0283886819c7c140a023582b7269e2d0", null ]
|
||||
];
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: numerical_methods/qr_eigen_values.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,7 +124,7 @@ $(function(){initNavTree('de/d75/qr__eigen__values_8cpp_source.html','../../');
|
||||
<div class="headertitle"><div class="title">qr_eigen_values.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../de/d75/qr__eigen__values_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../de/d75/qr__eigen__values_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include <cassert></span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include <cmath></span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include <cstdlib></span></div>
|
||||
@@ -137,7 +137,8 @@ $(function(){initNavTree('de/d75/qr__eigen__values_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include "<a class="code" href="../../d4/d68/qr__decompose_8h.html">./qr_decompose.h</a>"</span></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="keyword">using </span>qr_algorithm::operator<<;</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="../../de/d75/qr__eigen__values_8cpp.html#aee57a411f07599034f5ceb8cc7d65b40"> 20</a></span><span class="preprocessor">#define LIMS 9 </span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="../../de/d75/qr__eigen__values_8cpp.html#aee57a411f07599034f5ceb8cc7d65b40"> 20</a></span><span class="preprocessor">#define LIMS 9 </span><span class="preprocessor"></span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span></div>
|
||||
<div class="foldopen" id="foldopen00028" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="../../de/d75/qr__eigen__values_8cpp.html#a9bbf469d5525a816b0d6ca812119093d"> 28</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d75/qr__eigen__values_8cpp.html#a9bbf469d5525a816b0d6ca812119093d">create_matrix</a>(std::valarray<std::valarray<double>> *A) {</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordtype">int</span> i, j, tmp, lim2 = <a class="code hl_define" href="../../de/d75/qr__eigen__values_8cpp.html#aee57a411f07599034f5ceb8cc7d65b40">LIMS</a> >> 1;</div>
|
||||
@@ -156,7 +157,7 @@ $(function(){initNavTree('de/d75/qr__eigen__values_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> }</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span></div>
|
||||
<div class="foldopen" id="foldopen00054" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="../../de/d75/qr__eigen__values_8cpp.html#abb8bf4c55e10685a5eb2ad3797fde1ae"> 54</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d75/qr__eigen__values_8cpp.html#abb8bf4c55e10685a5eb2ad3797fde1ae">mat_mul</a>(<span class="keyword">const</span> std::valarray<std::valarray<double>> &A,</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keyword">const</span> std::valarray<std::valarray<double>> &B,</div>
|
||||
@@ -254,7 +255,7 @@ $(function(){initNavTree('de/d75/qr__eigen__values_8cpp_source.html','../../');
|
||||
</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> </div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span>} <span class="comment">// namespace qr_algorithm</span></div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span></div>
|
||||
<div class="foldopen" id="foldopen00177" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"><a class="line" href="../../de/d75/qr__eigen__values_8cpp.html#a1440a7779ac56f47a3f355ce4a8c7da0"> 177</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d75/qr__eigen__values_8cpp.html#a1440a7779ac56f47a3f355ce4a8c7da0">test1</a>() {</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> std::valarray<std::valarray<double>> X = {{5, 7}, {7, 11}};</div>
|
||||
@@ -278,7 +279,7 @@ $(function(){initNavTree('de/d75/qr__eigen__values_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> std::cout << <span class="stringliteral">"Test 1 Passed\n\n"</span>;</div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> </div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span></div>
|
||||
<div class="foldopen" id="foldopen00210" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"><a class="line" href="../../de/d75/qr__eigen__values_8cpp.html#a0283886819c7c140a023582b7269e2d0"> 210</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d75/qr__eigen__values_8cpp.html#a0283886819c7c140a023582b7269e2d0">test2</a>() {</div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> std::valarray<std::valarray<double>> X = {{-4, 4, 2, 0, -3},</div>
|
||||
@@ -310,7 +311,7 @@ $(function(){initNavTree('de/d75/qr__eigen__values_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> std::cout << <span class="stringliteral">"Test 2 Passed\n\n"</span>;</div>
|
||||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> </div>
|
||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span></div>
|
||||
<div class="foldopen" id="foldopen00243" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"><a class="line" href="../../de/d75/qr__eigen__values_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 243</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../dd/d1e/generate__parentheses_8cpp.html#gae66f6b31b5ad750f1fe042a706a4e3d4">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv) {</div>
|
||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9977ad12548c4a49dee9dc3f0685aa54">mat_size</a> = 5;</div>
|
||||
@@ -372,7 +373,7 @@ $(function(){initNavTree('de/d75/qr__eigen__values_8cpp_source.html','../../');
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_9c6faab82c22511b50177aa2e38e2780.html">numerical_methods</a></li><li class="navelem"><a class="el" href="../../de/d75/qr__eigen__values_8cpp.html">qr_eigen_values.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.12.0 </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.13.2 </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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: std::is_arithmetic< uint256_t > Pages: 1 -->
|
||||
<svg width="99pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: std::is_arithmetic< uint256_t > Pages: 1 -->
|
||||
<svg width="99pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: dynamic_programming/tree_height.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -203,7 +203,7 @@ $(function(){initNavTree('de/d77/tree__height_8cpp_source.html','../../'); initR
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_8a20dd5bfd5341a725342bf72b6b686f.html">dynamic_programming</a></li><li class="navelem"><b>tree_height.cpp</b></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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: geometry/graham_scan_algorithm.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -174,7 +174,7 @@ $(function(){initNavTree('de/d79/graham__scan__algorithm_8cpp_source.html','../.
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment"> * @brief Self-test implementations</span></div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="comment"> * @returns void</span></div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="comment"> *******************************************************************************/</span></div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d6/d2c/caesar__cipher_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a>() {</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../dd/d1e/generate__parentheses_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>() {</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> std::vector<geometry::grahamscan::Point> points = {</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> {0, 3}, {1, 1}, {2, 2}, {4, 4}, {0, 0}, {1, 2}, {3, 1}, {3, 3}};</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> std::vector<geometry::grahamscan::Point> expected_result = {</div>
|
||||
@@ -197,10 +197,10 @@ $(function(){initNavTree('de/d79/graham__scan__algorithm_8cpp_source.html','../.
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="comment"> * @returns 0 on exit</span></div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment"> *******************************************************************************/</span></div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="keywordtype">int</span> <a class="code hl_function" href="../../dd/d1e/generate__parentheses_8cpp.html#gae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_function" href="../../d6/d2c/caesar__cipher_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_function" href="../../dd/d1e/generate__parentheses_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span>}</div>
|
||||
<div class="ttc" id="acaesar__cipher_8cpp_html_ae1a3968e7947464bee7714f6d43b7002"><div class="ttname"><a href="../../d6/d2c/caesar__cipher_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a></div><div class="ttdeci">void test()</div><div class="ttdef"><b>Definition</b> <a href="../../d6/d2c/caesar__cipher_8cpp_source.html#l00100">caesar_cipher.cpp:100</a></div></div>
|
||||
<div class="ttc" id="agenerate__parentheses_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../dd/d1e/generate__parentheses_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> <a href="../../dd/d1e/generate__parentheses_8cpp_source.html#l00082">generate_parentheses.cpp:82</a></div></div>
|
||||
<div class="ttc" id="agenerate__parentheses_8cpp_html_gae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../dd/d1e/generate__parentheses_8cpp.html#gae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">Main function.</div><div class="ttdef"><b>Definition</b> <a href="../../dd/d1e/generate__parentheses_8cpp_source.html#l00110">generate_parentheses.cpp:110</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
@@ -208,7 +208,7 @@ $(function(){initNavTree('de/d79/graham__scan__algorithm_8cpp_source.html','../.
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_e3380d2178455503f266746fb14246a5.html">geometry</a></li><li class="navelem"><b>graham_scan_algorithm.cpp</b></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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: sorting/merge_insertion_sort.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -155,15 +155,15 @@ Namespaces</h2></td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a0cba4fbf287ab8cb978ed7f8fef886b1" id="r_a0cba4fbf287ab8cb978ed7f8fef886b1"><td class="memTemplParams" colspan="2">template<typename T , size_t N> </td></tr>
|
||||
<tr class="memitem:a0cba4fbf287ab8cb978ed7f8fef886b1" id="r_a0cba4fbf287ab8cb978ed7f8fef886b1"><td class="memTemplParams" colspan="2">template<typename T, size_t N> </td></tr>
|
||||
<tr class="memitem:a0cba4fbf287ab8cb978ed7f8fef886b1"><td class="memTemplItemLeft" align="right" valign="top">static void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a0cba4fbf287ab8cb978ed7f8fef886b1">sorting::merge_insertion::InsertionSort</a> (std::array< T, N > *A, size_t start, size_t end)</td></tr>
|
||||
<tr class="memdesc:a0cba4fbf287ab8cb978ed7f8fef886b1"><td class="mdescLeft"> </td><td class="mdescRight">Insertion merge algorithm. <br /></td></tr>
|
||||
<tr class="separator:a0cba4fbf287ab8cb978ed7f8fef886b1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af4de4067a9a866ffd985c5b5055ccedf" id="r_af4de4067a9a866ffd985c5b5055ccedf"><td class="memTemplParams" colspan="2">template<typename T , size_t N> </td></tr>
|
||||
<tr class="memitem:af4de4067a9a866ffd985c5b5055ccedf" id="r_af4de4067a9a866ffd985c5b5055ccedf"><td class="memTemplParams" colspan="2">template<typename T, size_t N> </td></tr>
|
||||
<tr class="memitem:af4de4067a9a866ffd985c5b5055ccedf"><td class="memTemplItemLeft" align="right" valign="top">static void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#af4de4067a9a866ffd985c5b5055ccedf">sorting::merge_insertion::merge</a> (std::array< T, N > *array, size_t min, size_t max, size_t mid)</td></tr>
|
||||
<tr class="memdesc:af4de4067a9a866ffd985c5b5055ccedf"><td class="mdescLeft"> </td><td class="mdescRight">Perform merge of data in a window. <br /></td></tr>
|
||||
<tr class="separator:af4de4067a9a866ffd985c5b5055ccedf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7161278f18e83b671c6454b139cc5674" id="r_a7161278f18e83b671c6454b139cc5674"><td class="memTemplParams" colspan="2">template<typename T , size_t N> </td></tr>
|
||||
<tr class="memitem:a7161278f18e83b671c6454b139cc5674" id="r_a7161278f18e83b671c6454b139cc5674"><td class="memTemplParams" colspan="2">template<typename T, size_t N> </td></tr>
|
||||
<tr class="memitem:a7161278f18e83b671c6454b139cc5674"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a7161278f18e83b671c6454b139cc5674">sorting::merge_insertion::mergeSort</a> (std::array< T, N > *array, size_t min, size_t max, size_t threshold)</td></tr>
|
||||
<tr class="memdesc:a7161278f18e83b671c6454b139cc5674"><td class="mdescLeft"> </td><td class="mdescRight">Final combined algorithm. Algorithm utilizes <a class="el" href="#a0cba4fbf287ab8cb978ed7f8fef886b1" title="Insertion merge algorithm.">sorting::merge_insertion::InsertionSort</a> if window length is less than threshold, else performs merge sort recursively using <a class="el" href="#a7161278f18e83b671c6454b139cc5674" title="Final combined algorithm. Algorithm utilizes sorting::merge_insertion::InsertionSort if window length...">sorting::merge_insertion::mergeSort</a>. <br /></td></tr>
|
||||
<tr class="separator:a7161278f18e83b671c6454b139cc5674"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -189,7 +189,7 @@ Functions</h2></td></tr>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T , size_t N> </div>
|
||||
template<typename T, size_t N> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
@@ -212,7 +212,7 @@ template<typename T , size_t N> </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel static">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -291,7 +291,7 @@ template<typename T , size_t N> </div>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T , size_t N> </div>
|
||||
template<typename T, size_t N> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
@@ -319,7 +319,7 @@ template<typename T , size_t N> </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel static">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -377,7 +377,7 @@ template<typename T , size_t N> </div>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T , size_t N> </div>
|
||||
template<typename T, size_t N> </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void sorting::merge_insertion::mergeSort </td>
|
||||
@@ -434,12 +434,12 @@ template<typename T , size_t N> </div>
|
||||
<div class="line"><span class="lineno"> 118</span> <a class="code hl_function" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort</a>(array, mid, max, threshold);</div>
|
||||
<div class="line"><span class="lineno"> 119</span> </div>
|
||||
<div class="line"><span class="lineno"> 120</span> <span class="comment">// and finally merge all that sorted stuff</span></div>
|
||||
<div class="line"><span class="lineno"> 121</span> <a class="code hl_function" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge</a>(array, min, max, mid);</div>
|
||||
<div class="line"><span class="lineno"> 121</span> <a class="code hl_function" href="../../d5/d91/namespacesorting.html#aa26de383227859210f14dcf12201a079">merge</a>(array, min, max, mid);</div>
|
||||
<div class="line"><span class="lineno"> 122</span> }</div>
|
||||
<div class="line"><span class="lineno"> 123</span>}</div>
|
||||
<div class="ttc" id="agroup__sorting_html_ga460c61cd948203b4816bef2accb3fc73"><div class="ttname"><a href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge</a></div><div class="ttdeci">void merge(int *arr, int l, int m, int r)</div><div class="ttdef"><b>Definition</b> <a href="../../d5/df4/merge__sort_8cpp_source.html#l00033">merge_sort.cpp:33</a></div></div>
|
||||
<div class="ttc" id="agroup__sorting_html_gab6b14fea48d9841e29b9fc26be6e05d7"><div class="ttname"><a href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort</a></div><div class="ttdeci">void mergeSort(int *arr, int l, int r)</div><div class="ttdef"><b>Definition</b> <a href="../../d5/df4/merge__sort_8cpp_source.html#l00071">merge_sort.cpp:71</a></div></div>
|
||||
<div class="ttc" id="amerge__insertion__sort_8cpp_html_a0cba4fbf287ab8cb978ed7f8fef886b1"><div class="ttname"><a href="#a0cba4fbf287ab8cb978ed7f8fef886b1">sorting::merge_insertion::InsertionSort</a></div><div class="ttdeci">static void InsertionSort(std::array< T, N > *A, size_t start, size_t end)</div><div class="ttdoc">Insertion merge algorithm.</div><div class="ttdef"><b>Definition</b> <a href="../../de/d7b/merge__insertion__sort_8cpp_source.html#l00037">merge_insertion_sort.cpp:37</a></div></div>
|
||||
<div class="ttc" id="anamespacesorting_html_aa26de383227859210f14dcf12201a079"><div class="ttname"><a href="../../d5/d91/namespacesorting.html#aa26de383227859210f14dcf12201a079">sorting::merge</a></div><div class="ttdeci">void merge(Iterator, Iterator, const Iterator, char[])</div><div class="ttdoc">merges 2 sorted adjacent segments into a larger sorted segment</div><div class="ttdef"><b>Definition</b> <a href="../../d0/db6/non__recursive__merge__sort_8cpp_source.html#l00057">non_recursive_merge_sort.cpp:57</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -461,7 +461,7 @@ template<typename T , size_t N> </div>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel static">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -501,7 +501,7 @@ template<typename T , size_t N> </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="../../de/d7b/merge__insertion__sort_8cpp.html">merge_insertion_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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
var merge__insertion__sort_8cpp =
|
||||
[
|
||||
[ "InsertionSort", "de/d7b/merge__insertion__sort_8cpp.html#a0cba4fbf287ab8cb978ed7f8fef886b1", null ],
|
||||
[ "sorting::merge_insertion::InsertionSort", "de/d7b/merge__insertion__sort_8cpp.html#a0cba4fbf287ab8cb978ed7f8fef886b1", null ],
|
||||
[ "main", "de/d7b/merge__insertion__sort_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "merge", "de/d7b/merge__insertion__sort_8cpp.html#af4de4067a9a866ffd985c5b5055ccedf", null ],
|
||||
[ "mergeSort", "de/d7b/merge__insertion__sort_8cpp.html#a7161278f18e83b671c6454b139cc5674", null ],
|
||||
[ "sorting::merge_insertion::merge", "de/d7b/merge__insertion__sort_8cpp.html#af4de4067a9a866ffd985c5b5055ccedf", null ],
|
||||
[ "sorting::merge_insertion::mergeSort", "de/d7b/merge__insertion__sort_8cpp.html#a7161278f18e83b671c6454b139cc5674", null ],
|
||||
[ "test", "de/d7b/merge__insertion__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]
|
||||
];
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: sorting/merge_insertion_sort.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,17 +124,17 @@ $(function(){initNavTree('de/d7b/merge__insertion__sort_8cpp_source.html','../..
|
||||
<div class="headertitle"><div class="title">merge_insertion_sort.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../de/d7b/merge__insertion__sort_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../de/d7b/merge__insertion__sort_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include <algorithm></span></div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include <array></span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include <cassert></span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include <ctime></span></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include <iostream></span></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include <memory></span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d5/d91/namespacesorting.html">sorting</a> {</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../de/d0a/namespacemerge__insertion.html">merge_insertion</a> {</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span></div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> N></div>
|
||||
<div class="foldopen" id="foldopen00037" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="../../de/d7b/merge__insertion__sort_8cpp.html#a0cba4fbf287ab8cb978ed7f8fef886b1"> 37</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#a0cba4fbf287ab8cb978ed7f8fef886b1">InsertionSort</a>(std::array<T, N> *A, <span class="keywordtype">size_t</span> start, <span class="keywordtype">size_t</span> end) {</div>
|
||||
@@ -156,10 +156,10 @@ $(function(){initNavTree('de/d7b/merge__insertion__sort_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> }</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span></div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> N></div>
|
||||
<div class="foldopen" id="foldopen00067" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="../../de/d7b/merge__insertion__sort_8cpp.html#af4de4067a9a866ffd985c5b5055ccedf"> 67</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> merge(std::array<T, N> *array, <span class="keywordtype">size_t</span> min, <span class="keywordtype">size_t</span> max, <span class="keywordtype">size_t</span> mid) {</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="../../de/d7b/merge__insertion__sort_8cpp.html#af4de4067a9a866ffd985c5b5055ccedf"> 67</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#af4de4067a9a866ffd985c5b5055ccedf">merge</a>(std::array<T, N> *array, <span class="keywordtype">size_t</span> min, <span class="keywordtype">size_t</span> max, <span class="keywordtype">size_t</span> mid) {</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordtype">size_t</span> firstIndex = min;</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordtype">size_t</span> secondIndex = mid + 1;</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
|
||||
@@ -185,10 +185,10 @@ $(function(){initNavTree('de/d7b/merge__insertion__sort_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="comment">// tempArray[index];</span></div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> </div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span></div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> N></div>
|
||||
<div class="foldopen" id="foldopen00107" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"><a class="line" href="../../de/d7b/merge__insertion__sort_8cpp.html#a7161278f18e83b671c6454b139cc5674"> 107</a></span><span class="keywordtype">void</span> mergeSort(std::array<T, N> *array, <span class="keywordtype">size_t</span> min, <span class="keywordtype">size_t</span> max,</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"><a class="line" href="../../de/d7b/merge__insertion__sort_8cpp.html#a7161278f18e83b671c6454b139cc5674"> 107</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#a7161278f18e83b671c6454b139cc5674">mergeSort</a>(std::array<T, N> *array, <span class="keywordtype">size_t</span> min, <span class="keywordtype">size_t</span> max,</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordtype">size_t</span> threshold) {</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="comment">// prerequisite</span></div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">if</span> ((max - min) <= threshold) {</div>
|
||||
@@ -198,18 +198,18 @@ $(function(){initNavTree('de/d7b/merge__insertion__sort_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordtype">size_t</span> mid = (max + min) >> 1;</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="comment">// apply merge sort to both parts of this</span></div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> mergeSort(array, min, mid, threshold);</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> mergeSort(array, mid, max, threshold);</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#a7161278f18e83b671c6454b139cc5674">mergeSort</a>(array, min, mid, threshold);</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#a7161278f18e83b671c6454b139cc5674">mergeSort</a>(array, mid, max, threshold);</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="comment">// and finally merge all that sorted stuff</span></div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> merge(array, min, max, mid);</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#af4de4067a9a866ffd985c5b5055ccedf">merge</a>(array, min, max, mid);</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> }</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> </div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>} <span class="comment">// namespace merge_insertion</span></div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span>} <span class="comment">// namespace sorting</span></div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> </div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span></div>
|
||||
<div class="foldopen" id="foldopen00132" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"><a class="line" href="../../de/d7b/merge__insertion__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d"> 132</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>() {</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keyword">constexpr</span> <span class="keywordtype">size_t</span> size = 30;</div>
|
||||
@@ -221,7 +221,7 @@ $(function(){initNavTree('de/d7b/merge__insertion__sort_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> }</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> std::cout << std::endl;</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> </div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> sorting::merge_insertion::InsertionSort(&array, 0, size);</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#a0cba4fbf287ab8cb978ed7f8fef886b1">sorting::merge_insertion::InsertionSort</a>(&array, 0, size);</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="comment">// sorting::merge_insertion::mergeSort(&array, 0, size, 10);</span></div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> </div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="comment">// output</span></div>
|
||||
@@ -234,7 +234,7 @@ $(function(){initNavTree('de/d7b/merge__insertion__sort_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> std::cout << <span class="stringliteral">"Test passed\n"</span>;</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> </div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span></div>
|
||||
<div class="foldopen" id="foldopen00159" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"><a class="line" href="../../de/d7b/merge__insertion__sort_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 159</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> std::srand(std::time(<span class="keyword">nullptr</span>));</div>
|
||||
@@ -243,8 +243,10 @@ $(function(){initNavTree('de/d7b/merge__insertion__sort_8cpp_source.html','../..
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span>}</div>
|
||||
</div>
|
||||
<div class="ttc" id="amerge__insertion__sort_8cpp_html_a0cba4fbf287ab8cb978ed7f8fef886b1"><div class="ttname"><a href="../../de/d7b/merge__insertion__sort_8cpp.html#a0cba4fbf287ab8cb978ed7f8fef886b1">sorting::merge_insertion::InsertionSort</a></div><div class="ttdeci">static void InsertionSort(std::array< T, N > *A, size_t start, size_t end)</div><div class="ttdoc">Insertion merge algorithm.</div><div class="ttdef"><b>Definition</b> <a href="#l00037">merge_insertion_sort.cpp:37</a></div></div>
|
||||
<div class="ttc" id="amerge__insertion__sort_8cpp_html_a7161278f18e83b671c6454b139cc5674"><div class="ttname"><a href="../../de/d7b/merge__insertion__sort_8cpp.html#a7161278f18e83b671c6454b139cc5674">sorting::merge_insertion::mergeSort</a></div><div class="ttdeci">void mergeSort(std::array< T, N > *array, size_t min, size_t max, size_t threshold)</div><div class="ttdoc">Final combined algorithm. Algorithm utilizes sorting::merge_insertion::InsertionSort if window length...</div><div class="ttdef"><b>Definition</b> <a href="#l00107">merge_insertion_sort.cpp:107</a></div></div>
|
||||
<div class="ttc" id="amerge__insertion__sort_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../de/d7b/merge__insertion__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Function to test code using random arrays.</div><div class="ttdef"><b>Definition</b> <a href="#l00132">merge_insertion_sort.cpp:132</a></div></div>
|
||||
<div class="ttc" id="amerge__insertion__sort_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../de/d7b/merge__insertion__sort_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">Main function.</div><div class="ttdef"><b>Definition</b> <a href="#l00159">merge_insertion_sort.cpp:159</a></div></div>
|
||||
<div class="ttc" id="amerge__insertion__sort_8cpp_html_af4de4067a9a866ffd985c5b5055ccedf"><div class="ttname"><a href="../../de/d7b/merge__insertion__sort_8cpp.html#af4de4067a9a866ffd985c5b5055ccedf">sorting::merge_insertion::merge</a></div><div class="ttdeci">static void merge(std::array< T, N > *array, size_t min, size_t max, size_t mid)</div><div class="ttdoc">Perform merge of data in a window.</div><div class="ttdef"><b>Definition</b> <a href="#l00067">merge_insertion_sort.cpp:67</a></div></div>
|
||||
<div class="ttc" id="anamespacemerge__insertion_html"><div class="ttname"><a href="../../de/d0a/namespacemerge__insertion.html">merge_insertion</a></div><div class="ttdoc">Combined Intersion-Merge sorting algorithm.</div></div>
|
||||
<div class="ttc" id="anamespacesorting_html"><div class="ttname"><a href="../../d5/d91/namespacesorting.html">sorting</a></div><div class="ttdoc">for working with vectors</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
@@ -253,7 +255,7 @@ $(function(){initNavTree('de/d7b/merge__insertion__sort_8cpp_source.html','../..
|
||||
<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="../../de/d7b/merge__insertion__sort_8cpp.html">merge_insertion_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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: Member List</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -134,7 +134,7 @@ $(function(){initNavTree('de/d48/struct_trie_1_1_trie_node.html','../../'); init
|
||||
<!-- 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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: is_graph_bipartite Namespace Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -135,7 +135,7 @@ $(function(){initNavTree('de/d83/namespaceis__graph__bipartite.html','../../');
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../de/d83/namespaceis__graph__bipartite.html">is_graph_bipartite</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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: others/decimal_to_roman_numeral.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -324,7 +324,7 @@ Functions</h2></td></tr>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_9510827d0b234b3cc54b29892f217477.html">others</a></li><li class="navelem"><a class="el" href="../../de/d85/decimal__to__roman__numeral_8cpp.html">decimal_to_roman_numeral.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: others/decimal_to_roman_numeral.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,12 +124,13 @@ $(function(){initNavTree('de/d85/decimal__to__roman__numeral_8cpp_source.html','
|
||||
<div class="headertitle"><div class="title">decimal_to_roman_numeral.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../de/d85/decimal__to__roman__numeral_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../de/d85/decimal__to__roman__numeral_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include <cmath></span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include <cstdio></span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include <cstring></span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include <iostream></span></div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span></div>
|
||||
<div class="foldopen" id="foldopen00015" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="../../de/d85/decimal__to__roman__numeral_8cpp.html#a88203bd297e8405160c132faa1187780"> 15</a></span>std::string <a class="code hl_function" href="../../de/d85/decimal__to__roman__numeral_8cpp.html#a88203bd297e8405160c132faa1187780">fill</a>(<span class="keywordtype">char</span> c, <span class="keywordtype">int</span> n) {</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> std::string s = <span class="stringliteral">""</span>;</div>
|
||||
@@ -137,7 +138,7 @@ $(function(){initNavTree('de/d85/decimal__to__roman__numeral_8cpp_source.html','
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keywordflow">return</span> s;</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span></div>
|
||||
<div class="foldopen" id="foldopen00024" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="../../de/d85/decimal__to__roman__numeral_8cpp.html#a003fb4e1b08279fe4cd50fbbc2782c2d"> 24</a></span>std::string <a class="code hl_function" href="../../de/d85/decimal__to__roman__numeral_8cpp.html#a003fb4e1b08279fe4cd50fbbc2782c2d">tolowerRoman</a>(<span class="keywordtype">int</span> n) {</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">if</span> (n < 4)</div>
|
||||
@@ -170,7 +171,7 @@ $(function(){initNavTree('de/d85/decimal__to__roman__numeral_8cpp_source.html','
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">return</span> <span class="stringliteral">"?"</span>;</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span></div>
|
||||
<div class="foldopen" id="foldopen00058" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="../../de/d85/decimal__to__roman__numeral_8cpp.html#a214743638eff1336f835310049aef979"> 58</a></span>std::string <a class="code hl_function" href="../../de/d85/decimal__to__roman__numeral_8cpp.html#a214743638eff1336f835310049aef979">toupperRoman</a>(<span class="keywordtype">int</span> n) {</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">if</span> (n < 4)</div>
|
||||
@@ -203,7 +204,7 @@ $(function(){initNavTree('de/d85/decimal__to__roman__numeral_8cpp_source.html','
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">return</span> <span class="stringliteral">"?"</span>;</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> </div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span></div>
|
||||
<div class="foldopen" id="foldopen00090" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="../../de/d85/decimal__to__roman__numeral_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 90</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../de/d85/decimal__to__roman__numeral_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">int</span> n;</div>
|
||||
@@ -225,7 +226,7 @@ $(function(){initNavTree('de/d85/decimal__to__roman__numeral_8cpp_source.html','
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_9510827d0b234b3cc54b29892f217477.html">others</a></li><li class="navelem"><a class="el" href="../../de/d85/decimal__to__roman__numeral_8cpp.html">decimal_to_roman_numeral.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: graph/travelling_salesman_problem.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -219,7 +219,7 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel static">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -259,7 +259,7 @@ Functions</h2></td></tr>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_12552d7fa429bf94a2e32e5cf39f7e69.html">graph</a></li><li class="navelem"><a class="el" href="../../de/d88/travelling__salesman__problem_8cpp.html">travelling_salesman_problem.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -2,5 +2,5 @@ var travelling__salesman__problem_8cpp =
|
||||
[
|
||||
[ "main", "de/d88/travelling__salesman__problem_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "tests", "de/d88/travelling__salesman__problem_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e", null ],
|
||||
[ "TravellingSalesmanProblem", "de/d88/travelling__salesman__problem_8cpp.html#ab7706341d006e20d1ae58274187a3346", null ]
|
||||
[ "graph::TravellingSalesmanProblem", "df/dce/namespacegraph.html#ab7706341d006e20d1ae58274187a3346", null ]
|
||||
];
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: graph/travelling_salesman_problem.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,14 +124,15 @@ $(function(){initNavTree('de/d88/travelling__salesman__problem_8cpp_source.html'
|
||||
<div class="headertitle"><div class="title">travelling_salesman_problem.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../de/d88/travelling__salesman__problem_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../de/d88/travelling__salesman__problem_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include <algorithm></span> </div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include <cassert></span> </div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include <cstdint></span></div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include <iostream></span> </div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#include <limits></span> </div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="preprocessor">#include <vector></span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span></div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a> {</div>
|
||||
<div class="foldopen" id="foldopen00041" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="../../df/dce/namespacegraph.html#ab7706341d006e20d1ae58274187a3346"> 41</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#ab7706341d006e20d1ae58274187a3346">TravellingSalesmanProblem</a>(std::vector<std::vector<uint32_t>> *cities,</div>
|
||||
@@ -142,18 +143,18 @@ $(function(){initNavTree('de/d88/travelling__salesman__problem_8cpp_source.html'
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> vtx.push_back(i);</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> }</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> }</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span></div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> int32_t min_path = 2147483647;</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">do</span> {</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> int32_t curr_weight = 0;</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span></div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">int</span> k = src;</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i : vtx) {</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> curr_weight += (*cities)[k][i];</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> k = i;</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> }</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> curr_weight += (*cities)[k][src];</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span></div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> min_path = std::min(min_path, curr_weight);</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> } <span class="keywordflow">while</span> (next_permutation(vtx.begin(), vtx.end()));</div>
|
||||
@@ -162,7 +163,7 @@ $(function(){initNavTree('de/d88/travelling__salesman__problem_8cpp_source.html'
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span>} <span class="comment">// namespace graph</span></div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span></div>
|
||||
<div class="foldopen" id="foldopen00078" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="../../de/d88/travelling__salesman__problem_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e"> 78</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d88/travelling__salesman__problem_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a>() {</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> std::cout << <span class="stringliteral">"Initiatinig Predefined Tests..."</span> << std::endl;</div>
|
||||
@@ -187,7 +188,7 @@ $(function(){initNavTree('de/d88/travelling__salesman__problem_8cpp_source.html'
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> std::cout << <span class="stringliteral">"3rd test passed..."</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span></div>
|
||||
<div class="foldopen" id="foldopen00105" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"><a class="line" href="../../de/d88/travelling__salesman__problem_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 105</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../de/d88/travelling__salesman__problem_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <a class="code hl_function" href="../../de/d88/travelling__salesman__problem_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
@@ -208,7 +209,7 @@ $(function(){initNavTree('de/d88/travelling__salesman__problem_8cpp_source.html'
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_12552d7fa429bf94a2e32e5cf39f7e69.html">graph</a></li><li class="navelem"><a class="el" href="../../de/d88/travelling__salesman__problem_8cpp.html">travelling_salesman_problem.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: geometry/graham_scan_functions.hpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -246,9 +246,9 @@ $(function(){initNavTree('de/d89/graham__scan__functions_8hpp_source.html','../.
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span><span class="comment"> * @param vp2 Co-ordinates of Point 2 <int, int>.</span></div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><span class="comment"> * @returns @param int distance between p1 and p2.</span></div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="comment"> *******************************************************************************/</span></div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="keywordtype">int</span> <a class="code hl_struct" href="../../d1/db3/structcompare.html">compare</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *vp1, <span class="keyword">const</span> <span class="keywordtype">void</span> *vp2) {</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keyword">auto</span> *p1 = <span class="keyword">static_cast<</span><span class="keyword">const </span><a class="code hl_struct" href="../../d8/dc8/struct_point.html">Point</a> *<span class="keyword">></span>(vp1);</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keyword">auto</span> *p2 = <span class="keyword">static_cast<</span><span class="keyword">const </span><a class="code hl_struct" href="../../d8/dc8/struct_point.html">Point</a> *<span class="keyword">></span>(vp2);</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="keywordtype">int</span> compare(<span class="keyword">const</span> <span class="keywordtype">void</span> *vp1, <span class="keyword">const</span> <span class="keywordtype">void</span> *vp2) {</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keyword">auto</span> *p1 = <span class="keyword">static_cast<</span><span class="keyword">const </span><a class="code hl_struct" href="../../d7/d48/structgeometry_1_1grahamscan_1_1_point.html">Point</a> *<span class="keyword">></span>(vp1);</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keyword">auto</span> *p2 = <span class="keyword">static_cast<</span><span class="keyword">const </span><a class="code hl_struct" href="../../d7/d48/structgeometry_1_1grahamscan_1_1_point.html">Point</a> *<span class="keyword">></span>(vp2);</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="comment">// Find orientation</span></div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordtype">int</span> o = orientation(p0, *p1, *p2);</div>
|
||||
@@ -284,7 +284,7 @@ $(function(){initNavTree('de/d89/graham__scan__functions_8hpp_source.html','../.
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="comment">// before p2 in sorted output if p2 has larger polar angle</span></div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="comment">// (in counterclockwise direction) than p1.</span></div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> p0 = points[0];</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> qsort(&points[1], size - 1, <span class="keyword">sizeof</span>(<a class="code hl_struct" href="../../d8/dc8/struct_point.html">Point</a>), <a class="code hl_struct" href="../../d1/db3/structcompare.html">compare</a>);</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> qsort(&points[1], size - 1, <span class="keyword">sizeof</span>(<a class="code hl_struct" href="../../d7/d48/structgeometry_1_1grahamscan_1_1_point.html">Point</a>), compare);</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> </div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="comment">// If two or more points make same angle with p0, Remove all but the one</span></div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="comment">// that is farthest from p0 Remember that, in above sorting, our criteria</span></div>
|
||||
@@ -328,7 +328,7 @@ $(function(){initNavTree('de/d89/graham__scan__functions_8hpp_source.html','../.
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> std::vector<Point> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="comment">// Now stack has the output points, push them into the resultant vector</span></div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">while</span> (!St.empty()) {</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <a class="code hl_struct" href="../../d8/dc8/struct_point.html">Point</a> p = St.top();</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <a class="code hl_struct" href="../../d7/d48/structgeometry_1_1grahamscan_1_1_point.html">Point</a> p = St.top();</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.push_back(p);</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> St.pop();</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> }</div>
|
||||
@@ -342,7 +342,6 @@ $(function(){initNavTree('de/d89/graham__scan__functions_8hpp_source.html','../.
|
||||
<div class="ttc" id="anamespacegeometry_html"><div class="ttname"><a href="../../d5/d5f/namespacegeometry.html">geometry</a></div><div class="ttdoc">for std::swap</div><div class="ttdef"><b>Definition</b> <a href="#l00052">graham_scan_functions.hpp:52</a></div></div>
|
||||
<div class="ttc" id="astruct_point_html"><div class="ttname"><a href="../../d8/dc8/struct_point.html">Point</a></div><div class="ttdef"><b>Definition</b> <a href="../../d8/d6c/line__segment__intersection_8cpp_source.html#l00012">line_segment_intersection.cpp:12</a></div></div>
|
||||
<div class="ttc" id="astruct_point_html_a2e1b5fb2b2a83571f5c0bc0f66a73cf7"><div class="ttname"><a href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">Point::y</a></div><div class="ttdeci">int y</div><div class="ttdoc">Point respect to x coordinate.</div><div class="ttdef"><b>Definition</b> <a href="../../d8/d6c/line__segment__intersection_8cpp_source.html#l00014">line_segment_intersection.cpp:14</a></div></div>
|
||||
<div class="ttc" id="astructcompare_html"><div class="ttname"><a href="../../d1/db3/structcompare.html">compare</a></div><div class="ttdef"><b>Definition</b> <a href="../../d5/d8e/huffman_8cpp_source.html#l00036">huffman.cpp:36</a></div></div>
|
||||
<div class="ttc" id="astructgeometry_1_1grahamscan_1_1_point_html"><div class="ttname"><a href="../../d7/d48/structgeometry_1_1grahamscan_1_1_point.html">geometry::grahamscan::Point</a></div><div class="ttdef"><b>Definition</b> <a href="#l00064">graham_scan_functions.hpp:64</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
@@ -350,7 +349,7 @@ $(function(){initNavTree('de/d89/graham__scan__functions_8hpp_source.html','../.
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_e3380d2178455503f266746fb14246a5.html">geometry</a></li><li class="navelem"><b>graham_scan_functions.hpp</b></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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: Member List</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -140,7 +140,7 @@ $(function(){initNavTree('dd/d2f/class_trie.html','../../'); initResizable(true)
|
||||
<!-- 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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: dynamic_programming/partition_problem.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -214,7 +214,7 @@ $(function(){initNavTree('de/d8c/partition__problem_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span><span class="comment"> * @brief Self-test implementations</span></div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="comment"> * @returns void</span></div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="comment"> *******************************************************************************/</span></div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d6/d2c/caesar__cipher_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a>() {</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../dd/d1e/generate__parentheses_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>() {</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> std::vector<uint64_t> arr = {{1, 3, 3, 2, 3, 2}};</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> uint64_t n = arr.size();</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordtype">bool</span> expected_result = <span class="keyword">true</span>;</div>
|
||||
@@ -229,10 +229,10 @@ $(function(){initNavTree('de/d8c/partition__problem_8cpp_source.html','../../');
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span><span class="comment"> * @returns 0 on exit</span></div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="comment"> *******************************************************************************/</span></div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="keywordtype">int</span> <a class="code hl_function" href="../../dd/d1e/generate__parentheses_8cpp.html#gae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_function" href="../../d6/d2c/caesar__cipher_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_function" href="../../dd/d1e/generate__parentheses_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span>}</div>
|
||||
<div class="ttc" id="acaesar__cipher_8cpp_html_ae1a3968e7947464bee7714f6d43b7002"><div class="ttname"><a href="../../d6/d2c/caesar__cipher_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a></div><div class="ttdeci">void test()</div><div class="ttdef"><b>Definition</b> <a href="../../d6/d2c/caesar__cipher_8cpp_source.html#l00100">caesar_cipher.cpp:100</a></div></div>
|
||||
<div class="ttc" id="agenerate__parentheses_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../dd/d1e/generate__parentheses_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> <a href="../../dd/d1e/generate__parentheses_8cpp_source.html#l00082">generate_parentheses.cpp:82</a></div></div>
|
||||
<div class="ttc" id="agenerate__parentheses_8cpp_html_gae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../dd/d1e/generate__parentheses_8cpp.html#gae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">Main function.</div><div class="ttdef"><b>Definition</b> <a href="../../dd/d1e/generate__parentheses_8cpp_source.html#l00110">generate_parentheses.cpp:110</a></div></div>
|
||||
<div class="ttc" id="anamespacedp_html"><div class="ttname"><a href="../../df/d88/namespacedp.html">dp</a></div><div class="ttdoc">for std::vector</div><div class="ttdef"><b>Definition</b> <a href="#l00039">partition_problem.cpp:39</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
@@ -241,7 +241,7 @@ $(function(){initNavTree('de/d8c/partition__problem_8cpp_source.html','../../');
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_8a20dd5bfd5341a725342bf72b6b686f.html">dynamic_programming</a></li><li class="navelem"><b>partition_problem.cpp</b></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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: Member List</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -138,7 +138,7 @@ $(function(){initNavTree('dd/dca/class_f_c_f_s.html','../../'); initResizable(tr
|
||||
<!-- 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.12.0 </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.13.2 </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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: others::postfix_expression::Stack Pages: 1 -->
|
||||
<svg width="139pt" height="105pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: others::postfix_expression::Stack Pages: 1 -->
|
||||
<svg width="139pt" height="105pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: Member List</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -135,7 +135,7 @@ $(function(){initNavTree('da/d49/classgreedy__algorithms_1_1_digit_separation.ht
|
||||
<!-- 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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: Member List</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -134,7 +134,7 @@ $(function(){initNavTree('d8/d10/structlist.html','../../'); initResizable(true)
|
||||
<!-- 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.12.0 </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.13.2 </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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: others/iterative_tree_traversals.cpp Pages: 1 -->
|
||||
<svg width="321pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: others/iterative_tree_traversals.cpp Pages: 1 -->
|
||||
<svg width="321pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: Subsets Namespace Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -135,7 +135,7 @@ $(function(){initNavTree('de/d95/namespace_subsets.html','../../'); initResizabl
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../de/d95/namespace_subsets.html">Subsets</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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: math/aliquot_sum.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -164,8 +164,7 @@ Functions</h2></td></tr>
|
||||
<p>The Aliquot sum \(s(n)\) of a non-negative integer n is the sum of all proper divisors of n, that is, all the divisors of n, other than itself.</p>
|
||||
<p>Formula:</p>
|
||||
<p class="formulaDsp">
|
||||
\[
|
||||
s(n) = \sum_{d|n, d\neq n}d.
|
||||
\[ s(n) = \sum_{d|n, d\neq n}d.
|
||||
\]
|
||||
</p>
|
||||
<p>For example; \(s(18) = 1 + 2 + 3 + 6 + 9 = 21 \)</p>
|
||||
@@ -218,7 +217,7 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel static">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -249,7 +248,7 @@ Functions</h2></td></tr>
|
||||
<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="../../de/d99/aliquot__sum_8cpp.html">aliquot_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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var aliquot__sum_8cpp =
|
||||
[
|
||||
[ "aliquot_sum", "de/d99/aliquot__sum_8cpp.html#ab37f3a7302a84179aae682c79d8390bf", null ],
|
||||
[ "math::aliquot_sum", "dd/d47/namespacemath.html#ab37f3a7302a84179aae682c79d8390bf", null ],
|
||||
[ "main", "de/d99/aliquot__sum_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "test", "de/d99/aliquot__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]
|
||||
];
|
||||
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: math/aliquot_sum.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,13 +124,14 @@ $(function(){initNavTree('de/d99/aliquot__sum_8cpp_source.html','../../'); initR
|
||||
<div class="headertitle"><div class="title">aliquot_sum.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../de/d99/aliquot__sum_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../de/d99/aliquot__sum_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include <cassert></span> </div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include <cstdint></span></div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#include <iostream></span> </div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span></div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../dd/d47/namespacemath.html">math</a> {</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span></div>
|
||||
<div class="foldopen" id="foldopen00036" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="../../dd/d47/namespacemath.html#ab37f3a7302a84179aae682c79d8390bf"> 36</a></span>uint64_t <a class="code hl_function" href="../../dd/d47/namespacemath.html#ab37f3a7302a84179aae682c79d8390bf">aliquot_sum</a>(<span class="keyword">const</span> uint64_t num) {</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordflow">if</span> (num == 0 || num == 1) {</div>
|
||||
@@ -149,7 +150,7 @@ $(function(){initNavTree('de/d99/aliquot__sum_8cpp_source.html','../../'); initR
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span>} <span class="comment">// namespace math</span></div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span></div>
|
||||
<div class="foldopen" id="foldopen00057" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="../../de/d99/aliquot__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d"> 57</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d99/aliquot__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>() {</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="comment">// Aliquot sum of 10 is 1 + 2 + 5 = 8</span></div>
|
||||
@@ -164,7 +165,7 @@ $(function(){initNavTree('de/d99/aliquot__sum_8cpp_source.html','../../'); initR
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> std::cout << <span class="stringliteral">"All the tests have successfully passed!\n"</span>;</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span></div>
|
||||
<div class="foldopen" id="foldopen00074" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="../../de/d99/aliquot__sum_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 74</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../de/d99/aliquot__sum_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_function" href="../../de/d99/aliquot__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run the self-test implementations</span></div>
|
||||
@@ -181,7 +182,7 @@ $(function(){initNavTree('de/d99/aliquot__sum_8cpp_source.html','../../'); initR
|
||||
<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="../../de/d99/aliquot__sum_8cpp.html">aliquot_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.12.0 </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.13.2 </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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: data_structures/trie_tree.cpp Pages: 1 -->
|
||||
<svg width="372pt" height="94pt"
|
||||
|
||||
|
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 12.2.0 (20241103.1931)
|
||||
<!-- Generated by graphviz version 12.2.1 (20241206.2353)
|
||||
-->
|
||||
<!-- Title: data_structures/trie_tree.cpp Pages: 1 -->
|
||||
<svg width="372pt" height="94pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |