Documentation for 53a6c16730

This commit is contained in:
github-actions
2022-01-16 16:05:19 +00:00
parent 778f1be9e5
commit 2cab28c905
3620 changed files with 52045 additions and 41188 deletions

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: graph::is_graph_bipartite::Graph Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -100,6 +100,12 @@ $(document).ready(function(){initNavTree('de/d00/classgraph_1_1is__graph__bipart
<p>Class for representing graph as an adjacency list.
<a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for graph::is_graph_bipartite::Graph:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/db7/classgraph_1_1is__graph__bipartite_1_1_graph__coll__graph.svg" width="264" height="246"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
@@ -162,14 +168,15 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>n</b></td></tr>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> {</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">n</a> = size;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f">adj</a>.resize(<a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">n</a>);</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>.resize(<a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">n</a>, -1);</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> }</div>
<div class="fragment"><div class="line"><span class="lineno"> 65</span> {</div>
<div class="line"><span class="lineno"> 66</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">n</a> = size;</div>
<div class="line"><span class="lineno"> 67</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f">adj</a>.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/resize.html">resize</a>(<a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">n</a>);</div>
<div class="line"><span class="lineno"> 68</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/resize.html">resize</a>(<a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">n</a>, -1);</div>
<div class="line"><span class="lineno"> 69</span> }</div>
<div class="ttc" id="aclassgraph_1_1is__graph__bipartite_1_1_graph_html_a9d10768f927baa8a4d4a5ffce295b6b6"><div class="ttname"><a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">graph::is_graph_bipartite::Graph::side</a></div><div class="ttdeci">std::vector&lt; int &gt; side</div><div class="ttdoc">stores the side of the vertex</div><div class="ttdef"><b>Definition:</b> is_graph_bipartite.cpp:58</div></div>
<div class="ttc" id="aclassgraph_1_1is__graph__bipartite_1_1_graph_html_ab0efcfa04fff8616aff0062522d1483f"><div class="ttname"><a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f">graph::is_graph_bipartite::Graph::adj</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; int &gt; &gt; adj</div><div class="ttdoc">adj stores the graph as an adjacency list</div><div class="ttdef"><b>Definition:</b> is_graph_bipartite.cpp:56</div></div>
<div class="ttc" id="aclassgraph_1_1is__graph__bipartite_1_1_graph_html_aefea7ee87a708298c486d5a38ac628ef"><div class="ttname"><a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">graph::is_graph_bipartite::Graph::n</a></div><div class="ttdeci">int n</div><div class="ttdoc">size of the graph</div><div class="ttdef"><b>Definition:</b> is_graph_bipartite.cpp:53</div></div>
<div class="ttc" id="aresize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/resize.html">std::vector::resize</a></div><div class="ttdeci">T resize(T... args)</div></div>
</div><!-- fragment -->
</div>
</div>
@@ -208,11 +215,18 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>n</b></td></tr>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> {</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f">adj</a>[u - 1].push_back(v - 1);</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f">adj</a>[v - 1].push_back(u - 1);</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span>}</div>
</div><!-- fragment -->
<div class="fragment"><div class="line"><span class="lineno"> 83</span> {</div>
<div class="line"><span class="lineno"> 84</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f">adj</a>[u - 1].<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(v - 1);</div>
<div class="line"><span class="lineno"> 85</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f">adj</a>[v - 1].<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(u - 1);</div>
<div class="line"><span class="lineno"> 86</span>}</div>
<div class="ttc" id="apush_back_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">std::vector::push_back</a></div><div class="ttdeci">T push_back(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph_ad8c10df34357b2cd865c81e0c4f0bd8c_cgraph.svg" width="378" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="a9b0c6400693a5cfff971f768dd5ca5ca" name="a9b0c6400693a5cfff971f768dd5ca5ca"></a>
@@ -236,29 +250,29 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>n</b></td></tr>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if th graph is bipartite </dd>
<dd>
<code>false</code> otherwise </dd></dl>
<div class="fragment"><div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> {</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../d3/d84/word__break_8cpp.html#a272b0f5cdb4e41fd6dee4538b808c06a">check</a> = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue&lt;int&gt;</a> q;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> current_edge = 0; current_edge &lt; <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">n</a>; ++current_edge) {</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[current_edge] == -1) {</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> q.push(current_edge);</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[current_edge] = 0;</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordflow">while</span> (q.size()) {</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordtype">int</span> current = q.front();</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> q.pop();</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> neighbour : <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f">adj</a>[current]) {</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[neighbour] == -1) {</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[neighbour] = (1 ^ <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[current]);</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> q.push(neighbour);</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <a class="code hl_function" href="../../d3/d84/word__break_8cpp.html#a272b0f5cdb4e41fd6dee4538b808c06a">check</a> &amp;= (<a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[neighbour] != <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[current]);</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 class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> }</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> }</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> }</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d3/d84/word__break_8cpp.html#a272b0f5cdb4e41fd6dee4538b808c06a">check</a>;</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 106</span> {</div>
<div class="line"><span class="lineno"> 107</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../d3/d84/word__break_8cpp.html#a272b0f5cdb4e41fd6dee4538b808c06a">check</a> = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 108</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue&lt;int&gt;</a> q;</div>
<div class="line"><span class="lineno"> 109</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> current_edge = 0; current_edge &lt; <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">n</a>; ++current_edge) {</div>
<div class="line"><span class="lineno"> 110</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[current_edge] == -1) {</div>
<div class="line"><span class="lineno"> 111</span> q.push(current_edge);</div>
<div class="line"><span class="lineno"> 112</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[current_edge] = 0;</div>
<div class="line"><span class="lineno"> 113</span> <span class="keywordflow">while</span> (q.size()) {</div>
<div class="line"><span class="lineno"> 114</span> <span class="keywordtype">int</span> current = q.front();</div>
<div class="line"><span class="lineno"> 115</span> q.pop();</div>
<div class="line"><span class="lineno"> 116</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> neighbour : <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f">adj</a>[current]) {</div>
<div class="line"><span class="lineno"> 117</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[neighbour] == -1) {</div>
<div class="line"><span class="lineno"> 118</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[neighbour] = (1 ^ <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[current]);</div>
<div class="line"><span class="lineno"> 119</span> q.push(neighbour);</div>
<div class="line"><span class="lineno"> 120</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno"> 121</span> <a class="code hl_function" href="../../d3/d84/word__break_8cpp.html#a272b0f5cdb4e41fd6dee4538b808c06a">check</a> &amp;= (<a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[neighbour] != <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">side</a>[current]);</div>
<div class="line"><span class="lineno"> 122</span> }</div>
<div class="line"><span class="lineno"> 123</span> }</div>
<div class="line"><span class="lineno"> 124</span> }</div>
<div class="line"><span class="lineno"> 125</span> }</div>
<div class="line"><span class="lineno"> 126</span> }</div>
<div class="line"><span class="lineno"> 127</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d3/d84/word__break_8cpp.html#a272b0f5cdb4e41fd6dee4538b808c06a">check</a>;</div>
<div class="line"><span class="lineno"> 128</span>}</div>
<div class="ttc" id="aqueue_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue</a></div></div>
<div class="ttc" id="aword__break_8cpp_html_a272b0f5cdb4e41fd6dee4538b808c06a"><div class="ttname"><a href="../../d3/d84/word__break_8cpp.html#a272b0f5cdb4e41fd6dee4538b808c06a">dynamic_programming::word_break::check</a></div><div class="ttdeci">bool check(const std::string &amp;s, const std::unordered_set&lt; std::string &gt; &amp;strSet, int pos, std::vector&lt; int &gt; *dp)</div><div class="ttdoc">Function that checks if the string passed in param can be segmented from position 'pos',...</div><div class="ttdef"><b>Definition:</b> word_break.cpp:80</div></div>
</div><!-- fragment -->
@@ -273,7 +287,7 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>n</b></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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -0,0 +1,4 @@
<map id="graph::is_graph_bipartite::Graph::addEdge" name="graph::is_graph_bipartite::Graph::addEdge">
<area shape="rect" id="node1" title="Function that add an edge between two nodes or vertices of graph." alt="" coords="5,5,169,47"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back#" title=" " alt="" coords="217,13,372,39"/>
</map>

View File

@@ -0,0 +1 @@
7a4ed05f633d729247100dc4ec55f26e

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.50.0 (20211204.2007)
-->
<!-- Title: graph::is_graph_bipartite::Graph::addEdge Pages: 1 -->
<svg width="283pt" height="39pt"
viewBox="0.00 0.00 283.00 39.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 35)">
<title>graph::is_graph_bipartite::Graph::addEdge</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 279,-35 279,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Function that add an edge between two nodes or vertices of graph.">
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-30.5 123,-30.5 123,-0.5 0,-0.5"/>
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::is_graph_bipartite</text>
<text text-anchor="middle" x="61.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Graph::addEdge</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
<polygon fill="white" stroke="black" points="159,-6 159,-25 275,-25 275,-6 159,-6"/>
<text text-anchor="middle" x="217" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M123.17,-15.5C131.51,-15.5 140.11,-15.5 148.57,-15.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="148.77,-19 158.77,-15.5 148.77,-12 148.77,-19"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: sorting/cycle_sort.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -168,53 +168,53 @@ template&lt;typename T &gt; </div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;T&gt;</a> arr(in_arr);</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> cycle_start = 0; cycle_start &lt;= arr.size() - 1; cycle_start++) {</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="comment">// initialize item</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> T item = arr[cycle_start];</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="comment">// Count the number of elements smaller than item, this number is the</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="comment">// correct index of item.</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordtype">int</span> pos = cycle_start;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = cycle_start + 1; i &lt; arr.size(); i++) {</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">if</span> (arr[i] &lt; item) {</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> pos++;</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="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="comment">// item is already in correct position</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">if</span> (pos == cycle_start) {</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> }</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="comment">// duplicate elements</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">while</span> (item == arr[pos]) pos += 1;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">if</span> (pos == cycle_start) {</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a>(item, arr[pos]);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> }</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="comment">// Rest of the elements</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">while</span> (pos != cycle_start) {</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> pos = cycle_start;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// Find position where we put the element</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = cycle_start + 1; i &lt; arr.size(); i++) {</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">if</span> (arr[i] &lt; item) {</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> pos += 1;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> }</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="comment">// duplicate elements</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keywordflow">while</span> (item == arr[pos]) pos += 1;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordflow">if</span> (item == arr[pos]) {</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a>(item, arr[pos]);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> }</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> }</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> }</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">return</span> arr;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 37</span> {</div>
<div class="line"><span class="lineno"> 38</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;T&gt;</a> arr(in_arr);</div>
<div class="line"><span class="lineno"> 39</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> cycle_start = 0; cycle_start &lt;= arr.size() - 1; cycle_start++) {</div>
<div class="line"><span class="lineno"> 40</span> <span class="comment">// initialize item</span></div>
<div class="line"><span class="lineno"> 41</span> T item = arr[cycle_start];</div>
<div class="line"><span class="lineno"> 42</span> </div>
<div class="line"><span class="lineno"> 43</span> <span class="comment">// Count the number of elements smaller than item, this number is the</span></div>
<div class="line"><span class="lineno"> 44</span> <span class="comment">// correct index of item.</span></div>
<div class="line"><span class="lineno"> 45</span> <span class="keywordtype">int</span> pos = cycle_start;</div>
<div class="line"><span class="lineno"> 46</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = cycle_start + 1; i &lt; arr.size(); i++) {</div>
<div class="line"><span class="lineno"> 47</span> <span class="keywordflow">if</span> (arr[i] &lt; item) {</div>
<div class="line"><span class="lineno"> 48</span> pos++;</div>
<div class="line"><span class="lineno"> 49</span> }</div>
<div class="line"><span class="lineno"> 50</span> }</div>
<div class="line"><span class="lineno"> 51</span> </div>
<div class="line"><span class="lineno"> 52</span> <span class="comment">// item is already in correct position</span></div>
<div class="line"><span class="lineno"> 53</span> <span class="keywordflow">if</span> (pos == cycle_start) {</div>
<div class="line"><span class="lineno"> 54</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><span class="lineno"> 55</span> }</div>
<div class="line"><span class="lineno"> 56</span> </div>
<div class="line"><span class="lineno"> 57</span> <span class="comment">// duplicate elements</span></div>
<div class="line"><span class="lineno"> 58</span> <span class="keywordflow">while</span> (item == arr[pos]) pos += 1;</div>
<div class="line"><span class="lineno"> 59</span> <span class="keywordflow">if</span> (pos == cycle_start) {</div>
<div class="line"><span class="lineno"> 60</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><span class="lineno"> 61</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno"> 62</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a>(item, arr[pos]);</div>
<div class="line"><span class="lineno"> 63</span> }</div>
<div class="line"><span class="lineno"> 64</span> <span class="comment">// Rest of the elements</span></div>
<div class="line"><span class="lineno"> 65</span> <span class="keywordflow">while</span> (pos != cycle_start) {</div>
<div class="line"><span class="lineno"> 66</span> pos = cycle_start;</div>
<div class="line"><span class="lineno"> 67</span> <span class="comment">// Find position where we put the element</span></div>
<div class="line"><span class="lineno"> 68</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = cycle_start + 1; i &lt; arr.size(); i++) {</div>
<div class="line"><span class="lineno"> 69</span> <span class="keywordflow">if</span> (arr[i] &lt; item) {</div>
<div class="line"><span class="lineno"> 70</span> pos += 1;</div>
<div class="line"><span class="lineno"> 71</span> }</div>
<div class="line"><span class="lineno"> 72</span> }</div>
<div class="line"><span class="lineno"> 73</span> <span class="comment">// duplicate elements</span></div>
<div class="line"><span class="lineno"> 74</span> <span class="keywordflow">while</span> (item == arr[pos]) pos += 1;</div>
<div class="line"><span class="lineno"> 75</span> <span class="keywordflow">if</span> (item == arr[pos]) {</div>
<div class="line"><span class="lineno"> 76</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><span class="lineno"> 77</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno"> 78</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a>(item, arr[pos]);</div>
<div class="line"><span class="lineno"> 79</span> }</div>
<div class="line"><span class="lineno"> 80</span> }</div>
<div class="line"><span class="lineno"> 81</span> }</div>
<div class="line"><span class="lineno"> 82</span> <span class="keywordflow">return</span> arr;</div>
<div class="line"><span class="lineno"> 83</span>}</div>
<div class="ttc" id="aswap_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a></div><div class="ttdeci">T swap(T... args)</div></div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
</div><!-- fragment --><div class="dynheader">
@@ -244,10 +244,10 @@ Here is the call graph for this function:</div>
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> {</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// execute the test</span></div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 127</span> {</div>
<div class="line"><span class="lineno"> 128</span> <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// execute the test</span></div>
<div class="line"><span class="lineno"> 129</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 130</span>}</div>
<div class="ttc" id="acycle__sort_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../de/d07/cycle__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Test implementations.</div><div class="ttdef"><b>Definition:</b> cycle_sort.cpp:91</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -283,37 +283,37 @@ Here is the call graph for this function:</div>
<p>Test implementations. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> {</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="comment">// Test 1</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="comment">// [4, 3, 2, 1] return [1, 2, 3, 4]</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> array1 = {4, 3, 2, 1};</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 1... &quot;</span>;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> 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="l00097" name="l00097"></a><span class="lineno"> 97</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(arr1), <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a>(arr1)));</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> </div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</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="l00101" name="l00101"></a><span class="lineno"> 101</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;double&gt;</a> array2 = {4.3, -6.5, -7.4, 0, 2.7, 1.8};</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 2... &quot;</span>;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;double&gt;</a> 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="l00104" name="l00104"></a><span class="lineno"> 104</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(arr2), <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a>(arr2)));</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> </div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="comment">// Test 3</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="comment">// [3, 3, 3, 3] return [3, 3, 3, 3]</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> array3 = {3, 3, 3, 3};</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 3... &quot;</span>;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> 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="l00112" name="l00112"></a><span class="lineno"> 112</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(arr3), <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a>(arr3)));</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="comment">// [9, 4, 6, 8, 14, 3] return [9, 4, 6, 8, 14, 3]</span></div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> array4 = {3, 4, 6, 8, 9, 14};</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 4... &quot;</span>;</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> 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="l00119" name="l00119"></a><span class="lineno"> 119</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(arr4), <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a>(arr4)));</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 91</span> {</div>
<div class="line"><span class="lineno"> 92</span> <span class="comment">// Test 1</span></div>
<div class="line"><span class="lineno"> 93</span> <span class="comment">// [4, 3, 2, 1] return [1, 2, 3, 4]</span></div>
<div class="line"><span class="lineno"> 94</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> array1 = {4, 3, 2, 1};</div>
<div class="line"><span class="lineno"> 95</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 1... &quot;</span>;</div>
<div class="line"><span class="lineno"> 96</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> arr1 = <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#ae79a9d247691fce0d655fce75f1c04fa">sorting::cycle_sort::cycleSort</a>(array1);</div>
<div class="line"><span class="lineno"> 97</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(arr1), <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a>(arr1)));</div>
<div class="line"><span class="lineno"> 98</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 99</span> </div>
<div class="line"><span class="lineno"> 100</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"><span class="lineno"> 101</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;double&gt;</a> array2 = {4.3, -6.5, -7.4, 0, 2.7, 1.8};</div>
<div class="line"><span class="lineno"> 102</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 2... &quot;</span>;</div>
<div class="line"><span class="lineno"> 103</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;double&gt;</a> arr2 = <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#ae79a9d247691fce0d655fce75f1c04fa">sorting::cycle_sort::cycleSort</a>(array2);</div>
<div class="line"><span class="lineno"> 104</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(arr2), <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a>(arr2)));</div>
<div class="line"><span class="lineno"> 105</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 106</span> </div>
<div class="line"><span class="lineno"> 107</span> <span class="comment">// Test 3</span></div>
<div class="line"><span class="lineno"> 108</span> <span class="comment">// [3, 3, 3, 3] return [3, 3, 3, 3]</span></div>
<div class="line"><span class="lineno"> 109</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> array3 = {3, 3, 3, 3};</div>
<div class="line"><span class="lineno"> 110</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 3... &quot;</span>;</div>
<div class="line"><span class="lineno"> 111</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> arr3 = <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#ae79a9d247691fce0d655fce75f1c04fa">sorting::cycle_sort::cycleSort</a>(array3);</div>
<div class="line"><span class="lineno"> 112</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(arr3), <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a>(arr3)));</div>
<div class="line"><span class="lineno"> 113</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 114</span> </div>
<div class="line"><span class="lineno"> 115</span> <span class="comment">// [9, 4, 6, 8, 14, 3] return [9, 4, 6, 8, 14, 3]</span></div>
<div class="line"><span class="lineno"> 116</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> array4 = {3, 4, 6, 8, 9, 14};</div>
<div class="line"><span class="lineno"> 117</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 4... &quot;</span>;</div>
<div class="line"><span class="lineno"> 118</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> arr4 = <a class="code hl_function" href="../../de/d07/cycle__sort_8cpp.html#ae79a9d247691fce0d655fce75f1c04fa">sorting::cycle_sort::cycleSort</a>(array4);</div>
<div class="line"><span class="lineno"> 119</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(arr4), <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a>(arr4)));</div>
<div class="line"><span class="lineno"> 120</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 121</span>}</div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
<div class="ttc" id="acycle__sort_8cpp_html_ae79a9d247691fce0d655fce75f1c04fa"><div class="ttname"><a href="../../de/d07/cycle__sort_8cpp.html#ae79a9d247691fce0d655fce75f1c04fa">sorting::cycle_sort::cycleSort</a></div><div class="ttdeci">std::vector&lt; T &gt; cycleSort(const std::vector&lt; T &gt; &amp;in_arr)</div><div class="ttdoc">The main function implements cycleSort.</div><div class="ttdef"><b>Definition:</b> cycle_sort.cpp:37</div></div>
@@ -335,7 +335,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_bb1b521853a9c46347182a9d10420771.html">sorting</a></li><li class="navelem"><a class="el" href="../../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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -1,7 +1,7 @@
<map id="test" name="test">
<area shape="rect" id="node1" title="Test implementations." alt="" coords="5,81,49,108"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/begin.html#" title=" " alt="" coords="109,5,187,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/end.html#" title=" " alt="" coords="113,56,183,83"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="112,107,184,133"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/is_sorted.html#" title=" " alt="" coords="97,157,199,184"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/begin#" title=" " alt="" coords="109,5,187,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/end#" title=" " alt="" coords="113,56,183,83"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="112,107,184,133"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/is_sorted#" title=" " alt="" coords="97,157,199,184"/>
</map>

View File

@@ -1 +1 @@
396d18f21d4ee25dd94a9b556a854721
20c07cd42dd5ad84824330b180cf0c03

View File

@@ -21,7 +21,7 @@
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/begin.html#" xlink:title=" ">
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/begin#" xlink:title=" ">
<polygon fill="white" stroke="black" points="77.5,-114.5 77.5,-133.5 136.5,-133.5 136.5,-114.5 77.5,-114.5"/>
<text text-anchor="middle" x="107" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::begin</text>
</a>
@@ -36,7 +36,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/end.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/end#" xlink:title=" ">
<polygon fill="white" stroke="black" points="81,-76.5 81,-95.5 133,-95.5 133,-76.5 81,-76.5"/>
<text text-anchor="middle" x="107" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::end</text>
</a>
@@ -51,7 +51,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="80,-38.5 80,-57.5 134,-57.5 134,-38.5 80,-38.5"/>
<text text-anchor="middle" x="107" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -66,7 +66,7 @@
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html#" xlink:title=" ">
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/is_sorted#" xlink:title=" ">
<polygon fill="white" stroke="black" points="69,-0.5 69,-19.5 145,-19.5 145,-0.5 69,-0.5"/>
<text text-anchor="middle" x="107" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::is_sorted</text>
</a>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -1,8 +1,8 @@
<map id="main" name="main">
<area shape="rect" id="node1" title="Main function." alt="" coords="5,81,56,108"/>
<area shape="rect" id="node2" href="$de/d07/cycle__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Test implementations." alt="" coords="104,81,148,108"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/begin.html#" title=" " alt="" coords="207,5,286,32"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/end.html#" title=" " alt="" coords="212,56,281,83"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="211,107,283,133"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/is_sorted.html#" title=" " alt="" coords="196,157,297,184"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/begin#" title=" " alt="" coords="207,5,286,32"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/end#" title=" " alt="" coords="212,56,281,83"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="211,107,283,133"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/is_sorted#" title=" " alt="" coords="196,157,297,184"/>
</map>

View File

@@ -1 +1 @@
c4d8966f0f81d1fcf2b5945b46be0981
8837b20009f460b01a60689ba597fb66

View File

@@ -36,7 +36,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/begin.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/begin#" xlink:title=" ">
<polygon fill="white" stroke="black" points="151.5,-114.5 151.5,-133.5 210.5,-133.5 210.5,-114.5 151.5,-114.5"/>
<text text-anchor="middle" x="181" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::begin</text>
</a>
@@ -51,7 +51,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/end.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/end#" xlink:title=" ">
<polygon fill="white" stroke="black" points="155,-76.5 155,-95.5 207,-95.5 207,-76.5 155,-76.5"/>
<text text-anchor="middle" x="181" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::end</text>
</a>
@@ -66,7 +66,7 @@
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="154,-38.5 154,-57.5 208,-57.5 208,-38.5 154,-38.5"/>
<text text-anchor="middle" x="181" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -81,7 +81,7 @@
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html#" xlink:title=" ">
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/is_sorted#" xlink:title=" ">
<polygon fill="white" stroke="black" points="143,-0.5 143,-19.5 219,-19.5 219,-0.5 143,-0.5"/>
<text text-anchor="middle" x="181" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::is_sorted</text>
</a>

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -1,5 +1,5 @@
<map id="sorting::cycle_sort::cycleSort" name="sorting::cycle_sort::cycleSort">
<area shape="rect" id="node1" title="The main function implements cycleSort." alt="" coords="5,29,135,71"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="183,11,299,38"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="201,62,280,89"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="183,11,299,38"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap#" title=" " alt="" coords="201,62,280,89"/>
</map>

View File

@@ -1 +1 @@
5b053505edef708afa3d6e8c3ea12920
5ea4a30535fa04295e2d4afc4f0944de

View File

@@ -28,7 +28,7 @@
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
<polygon fill="white" stroke="black" points="133,-38.5 133,-57.5 220,-57.5 220,-38.5 133,-38.5"/>
<text text-anchor="middle" x="176.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
@@ -43,7 +43,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap#" xlink:title=" ">
<polygon fill="white" stroke="black" points="147,-0.5 147,-19.5 206,-19.5 206,-0.5 147,-0.5"/>
<text text-anchor="middle" x="176.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
</a>

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: merge_insertion Namespace Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('de/d0a/namespacemerge__insertion.html'
<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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: search/fibonacci_search.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -163,51 +163,51 @@ Functions</h2></td></tr>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>if the array contains the value, returns an index of the element. otherwise -1. </dd></dl>
<div class="fragment"><div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> {</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>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordtype">int</span> last = 0, current = 1;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordtype">int</span> length = arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>(); <span class="comment">// array size</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="comment">// next member of Fibonacci sequence which is &quot;last&quot; + &quot;current&quot;</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordtype">int</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a> = last + current; </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="comment">// &quot;next&quot; will store the smallest Fibonacci number greater or equal to &quot;length&quot;</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">while</span>(next &lt; length){</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> last = current;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> current = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a>;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a> = last + current;</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="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// &quot;offset&quot; is the end of eliminated range from front</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordtype">int</span> offset = -1, index;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="comment">// while loop until there are elements left to consider.</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="comment">// when &quot;next&quot; becomes 1, last is equal to 0, so search is done,</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="comment">// because arr[offset] will already be eliminated</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">while</span>(next &gt; 1){</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="comment">// check if &quot;last&quot; is valid location</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(offset + last, length-1);</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="comment">// if value is greater than the value at &quot;index&quot;, eliminate the subarray from offset to index</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">if</span>(arr[index] &lt; value){</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a> = current;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> current = last;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> last = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a> - current;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> offset = index;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="comment">// if value is less than the value at &quot;index&quot;, eliminate the subarray after index+1</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(arr[index] &gt; value){</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a> = last;</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> current = current - last;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> last = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a> - current;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="comment">// element is found</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">return</span> index;</div>
<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> }</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// comparing the last element</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">if</span>(current &amp;&amp; !arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/empty.html">empty</a>() &amp;&amp; arr[offset+1] == value){</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">return</span> offset+1;</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> }</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="comment">// value was not found, return -1</span></div>
<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 class="fragment"><div class="line"><span class="lineno"> 23</span> {</div>
<div class="line"><span class="lineno"> 24</span> <span class="comment">// initialize last and current members of Fibonacci sequence </span></div>
<div class="line"><span class="lineno"> 25</span> <span class="keywordtype">int</span> last = 0, current = 1;</div>
<div class="line"><span class="lineno"> 26</span> <span class="keywordtype">int</span> length = arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>(); <span class="comment">// array size</span></div>
<div class="line"><span class="lineno"> 27</span> <span class="comment">// next member of Fibonacci sequence which is &quot;last&quot; + &quot;current&quot;</span></div>
<div class="line"><span class="lineno"> 28</span> <span class="keywordtype">int</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a> = last + current; </div>
<div class="line"><span class="lineno"> 29</span> </div>
<div class="line"><span class="lineno"> 30</span> <span class="comment">// &quot;next&quot; will store the smallest Fibonacci number greater or equal to &quot;length&quot;</span></div>
<div class="line"><span class="lineno"> 31</span> <span class="keywordflow">while</span>(next &lt; length){</div>
<div class="line"><span class="lineno"> 32</span> last = current;</div>
<div class="line"><span class="lineno"> 33</span> current = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a>;</div>
<div class="line"><span class="lineno"> 34</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a> = last + current;</div>
<div class="line"><span class="lineno"> 35</span> }</div>
<div class="line"><span class="lineno"> 36</span> </div>
<div class="line"><span class="lineno"> 37</span> <span class="comment">// &quot;offset&quot; is the end of eliminated range from front</span></div>
<div class="line"><span class="lineno"> 38</span> <span class="keywordtype">int</span> offset = -1, index;</div>
<div class="line"><span class="lineno"> 39</span> <span class="comment">// while loop until there are elements left to consider.</span></div>
<div class="line"><span class="lineno"> 40</span> <span class="comment">// when &quot;next&quot; becomes 1, last is equal to 0, so search is done,</span></div>
<div class="line"><span class="lineno"> 41</span> <span class="comment">// because arr[offset] will already be eliminated</span></div>
<div class="line"><span class="lineno"> 42</span> <span class="keywordflow">while</span>(next &gt; 1){</div>
<div class="line"><span class="lineno"> 43</span> <span class="comment">// check if &quot;last&quot; is valid location</span></div>
<div class="line"><span class="lineno"> 44</span> index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(offset + last, length-1);</div>
<div class="line"><span class="lineno"> 45</span> <span class="comment">// if value is greater than the value at &quot;index&quot;, eliminate the subarray from offset to index</span></div>
<div class="line"><span class="lineno"> 46</span> <span class="keywordflow">if</span>(arr[index] &lt; value){</div>
<div class="line"><span class="lineno"> 47</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a> = current;</div>
<div class="line"><span class="lineno"> 48</span> current = last;</div>
<div class="line"><span class="lineno"> 49</span> last = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a> - current;</div>
<div class="line"><span class="lineno"> 50</span> offset = index;</div>
<div class="line"><span class="lineno"> 51</span> <span class="comment">// if value is less than the value at &quot;index&quot;, eliminate the subarray after index+1</span></div>
<div class="line"><span class="lineno"> 52</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(arr[index] &gt; value){</div>
<div class="line"><span class="lineno"> 53</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a> = last;</div>
<div class="line"><span class="lineno"> 54</span> current = current - last;</div>
<div class="line"><span class="lineno"> 55</span> last = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/next.html">next</a> - current;</div>
<div class="line"><span class="lineno"> 56</span> <span class="comment">// element is found</span></div>
<div class="line"><span class="lineno"> 57</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno"> 58</span> <span class="keywordflow">return</span> index;</div>
<div class="line"><span class="lineno"> 59</span> }</div>
<div class="line"><span class="lineno"> 60</span> }</div>
<div class="line"><span class="lineno"> 61</span> <span class="comment">// comparing the last element</span></div>
<div class="line"><span class="lineno"> 62</span> <span class="keywordflow">if</span>(current &amp;&amp; !arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/empty.html">empty</a>() &amp;&amp; arr[offset+1] == value){</div>
<div class="line"><span class="lineno"> 63</span> <span class="keywordflow">return</span> offset+1;</div>
<div class="line"><span class="lineno"> 64</span> }</div>
<div class="line"><span class="lineno"> 65</span> <span class="comment">// value was not found, return -1</span></div>
<div class="line"><span class="lineno"> 66</span> <span class="keywordflow">return</span> -1;</div>
<div class="line"><span class="lineno"> 67</span>}</div>
<div class="ttc" id="aempty_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/empty.html">std::vector::empty</a></div><div class="ttdeci">T empty(T... args)</div></div>
<div class="ttc" id="amin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a></div><div class="ttdeci">T min(T... args)</div></div>
<div class="ttc" id="anext_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/iterator/next.html">std::next</a></div><div class="ttdeci">T next(T... args)</div></div>
@@ -237,11 +237,11 @@ Here is the call graph for this function:</div>
</table>
</div><div class="memdoc">
<p >Main Function testing the algorithm </p>
<div class="fragment"><div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> {</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> assert(<a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#a5e144326104e57a3808aed7eb098db0d">no_occurence_tests</a>());</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> assert(<a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#a2aa09bef74ee063c1331de0883af4f4f">random_tests</a>());</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 123</span> {</div>
<div class="line"><span class="lineno"> 124</span> assert(<a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#a5e144326104e57a3808aed7eb098db0d">no_occurence_tests</a>());</div>
<div class="line"><span class="lineno"> 125</span> assert(<a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#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="../../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> fibonacci_search.cpp:96</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> fibonacci_search.cpp:72</div></div>
</div><!-- fragment --><div class="dynheader">
@@ -269,26 +269,26 @@ Here is the call graph for this function:</div>
</div><div class="memdoc">
<p>random tests for checking performance when an array doesn't contain an element </p>
<div class="fragment"><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="keywordtype">bool</span> passed = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keywordtype">int</span> rand_num, rand_value, index, num_tests = 1000;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> arr;</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">while</span>(num_tests--){</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/clear.html">clear</a>();</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; 100; i++){</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> rand_num = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 1000;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(rand_num);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> }</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> rand_value = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 1000;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">while</span>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/find.html">std::find</a>(arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>(), rand_value) != arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>()){</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/remove.html">std::remove</a>(arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>(), rand_value);</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> }</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/sort.html">sort</a>(arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>());</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> index = <a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#a0bc61b3903d9a53061bf31e5d110fe61">fibonacci_search</a>(arr, rand_value);</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> passed = passed &amp;&amp; (index == -1);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> }</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordflow">return</span> passed;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 72</span> {</div>
<div class="line"><span class="lineno"> 73</span> <span class="keywordtype">bool</span> passed = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 74</span> <span class="keywordtype">int</span> rand_num, rand_value, index, num_tests = 1000;</div>
<div class="line"><span class="lineno"> 75</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> arr;</div>
<div class="line"><span class="lineno"> 76</span> <span class="keywordflow">while</span>(num_tests--){</div>
<div class="line"><span class="lineno"> 77</span> arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/clear.html">clear</a>();</div>
<div class="line"><span class="lineno"> 78</span> <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; 100; i++){</div>
<div class="line"><span class="lineno"> 79</span> rand_num = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 1000;</div>
<div class="line"><span class="lineno"> 80</span> arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(rand_num);</div>
<div class="line"><span class="lineno"> 81</span> }</div>
<div class="line"><span class="lineno"> 82</span> rand_value = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 1000;</div>
<div class="line"><span class="lineno"> 83</span> <span class="keywordflow">while</span>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/find.html">std::find</a>(arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>(), rand_value) != arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>()){</div>
<div class="line"><span class="lineno"> 84</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/remove.html">std::remove</a>(arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>(), rand_value);</div>
<div class="line"><span class="lineno"> 85</span> }</div>
<div class="line"><span class="lineno"> 86</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/sort.html">sort</a>(arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>());</div>
<div class="line"><span class="lineno"> 87</span> index = <a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#a0bc61b3903d9a53061bf31e5d110fe61">fibonacci_search</a>(arr, rand_value);</div>
<div class="line"><span class="lineno"> 88</span> passed = passed &amp;&amp; (index == -1);</div>
<div class="line"><span class="lineno"> 89</span> }</div>
<div class="line"><span class="lineno"> 90</span> <span class="keywordflow">return</span> passed;</div>
<div class="line"><span class="lineno"> 91</span>}</div>
<div class="ttc" id="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/begin.html">std::vector::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
<div class="ttc" id="aclear_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/clear.html">std::vector::clear</a></div><div class="ttdeci">T clear(T... args)</div></div>
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/end.html">std::vector::end</a></div><div class="ttdeci">T end(T... args)</div></div>
@@ -298,7 +298,7 @@ Here is the call graph for this function:</div>
<div class="ttc" id="arand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a></div><div class="ttdeci">T rand(T... args)</div></div>
<div class="ttc" id="aremove_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/remove.html">std::remove</a></div><div class="ttdeci">T remove(T... args)</div></div>
<div class="ttc" id="asort_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/sort.html">std::sort</a></div><div class="ttdeci">T sort(T... args)</div></div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt; int &gt;</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -324,28 +324,28 @@ Here is the call graph for this function:</div>
</div><div class="memdoc">
<p>random tests which cover cases when we have one, multiple or zero occurences of the value we're looking for </p>
<div class="fragment"><div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordtype">bool</span> passed = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordtype">int</span> rand_num, rand_value, index, real_value, num_tests = 10000;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> arr;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordflow">while</span>(num_tests--){</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/clear.html">clear</a>();</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; 100; i++){</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> rand_num = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 1000;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(rand_num);</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> }</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> rand_value = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 1000;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/sort.html">std::sort</a>(arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>());</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> index = <a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#a0bc61b3903d9a53061bf31e5d110fe61">fibonacci_search</a>(arr, rand_value);</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">if</span>(index != -1){</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> real_value = arr[index];</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> passed = passed &amp;&amp; (real_value == rand_value);</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> passed = passed &amp;&amp; (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/find.html">std::find</a>(arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>(), rand_value) == arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>());</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> }</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> }</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">return</span> passed;</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 96</span> {</div>
<div class="line"><span class="lineno"> 97</span> <span class="keywordtype">bool</span> passed = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 98</span> <span class="keywordtype">int</span> rand_num, rand_value, index, real_value, num_tests = 10000;</div>
<div class="line"><span class="lineno"> 99</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> arr;</div>
<div class="line"><span class="lineno"> 100</span> <span class="keywordflow">while</span>(num_tests--){</div>
<div class="line"><span class="lineno"> 101</span> arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/clear.html">clear</a>();</div>
<div class="line"><span class="lineno"> 102</span> <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; 100; i++){</div>
<div class="line"><span class="lineno"> 103</span> rand_num = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 1000;</div>
<div class="line"><span class="lineno"> 104</span> arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(rand_num);</div>
<div class="line"><span class="lineno"> 105</span> }</div>
<div class="line"><span class="lineno"> 106</span> rand_value = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 1000;</div>
<div class="line"><span class="lineno"> 107</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/sort.html">std::sort</a>(arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>());</div>
<div class="line"><span class="lineno"> 108</span> index = <a class="code hl_function" href="../../de/d0d/fibonacci__search_8cpp.html#a0bc61b3903d9a53061bf31e5d110fe61">fibonacci_search</a>(arr, rand_value);</div>
<div class="line"><span class="lineno"> 109</span> <span class="keywordflow">if</span>(index != -1){</div>
<div class="line"><span class="lineno"> 110</span> real_value = arr[index];</div>
<div class="line"><span class="lineno"> 111</span> passed = passed &amp;&amp; (real_value == rand_value);</div>
<div class="line"><span class="lineno"> 112</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno"> 113</span> passed = passed &amp;&amp; (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/find.html">std::find</a>(arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>(), rand_value) == arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>());</div>
<div class="line"><span class="lineno"> 114</span> }</div>
<div class="line"><span class="lineno"> 115</span> }</div>
<div class="line"><span class="lineno"> 116</span> <span class="keywordflow">return</span> passed;</div>
<div class="line"><span class="lineno"> 117</span>}</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -361,7 +361,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_19b2bf9199a15c634a08b1ede1dd896a.html">search</a></li><li class="navelem"><a class="el" href="../../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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -1,6 +1,6 @@
<map id="fibonacci_search" name="fibonacci_search">
<area shape="rect" id="node1" title="using fibonacci search algorithm finds an index of a given element in a sorted array" alt="" coords="5,56,125,83"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/empty.html#" title=" " alt="" coords="173,5,301,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min.html#" title=" " alt="" coords="203,56,272,83"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="179,107,295,133"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/empty#" title=" " alt="" coords="173,5,301,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min#" title=" " alt="" coords="203,56,272,83"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="179,107,295,133"/>
</map>

View File

@@ -1 +1 @@
063ff784a58a57351610ed3cc44df002
5a386a23760e75dfb7cb11b1ca465671

View File

@@ -21,7 +21,7 @@
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/empty.html#" xlink:title=" ">
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/empty#" xlink:title=" ">
<polygon fill="white" stroke="black" points="126,-76.5 126,-95.5 222,-95.5 222,-76.5 126,-76.5"/>
<text text-anchor="middle" x="174" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::empty</text>
</a>
@@ -36,7 +36,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min#" xlink:title=" ">
<polygon fill="white" stroke="black" points="148,-38.5 148,-57.5 200,-57.5 200,-38.5 148,-38.5"/>
<text text-anchor="middle" x="174" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
</a>
@@ -51,7 +51,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
<polygon fill="white" stroke="black" points="130.5,-0.5 130.5,-19.5 217.5,-19.5 217.5,-0.5 130.5,-0.5"/>
<text text-anchor="middle" x="174" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -1,14 +1,14 @@
<map id="random_tests" name="random_tests">
<area shape="rect" id="node1" title="random tests which cover cases when we have one, multiple or zero occurences of the value we&#39;re looki..." alt="" coords="5,183,107,209"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/begin.html#" title=" " alt="" coords="171,5,293,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/clear.html#" title=" " alt="" coords="172,56,292,83"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end.html#" title=" " alt="" coords="175,107,289,133"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/begin#" title=" " alt="" coords="171,5,293,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/clear#" title=" " alt="" coords="172,56,292,83"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end#" title=" " alt="" coords="175,107,289,133"/>
<area shape="rect" id="node5" href="$de/d0d/fibonacci__search_8cpp.html#a0bc61b3903d9a53061bf31e5d110fe61" title="using fibonacci search algorithm finds an index of a given element in a sorted array" alt="" coords="172,157,292,184"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/find.html#" title=" " alt="" coords="197,208,267,235"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="155,259,309,285"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand.html#" title=" " alt="" coords="195,309,269,336"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/sort.html#" title=" " alt="" coords="197,360,267,387"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/empty.html#" title=" " alt="" coords="357,107,485,133"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min.html#" title=" " alt="" coords="387,157,456,184"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="363,208,479,235"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/find#" title=" " alt="" coords="197,208,267,235"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back#" title=" " alt="" coords="155,259,309,285"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand#" title=" " alt="" coords="195,309,269,336"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/sort#" title=" " alt="" coords="197,360,267,387"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/empty#" title=" " alt="" coords="357,107,485,133"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min#" title=" " alt="" coords="387,157,456,184"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="363,208,479,235"/>
</map>

View File

@@ -1 +1 @@
090020658332cc4ae4bf1c5a1195a05e
2d552b09eb9d20915a9694cac447dd25

View File

@@ -21,7 +21,7 @@
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/begin.html#" xlink:title=" ">
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/begin#" xlink:title=" ">
<polygon fill="white" stroke="black" points="124,-266.5 124,-285.5 216,-285.5 216,-266.5 124,-266.5"/>
<text text-anchor="middle" x="170" y="-273.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::begin</text>
</a>
@@ -36,7 +36,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/clear.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/clear#" xlink:title=" ">
<polygon fill="white" stroke="black" points="125,-228.5 125,-247.5 215,-247.5 215,-228.5 125,-228.5"/>
<text text-anchor="middle" x="170" y="-235.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::clear</text>
</a>
@@ -51,7 +51,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/end.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/end#" xlink:title=" ">
<polygon fill="white" stroke="black" points="127.5,-190.5 127.5,-209.5 212.5,-209.5 212.5,-190.5 127.5,-190.5"/>
<text text-anchor="middle" x="170" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::end</text>
</a>
@@ -81,7 +81,7 @@
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/find.html#" xlink:title=" ">
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/find#" xlink:title=" ">
<polygon fill="white" stroke="black" points="144,-114.5 144,-133.5 196,-133.5 196,-114.5 144,-114.5"/>
<text text-anchor="middle" x="170" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::find</text>
</a>
@@ -96,7 +96,7 @@
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
<polygon fill="white" stroke="black" points="112,-76.5 112,-95.5 228,-95.5 228,-76.5 112,-76.5"/>
<text text-anchor="middle" x="170" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>
@@ -111,7 +111,7 @@
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand.html#" xlink:title=" ">
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand#" xlink:title=" ">
<polygon fill="white" stroke="black" points="142.5,-38.5 142.5,-57.5 197.5,-57.5 197.5,-38.5 142.5,-38.5"/>
<text text-anchor="middle" x="170" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::rand</text>
</a>
@@ -126,7 +126,7 @@
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/sort.html#" xlink:title=" ">
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/sort#" xlink:title=" ">
<polygon fill="white" stroke="black" points="143.5,-0.5 143.5,-19.5 196.5,-19.5 196.5,-0.5 143.5,-0.5"/>
<text text-anchor="middle" x="170" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sort</text>
</a>
@@ -141,7 +141,7 @@
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/empty.html#" xlink:title=" ">
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/empty#" xlink:title=" ">
<polygon fill="white" stroke="black" points="264,-190.5 264,-209.5 360,-209.5 360,-190.5 264,-190.5"/>
<text text-anchor="middle" x="312" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::empty</text>
</a>
@@ -156,7 +156,7 @@
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min.html#" xlink:title=" ">
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min#" xlink:title=" ">
<polygon fill="white" stroke="black" points="286,-152.5 286,-171.5 338,-171.5 338,-152.5 286,-152.5"/>
<text text-anchor="middle" x="312" y="-159.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
</a>
@@ -171,7 +171,7 @@
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
<polygon fill="white" stroke="black" points="268.5,-114.5 268.5,-133.5 355.5,-133.5 355.5,-114.5 268.5,-114.5"/>
<text text-anchor="middle" x="312" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

@@ -1,14 +1,14 @@
<map id="no_occurence_tests" name="no_occurence_tests">
<area shape="rect" id="node1" title="random tests for checking performance when an array doesn&#39;t contain an element" alt="" coords="5,183,144,209"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/begin.html#" title=" " alt="" coords="208,5,331,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/clear.html#" title=" " alt="" coords="209,56,329,83"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end.html#" title=" " alt="" coords="213,107,326,133"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/begin#" title=" " alt="" coords="208,5,331,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/clear#" title=" " alt="" coords="209,56,329,83"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end#" title=" " alt="" coords="213,107,326,133"/>
<area shape="rect" id="node5" href="$de/d0d/fibonacci__search_8cpp.html#a0bc61b3903d9a53061bf31e5d110fe61" title="using fibonacci search algorithm finds an index of a given element in a sorted array" alt="" coords="209,157,329,184"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/find.html#" title=" " alt="" coords="235,208,304,235"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="192,259,347,285"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand.html#" title=" " alt="" coords="233,309,306,336"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/remove.html#" title=" " alt="" coords="224,360,315,387"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/empty.html#" title=" " alt="" coords="395,107,523,133"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min.html#" title=" " alt="" coords="424,157,493,184"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="401,208,517,235"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/find#" title=" " alt="" coords="235,208,304,235"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back#" title=" " alt="" coords="192,259,347,285"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand#" title=" " alt="" coords="233,309,306,336"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/remove#" title=" " alt="" coords="224,360,315,387"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/empty#" title=" " alt="" coords="395,107,523,133"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min#" title=" " alt="" coords="424,157,493,184"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="401,208,517,235"/>
</map>

View File

@@ -1 +1 @@
a2d632cc9344efe20fc17531568a90c0
6ea1a5d2c02deb9e7d0f8519c4fac786

View File

@@ -21,7 +21,7 @@
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/begin.html#" xlink:title=" ">
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/begin#" xlink:title=" ">
<polygon fill="white" stroke="black" points="152,-266.5 152,-285.5 244,-285.5 244,-266.5 152,-266.5"/>
<text text-anchor="middle" x="198" y="-273.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::begin</text>
</a>
@@ -36,7 +36,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/clear.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/clear#" xlink:title=" ">
<polygon fill="white" stroke="black" points="153,-228.5 153,-247.5 243,-247.5 243,-228.5 153,-228.5"/>
<text text-anchor="middle" x="198" y="-235.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::clear</text>
</a>
@@ -51,7 +51,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/end.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/end#" xlink:title=" ">
<polygon fill="white" stroke="black" points="155.5,-190.5 155.5,-209.5 240.5,-209.5 240.5,-190.5 155.5,-190.5"/>
<text text-anchor="middle" x="198" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::end</text>
</a>
@@ -81,7 +81,7 @@
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/find.html#" xlink:title=" ">
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/find#" xlink:title=" ">
<polygon fill="white" stroke="black" points="172,-114.5 172,-133.5 224,-133.5 224,-114.5 172,-114.5"/>
<text text-anchor="middle" x="198" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::find</text>
</a>
@@ -96,7 +96,7 @@
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
<polygon fill="white" stroke="black" points="140,-76.5 140,-95.5 256,-95.5 256,-76.5 140,-76.5"/>
<text text-anchor="middle" x="198" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>
@@ -111,7 +111,7 @@
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand.html#" xlink:title=" ">
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand#" xlink:title=" ">
<polygon fill="white" stroke="black" points="170.5,-38.5 170.5,-57.5 225.5,-57.5 225.5,-38.5 170.5,-38.5"/>
<text text-anchor="middle" x="198" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::rand</text>
</a>
@@ -126,7 +126,7 @@
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/remove.html#" xlink:title=" ">
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/remove#" xlink:title=" ">
<polygon fill="white" stroke="black" points="164,-0.5 164,-19.5 232,-19.5 232,-0.5 164,-0.5"/>
<text text-anchor="middle" x="198" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::remove</text>
</a>
@@ -141,7 +141,7 @@
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/empty.html#" xlink:title=" ">
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/empty#" xlink:title=" ">
<polygon fill="white" stroke="black" points="292,-190.5 292,-209.5 388,-209.5 388,-190.5 292,-190.5"/>
<text text-anchor="middle" x="340" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::empty</text>
</a>
@@ -156,7 +156,7 @@
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min.html#" xlink:title=" ">
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min#" xlink:title=" ">
<polygon fill="white" stroke="black" points="314,-152.5 314,-171.5 366,-171.5 366,-152.5 314,-152.5"/>
<text text-anchor="middle" x="340" y="-159.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
</a>
@@ -171,7 +171,7 @@
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
<polygon fill="white" stroke="black" points="296.5,-114.5 296.5,-133.5 383.5,-133.5 383.5,-114.5 296.5,-114.5"/>
<text text-anchor="middle" x="340" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

@@ -2,16 +2,16 @@
<area shape="rect" id="node1" title=" " alt="" coords="5,208,56,235"/>
<area shape="rect" id="node2" href="$de/d0d/fibonacci__search_8cpp.html#a5e144326104e57a3808aed7eb098db0d" title="random tests for checking performance when an array doesn&#39;t contain an element" alt="" coords="104,233,243,260"/>
<area shape="rect" id="node14" href="$de/d0d/fibonacci__search_8cpp.html#a2aa09bef74ee063c1331de0883af4f4f" title="random tests which cover cases when we have one, multiple or zero occurences of the value we&#39;re looki..." alt="" coords="123,183,224,209"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/begin.html#" title=" " alt="" coords="307,309,429,336"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/clear.html#" title=" " alt="" coords="308,360,428,387"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end.html#" title=" " alt="" coords="311,56,425,83"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/begin#" title=" " alt="" coords="307,309,429,336"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/clear#" title=" " alt="" coords="308,360,428,387"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end#" title=" " alt="" coords="311,56,425,83"/>
<area shape="rect" id="node6" href="$de/d0d/fibonacci__search_8cpp.html#a0bc61b3903d9a53061bf31e5d110fe61" title="using fibonacci search algorithm finds an index of a given element in a sorted array" alt="" coords="308,107,428,133"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/find.html#" title=" " alt="" coords="333,157,403,184"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="291,208,445,235"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand.html#" title=" " alt="" coords="331,259,405,285"/>
<area shape="rect" id="node13" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/remove.html#" title=" " alt="" coords="323,411,413,437"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/empty.html#" title=" " alt="" coords="493,56,621,83"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min.html#" title=" " alt="" coords="523,107,592,133"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="499,157,615,184"/>
<area shape="rect" id="node15" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/sort.html#" title=" " alt="" coords="333,5,403,32"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/find#" title=" " alt="" coords="333,157,403,184"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back#" title=" " alt="" coords="291,208,445,235"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand#" title=" " alt="" coords="331,259,405,285"/>
<area shape="rect" id="node13" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/remove#" title=" " alt="" coords="323,411,413,437"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/empty#" title=" " alt="" coords="493,56,621,83"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min#" title=" " alt="" coords="523,107,592,133"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="499,157,615,184"/>
<area shape="rect" id="node15" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/sort#" title=" " alt="" coords="333,5,403,32"/>
</map>

View File

@@ -1 +1 @@
adfe60d208ce172c9f899542fe69b197
e363605a5346c621e94da5ef6800d8c5

View File

@@ -51,7 +51,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/begin.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/begin#" xlink:title=" ">
<polygon fill="white" stroke="black" points="226,-76.5 226,-95.5 318,-95.5 318,-76.5 226,-76.5"/>
<text text-anchor="middle" x="272" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::begin</text>
</a>
@@ -66,7 +66,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/clear.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/clear#" xlink:title=" ">
<polygon fill="white" stroke="black" points="227,-38.5 227,-57.5 317,-57.5 317,-38.5 227,-38.5"/>
<text text-anchor="middle" x="272" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::clear</text>
</a>
@@ -81,7 +81,7 @@
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/end.html#" xlink:title=" ">
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/end#" xlink:title=" ">
<polygon fill="white" stroke="black" points="229.5,-266.5 229.5,-285.5 314.5,-285.5 314.5,-266.5 229.5,-266.5"/>
<text text-anchor="middle" x="272" y="-273.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::end</text>
</a>
@@ -111,7 +111,7 @@
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/find.html#" xlink:title=" ">
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/find#" xlink:title=" ">
<polygon fill="white" stroke="black" points="246,-190.5 246,-209.5 298,-209.5 298,-190.5 246,-190.5"/>
<text text-anchor="middle" x="272" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::find</text>
</a>
@@ -126,7 +126,7 @@
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
<polygon fill="white" stroke="black" points="214,-152.5 214,-171.5 330,-171.5 330,-152.5 214,-152.5"/>
<text text-anchor="middle" x="272" y="-159.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>
@@ -141,7 +141,7 @@
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand.html#" xlink:title=" ">
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand#" xlink:title=" ">
<polygon fill="white" stroke="black" points="244.5,-114.5 244.5,-133.5 299.5,-133.5 299.5,-114.5 244.5,-114.5"/>
<text text-anchor="middle" x="272" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::rand</text>
</a>
@@ -156,7 +156,7 @@
<!-- Node13 -->
<g id="node13" class="node">
<title>Node13</title>
<g id="a_node13"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/remove.html#" xlink:title=" ">
<g id="a_node13"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/remove#" xlink:title=" ">
<polygon fill="white" stroke="black" points="238,-0.5 238,-19.5 306,-19.5 306,-0.5 238,-0.5"/>
<text text-anchor="middle" x="272" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::remove</text>
</a>
@@ -171,7 +171,7 @@
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/empty.html#" xlink:title=" ">
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/empty#" xlink:title=" ">
<polygon fill="white" stroke="black" points="366,-266.5 366,-285.5 462,-285.5 462,-266.5 366,-266.5"/>
<text text-anchor="middle" x="414" y="-273.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::empty</text>
</a>
@@ -186,7 +186,7 @@
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min.html#" xlink:title=" ">
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min#" xlink:title=" ">
<polygon fill="white" stroke="black" points="388,-228.5 388,-247.5 440,-247.5 440,-228.5 388,-228.5"/>
<text text-anchor="middle" x="414" y="-235.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
</a>
@@ -201,7 +201,7 @@
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
<polygon fill="white" stroke="black" points="370.5,-190.5 370.5,-209.5 457.5,-209.5 457.5,-190.5 370.5,-190.5"/>
<text text-anchor="middle" x="414" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
@@ -258,7 +258,7 @@
<!-- Node15 -->
<g id="node15" class="node">
<title>Node15</title>
<g id="a_node15"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/sort.html#" xlink:title=" ">
<g id="a_node15"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/sort#" xlink:title=" ">
<polygon fill="white" stroke="black" points="245.5,-304.5 245.5,-323.5 298.5,-323.5 298.5,-304.5 245.5,-304.5"/>
<text text-anchor="middle" x="272" y="-311.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sort</text>
</a>

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: Member List</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -107,7 +107,7 @@ $(document).ready(function(){initNavTree('d6/dc1/classmath_1_1ncr__modulo__p_1_1
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: data_structures/disjoint_set.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -156,13 +156,13 @@ Variables</h2></td></tr>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> root = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">vector&lt;int&gt;</a>(n + 1);</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> rank = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">vector&lt;int&gt;</a>(n + 1, 1);</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt;= n; ++i) {</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> root[i] = i;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> }</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 37</span> {</div>
<div class="line"><span class="lineno"> 38</span> root = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">vector&lt;int&gt;</a>(n + 1);</div>
<div class="line"><span class="lineno"> 39</span> rank = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">vector&lt;int&gt;</a>(n + 1, 1);</div>
<div class="line"><span class="lineno"> 40</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt;= n; ++i) {</div>
<div class="line"><span class="lineno"> 41</span> root[i] = i;</div>
<div class="line"><span class="lineno"> 42</span> }</div>
<div class="line"><span class="lineno"> 43</span>}</div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
</div><!-- fragment -->
</div>
@@ -189,12 +189,12 @@ Variables</h2></td></tr>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>set to which x belongs to </dd></dl>
<div class="fragment"><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> <span class="keywordflow">if</span> (root[x] == x) {</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">return</span> x;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> }</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="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 class="fragment"><div class="line"><span class="lineno"> 53</span> {</div>
<div class="line"><span class="lineno"> 54</span> <span class="keywordflow">if</span> (root[x] == x) {</div>
<div class="line"><span class="lineno"> 55</span> <span class="keywordflow">return</span> x;</div>
<div class="line"><span class="lineno"> 56</span> }</div>
<div class="line"><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"><span class="lineno"> 58</span>}</div>
<div class="ttc" id="adisjoint__set_8cpp_html_a34b9ead0608e676d9ae5188672427cc8"><div class="ttname"><a href="../../de/d23/disjoint__set_8cpp.html#a34b9ead0608e676d9ae5188672427cc8">Find</a></div><div class="ttdeci">int Find(int x)</div><div class="ttdef"><b>Definition:</b> disjoint_set.cpp:53</div></div>
</div><!-- fragment -->
</div>
@@ -231,7 +231,7 @@ Variables</h2></td></tr>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span>{ <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="fragment"><div class="line"><span class="lineno"> 67</span>{ <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><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -257,28 +257,28 @@ Here is the call graph for this function:</div>
</table>
</div><div class="memdoc">
<p >Main function </p>
<div class="fragment"><div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> {</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="comment">// tests CreateSet &amp; Find</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordtype">int</span> n = 100;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a010965fc5f16cca5a62506afab24e4ec">CreateSet</a>(n);</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt;= 100; ++i) {</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">if</span> (root[i] != i) {</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;Fail&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> }</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> }</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="comment">// tests InSameUnion &amp; Union</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;1 and 2 are initially not in the same subset&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a2fb0a7cd26a477e2d48ba7e0118bc985">InSameUnion</a>(1, 2)) {</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;Fail&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> }</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a44481bb75386fbb0f958a388d4b9f757">Union</a>(1, 2);</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;1 and 2 are now in the same subset&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a2fb0a7cd26a477e2d48ba7e0118bc985">InSameUnion</a>(1, 2)) {</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;Fail&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> }</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 93</span> {</div>
<div class="line"><span class="lineno"> 94</span> <span class="comment">// tests CreateSet &amp; Find</span></div>
<div class="line"><span class="lineno"> 95</span> <span class="keywordtype">int</span> n = 100;</div>
<div class="line"><span class="lineno"> 96</span> <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a010965fc5f16cca5a62506afab24e4ec">CreateSet</a>(n);</div>
<div class="line"><span class="lineno"> 97</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt;= 100; ++i) {</div>
<div class="line"><span class="lineno"> 98</span> <span class="keywordflow">if</span> (root[i] != i) {</div>
<div class="line"><span class="lineno"> 99</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;Fail&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><span class="lineno"> 100</span> <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno"> 101</span> }</div>
<div class="line"><span class="lineno"> 102</span> }</div>
<div class="line"><span class="lineno"> 103</span> <span class="comment">// tests InSameUnion &amp; Union</span></div>
<div class="line"><span class="lineno"> 104</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;1 and 2 are initially not in the same subset&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><span class="lineno"> 105</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a2fb0a7cd26a477e2d48ba7e0118bc985">InSameUnion</a>(1, 2)) {</div>
<div class="line"><span class="lineno"> 106</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;Fail&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><span class="lineno"> 107</span> }</div>
<div class="line"><span class="lineno"> 108</span> <a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a44481bb75386fbb0f958a388d4b9f757">Union</a>(1, 2);</div>
<div class="line"><span class="lineno"> 109</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;1 and 2 are now in the same subset&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><span class="lineno"> 110</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="../../de/d23/disjoint__set_8cpp.html#a2fb0a7cd26a477e2d48ba7e0118bc985">InSameUnion</a>(1, 2)) {</div>
<div class="line"><span class="lineno"> 111</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> &lt;&lt; <span class="stringliteral">&quot;Fail&quot;</span> &lt;&lt; <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
<div class="line"><span class="lineno"> 112</span> }</div>
<div class="line"><span class="lineno"> 113</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 114</span>}</div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="adisjoint__set_8cpp_html_a010965fc5f16cca5a62506afab24e4ec"><div class="ttname"><a href="../../de/d23/disjoint__set_8cpp.html#a010965fc5f16cca5a62506afab24e4ec">CreateSet</a></div><div class="ttdeci">void CreateSet(int n)</div><div class="ttdef"><b>Definition:</b> disjoint_set.cpp:37</div></div>
<div class="ttc" id="adisjoint__set_8cpp_html_a2fb0a7cd26a477e2d48ba7e0118bc985"><div class="ttname"><a href="../../de/d23/disjoint__set_8cpp.html#a2fb0a7cd26a477e2d48ba7e0118bc985">InSameUnion</a></div><div class="ttdeci">bool InSameUnion(int x, int y)</div><div class="ttdef"><b>Definition:</b> disjoint_set.cpp:67</div></div>
@@ -325,19 +325,19 @@ Here is the call graph for this function:</div>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> {</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="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>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">if</span> (a != b) {</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordflow">if</span> (rank[a] &lt; rank[b]) {</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> root[a] = b;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (rank[a] &gt; rank[b]) {</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> root[b] = a;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> root[a] = b;</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> ++rank[b];</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> }</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> }</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 78</span> {</div>
<div class="line"><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>
<div class="line"><span class="lineno"> 80</span> <span class="keywordflow">if</span> (a != b) {</div>
<div class="line"><span class="lineno"> 81</span> <span class="keywordflow">if</span> (rank[a] &lt; rank[b]) {</div>
<div class="line"><span class="lineno"> 82</span> root[a] = b;</div>
<div class="line"><span class="lineno"> 83</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (rank[a] &gt; rank[b]) {</div>
<div class="line"><span class="lineno"> 84</span> root[b] = a;</div>
<div class="line"><span class="lineno"> 85</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno"> 86</span> root[a] = b;</div>
<div class="line"><span class="lineno"> 87</span> ++rank[b];</div>
<div class="line"><span class="lineno"> 88</span> }</div>
<div class="line"><span class="lineno"> 89</span> }</div>
<div class="line"><span class="lineno"> 90</span>}</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -353,7 +353,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html">data_structures</a></li><li class="navelem"><a class="el" href="../../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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: Member List</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -109,7 +109,7 @@ $(document).ready(function(){initNavTree('dd/d91/class_fenwick_tree.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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: operations_on_datastructures/circular_linked_list.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -177,10 +177,10 @@ Functions</h2></td></tr>
<p>main function </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> {</div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> <a class="code hl_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 class="fragment"><div class="line"><span class="lineno"> 345</span> {</div>
<div class="line"><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"><span class="lineno"> 347</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 348</span>}</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> circular_linked_list.cpp:333</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -216,13 +216,13 @@ Here is the call graph for this function:</div>
<p>Function to test the correctness of the Circular Linked List. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> {</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>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> <a class="code hl_function" href="../../d9/df4/namespacetests.html#abdd77344d4af8fd56d14a5cabbf2f669">tests::test2</a>();</div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> <a class="code hl_function" href="../../d9/df4/namespacetests.html#aa515639572647508b94986489aab6d76">tests::test3</a>();</div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> <a class="code hl_function" href="../../d9/df4/namespacetests.html#a2b9769e44683dcb67fe1083ad91e134d">tests::test4</a>();</div>
<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 class="fragment"><div class="line"><span class="lineno"> 333</span> {</div>
<div class="line"><span class="lineno"> 334</span> <a class="code hl_function" href="../../d9/df4/namespacetests.html#a167c24bd817469ae47358d12e034f2d5">tests::test1</a>();</div>
<div class="line"><span class="lineno"> 335</span> <a class="code hl_function" href="../../d9/df4/namespacetests.html#abdd77344d4af8fd56d14a5cabbf2f669">tests::test2</a>();</div>
<div class="line"><span class="lineno"> 336</span> <a class="code hl_function" href="../../d9/df4/namespacetests.html#aa515639572647508b94986489aab6d76">tests::test3</a>();</div>
<div class="line"><span class="lineno"> 337</span> <a class="code hl_function" href="../../d9/df4/namespacetests.html#a2b9769e44683dcb67fe1083ad91e134d">tests::test4</a>();</div>
<div class="line"><span class="lineno"> 338</span> <a class="code hl_function" href="../../d9/df4/namespacetests.html#af7b81d7a1534216af6a36a80135beb86">tests::test5</a>();</div>
<div class="line"><span class="lineno"> 339</span>}</div>
<div class="ttc" id="anamespacetests_html_a167c24bd817469ae47358d12e034f2d5"><div class="ttname"><a href="../../d9/df4/namespacetests.html#a167c24bd817469ae47358d12e034f2d5">tests::test1</a></div><div class="ttdeci">void test1()</div><div class="ttdoc">A Test to check an simple case.</div><div class="ttdef"><b>Definition:</b> array_left_rotation.cpp:75</div></div>
<div class="ttc" id="anamespacetests_html_a2b9769e44683dcb67fe1083ad91e134d"><div class="ttname"><a href="../../d9/df4/namespacetests.html#a2b9769e44683dcb67fe1083ad91e134d">tests::test4</a></div><div class="ttdeci">void test4()</div><div class="ttdoc">A Test to check a very large input.</div><div class="ttdef"><b>Definition:</b> array_left_rotation.cpp:120</div></div>
<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> array_left_rotation.cpp:105</div></div>
@@ -243,7 +243,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -7,8 +7,8 @@
<area shape="rect" id="node12" href="$d9/df4/namespacetests.html#af7b81d7a1534216af6a36a80135beb86" title="A Test to check a shift of zero." alt="" coords="97,5,185,32"/>
<area shape="rect" id="node3" href="$d8/ddf/sieve__of__eratosthenes_8cpp.html#a235843bdf82d2a6cc8596ae8fd3b8df9" title=" " alt="" coords="307,136,353,163"/>
<area shape="rect" id="node6" href="$da/d6d/namespaceoperations__on__datastructures.html#afce39cf843989a39811a49ebe29dd6d8" title="Shifts the given vector to the left by the shift amount and returns a new vector with the result...." alt="" coords="233,70,427,111"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="497,183,569,209"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="497,183,569,209"/>
<area shape="rect" id="node5" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title="for IO operations" alt="" coords="497,132,568,159"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="475,77,591,104"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="253,208,407,235"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="475,77,591,104"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back#" title=" " alt="" coords="253,208,407,235"/>
</map>

View File

@@ -1 +1 @@
ebcbcc6dcb35f22238db8a6048e6db60
aa23eed3bffd63984402391738a6133b

View File

@@ -127,7 +127,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="368.5,-19.5 368.5,-38.5 422.5,-38.5 422.5,-19.5 368.5,-19.5"/>
<text text-anchor="middle" x="395.5" y="-26.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -157,7 +157,7 @@
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
<polygon fill="white" stroke="black" points="352,-98.5 352,-117.5 439,-117.5 439,-98.5 352,-98.5"/>
<text text-anchor="middle" x="395.5" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
@@ -208,7 +208,7 @@
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
<polygon fill="white" stroke="black" points="185.5,-0.5 185.5,-19.5 301.5,-19.5 301.5,-0.5 185.5,-0.5"/>
<text text-anchor="middle" x="243.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -8,8 +8,8 @@
<area shape="rect" id="node13" href="$d9/df4/namespacetests.html#af7b81d7a1534216af6a36a80135beb86" title="A Test to check a shift of zero." alt="" coords="196,5,284,32"/>
<area shape="rect" id="node4" href="$d8/ddf/sieve__of__eratosthenes_8cpp.html#a235843bdf82d2a6cc8596ae8fd3b8df9" title=" " alt="" coords="405,136,452,163"/>
<area shape="rect" id="node7" href="$da/d6d/namespaceoperations__on__datastructures.html#afce39cf843989a39811a49ebe29dd6d8" title="Shifts the given vector to the left by the shift amount and returns a new vector with the result...." alt="" coords="332,70,525,111"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="595,183,667,209"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="595,183,667,209"/>
<area shape="rect" id="node6" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title="for IO operations" alt="" coords="596,132,667,159"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="573,77,689,104"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="351,208,506,235"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="573,77,689,104"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back#" title=" " alt="" coords="351,208,506,235"/>
</map>

View File

@@ -1 +1 @@
b0da492e8619afccf643b3c111ac9498
11d007e86d96fac9a346c73764650758

View File

@@ -188,7 +188,7 @@ var sectionId = 'dynsection-1';
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="442.5,-19.5 442.5,-38.5 496.5,-38.5 496.5,-19.5 442.5,-19.5"/>
<text text-anchor="middle" x="469.5" y="-26.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -218,7 +218,7 @@ var sectionId = 'dynsection-1';
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
<polygon fill="white" stroke="black" points="426,-98.5 426,-117.5 513,-117.5 513,-98.5 426,-98.5"/>
<text text-anchor="middle" x="469.5" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
@@ -269,7 +269,7 @@ var sectionId = 'dynsection-1';
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
<polygon fill="white" stroke="black" points="259.5,-0.5 259.5,-19.5 375.5,-19.5 375.5,-0.5 259.5,-0.5"/>
<text text-anchor="middle" x="317.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -142,7 +142,7 @@
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="442.5,-19.5 442.5,-38.5 496.5,-38.5 496.5,-19.5 442.5,-19.5"/>
<text text-anchor="middle" x="469.5" y="-26.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -172,7 +172,7 @@
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
<polygon fill="white" stroke="black" points="426,-98.5 426,-117.5 513,-117.5 513,-98.5 426,-98.5"/>
<text text-anchor="middle" x="469.5" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
@@ -223,7 +223,7 @@
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
<polygon fill="white" stroke="black" points="259.5,-0.5 259.5,-19.5 375.5,-19.5 375.5,-0.5 259.5,-0.5"/>
<text text-anchor="middle" x="317.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,4 @@
<map id="data_structures::linked_list::link" name="data_structures::linked_list::link">
<area shape="rect" id="node1" title=" " alt="" coords="5,5,160,47"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/memory/shared_ptr" title=" " alt="" coords="6,109,159,165"/>
</map>

View File

@@ -0,0 +1 @@
e2b8ece80303039a2b5593769531e5fa

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.50.0 (20211204.2007)
-->
<!-- Title: data_structures::linked_list::link Pages: 1 -->
<svg width="124pt" height="128pt"
viewBox="0.00 0.00 124.00 128.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 124)">
<title>data_structures::linked_list::link</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-124 120,-124 120,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title=" ">
<polygon fill="#bfbfbf" stroke="black" points="0,-89.5 0,-119.5 116,-119.5 116,-89.5 0,-89.5"/>
<text text-anchor="start" x="8" y="-107.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
<text text-anchor="middle" x="58" y="-96.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::link</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/memory/shared_ptr" xlink:title=" ">
<polygon fill="white" stroke="black" points="0.5,-0.5 0.5,-41.5 115.5,-41.5 115.5,-0.5 0.5,-0.5"/>
<text text-anchor="start" x="8.5" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::shared_ptr&lt; data</text>
<text text-anchor="start" x="8.5" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_structures::linked_list</text>
<text text-anchor="middle" x="58" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::link &gt;</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M42.64,-80.55C41.15,-77.44 39.87,-74.22 39,-71 36.33,-61.14 39.63,-50.52 44.19,-41.71"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="39.62,-82.31 47.54,-89.35 45.73,-78.91 39.62,-82.31"/>
<text text-anchor="middle" x="46.5" y="-63" font-family="Helvetica,sans-Serif" font-size="10.00"> ptr</text>
</g>
<!-- Node2&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node2&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M58,-51.8C58,-64.6 58,-78.97 58,-89.3"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="61.5,-51.53 58,-41.53 54.5,-51.53 61.5,-51.53"/>
<text text-anchor="middle" x="73" y="-63" font-family="Helvetica,sans-Serif" font-size="10.00"> psucc</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: n_bonacci Namespace Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('de/d36/namespacen__bonacci.html','../.
<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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: karatsuba_algorithm Namespace Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('de/d41/namespacekaratsuba__algorithm.h
<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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: math/string_fibonacci.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -154,46 +154,46 @@ Functions</h2></td></tr>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>sum as a <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> </dd></dl>
<div class="fragment"><div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> {</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> temp = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="comment">// carry flag</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordtype">int</span> carry = 0;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="comment">// fills up with zeros</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">while</span> (a.length() &lt; b.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> a = <span class="stringliteral">&quot;0&quot;</span> + a;</div>
<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> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="comment">// fills up with zeros</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordflow">while</span> (b.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>() &lt; a.length()) {</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> b = <span class="stringliteral">&quot;0&quot;</span> + b;</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> }</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="comment">// adds the numbers a and b</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = a.length() - 1; i &gt;= 0; i--) {</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordtype">char</span> val = <span class="keyword">static_cast&lt;</span><span class="keywordtype">char</span><span class="keyword">&gt;</span>(((a[i] - 48) + (b[i] - 48)) + 48 + carry);</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">if</span> (val &gt; 57) {</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> carry = 1;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> val -= 10;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> carry = 0;</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> temp = val + temp;</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> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="comment">// processes the carry flag</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">if</span> (carry == 1) {</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> temp = <span class="stringliteral">&quot;1&quot;</span> + temp;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> }</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="comment">// removes leading zeros.</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">while</span> (temp[0] == <span class="charliteral">&#39;0&#39;</span> &amp;&amp; temp.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>() &gt; 1) {</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> temp = temp.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/substr.html">substr</a>(1);</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> }</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">return</span> temp;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 24</span> {</div>
<div class="line"><span class="lineno"> 25</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> temp = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><span class="lineno"> 26</span> </div>
<div class="line"><span class="lineno"> 27</span> <span class="comment">// carry flag</span></div>
<div class="line"><span class="lineno"> 28</span> <span class="keywordtype">int</span> carry = 0;</div>
<div class="line"><span class="lineno"> 29</span> </div>
<div class="line"><span class="lineno"> 30</span> <span class="comment">// fills up with zeros</span></div>
<div class="line"><span class="lineno"> 31</span> <span class="keywordflow">while</span> (a.length() &lt; b.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
<div class="line"><span class="lineno"> 32</span> a = <span class="stringliteral">&quot;0&quot;</span> + a;</div>
<div class="line"><span class="lineno"> 33</span> }</div>
<div class="line"><span class="lineno"> 34</span> </div>
<div class="line"><span class="lineno"> 35</span> <span class="comment">// fills up with zeros</span></div>
<div class="line"><span class="lineno"> 36</span> <span class="keywordflow">while</span> (b.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>() &lt; a.length()) {</div>
<div class="line"><span class="lineno"> 37</span> b = <span class="stringliteral">&quot;0&quot;</span> + b;</div>
<div class="line"><span class="lineno"> 38</span> }</div>
<div class="line"><span class="lineno"> 39</span> </div>
<div class="line"><span class="lineno"> 40</span> <span class="comment">// adds the numbers a and b</span></div>
<div class="line"><span class="lineno"> 41</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = a.length() - 1; i &gt;= 0; i--) {</div>
<div class="line"><span class="lineno"> 42</span> <span class="keywordtype">char</span> val = <span class="keyword">static_cast&lt;</span><span class="keywordtype">char</span><span class="keyword">&gt;</span>(((a[i] - 48) + (b[i] - 48)) + 48 + carry);</div>
<div class="line"><span class="lineno"> 43</span> <span class="keywordflow">if</span> (val &gt; 57) {</div>
<div class="line"><span class="lineno"> 44</span> carry = 1;</div>
<div class="line"><span class="lineno"> 45</span> val -= 10;</div>
<div class="line"><span class="lineno"> 46</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno"> 47</span> carry = 0;</div>
<div class="line"><span class="lineno"> 48</span> }</div>
<div class="line"><span class="lineno"> 49</span> temp = val + temp;</div>
<div class="line"><span class="lineno"> 50</span> }</div>
<div class="line"><span class="lineno"> 51</span> </div>
<div class="line"><span class="lineno"> 52</span> <span class="comment">// processes the carry flag</span></div>
<div class="line"><span class="lineno"> 53</span> <span class="keywordflow">if</span> (carry == 1) {</div>
<div class="line"><span class="lineno"> 54</span> temp = <span class="stringliteral">&quot;1&quot;</span> + temp;</div>
<div class="line"><span class="lineno"> 55</span> }</div>
<div class="line"><span class="lineno"> 56</span> </div>
<div class="line"><span class="lineno"> 57</span> <span class="comment">// removes leading zeros.</span></div>
<div class="line"><span class="lineno"> 58</span> <span class="keywordflow">while</span> (temp[0] == <span class="charliteral">&#39;0&#39;</span> &amp;&amp; temp.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>() &gt; 1) {</div>
<div class="line"><span class="lineno"> 59</span> temp = temp.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/substr.html">substr</a>(1);</div>
<div class="line"><span class="lineno"> 60</span> }</div>
<div class="line"><span class="lineno"> 61</span> </div>
<div class="line"><span class="lineno"> 62</span> <span class="keywordflow">return</span> temp;</div>
<div class="line"><span class="lineno"> 63</span>}</div>
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">std::string::length</a></div><div class="ttdeci">T length(T... args)</div></div>
<div class="ttc" id="asubstr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/substr.html">std::string::substr</a></div><div class="ttdeci">T substr(T... args)</div></div>
@@ -227,17 +227,17 @@ Here is the call graph for this function:</div>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> {</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> tmp = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> fibMinus1 = <span class="stringliteral">&quot;1&quot;</span>;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> fibMinus2 = <span class="stringliteral">&quot;0&quot;</span>;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">for</span> (uint64_t i = 0; i &lt; n; i++) {</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> tmp = <a class="code hl_function" href="../../de/d47/string__fibonacci_8cpp.html#a28052eee05d43c2ebc5147c52bd50c35">add</a>(fibMinus1, fibMinus2);</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> fibMinus2 = fibMinus1;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> fibMinus1 = tmp;</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> }</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; fibMinus2;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 68</span> {</div>
<div class="line"><span class="lineno"> 69</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> tmp = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><span class="lineno"> 70</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> fibMinus1 = <span class="stringliteral">&quot;1&quot;</span>;</div>
<div class="line"><span class="lineno"> 71</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> fibMinus2 = <span class="stringliteral">&quot;0&quot;</span>;</div>
<div class="line"><span class="lineno"> 72</span> <span class="keywordflow">for</span> (uint64_t i = 0; i &lt; n; i++) {</div>
<div class="line"><span class="lineno"> 73</span> tmp = <a class="code hl_function" href="../../de/d47/string__fibonacci_8cpp.html#a28052eee05d43c2ebc5147c52bd50c35">add</a>(fibMinus1, fibMinus2);</div>
<div class="line"><span class="lineno"> 74</span> fibMinus2 = fibMinus1;</div>
<div class="line"><span class="lineno"> 75</span> fibMinus1 = tmp;</div>
<div class="line"><span class="lineno"> 76</span> }</div>
<div class="line"><span class="lineno"> 77</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; fibMinus2;</div>
<div class="line"><span class="lineno"> 78</span>}</div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="astring__fibonacci_8cpp_html_a28052eee05d43c2ebc5147c52bd50c35"><div class="ttname"><a href="../../de/d47/string__fibonacci_8cpp.html#a28052eee05d43c2ebc5147c52bd50c35">add</a></div><div class="ttdeci">std::string add(std::string a, std::string b)</div><div class="ttdef"><b>Definition:</b> string_fibonacci.cpp:24</div></div>
</div><!-- fragment --><div class="dynheader">
@@ -265,15 +265,15 @@ Here is the call graph for this function:</div>
</table>
</div><div class="memdoc">
<p >main function </p>
<div class="fragment"><div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> {</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordtype">int</span> n;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Enter whatever number N you want to find the fibonacci of\n&quot;</span>;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; n;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; n &lt;&lt; <span class="stringliteral">&quot; th Fibonacci is \n&quot;</span>;</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <a class="code hl_function" href="../../de/d47/string__fibonacci_8cpp.html#ad8055ee368a5d5b24de01bdde6bf8fca">fib_Accurate</a>(n);</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 81</span> {</div>
<div class="line"><span class="lineno"> 82</span> <span class="keywordtype">int</span> n;</div>
<div class="line"><span class="lineno"> 83</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Enter whatever number N you want to find the fibonacci of\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 84</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; n;</div>
<div class="line"><span class="lineno"> 85</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; n &lt;&lt; <span class="stringliteral">&quot; th Fibonacci is \n&quot;</span>;</div>
<div class="line"><span class="lineno"> 86</span> <a class="code hl_function" href="../../de/d47/string__fibonacci_8cpp.html#ad8055ee368a5d5b24de01bdde6bf8fca">fib_Accurate</a>(n);</div>
<div class="line"><span class="lineno"> 87</span> </div>
<div class="line"><span class="lineno"> 88</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 89</span>}</div>
<div class="ttc" id="abasic_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a></div></div>
<div class="ttc" id="astring__fibonacci_8cpp_html_ad8055ee368a5d5b24de01bdde6bf8fca"><div class="ttname"><a href="../../de/d47/string__fibonacci_8cpp.html#ad8055ee368a5d5b24de01bdde6bf8fca">fib_Accurate</a></div><div class="ttdeci">void fib_Accurate(uint64_t n)</div><div class="ttdef"><b>Definition:</b> string_fibonacci.cpp:68</div></div>
</div><!-- fragment --><div class="dynheader">
@@ -291,7 +291,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_296d53ceaeaa7e099814a6def439fe8a.html">math</a></li><li class="navelem"><a class="el" href="../../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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -1,5 +1,5 @@
<map id="add" name="add">
<area shape="rect" id="node1" title=" " alt="" coords="5,31,48,57"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size.html#" title=" " alt="" coords="97,5,219,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/substr.html#" title=" " alt="" coords="96,56,220,83"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size#" title=" " alt="" coords="97,5,219,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/substr#" title=" " alt="" coords="96,56,220,83"/>
</map>

View File

@@ -1 +1 @@
a49c2d15d05c69c441e0dd988f7e7e4c
9f2afcb2a826bf24669456b569167717

View File

@@ -21,7 +21,7 @@
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size#" xlink:title=" ">
<polygon fill="white" stroke="black" points="68.5,-38.5 68.5,-57.5 160.5,-57.5 160.5,-38.5 68.5,-38.5"/>
<text text-anchor="middle" x="114.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
</a>
@@ -36,7 +36,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/substr.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/substr#" xlink:title=" ">
<polygon fill="white" stroke="black" points="68,-0.5 68,-19.5 161,-19.5 161,-0.5 68,-0.5"/>
<text text-anchor="middle" x="114.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::substr</text>
</a>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,6 +1,6 @@
<map id="fib_Accurate" name="fib_Accurate">
<area shape="rect" id="node1" title=" " alt="" coords="5,31,100,57"/>
<area shape="rect" id="node2" href="$de/d47/string__fibonacci_8cpp.html#a28052eee05d43c2ebc5147c52bd50c35" title=" " alt="" coords="148,31,191,57"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size.html#" title=" " alt="" coords="239,5,362,32"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/substr.html#" title=" " alt="" coords="239,56,363,83"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size#" title=" " alt="" coords="239,5,362,32"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/substr#" title=" " alt="" coords="239,56,363,83"/>
</map>

View File

@@ -1 +1 @@
f739769729c52196fcf6bafd343fc050
4d1a581e06ef1db408f80649fd77e1b0

View File

@@ -36,7 +36,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size#" xlink:title=" ">
<polygon fill="white" stroke="black" points="175.5,-38.5 175.5,-57.5 267.5,-57.5 267.5,-38.5 175.5,-38.5"/>
<text text-anchor="middle" x="221.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
</a>
@@ -51,7 +51,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/substr.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/substr#" xlink:title=" ">
<polygon fill="white" stroke="black" points="175,-0.5 175,-19.5 268,-19.5 268,-0.5 175,-0.5"/>
<text text-anchor="middle" x="221.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::substr</text>
</a>

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -2,6 +2,6 @@
<area shape="rect" id="node1" title=" " alt="" coords="5,31,56,57"/>
<area shape="rect" id="node2" href="$de/d47/string__fibonacci_8cpp.html#ad8055ee368a5d5b24de01bdde6bf8fca" title=" " alt="" coords="104,31,199,57"/>
<area shape="rect" id="node3" href="$de/d47/string__fibonacci_8cpp.html#a28052eee05d43c2ebc5147c52bd50c35" title=" " alt="" coords="247,31,289,57"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size.html#" title=" " alt="" coords="338,5,461,32"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/substr.html#" title=" " alt="" coords="337,56,461,83"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size#" title=" " alt="" coords="338,5,461,32"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/substr#" title=" " alt="" coords="337,56,461,83"/>
</map>

View File

@@ -1 +1 @@
482e825d50dea9f2175eeecbe06279df
a688ad05753a523dfd39e4a3373a451c

View File

@@ -51,7 +51,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size#" xlink:title=" ">
<polygon fill="white" stroke="black" points="249.5,-38.5 249.5,-57.5 341.5,-57.5 341.5,-38.5 249.5,-38.5"/>
<text text-anchor="middle" x="295.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
</a>
@@ -66,7 +66,7 @@
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/substr.html#" xlink:title=" ">
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/substr#" xlink:title=" ">
<polygon fill="white" stroke="black" points="249,-0.5 249,-19.5 342,-19.5 342,-0.5 249,-0.5"/>
<text text-anchor="middle" x="295.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::substr</text>
</a>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: Trie::TrieNode Struct Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -96,6 +96,12 @@ $(document).ready(function(){initNavTree('de/d48/struct_trie_1_1_trie_node.html'
<div class="headertitle"><div class="title">Trie::TrieNode Struct Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Collaboration diagram for Trie::TrieNode:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d4/d2c/struct_trie_1_1_trie_node__coll__graph.svg" width="154" height="142"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
@@ -117,7 +123,7 @@ bool&#160;</td><td class="memItemRight" valign="bottom"><b>isEndOfWord</b> {fals
<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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: Compare&lt; S, T, E &gt; Class Template Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -165,17 +165,17 @@ template&lt;typename S , typename T , typename E &gt; </div>
<dl class="section return"><dt>Returns</dt><dd>true if the tuples SHOULD be swapped </dd>
<dd>
false if the tuples SHOULDN'T be swapped </dd></dl>
<div class="fragment"><div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> {</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="comment">// Compare arrival times</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordflow">if</span> (get&lt;1&gt;(t2) &lt; get&lt;1&gt;(t1)) {</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> }</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="comment">// If arrival times are same, then compare Process IDs</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (get&lt;1&gt;(t2) == get&lt;1&gt;(t1)) {</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">return</span> get&lt;0&gt;(t2) &lt; get&lt;0&gt;(t1);</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> }</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> }</div>
<div class="fragment"><div class="line"><span class="lineno"> 76</span> {</div>
<div class="line"><span class="lineno"> 77</span> <span class="comment">// Compare arrival times</span></div>
<div class="line"><span class="lineno"> 78</span> <span class="keywordflow">if</span> (get&lt;1&gt;(t2) &lt; get&lt;1&gt;(t1)) {</div>
<div class="line"><span class="lineno"> 79</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 80</span> }</div>
<div class="line"><span class="lineno"> 81</span> <span class="comment">// If arrival times are same, then compare Process IDs</span></div>
<div class="line"><span class="lineno"> 82</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (get&lt;1&gt;(t2) == get&lt;1&gt;(t1)) {</div>
<div class="line"><span class="lineno"> 83</span> <span class="keywordflow">return</span> get&lt;0&gt;(t2) &lt; get&lt;0&gt;(t1);</div>
<div class="line"><span class="lineno"> 84</span> }</div>
<div class="line"><span class="lineno"> 85</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 86</span> }</div>
</div><!-- fragment -->
</div>
</div>
@@ -188,7 +188,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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -0,0 +1,8 @@
<map id="range_queries::heavy_light_decomposition::Tree&lt; X &gt;" name="range_queries::heavy_light_decomposition::Tree&lt; X &gt;">
<area shape="rect" id="node1" title="A Basic Tree, which supports binary lifting." alt="" coords="473,90,620,146"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector" title=" " alt="" coords="243,5,382,47"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list" title=" " alt="" coords="15,13,118,39"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector" title=" " alt="" coords="233,149,392,191"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector" title=" " alt="" coords="5,113,128,139"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector" title=" " alt="" coords="254,215,371,242"/>
</map>

View File

@@ -0,0 +1 @@
d127e642168ec5477c414313b2743296

View File

@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.50.0 (20211204.2007)
-->
<!-- Title: range_queries::heavy_light_decomposition::Tree&lt; X &gt; Pages: 1 -->
<svg width="469pt" height="186pt"
viewBox="0.00 0.00 469.00 185.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 181.5)">
<title>range_queries::heavy_light_decomposition::Tree&lt; X &gt;</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-181.5 465,-181.5 465,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="A Basic Tree, which supports binary lifting.">
<polygon fill="#bfbfbf" stroke="black" points="351,-72.5 351,-113.5 461,-113.5 461,-72.5 351,-72.5"/>
<text text-anchor="start" x="359" y="-101.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="359" y="-90.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="406" y="-79.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector" xlink:title=" ">
<polygon fill="white" stroke="black" points="178.5,-147 178.5,-177 282.5,-177 282.5,-147 178.5,-147"/>
<text text-anchor="start" x="186.5" y="-165" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; std::list</text>
<text text-anchor="middle" x="230.5" y="-154" font-family="Helvetica,sans-Serif" font-size="10.00">&lt; int &gt; &gt;</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node2&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M279.11,-143.06C302.09,-133.93 329.69,-122.95 353.19,-113.6"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="277.57,-139.91 269.58,-146.86 280.16,-146.41 277.57,-139.91"/>
<text text-anchor="middle" x="320.5" y="-132" font-family="Helvetica,sans-Serif" font-size="10.00"> t_adj</text>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list" xlink:title=" ">
<polygon fill="white" stroke="black" points="7.5,-152.5 7.5,-171.5 84.5,-171.5 84.5,-152.5 7.5,-152.5"/>
<text text-anchor="middle" x="46" y="-159.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list&lt; int &gt;</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node3&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M95.03,-162C120.64,-162 152.16,-162 178.24,-162"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="94.81,-158.5 84.81,-162 94.81,-165.5 94.81,-158.5"/>
<text text-anchor="middle" x="131.5" y="-165" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector" xlink:title=" ">
<polygon fill="white" stroke="black" points="171,-39 171,-69 290,-69 290,-39 171,-39"/>
<text text-anchor="start" x="179" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; std::vector</text>
<text text-anchor="middle" x="230.5" y="-46" font-family="Helvetica,sans-Serif" font-size="10.00">&lt; int &gt; &gt;</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node1 -->
<g id="edge3" class="edge">
<title>Node4&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M300.07,-69.41C316.99,-73.22 334.88,-77.24 351,-80.86"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="300.76,-65.98 290.24,-67.2 299.23,-72.81 300.76,-65.98"/>
<text text-anchor="middle" x="320.5" y="-78" font-family="Helvetica,sans-Serif" font-size="10.00"> t_par</text>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector" xlink:title=" ">
<polygon fill="white" stroke="black" points="0,-77.5 0,-96.5 92,-96.5 92,-77.5 0,-77.5"/>
<text text-anchor="middle" x="46" y="-84.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; int &gt;</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node1 -->
<g id="edge5" class="edge">
<title>Node5&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M102.25,-89.75C104.87,-89.84 107.46,-89.93 110,-90 194.09,-92.43 291.71,-92.98 350.89,-93.06"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="102.2,-86.24 92.07,-89.35 101.93,-93.24 102.2,-86.24"/>
<text text-anchor="middle" x="230.5" y="-106" font-family="Helvetica,sans-Serif" font-size="10.00"> t_depth</text>
<text text-anchor="middle" x="230.5" y="-95" font-family="Helvetica,sans-Serif" font-size="10.00">t_size</text>
</g>
<!-- Node5&#45;&gt;Node4 -->
<g id="edge4" class="edge">
<title>Node5&#45;&gt;Node4</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M102.15,-77.03C123.83,-73.11 148.76,-68.6 170.78,-64.62"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="101.33,-73.62 92.11,-78.84 102.58,-80.51 101.33,-73.62"/>
<text text-anchor="middle" x="131.5" y="-78" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector" xlink:title=" ">
<polygon fill="white" stroke="black" points="186.5,-0.5 186.5,-19.5 274.5,-19.5 274.5,-0.5 186.5,-0.5"/>
<text text-anchor="middle" x="230.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node1 -->
<g id="edge6" class="edge">
<title>Node6&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M274.28,-22.83C279.63,-24.74 284.98,-26.81 290,-29 318.7,-41.5 349.61,-58.95 372.16,-72.48"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="275.31,-19.48 264.71,-19.55 273.04,-26.1 275.31,-19.48"/>
<text text-anchor="middle" x="320.5" y="-53" font-family="Helvetica,sans-Serif" font-size="10.00"> t_val</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -0,0 +1,4 @@
<map id="range_queries::perSegTree::Node" name="range_queries::perSegTree::Node">
<area shape="rect" id="node1" title=" " alt="" coords="5,5,184,47"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/memory/shared_ptr" title=" " alt="" coords="17,124,172,180"/>
</map>

View File

@@ -0,0 +1 @@
78bb169d05281bf2ba6ad883483570d0

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.50.0 (20211204.2007)
-->
<!-- Title: range_queries::perSegTree::Node Pages: 1 -->
<svg width="142pt" height="139pt"
viewBox="0.00 0.00 142.00 139.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 135)">
<title>range_queries::perSegTree::Node</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-135 138,-135 138,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title=" ">
<polygon fill="#bfbfbf" stroke="black" points="0,-100.5 0,-130.5 134,-130.5 134,-100.5 0,-100.5"/>
<text text-anchor="start" x="8" y="-118.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::perSegTree</text>
<text text-anchor="middle" x="67" y="-107.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Node</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/memory/shared_ptr" xlink:title=" ">
<polygon fill="white" stroke="black" points="9,-0.5 9,-41.5 125,-41.5 125,-0.5 9,-0.5"/>
<text text-anchor="start" x="17" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::shared_ptr&lt; range</text>
<text text-anchor="start" x="17" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_queries::perSegTree::</text>
<text text-anchor="middle" x="67" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">Node &gt;</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M51.64,-91.55C50.15,-88.44 48.87,-85.22 48,-82 45.44,-72.56 45.75,-69.52 48,-60 49.46,-53.83 52.08,-47.51 54.92,-41.85"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="48.62,-93.31 56.54,-100.35 54.73,-89.91 48.62,-93.31"/>
<text text-anchor="middle" x="55.5" y="-68.5" font-family="Helvetica,sans-Serif" font-size="10.00"> ptr</text>
</g>
<!-- Node2&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node2&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M67,-51.85C67,-68.16 67,-87.6 67,-100.45"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="70.5,-51.68 67,-41.68 63.5,-51.68 70.5,-51.68"/>
<text text-anchor="middle" x="76.5" y="-74" font-family="Helvetica,sans-Serif" font-size="10.00"> left</text>
<text text-anchor="middle" x="76.5" y="-63" font-family="Helvetica,sans-Serif" font-size="10.00">right</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: strings/knuth_morris_pratt.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -147,26 +147,26 @@ Functions</h2></td></tr>
</table>
</div><div class="memdoc">
<p >Main function </p>
<div class="fragment"><div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> {</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> text = <span class="stringliteral">&quot;alskfjaldsabc1abc1abc12k23adsfabcabc&quot;</span>;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> pattern = <span class="stringliteral">&quot;abc1abc12l&quot;</span>;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d9/d03/namespacestring__search.html#a26a58225ce7d3fa9d4c2f5349a65ed93">kmp</a>(pattern, text) == <span class="keyword">true</span>) {</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Found&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Not Found&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> }</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> text = <span class="stringliteral">&quot;abcabc&quot;</span>;</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> pattern = <span class="stringliteral">&quot;bca&quot;</span>;</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d9/d03/namespacestring__search.html#a26a58225ce7d3fa9d4c2f5349a65ed93">kmp</a>(pattern, text) == <span class="keyword">true</span>) {</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Found&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Not Found&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 76</span> {</div>
<div class="line"><span class="lineno"> 77</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> text = <span class="stringliteral">&quot;alskfjaldsabc1abc1abc12k23adsfabcabc&quot;</span>;</div>
<div class="line"><span class="lineno"> 78</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> pattern = <span class="stringliteral">&quot;abc1abc12l&quot;</span>;</div>
<div class="line"><span class="lineno"> 79</span> </div>
<div class="line"><span class="lineno"> 80</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d9/d03/namespacestring__search.html#a26a58225ce7d3fa9d4c2f5349a65ed93">kmp</a>(pattern, text) == <span class="keyword">true</span>) {</div>
<div class="line"><span class="lineno"> 81</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Found&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 82</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno"> 83</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Not Found&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 84</span> }</div>
<div class="line"><span class="lineno"> 85</span> </div>
<div class="line"><span class="lineno"> 86</span> text = <span class="stringliteral">&quot;abcabc&quot;</span>;</div>
<div class="line"><span class="lineno"> 87</span> pattern = <span class="stringliteral">&quot;bca&quot;</span>;</div>
<div class="line"><span class="lineno"> 88</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d9/d03/namespacestring__search.html#a26a58225ce7d3fa9d4c2f5349a65ed93">kmp</a>(pattern, text) == <span class="keyword">true</span>) {</div>
<div class="line"><span class="lineno"> 89</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Found&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 90</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno"> 91</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Not Found&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 92</span> }</div>
<div class="line"><span class="lineno"> 93</span> </div>
<div class="line"><span class="lineno"> 94</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 95</span>}</div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
@@ -186,7 +186,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -1,7 +1,7 @@
<map id="main" name="main">
<area shape="rect" id="node1" title=" " alt="" coords="5,31,56,57"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="135,5,207,32"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="135,5,207,32"/>
<area shape="rect" id="node3" href="$d9/d03/namespacestring__search.html#a26a58225ce7d3fa9d4c2f5349a65ed93" title=" " alt="" coords="104,56,237,83"/>
<area shape="rect" id="node4" href="$d9/d03/namespacestring__search.html#a996573527312d5255e1495b879e8a34f" title=" " alt="" coords="285,19,451,61"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size.html#" title=" " alt="" coords="499,56,611,83"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size#" title=" " alt="" coords="499,56,611,83"/>
</map>

View File

@@ -1 +1 @@
b3f68c98ba2d13ce39ebca157fab69ae
baf58aa92eb9ce7a8755902e67dd9a3b

View File

@@ -21,7 +21,7 @@
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="97,-38.5 97,-57.5 151,-57.5 151,-38.5 97,-38.5"/>
<text text-anchor="middle" x="124" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -67,7 +67,7 @@
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size#" xlink:title=" ">
<polygon fill="white" stroke="black" points="370,-0.5 370,-19.5 454,-19.5 454,-0.5 370,-0.5"/>
<text text-anchor="middle" x="412" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::size</text>
</a>

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: random_pivot_quick_sort Namespace Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('de/d6b/namespacerandom__pivot__quick__
<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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: probability/geometric_dist.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -168,9 +168,9 @@ Functions</h2></td></tr>
<p>Returns a random number between [0,1]. </p>
<dl class="section return"><dt>Returns</dt><dd>A uniformly distributed random number between 0 (included) and 1 (included) </dd></dl>
<div class="fragment"><div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> {</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">rand</a>()) / <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(RAND_MAX);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 48</span> {</div>
<div class="line"><span class="lineno"> 49</span> <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">rand</a>()) / <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(RAND_MAX);</div>
<div class="line"><span class="lineno"> 50</span>}</div>
<div class="ttc" id="arand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a></div><div class="ttdeci">T rand(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -199,11 +199,11 @@ Here is the call graph for this function:</div>
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> {</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">srand</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">time</a>(<span class="keyword">nullptr</span>));</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> <a class="code hl_function" href="../../de/d72/geometric__dist_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 256</span> {</div>
<div class="line"><span class="lineno"> 257</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">srand</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">time</a>(<span class="keyword">nullptr</span>));</div>
<div class="line"><span class="lineno"> 258</span> <a class="code hl_function" href="../../de/d72/geometric__dist_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><span class="lineno"> 259</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 260</span>}</div>
<div class="ttc" id="ageometric__dist_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../de/d72/geometric__dist_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> geometric_dist.cpp:197</div></div>
<div class="ttc" id="asrand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a></div><div class="ttdeci">T srand(T... args)</div></div>
<div class="ttc" id="atime_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a></div><div class="ttdeci">T time(T... args)</div></div>
@@ -239,32 +239,32 @@ Here is the call graph for this function:</div>
</table>
</dd>
</dl>
<div class="fragment"><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> uint32_t n_tries = 1000000;</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;float&gt;</a> tries;</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> tries.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/resize.html">resize</a>(n_tries);</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> </div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keywordtype">float</span> mean = 0.0f;</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; n_tries; ++i) {</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> tries[i] = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(dist.<a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a8aae1cebcf42ed2332f1c7217c401aa3">draw_sample</a>());</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> mean += tries[i];</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> }</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> </div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> mean /= <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(n_tries);</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> <span class="keywordtype">float</span> var = 0.0f;</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; n_tries; ++i) {</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> var += (tries[i] - mean) * (tries[i] - mean);</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> }</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> </div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="comment">// Unbiased estimate of variance</span></div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> var /= <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(n_tries - 1);</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> </div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;This value should be near &quot;</span> &lt;&lt; dist.<a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a41051365f8ac7700f2ed5880a6760413">expected_value</a>() &lt;&lt; <span class="stringliteral">&quot;: &quot;</span></div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> &lt;&lt; mean &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;This value should be near &quot;</span> &lt;&lt; dist.<a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aea8b0d649f0dc9a6f8baf3341a0b4960">variance</a>() &lt;&lt; <span class="stringliteral">&quot;: &quot;</span> &lt;&lt; var</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 166</span> {</div>
<div class="line"><span class="lineno"> 167</span> uint32_t n_tries = 1000000;</div>
<div class="line"><span class="lineno"> 168</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;float&gt;</a> tries;</div>
<div class="line"><span class="lineno"> 169</span> tries.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/resize.html">resize</a>(n_tries);</div>
<div class="line"><span class="lineno"> 170</span> </div>
<div class="line"><span class="lineno"> 171</span> <span class="keywordtype">float</span> mean = 0.0f;</div>
<div class="line"><span class="lineno"> 172</span> <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; n_tries; ++i) {</div>
<div class="line"><span class="lineno"> 173</span> tries[i] = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(dist.<a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a8aae1cebcf42ed2332f1c7217c401aa3">draw_sample</a>());</div>
<div class="line"><span class="lineno"> 174</span> mean += tries[i];</div>
<div class="line"><span class="lineno"> 175</span> }</div>
<div class="line"><span class="lineno"> 176</span> </div>
<div class="line"><span class="lineno"> 177</span> mean /= <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(n_tries);</div>
<div class="line"><span class="lineno"> 178</span> </div>
<div class="line"><span class="lineno"> 179</span> <span class="keywordtype">float</span> var = 0.0f;</div>
<div class="line"><span class="lineno"> 180</span> <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; n_tries; ++i) {</div>
<div class="line"><span class="lineno"> 181</span> var += (tries[i] - mean) * (tries[i] - mean);</div>
<div class="line"><span class="lineno"> 182</span> }</div>
<div class="line"><span class="lineno"> 183</span> </div>
<div class="line"><span class="lineno"> 184</span> <span class="comment">// Unbiased estimate of variance</span></div>
<div class="line"><span class="lineno"> 185</span> var /= <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(n_tries - 1);</div>
<div class="line"><span class="lineno"> 186</span> </div>
<div class="line"><span class="lineno"> 187</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;This value should be near &quot;</span> &lt;&lt; dist.<a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a41051365f8ac7700f2ed5880a6760413">expected_value</a>() &lt;&lt; <span class="stringliteral">&quot;: &quot;</span></div>
<div class="line"><span class="lineno"> 188</span> &lt;&lt; mean &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 189</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;This value should be near &quot;</span> &lt;&lt; dist.<a class="code hl_function" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aea8b0d649f0dc9a6f8baf3341a0b4960">variance</a>() &lt;&lt; <span class="stringliteral">&quot;: &quot;</span> &lt;&lt; var</div>
<div class="line"><span class="lineno"> 190</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 191</span>}</div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="aclassprobability_1_1geometric__dist_1_1geometric__distribution_html_a41051365f8ac7700f2ed5880a6760413"><div class="ttname"><a href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a41051365f8ac7700f2ed5880a6760413">probability::geometric_dist::geometric_distribution::expected_value</a></div><div class="ttdeci">float expected_value() const</div><div class="ttdoc">The expected value of a geometrically distributed random variable X.</div><div class="ttdef"><b>Definition:</b> geometric_dist.cpp:71</div></div>
<div class="ttc" id="aclassprobability_1_1geometric__dist_1_1geometric__distribution_html_a8aae1cebcf42ed2332f1c7217c401aa3"><div class="ttname"><a href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a8aae1cebcf42ed2332f1c7217c401aa3">probability::geometric_dist::geometric_distribution::draw_sample</a></div><div class="ttdeci">uint32_t draw_sample() const</div><div class="ttdoc">Generates a (discrete) sample according to the geometrical distribution.</div><div class="ttdef"><b>Definition:</b> geometric_dist.cpp:125</div></div>
@@ -306,60 +306,60 @@ Here is the call graph for this function:</div>
<p>Self-test implementations. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> {</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <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>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> </div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="keyword">const</span> <span class="keywordtype">float</span> threshold = 1e-3f;</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Starting tests for p = 0.3...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> assert(std::abs(dist.expected_value() - 3.33333333f) &lt; threshold);</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> assert(std::abs(dist.variance() - 7.77777777f) &lt; threshold);</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> assert(std::abs(dist.standard_deviation() - 2.788866755) &lt; threshold);</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> assert(std::abs(dist.probability_density(5) - 0.07203) &lt; threshold);</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> assert(std::abs(dist.cumulative_distribution(6) - 0.882351) &lt; threshold);</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> assert(std::abs(dist.inverse_cumulative_distribution(</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> dist.cumulative_distribution(8)) -</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> 8) &lt; threshold);</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> assert(std::abs(dist.range_tries() - 1.0f) &lt; threshold);</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> assert(std::abs(dist.range_tries(3) - 0.49f) &lt; threshold);</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> assert(std::abs(dist.range_tries(5, 11) - 0.2203267f) &lt; threshold);</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;All tests passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> <a class="code hl_function" href="../../de/d72/geometric__dist_8cpp.html#a70fd1cc5c3a2813f28683dc75dcd65b6">sample_test</a>(dist);</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> </div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> dist = <a class="code hl_class" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html">probability::geometric_dist::geometric_distribution</a>(0.5f);</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> </div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Starting tests for p = 0.5...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> assert(std::abs(dist.expected_value() - 2.0f) &lt; threshold);</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> assert(std::abs(dist.variance() - 2.0f) &lt; threshold);</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> assert(std::abs(dist.standard_deviation() - 1.4142135f) &lt; threshold);</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> assert(std::abs(dist.probability_density(5) - 0.03125) &lt; threshold);</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> assert(std::abs(dist.cumulative_distribution(6) - 0.984375) &lt; threshold);</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> assert(std::abs(dist.inverse_cumulative_distribution(</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> dist.cumulative_distribution(8)) -</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> 8) &lt; threshold);</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> assert(std::abs(dist.range_tries() - 1.0f) &lt; threshold);</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> assert(std::abs(dist.range_tries(3) - 0.25f) &lt; threshold);</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> assert(std::abs(dist.range_tries(5, 11) - 0.062011f) &lt; threshold);</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;All tests passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <a class="code hl_function" href="../../de/d72/geometric__dist_8cpp.html#a70fd1cc5c3a2813f28683dc75dcd65b6">sample_test</a>(dist);</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> </div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> dist = <a class="code hl_class" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html">probability::geometric_dist::geometric_distribution</a>(0.8f);</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> </div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Starting tests for p = 0.8...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> assert(std::abs(dist.expected_value() - 1.25f) &lt; threshold);</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> assert(std::abs(dist.variance() - 0.3125f) &lt; threshold);</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> assert(std::abs(dist.standard_deviation() - 0.559016f) &lt; threshold);</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> assert(std::abs(dist.probability_density(5) - 0.00128) &lt; threshold);</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> assert(std::abs(dist.cumulative_distribution(6) - 0.999936) &lt; threshold);</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> assert(std::abs(dist.inverse_cumulative_distribution(</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> dist.cumulative_distribution(8)) -</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> 8) &lt; threshold);</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> assert(std::abs(dist.range_tries() - 1.0f) &lt; threshold);</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> assert(std::abs(dist.range_tries(3) - 0.04f) &lt; threshold);</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> assert(std::abs(dist.range_tries(5, 11) - 0.00159997f) &lt; threshold);</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;All tests have successfully passed!&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="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 class="fragment"><div class="line"><span class="lineno"> 197</span> {</div>
<div class="line"><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>
<div class="line"><span class="lineno"> 199</span> </div>
<div class="line"><span class="lineno"> 200</span> <span class="keyword">const</span> <span class="keywordtype">float</span> threshold = 1e-3f;</div>
<div class="line"><span class="lineno"> 201</span> </div>
<div class="line"><span class="lineno"> 202</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Starting tests for p = 0.3...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 203</span> assert(std::abs(dist.expected_value() - 3.33333333f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 204</span> assert(std::abs(dist.variance() - 7.77777777f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 205</span> assert(std::abs(dist.standard_deviation() - 2.788866755) &lt; threshold);</div>
<div class="line"><span class="lineno"> 206</span> assert(std::abs(dist.probability_density(5) - 0.07203) &lt; threshold);</div>
<div class="line"><span class="lineno"> 207</span> assert(std::abs(dist.cumulative_distribution(6) - 0.882351) &lt; threshold);</div>
<div class="line"><span class="lineno"> 208</span> assert(std::abs(dist.inverse_cumulative_distribution(</div>
<div class="line"><span class="lineno"> 209</span> dist.cumulative_distribution(8)) -</div>
<div class="line"><span class="lineno"> 210</span> 8) &lt; threshold);</div>
<div class="line"><span class="lineno"> 211</span> assert(std::abs(dist.range_tries() - 1.0f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 212</span> assert(std::abs(dist.range_tries(3) - 0.49f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 213</span> assert(std::abs(dist.range_tries(5, 11) - 0.2203267f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 214</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;All tests passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 215</span> <a class="code hl_function" href="../../de/d72/geometric__dist_8cpp.html#a70fd1cc5c3a2813f28683dc75dcd65b6">sample_test</a>(dist);</div>
<div class="line"><span class="lineno"> 216</span> </div>
<div class="line"><span class="lineno"> 217</span> dist = <a class="code hl_class" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html">probability::geometric_dist::geometric_distribution</a>(0.5f);</div>
<div class="line"><span class="lineno"> 218</span> </div>
<div class="line"><span class="lineno"> 219</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Starting tests for p = 0.5...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 220</span> assert(std::abs(dist.expected_value() - 2.0f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 221</span> assert(std::abs(dist.variance() - 2.0f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 222</span> assert(std::abs(dist.standard_deviation() - 1.4142135f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 223</span> assert(std::abs(dist.probability_density(5) - 0.03125) &lt; threshold);</div>
<div class="line"><span class="lineno"> 224</span> assert(std::abs(dist.cumulative_distribution(6) - 0.984375) &lt; threshold);</div>
<div class="line"><span class="lineno"> 225</span> assert(std::abs(dist.inverse_cumulative_distribution(</div>
<div class="line"><span class="lineno"> 226</span> dist.cumulative_distribution(8)) -</div>
<div class="line"><span class="lineno"> 227</span> 8) &lt; threshold);</div>
<div class="line"><span class="lineno"> 228</span> assert(std::abs(dist.range_tries() - 1.0f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 229</span> assert(std::abs(dist.range_tries(3) - 0.25f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 230</span> assert(std::abs(dist.range_tries(5, 11) - 0.062011f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 231</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;All tests passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 232</span> <a class="code hl_function" href="../../de/d72/geometric__dist_8cpp.html#a70fd1cc5c3a2813f28683dc75dcd65b6">sample_test</a>(dist);</div>
<div class="line"><span class="lineno"> 233</span> </div>
<div class="line"><span class="lineno"> 234</span> dist = <a class="code hl_class" href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html">probability::geometric_dist::geometric_distribution</a>(0.8f);</div>
<div class="line"><span class="lineno"> 235</span> </div>
<div class="line"><span class="lineno"> 236</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Starting tests for p = 0.8...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 237</span> assert(std::abs(dist.expected_value() - 1.25f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 238</span> assert(std::abs(dist.variance() - 0.3125f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 239</span> assert(std::abs(dist.standard_deviation() - 0.559016f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 240</span> assert(std::abs(dist.probability_density(5) - 0.00128) &lt; threshold);</div>
<div class="line"><span class="lineno"> 241</span> assert(std::abs(dist.cumulative_distribution(6) - 0.999936) &lt; threshold);</div>
<div class="line"><span class="lineno"> 242</span> assert(std::abs(dist.inverse_cumulative_distribution(</div>
<div class="line"><span class="lineno"> 243</span> dist.cumulative_distribution(8)) -</div>
<div class="line"><span class="lineno"> 244</span> 8) &lt; threshold);</div>
<div class="line"><span class="lineno"> 245</span> assert(std::abs(dist.range_tries() - 1.0f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 246</span> assert(std::abs(dist.range_tries(3) - 0.04f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 247</span> assert(std::abs(dist.range_tries(5, 11) - 0.00159997f) &lt; threshold);</div>
<div class="line"><span class="lineno"> 248</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;All tests have successfully passed!&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><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"><span class="lineno"> 250</span>}</div>
<div class="ttc" id="aclassprobability_1_1geometric__dist_1_1geometric__distribution_html"><div class="ttname"><a href="../../da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html">probability::geometric_dist::geometric_distribution</a></div><div class="ttdoc">A class to model the geometric distribution.</div><div class="ttdef"><b>Definition:</b> geometric_dist.cpp:55</div></div>
<div class="ttc" id="ageometric__dist_8cpp_html_a70fd1cc5c3a2813f28683dc75dcd65b6"><div class="ttname"><a href="../../de/d72/geometric__dist_8cpp.html#a70fd1cc5c3a2813f28683dc75dcd65b6">sample_test</a></div><div class="ttdeci">void sample_test(const probability::geometric_dist::geometric_distribution &amp;dist)</div><div class="ttdoc">Tests the sampling method of the geometric distribution.</div><div class="ttdef"><b>Definition:</b> geometric_dist.cpp:165</div></div>
</div><!-- fragment --><div class="dynheader">
@@ -377,7 +377,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_82e494173a87936756866de2fa774307.html">probability</a></li><li class="navelem"><a class="el" href="../../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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -1,11 +1,11 @@
<map id="sample_test" name="sample_test">
<area shape="rect" id="node1" title="Tests the sampling method of the geometric distribution." alt="" coords="5,203,99,230"/>
<area shape="rect" id="node2" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a8aae1cebcf42ed2332f1c7217c401aa3" title="Generates a (discrete) sample according to the geometrical distribution." alt="" coords="147,58,332,114"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="203,138,275,165"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="203,138,275,165"/>
<area shape="rect" id="node7" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a41051365f8ac7700f2ed5880a6760413" title="The expected value of a geometrically distributed random variable X." alt="" coords="147,189,332,245"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/resize.html#" title=" " alt="" coords="176,269,303,295"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/resize#" title=" " alt="" coords="176,269,303,295"/>
<area shape="rect" id="node9" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aea8b0d649f0dc9a6f8baf3341a0b4960" title="The variance of a geometrically distributed random variable X." alt="" coords="147,319,332,375"/>
<area shape="rect" id="node3" href="$de/d72/geometric__dist_8cpp.html#a82964ca6180507deb5fafc71050012ba" title="Returns a random number between [0,1]." alt="" coords="407,29,565,71"/>
<area shape="rect" id="node4" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aaf762e88c66918d7afda4234f28a7ddf" title="The inverse cumulative distribution function." alt="" coords="380,95,592,151"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/log.html#" title=" " alt="" coords="640,110,705,137"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/log#" title=" " alt="" coords="640,110,705,137"/>
</map>

View File

@@ -1 +1 @@
346675b1fa449146ef7c2cb2ec769df8
ff6f1403d9cdad63315ade75fba55eaf

View File

@@ -84,7 +84,7 @@ var sectionId = 'dynsection-3';
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="148.5,-158.5 148.5,-177.5 202.5,-177.5 202.5,-158.5 148.5,-158.5"/>
<text text-anchor="middle" x="175.5" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -116,7 +116,7 @@ var sectionId = 'dynsection-3';
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/resize.html#" xlink:title=" ">
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/resize#" xlink:title=" ">
<polygon fill="white" stroke="black" points="128,-60.5 128,-79.5 223,-79.5 223,-60.5 128,-60.5"/>
<text text-anchor="middle" x="175.5" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
@@ -187,7 +187,7 @@ var sectionId = 'dynsection-3';
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/log.html#" xlink:title=" ">
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/log#" xlink:title=" ">
<polygon fill="white" stroke="black" points="476,-179.5 476,-198.5 525,-198.5 525,-179.5 476,-179.5"/>
<text text-anchor="middle" x="500.5" y="-186.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::log</text>
</a>

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -38,7 +38,7 @@
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="148.5,-158.5 148.5,-177.5 202.5,-177.5 202.5,-158.5 148.5,-158.5"/>
<text text-anchor="middle" x="175.5" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -70,7 +70,7 @@
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/resize.html#" xlink:title=" ">
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/resize#" xlink:title=" ">
<polygon fill="white" stroke="black" points="128,-60.5 128,-79.5 223,-79.5 223,-60.5 128,-60.5"/>
<text text-anchor="middle" x="175.5" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
@@ -141,7 +141,7 @@
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/log.html#" xlink:title=" ">
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/log#" xlink:title=" ">
<polygon fill="white" stroke="black" points="476,-179.5 476,-198.5 525,-198.5 525,-179.5 476,-179.5"/>
<text text-anchor="middle" x="500.5" y="-186.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::log</text>
</a>

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@@ -1,7 +1,7 @@
<map id="test" name="test">
<area shape="rect" id="node1" title="Self&#45;test implementations." alt="" coords="5,275,49,301"/>
<area shape="rect" id="node2" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a08328dc7d62188427111f176b56a105a" title="The cumulative distribution function." alt="" coords="331,5,516,61"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="387,275,459,301"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="387,275,459,301"/>
<area shape="rect" id="node5" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a41051365f8ac7700f2ed5880a6760413" title="The expected value of a geometrically distributed random variable X." alt="" coords="331,325,516,381"/>
<area shape="rect" id="node6" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aaf762e88c66918d7afda4234f28a7ddf" title="The inverse cumulative distribution function." alt="" coords="564,259,776,315"/>
<area shape="rect" id="node8" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aee973db9f0435e0cb4cc70f8eb3447a1" title="The probability density function." alt="" coords="97,144,283,200"/>
@@ -9,11 +9,11 @@
<area shape="rect" id="node11" href="$de/d72/geometric__dist_8cpp.html#a70fd1cc5c3a2813f28683dc75dcd65b6" title="Tests the sampling method of the geometric distribution." alt="" coords="143,395,237,421"/>
<area shape="rect" id="node15" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aea8b0d649f0dc9a6f8baf3341a0b4960" title="The variance of a geometrically distributed random variable X." alt="" coords="331,536,516,592"/>
<area shape="rect" id="node16" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a0a10c512e13dd3a052e1c6d7f4d6f0f2" title="The standard deviation of a geometrically distributed random variable X." alt="" coords="97,536,283,592"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/pow.html#" title=" " alt="" coords="634,79,706,105"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/log.html#" title=" " alt="" coords="824,273,889,300"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/types/numeric_limits/max.html#" title=" " alt="" coords="341,85,506,112"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/pow#" title=" " alt="" coords="634,79,706,105"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/log#" title=" " alt="" coords="824,273,889,300"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/types/numeric_limits/max#" title=" " alt="" coords="341,85,506,112"/>
<area shape="rect" id="node12" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a8aae1cebcf42ed2332f1c7217c401aa3" title="Generates a (discrete) sample according to the geometrical distribution." alt="" coords="331,405,516,461"/>
<area shape="rect" id="node14" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/resize.html#" title=" " alt="" coords="360,485,487,512"/>
<area shape="rect" id="node14" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/resize#" title=" " alt="" coords="360,485,487,512"/>
<area shape="rect" id="node13" href="$de/d72/geometric__dist_8cpp.html#a82964ca6180507deb5fafc71050012ba" title="Returns a random number between [0,1]." alt="" coords="591,413,749,454"/>
<area shape="rect" id="node17" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="388,616,459,643"/>
<area shape="rect" id="node17" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="388,616,459,643"/>
</map>

View File

@@ -1 +1 @@
c1ad06c30601219838d37f1ffc15e3f7
82f1fb556ba8c426fa025f19358cf107

View File

@@ -84,7 +84,7 @@ var sectionId = 'dynsection-4';
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="286.5,-256.5 286.5,-275.5 340.5,-275.5 340.5,-256.5 286.5,-256.5"/>
<text text-anchor="middle" x="313.5" y="-263.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -216,7 +216,7 @@ var sectionId = 'dynsection-4';
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/pow.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/pow#" xlink:title=" ">
<polygon fill="white" stroke="black" points="471.5,-403.5 471.5,-422.5 525.5,-422.5 525.5,-403.5 471.5,-403.5"/>
<text text-anchor="middle" x="498.5" y="-410.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::pow</text>
</a>
@@ -231,7 +231,7 @@ var sectionId = 'dynsection-4';
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/log.html#" xlink:title=" ">
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/log#" xlink:title=" ">
<polygon fill="white" stroke="black" points="614,-257.5 614,-276.5 663,-276.5 663,-257.5 614,-257.5"/>
<text text-anchor="middle" x="638.5" y="-264.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::log</text>
</a>
@@ -258,7 +258,7 @@ var sectionId = 'dynsection-4';
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/types/numeric_limits/max.html#" xlink:title=" ">
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/types/numeric_limits/max#" xlink:title=" ">
<polygon fill="white" stroke="black" points="251.5,-398.5 251.5,-417.5 375.5,-417.5 375.5,-398.5 251.5,-398.5"/>
<text text-anchor="middle" x="313.5" y="-405.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::numeric_limits::max</text>
</a>
@@ -302,7 +302,7 @@ var sectionId = 'dynsection-4';
<!-- Node14 -->
<g id="node14" class="node">
<title>Node14</title>
<g id="a_node14"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/resize.html#" xlink:title=" ">
<g id="a_node14"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/resize#" xlink:title=" ">
<polygon fill="white" stroke="black" points="266,-98.5 266,-117.5 361,-117.5 361,-98.5 266,-98.5"/>
<text text-anchor="middle" x="313.5" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
@@ -357,7 +357,7 @@ var sectionId = 'dynsection-4';
<!-- Node17 -->
<g id="node17" class="node">
<title>Node17</title>
<g id="a_node17"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
<g id="a_node17"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
<polygon fill="white" stroke="black" points="287,-0.5 287,-19.5 340,-19.5 340,-0.5 287,-0.5"/>
<text text-anchor="middle" x="313.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
</a>

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -38,7 +38,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="286.5,-256.5 286.5,-275.5 340.5,-275.5 340.5,-256.5 286.5,-256.5"/>
<text text-anchor="middle" x="313.5" y="-263.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -170,7 +170,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/pow.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/pow#" xlink:title=" ">
<polygon fill="white" stroke="black" points="471.5,-403.5 471.5,-422.5 525.5,-422.5 525.5,-403.5 471.5,-403.5"/>
<text text-anchor="middle" x="498.5" y="-410.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::pow</text>
</a>
@@ -185,7 +185,7 @@
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/log.html#" xlink:title=" ">
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/log#" xlink:title=" ">
<polygon fill="white" stroke="black" points="614,-257.5 614,-276.5 663,-276.5 663,-257.5 614,-257.5"/>
<text text-anchor="middle" x="638.5" y="-264.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::log</text>
</a>
@@ -212,7 +212,7 @@
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/types/numeric_limits/max.html#" xlink:title=" ">
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/types/numeric_limits/max#" xlink:title=" ">
<polygon fill="white" stroke="black" points="251.5,-398.5 251.5,-417.5 375.5,-417.5 375.5,-398.5 251.5,-398.5"/>
<text text-anchor="middle" x="313.5" y="-405.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::numeric_limits::max</text>
</a>
@@ -256,7 +256,7 @@
<!-- Node14 -->
<g id="node14" class="node">
<title>Node14</title>
<g id="a_node14"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/resize.html#" xlink:title=" ">
<g id="a_node14"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/resize#" xlink:title=" ">
<polygon fill="white" stroke="black" points="266,-98.5 266,-117.5 361,-117.5 361,-98.5 266,-98.5"/>
<text text-anchor="middle" x="313.5" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
@@ -311,7 +311,7 @@
<!-- Node17 -->
<g id="node17" class="node">
<title>Node17</title>
<g id="a_node17"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
<g id="a_node17"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
<polygon fill="white" stroke="black" points="287,-0.5 287,-19.5 340,-19.5 340,-0.5 287,-0.5"/>
<text text-anchor="middle" x="313.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
</a>

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -2,7 +2,7 @@
<area shape="rect" id="node1" title="Main function." alt="" coords="5,275,56,301"/>
<area shape="rect" id="node2" href="$de/d72/geometric__dist_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Self&#45;test implementations." alt="" coords="104,275,148,301"/>
<area shape="rect" id="node3" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a08328dc7d62188427111f176b56a105a" title="The cumulative distribution function." alt="" coords="429,5,615,61"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="486,275,558,301"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="486,275,558,301"/>
<area shape="rect" id="node6" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a41051365f8ac7700f2ed5880a6760413" title="The expected value of a geometrically distributed random variable X." alt="" coords="429,325,615,381"/>
<area shape="rect" id="node7" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aaf762e88c66918d7afda4234f28a7ddf" title="The inverse cumulative distribution function." alt="" coords="663,259,875,315"/>
<area shape="rect" id="node9" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aee973db9f0435e0cb4cc70f8eb3447a1" title="The probability density function." alt="" coords="196,144,381,200"/>
@@ -10,11 +10,11 @@
<area shape="rect" id="node12" href="$de/d72/geometric__dist_8cpp.html#a70fd1cc5c3a2813f28683dc75dcd65b6" title="Tests the sampling method of the geometric distribution." alt="" coords="242,395,335,421"/>
<area shape="rect" id="node16" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#aea8b0d649f0dc9a6f8baf3341a0b4960" title="The variance of a geometrically distributed random variable X." alt="" coords="429,536,615,592"/>
<area shape="rect" id="node17" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a0a10c512e13dd3a052e1c6d7f4d6f0f2" title="The standard deviation of a geometrically distributed random variable X." alt="" coords="196,536,381,592"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/pow.html#" title=" " alt="" coords="733,79,805,105"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/log.html#" title=" " alt="" coords="923,273,988,300"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/types/numeric_limits/max.html#" title=" " alt="" coords="439,85,605,112"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/pow#" title=" " alt="" coords="733,79,805,105"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/log#" title=" " alt="" coords="923,273,988,300"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/types/numeric_limits/max#" title=" " alt="" coords="439,85,605,112"/>
<area shape="rect" id="node13" href="$da/d19/classprobability_1_1geometric__dist_1_1geometric__distribution.html#a8aae1cebcf42ed2332f1c7217c401aa3" title="Generates a (discrete) sample according to the geometrical distribution." alt="" coords="429,405,615,461"/>
<area shape="rect" id="node15" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/resize.html#" title=" " alt="" coords="459,485,585,512"/>
<area shape="rect" id="node15" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/resize#" title=" " alt="" coords="459,485,585,512"/>
<area shape="rect" id="node14" href="$de/d72/geometric__dist_8cpp.html#a82964ca6180507deb5fafc71050012ba" title="Returns a random number between [0,1]." alt="" coords="689,413,848,454"/>
<area shape="rect" id="node18" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="487,616,557,643"/>
<area shape="rect" id="node18" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="487,616,557,643"/>
</map>

View File

@@ -1 +1 @@
a20e7fc16400640c365d29579bfe789c
b7e70ece64b89b660787a22a4635ace9

View File

@@ -99,7 +99,7 @@ var sectionId = 'dynsection-2';
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="360.5,-256.5 360.5,-275.5 414.5,-275.5 414.5,-256.5 360.5,-256.5"/>
<text text-anchor="middle" x="387.5" y="-263.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -231,7 +231,7 @@ var sectionId = 'dynsection-2';
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/pow.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/pow#" xlink:title=" ">
<polygon fill="white" stroke="black" points="545.5,-403.5 545.5,-422.5 599.5,-422.5 599.5,-403.5 545.5,-403.5"/>
<text text-anchor="middle" x="572.5" y="-410.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::pow</text>
</a>
@@ -246,7 +246,7 @@ var sectionId = 'dynsection-2';
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/log.html#" xlink:title=" ">
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/log#" xlink:title=" ">
<polygon fill="white" stroke="black" points="688,-257.5 688,-276.5 737,-276.5 737,-257.5 688,-257.5"/>
<text text-anchor="middle" x="712.5" y="-264.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::log</text>
</a>
@@ -273,7 +273,7 @@ var sectionId = 'dynsection-2';
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/types/numeric_limits/max.html#" xlink:title=" ">
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/types/numeric_limits/max#" xlink:title=" ">
<polygon fill="white" stroke="black" points="325.5,-398.5 325.5,-417.5 449.5,-417.5 449.5,-398.5 325.5,-398.5"/>
<text text-anchor="middle" x="387.5" y="-405.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::numeric_limits::max</text>
</a>
@@ -317,7 +317,7 @@ var sectionId = 'dynsection-2';
<!-- Node15 -->
<g id="node15" class="node">
<title>Node15</title>
<g id="a_node15"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/resize.html#" xlink:title=" ">
<g id="a_node15"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/resize#" xlink:title=" ">
<polygon fill="white" stroke="black" points="340,-98.5 340,-117.5 435,-117.5 435,-98.5 340,-98.5"/>
<text text-anchor="middle" x="387.5" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
@@ -372,7 +372,7 @@ var sectionId = 'dynsection-2';
<!-- Node18 -->
<g id="node18" class="node">
<title>Node18</title>
<g id="a_node18"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
<g id="a_node18"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
<polygon fill="white" stroke="black" points="361,-0.5 361,-19.5 414,-19.5 414,-0.5 361,-0.5"/>
<text text-anchor="middle" x="387.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
</a>

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -53,7 +53,7 @@
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="360.5,-256.5 360.5,-275.5 414.5,-275.5 414.5,-256.5 360.5,-256.5"/>
<text text-anchor="middle" x="387.5" y="-263.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -185,7 +185,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/pow.html#" xlink:title=" ">
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/pow#" xlink:title=" ">
<polygon fill="white" stroke="black" points="545.5,-403.5 545.5,-422.5 599.5,-422.5 599.5,-403.5 545.5,-403.5"/>
<text text-anchor="middle" x="572.5" y="-410.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::pow</text>
</a>
@@ -200,7 +200,7 @@
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/log.html#" xlink:title=" ">
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/log#" xlink:title=" ">
<polygon fill="white" stroke="black" points="688,-257.5 688,-276.5 737,-276.5 737,-257.5 688,-257.5"/>
<text text-anchor="middle" x="712.5" y="-264.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::log</text>
</a>
@@ -227,7 +227,7 @@
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/types/numeric_limits/max.html#" xlink:title=" ">
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/types/numeric_limits/max#" xlink:title=" ">
<polygon fill="white" stroke="black" points="325.5,-398.5 325.5,-417.5 449.5,-417.5 449.5,-398.5 325.5,-398.5"/>
<text text-anchor="middle" x="387.5" y="-405.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::numeric_limits::max</text>
</a>
@@ -271,7 +271,7 @@
<!-- Node15 -->
<g id="node15" class="node">
<title>Node15</title>
<g id="a_node15"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/resize.html#" xlink:title=" ">
<g id="a_node15"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/resize#" xlink:title=" ">
<polygon fill="white" stroke="black" points="340,-98.5 340,-117.5 435,-117.5 435,-98.5 340,-98.5"/>
<text text-anchor="middle" x="387.5" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
@@ -326,7 +326,7 @@
<!-- Node18 -->
<g id="node18" class="node">
<title>Node18</title>
<g id="a_node18"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
<g id="a_node18"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
<polygon fill="white" stroke="black" points="361,-0.5 361,-19.5 414,-19.5 414,-0.5 361,-0.5"/>
<text text-anchor="middle" x="387.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
</a>

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: numerical_methods/qr_eigen_values.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -181,22 +181,22 @@ Functions</h2></td></tr>
</table>
</dd>
</dl>
<div class="fragment"><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> <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> &gt;&gt; 1;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = A-&gt;size();</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="preprocessor">#ifdef _OPENMP</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#pragma omp for</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">for</span> (i = 0; i &lt; <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> A[0][i][i] = (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % <a class="code hl_define" href="../../de/d75/qr__eigen__values_8cpp.html#aee57a411f07599034f5ceb8cc7d65b40">LIMS</a>) - lim2;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordflow">for</span> (j = i + 1; j &lt; <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; j++) {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> tmp = (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % <a class="code hl_define" href="../../de/d75/qr__eigen__values_8cpp.html#aee57a411f07599034f5ceb8cc7d65b40">LIMS</a>) - lim2;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> A[0][i][j] = tmp; <span class="comment">// summetrically distribute random values</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> A[0][j][i] = tmp;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> }</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> }</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>}</div>
<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="../../de/d75/qr__eigen__values_8cpp.html#aee57a411f07599034f5ceb8cc7d65b40">LIMS</a> &gt;&gt; 1;</div>
<div class="line"><span class="lineno"> 30</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = A-&gt;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 &lt; <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
<div class="line"><span class="lineno"> 36</span> A[0][i][i] = (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % <a class="code hl_define" href="../../de/d75/qr__eigen__values_8cpp.html#aee57a411f07599034f5ceb8cc7d65b40">LIMS</a>) - lim2;</div>
<div class="line"><span class="lineno"> 37</span> <span class="keywordflow">for</span> (j = i + 1; j &lt; <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; j++) {</div>
<div class="line"><span class="lineno"> 38</span> tmp = (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % <a class="code hl_define" href="../../de/d75/qr__eigen__values_8cpp.html#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>
<div class="line"><span class="lineno"> 41</span> }</div>
<div class="line"><span class="lineno"> 42</span> }</div>
<div class="line"><span class="lineno"> 43</span>}</div>
<div class="ttc" id="adata__structures_2sparse__table_8cpp_html_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><div class="ttname"><a href="../../d6/d42/data__structures_2sparse__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> sparse_table.cpp:47</div></div>
<div class="ttc" id="aqr__eigen__values_8cpp_html_aee57a411f07599034f5ceb8cc7d65b40"><div class="ttname"><a href="../../de/d75/qr__eigen__values_8cpp.html#aee57a411f07599034f5ceb8cc7d65b40">LIMS</a></div><div class="ttdeci">#define LIMS</div><div class="ttdef"><b>Definition:</b> qr_eigen_values.cpp:20</div></div>
<div class="ttc" id="arand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a></div><div class="ttdeci">T rand(T... args)</div></div>
@@ -235,48 +235,48 @@ Here is the call graph for this function:</div>
</table>
</div><div class="memdoc">
<p >main function </p>
<div class="fragment"><div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> {</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>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> <span class="keywordflow">if</span> (argc == 2) {</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> <a class="code hl_variable" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9977ad12548c4a49dee9dc3f0685aa54">mat_size</a> = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/atoi.html">atoi</a>(argv[1]);</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> } <span class="keywordflow">else</span> { <span class="comment">// if invalid input argument is given run tests</span></div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> <a class="code hl_function" href="../../de/d75/qr__eigen__values_8cpp.html#a1440a7779ac56f47a3f355ce4a8c7da0">test1</a>();</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <a class="code hl_function" href="../../de/d75/qr__eigen__values_8cpp.html#a0283886819c7c140a023582b7269e2d0">test2</a>();</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Usage: ./qr_eigen_values [mat_size]\n&quot;</span>;</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> }</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> </div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9977ad12548c4a49dee9dc3f0685aa54">mat_size</a> &lt; 2) {</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/c/fprintf.html">fprintf</a>(stderr, <span class="stringliteral">&quot;Matrix size should be &gt; 2\n&quot;</span>);</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> <span class="keywordflow">return</span> -1;</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> }</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> </div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> <span class="comment">// initialize random number generator</span></div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a>(<span class="keyword">nullptr</span>));</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> </div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> <span class="keywordtype">int</span> i, rows = <a class="code hl_variable" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9977ad12548c4a49dee9dc3f0685aa54">mat_size</a>, columns = <a class="code hl_variable" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9977ad12548c4a49dee9dc3f0685aa54">mat_size</a>;</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> </div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;std::valarray&lt;double&gt;</a>&gt; A(rows);</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> </div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; rows; i++) {</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> A[i] = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;double&gt;</a>(columns);</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> }</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> </div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="comment">/* create a random matrix */</span></div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <a class="code hl_function" href="../../de/d75/qr__eigen__values_8cpp.html#a9bbf469d5525a816b0d6ca812119093d">create_matrix</a>(&amp;A);</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> </div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; A &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> </div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> clock_t t1 = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/clock.html">clock</a>();</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;double&gt;</a> eigen_vals = <a class="code hl_function" href="../../d2/d3b/namespaceqr__algorithm.html#a28e2fa3e803abaea6c568dc45d69d8cc">qr_algorithm::eigen_values</a>(&amp;A);</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> <span class="keywordtype">double</span> dtime = <span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/clock.html">clock</a>() - t1) / CLOCKS_PER_SEC;</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> </div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Eigen vals: &quot;</span>;</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> <span class="keywordflow">for</span> (i = 0; i &lt; <a class="code hl_variable" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9977ad12548c4a49dee9dc3f0685aa54">mat_size</a>; i++) <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; eigen_vals[i] &lt;&lt; <span class="stringliteral">&quot;\t&quot;</span>;</div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\nTime taken to compute: &quot;</span> &lt;&lt; dtime &lt;&lt; <span class="stringliteral">&quot; sec\n&quot;</span>;</div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> </div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 243</span> {</div>
<div class="line"><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>
<div class="line"><span class="lineno"> 245</span> <span class="keywordflow">if</span> (argc == 2) {</div>
<div class="line"><span class="lineno"> 246</span> <a class="code hl_variable" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9977ad12548c4a49dee9dc3f0685aa54">mat_size</a> = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/atoi.html">atoi</a>(argv[1]);</div>
<div class="line"><span class="lineno"> 247</span> } <span class="keywordflow">else</span> { <span class="comment">// if invalid input argument is given run tests</span></div>
<div class="line"><span class="lineno"> 248</span> <a class="code hl_function" href="../../de/d75/qr__eigen__values_8cpp.html#a1440a7779ac56f47a3f355ce4a8c7da0">test1</a>();</div>
<div class="line"><span class="lineno"> 249</span> <a class="code hl_function" href="../../de/d75/qr__eigen__values_8cpp.html#a0283886819c7c140a023582b7269e2d0">test2</a>();</div>
<div class="line"><span class="lineno"> 250</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Usage: ./qr_eigen_values [mat_size]\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 251</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 252</span> }</div>
<div class="line"><span class="lineno"> 253</span> </div>
<div class="line"><span class="lineno"> 254</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9977ad12548c4a49dee9dc3f0685aa54">mat_size</a> &lt; 2) {</div>
<div class="line"><span class="lineno"> 255</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/c/fprintf.html">fprintf</a>(stderr, <span class="stringliteral">&quot;Matrix size should be &gt; 2\n&quot;</span>);</div>
<div class="line"><span class="lineno"> 256</span> <span class="keywordflow">return</span> -1;</div>
<div class="line"><span class="lineno"> 257</span> }</div>
<div class="line"><span class="lineno"> 258</span> </div>
<div class="line"><span class="lineno"> 259</span> <span class="comment">// initialize random number generator</span></div>
<div class="line"><span class="lineno"> 260</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a>(<span class="keyword">nullptr</span>));</div>
<div class="line"><span class="lineno"> 261</span> </div>
<div class="line"><span class="lineno"> 262</span> <span class="keywordtype">int</span> i, rows = <a class="code hl_variable" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9977ad12548c4a49dee9dc3f0685aa54">mat_size</a>, columns = <a class="code hl_variable" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9977ad12548c4a49dee9dc3f0685aa54">mat_size</a>;</div>
<div class="line"><span class="lineno"> 263</span> </div>
<div class="line"><span class="lineno"> 264</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;std::valarray&lt;double&gt;</a>&gt; A(rows);</div>
<div class="line"><span class="lineno"> 265</span> </div>
<div class="line"><span class="lineno"> 266</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; rows; i++) {</div>
<div class="line"><span class="lineno"> 267</span> A[i] = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;double&gt;</a>(columns);</div>
<div class="line"><span class="lineno"> 268</span> }</div>
<div class="line"><span class="lineno"> 269</span> </div>
<div class="line"><span class="lineno"> 270</span> <span class="comment">/* create a random matrix */</span></div>
<div class="line"><span class="lineno"> 271</span> <a class="code hl_function" href="../../de/d75/qr__eigen__values_8cpp.html#a9bbf469d5525a816b0d6ca812119093d">create_matrix</a>(&amp;A);</div>
<div class="line"><span class="lineno"> 272</span> </div>
<div class="line"><span class="lineno"> 273</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; A &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 274</span> </div>
<div class="line"><span class="lineno"> 275</span> clock_t t1 = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/clock.html">clock</a>();</div>
<div class="line"><span class="lineno"> 276</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;double&gt;</a> eigen_vals = <a class="code hl_function" href="../../d2/d3b/namespaceqr__algorithm.html#a28e2fa3e803abaea6c568dc45d69d8cc">qr_algorithm::eigen_values</a>(&amp;A);</div>
<div class="line"><span class="lineno"> 277</span> <span class="keywordtype">double</span> dtime = <span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/clock.html">clock</a>() - t1) / CLOCKS_PER_SEC;</div>
<div class="line"><span class="lineno"> 278</span> </div>
<div class="line"><span class="lineno"> 279</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Eigen vals: &quot;</span>;</div>
<div class="line"><span class="lineno"> 280</span> <span class="keywordflow">for</span> (i = 0; i &lt; <a class="code hl_variable" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9977ad12548c4a49dee9dc3f0685aa54">mat_size</a>; i++) <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; eigen_vals[i] &lt;&lt; <span class="stringliteral">&quot;\t&quot;</span>;</div>
<div class="line"><span class="lineno"> 281</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\nTime taken to compute: &quot;</span> &lt;&lt; dtime &lt;&lt; <span class="stringliteral">&quot; sec\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 282</span> </div>
<div class="line"><span class="lineno"> 283</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 284</span>}</div>
<div class="ttc" id="aatoi_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/byte/atoi.html">std::atoi</a></div><div class="ttdeci">T atoi(T... args)</div></div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="aclock_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/c/clock.html">std::clock</a></div><div class="ttdeci">T clock(T... args)</div></div>
@@ -342,25 +342,25 @@ Here is the call graph for this function:</div>
<dl class="section return"><dt>Returns</dt><dd>pointer to resultant matrix </dd></dl>
</li>
</ul>
<div class="fragment"><div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> {</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordtype">int</span> R1 = A.size();</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">int</span> C1 = A[0].size();</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordtype">int</span> R2 = B.size();</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordtype">int</span> C2 = B[0].size();</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">if</span> (C1 != R2) {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/c/perror.html">perror</a>(<span class="stringliteral">&quot;Matrix dimensions mismatch!&quot;</span>);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">return</span>;</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> }</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; R1; i++) {</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; C2; j++) {</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> OUT[0][i][j] = 0.f;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = 0; <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> &lt; C1; <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>++) {</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> OUT[0][i][j] += A[i][<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>] * B[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>][j];</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> }</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> }</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 56</span> {</div>
<div class="line"><span class="lineno"> 57</span> <span class="keywordtype">int</span> R1 = A.size();</div>
<div class="line"><span class="lineno"> 58</span> <span class="keywordtype">int</span> C1 = A[0].size();</div>
<div class="line"><span class="lineno"> 59</span> <span class="keywordtype">int</span> R2 = B.size();</div>
<div class="line"><span class="lineno"> 60</span> <span class="keywordtype">int</span> C2 = B[0].size();</div>
<div class="line"><span class="lineno"> 61</span> <span class="keywordflow">if</span> (C1 != R2) {</div>
<div class="line"><span class="lineno"> 62</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/c/perror.html">perror</a>(<span class="stringliteral">&quot;Matrix dimensions mismatch!&quot;</span>);</div>
<div class="line"><span class="lineno"> 63</span> <span class="keywordflow">return</span>;</div>
<div class="line"><span class="lineno"> 64</span> }</div>
<div class="line"><span class="lineno"> 65</span> </div>
<div class="line"><span class="lineno"> 66</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; R1; i++) {</div>
<div class="line"><span class="lineno"> 67</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; C2; j++) {</div>
<div class="line"><span class="lineno"> 68</span> OUT[0][i][j] = 0.f;</div>
<div class="line"><span class="lineno"> 69</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = 0; <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> &lt; C1; <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>++) {</div>
<div class="line"><span class="lineno"> 70</span> OUT[0][i][j] += A[i][<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>] * B[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>][j];</div>
<div class="line"><span class="lineno"> 71</span> }</div>
<div class="line"><span class="lineno"> 72</span> }</div>
<div class="line"><span class="lineno"> 73</span> }</div>
<div class="line"><span class="lineno"> 74</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> composite_simpson_rule.cpp:117</div></div>
<div class="ttc" id="aperror_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/c/perror.html">std::perror</a></div><div class="ttdeci">T perror(T... args)</div></div>
</div><!-- fragment -->
@@ -384,27 +384,27 @@ Here is the call graph for this function:</div>
\[\begin{bmatrix} 5 &amp; 7\\ 7 &amp; 11 \end{bmatrix}\]
</p>
<p> which are approximately, {15.56158, 0.384227} </p>
<div class="fragment"><div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> {</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;std::valarray&lt;double&gt;</a>&gt; X = {{5, 7}, {7, 11}};</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="keywordtype">double</span> y[] = {15.56158, 0.384227}; <span class="comment">// corresponding y-values</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> </div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;------- Test 1 -------&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;double&gt;</a> eig_vals = <a class="code hl_function" href="../../d2/d3b/namespaceqr__algorithm.html#a28e2fa3e803abaea6c568dc45d69d8cc">qr_algorithm::eigen_values</a>(&amp;X);</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> </div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 2; i++) {</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; i + 1 &lt;&lt; <span class="stringliteral">&quot;/2 Checking for &quot;</span> &lt;&lt; y[i] &lt;&lt; <span class="stringliteral">&quot; --&gt; &quot;</span>;</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; 2 &amp;&amp; !<a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>; j++) {</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="keywordflow">if</span> (std::abs(y[i] - eig_vals[j]) &lt; 0.1) {</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;(&quot;</span> &lt;&lt; eig_vals[j] &lt;&lt; <span class="stringliteral">&quot;) &quot;</span>;</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> }</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> }</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> assert(result); <span class="comment">// ensure that i^th expected eigen value was computed</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;found\n&quot;</span>;</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> }</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 1 Passed\n\n&quot;</span>;</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 177</span> {</div>
<div class="line"><span class="lineno"> 178</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;std::valarray&lt;double&gt;</a>&gt; X = {{5, 7}, {7, 11}};</div>
<div class="line"><span class="lineno"> 179</span> <span class="keywordtype">double</span> y[] = {15.56158, 0.384227}; <span class="comment">// corresponding y-values</span></div>
<div class="line"><span class="lineno"> 180</span> </div>
<div class="line"><span class="lineno"> 181</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;------- Test 1 -------&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 182</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;double&gt;</a> eig_vals = <a class="code hl_function" href="../../d2/d3b/namespaceqr__algorithm.html#a28e2fa3e803abaea6c568dc45d69d8cc">qr_algorithm::eigen_values</a>(&amp;X);</div>
<div class="line"><span class="lineno"> 183</span> </div>
<div class="line"><span class="lineno"> 184</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 2; i++) {</div>
<div class="line"><span class="lineno"> 185</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; i + 1 &lt;&lt; <span class="stringliteral">&quot;/2 Checking for &quot;</span> &lt;&lt; y[i] &lt;&lt; <span class="stringliteral">&quot; --&gt; &quot;</span>;</div>
<div class="line"><span class="lineno"> 186</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 187</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; 2 &amp;&amp; !<a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>; j++) {</div>
<div class="line"><span class="lineno"> 188</span> <span class="keywordflow">if</span> (std::abs(y[i] - eig_vals[j]) &lt; 0.1) {</div>
<div class="line"><span class="lineno"> 189</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 190</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;(&quot;</span> &lt;&lt; eig_vals[j] &lt;&lt; <span class="stringliteral">&quot;) &quot;</span>;</div>
<div class="line"><span class="lineno"> 191</span> }</div>
<div class="line"><span class="lineno"> 192</span> }</div>
<div class="line"><span class="lineno"> 193</span> assert(result); <span class="comment">// ensure that i^th expected eigen value was computed</span></div>
<div class="line"><span class="lineno"> 194</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;found\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 195</span> }</div>
<div class="line"><span class="lineno"> 196</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 1 Passed\n\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 197</span>}</div>
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
<div class="ttc" id="afibonacci__sum_8cpp_html_aadb40ac4c74a7efc0680b83eeee138aa"><div class="ttname"><a href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">math::fibonacci_sum::result</a></div><div class="ttdeci">uint64_t result(uint64_t n)</div><div class="ttdef"><b>Definition:</b> fibonacci_sum.cpp:76</div></div>
</div><!-- fragment --><div class="dynheader">
@@ -434,35 +434,35 @@ Here is the call graph for this function:</div>
\[\begin{bmatrix} -4&amp; 4&amp; 2&amp; 0&amp; -3\\ 4&amp; -4&amp; 4&amp; -3&amp; -1\\ 2&amp; 4&amp; 4&amp; 3&amp; -3\\ 0&amp; -3&amp; 3&amp; -1&amp;-1\\ -3&amp; -1&amp; -3&amp; -3&amp; 0 \end{bmatrix}\]
</p>
<p> which are approximately, {9.27648, -9.26948, 2.0181, -1.03516, -5.98994} </p>
<div class="fragment"><div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> {</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;std::valarray&lt;double&gt;</a>&gt; X = {{-4, 4, 2, 0, -3},</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> {4, -4, 4, -3, -1},</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> {2, 4, 4, 3, -3},</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> {0, -3, 3, -1, -3},</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> {-3, -1, -3, -3, 0}};</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <span class="keywordtype">double</span> y[] = {9.27648, -9.26948, 2.0181, -1.03516,</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> -5.98994}; <span class="comment">// corresponding y-values</span></div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> </div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;------- Test 2 -------&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;double&gt;</a> eig_vals = <a class="code hl_function" href="../../d2/d3b/namespaceqr__algorithm.html#a28e2fa3e803abaea6c568dc45d69d8cc">qr_algorithm::eigen_values</a>(&amp;X);</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> </div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; X &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span></div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> &lt;&lt; <span class="stringliteral">&quot;Eigen values: &quot;</span> &lt;&lt; eig_vals &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> </div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 5; i++) {</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; i + 1 &lt;&lt; <span class="stringliteral">&quot;/5 Checking for &quot;</span> &lt;&lt; y[i] &lt;&lt; <span class="stringliteral">&quot; --&gt; &quot;</span>;</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; 5 &amp;&amp; !<a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>; j++) {</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keywordflow">if</span> (std::abs(y[i] - eig_vals[j]) &lt; 0.1) {</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;(&quot;</span> &lt;&lt; eig_vals[j] &lt;&lt; <span class="stringliteral">&quot;) &quot;</span>;</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> }</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> }</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> assert(result); <span class="comment">// ensure that i^th expected eigen value was computed</span></div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;found\n&quot;</span>;</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> }</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 2 Passed\n\n&quot;</span>;</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 210</span> {</div>
<div class="line"><span class="lineno"> 211</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;std::valarray&lt;double&gt;</a>&gt; X = {{-4, 4, 2, 0, -3},</div>
<div class="line"><span class="lineno"> 212</span> {4, -4, 4, -3, -1},</div>
<div class="line"><span class="lineno"> 213</span> {2, 4, 4, 3, -3},</div>
<div class="line"><span class="lineno"> 214</span> {0, -3, 3, -1, -3},</div>
<div class="line"><span class="lineno"> 215</span> {-3, -1, -3, -3, 0}};</div>
<div class="line"><span class="lineno"> 216</span> <span class="keywordtype">double</span> y[] = {9.27648, -9.26948, 2.0181, -1.03516,</div>
<div class="line"><span class="lineno"> 217</span> -5.98994}; <span class="comment">// corresponding y-values</span></div>
<div class="line"><span class="lineno"> 218</span> </div>
<div class="line"><span class="lineno"> 219</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;------- Test 2 -------&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 220</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray&lt;double&gt;</a> eig_vals = <a class="code hl_function" href="../../d2/d3b/namespaceqr__algorithm.html#a28e2fa3e803abaea6c568dc45d69d8cc">qr_algorithm::eigen_values</a>(&amp;X);</div>
<div class="line"><span class="lineno"> 221</span> </div>
<div class="line"><span class="lineno"> 222</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; X &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span></div>
<div class="line"><span class="lineno"> 223</span> &lt;&lt; <span class="stringliteral">&quot;Eigen values: &quot;</span> &lt;&lt; eig_vals &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 224</span> </div>
<div class="line"><span class="lineno"> 225</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 5; i++) {</div>
<div class="line"><span class="lineno"> 226</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; i + 1 &lt;&lt; <span class="stringliteral">&quot;/5 Checking for &quot;</span> &lt;&lt; y[i] &lt;&lt; <span class="stringliteral">&quot; --&gt; &quot;</span>;</div>
<div class="line"><span class="lineno"> 227</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 228</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; 5 &amp;&amp; !<a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>; j++) {</div>
<div class="line"><span class="lineno"> 229</span> <span class="keywordflow">if</span> (std::abs(y[i] - eig_vals[j]) &lt; 0.1) {</div>
<div class="line"><span class="lineno"> 230</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 231</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;(&quot;</span> &lt;&lt; eig_vals[j] &lt;&lt; <span class="stringliteral">&quot;) &quot;</span>;</div>
<div class="line"><span class="lineno"> 232</span> }</div>
<div class="line"><span class="lineno"> 233</span> }</div>
<div class="line"><span class="lineno"> 234</span> assert(result); <span class="comment">// ensure that i^th expected eigen value was computed</span></div>
<div class="line"><span class="lineno"> 235</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;found\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 236</span> }</div>
<div class="line"><span class="lineno"> 237</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 2 Passed\n\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 238</span>}</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -478,7 +478,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

View File

@@ -1,12 +1,12 @@
<map id="test2" name="test2">
<area shape="rect" id="node1" title=" " alt="" coords="5,60,56,87"/>
<area shape="rect" id="node2" href="$d2/d3b/namespaceqr__algorithm.html#a28e2fa3e803abaea6c568dc45d69d8cc" title=" " alt="" coords="104,23,236,65"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="134,89,206,116"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="134,89,206,116"/>
<area shape="rect" id="node3" href="$de/d75/qr__eigen__values_8cpp.html#abb8bf4c55e10685a5eb2ad3797fde1ae" title=" " alt="" coords="341,5,413,32"/>
<area shape="rect" id="node4" href="$d2/d3b/namespaceqr__algorithm.html#a73ce637634fc49e1d10d190eb388ebf1" title=" " alt="" coords="284,56,471,83"/>
<area shape="rect" id="node5" href="$d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35" title=" " alt="" coords="525,5,681,32"/>
<area shape="rect" id="node6" href="$d2/d3b/namespaceqr__algorithm.html#ad16da2183db22378435042f26af43d5f" title=" " alt="" coords="519,56,688,83"/>
<area shape="rect" id="node9" href="$d2/d3b/namespaceqr__algorithm.html#a6d3c7dce1f142141f509d09f6c0e25dc" title=" " alt="" coords="521,107,686,133"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="782,56,853,83"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="782,56,853,83"/>
<area shape="rect" id="node8" href="$d2/d3b/namespaceqr__algorithm.html#a8ea313a1a1b5f9d0e3e332c29c6446ec" title=" " alt="" coords="736,107,899,133"/>
</map>

View File

@@ -1 +1 @@
07b42662cca12b8cc6de389e0a87f448
3a1ee05f7d4bd2920f81bb54da8bb440

View File

@@ -83,7 +83,7 @@ var sectionId = 'dynsection-4';
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="96.5,-13.5 96.5,-32.5 150.5,-32.5 150.5,-13.5 96.5,-13.5"/>
<text text-anchor="middle" x="123.5" y="-20.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -173,7 +173,7 @@ var sectionId = 'dynsection-4';
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
<polygon fill="white" stroke="black" points="582.5,-38.5 582.5,-57.5 635.5,-57.5 635.5,-38.5 582.5,-38.5"/>
<text text-anchor="middle" x="609" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
</a>

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -37,7 +37,7 @@
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="96.5,-13.5 96.5,-32.5 150.5,-32.5 150.5,-13.5 96.5,-13.5"/>
<text text-anchor="middle" x="123.5" y="-20.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -127,7 +127,7 @@
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
<polygon fill="white" stroke="black" points="582.5,-38.5 582.5,-57.5 635.5,-57.5 635.5,-38.5 582.5,-38.5"/>
<text text-anchor="middle" x="609" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
</a>

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -1,12 +1,12 @@
<map id="test1" name="test1">
<area shape="rect" id="node1" title=" " alt="" coords="5,60,56,87"/>
<area shape="rect" id="node2" href="$d2/d3b/namespaceqr__algorithm.html#a28e2fa3e803abaea6c568dc45d69d8cc" title=" " alt="" coords="104,23,236,65"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="134,89,206,116"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="134,89,206,116"/>
<area shape="rect" id="node3" href="$de/d75/qr__eigen__values_8cpp.html#abb8bf4c55e10685a5eb2ad3797fde1ae" title=" " alt="" coords="341,5,413,32"/>
<area shape="rect" id="node4" href="$d2/d3b/namespaceqr__algorithm.html#a73ce637634fc49e1d10d190eb388ebf1" title=" " alt="" coords="284,56,471,83"/>
<area shape="rect" id="node5" href="$d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35" title=" " alt="" coords="525,5,681,32"/>
<area shape="rect" id="node6" href="$d2/d3b/namespaceqr__algorithm.html#ad16da2183db22378435042f26af43d5f" title=" " alt="" coords="519,56,688,83"/>
<area shape="rect" id="node9" href="$d2/d3b/namespaceqr__algorithm.html#a6d3c7dce1f142141f509d09f6c0e25dc" title=" " alt="" coords="521,107,686,133"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="782,56,853,83"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="782,56,853,83"/>
<area shape="rect" id="node8" href="$d2/d3b/namespaceqr__algorithm.html#a8ea313a1a1b5f9d0e3e332c29c6446ec" title=" " alt="" coords="736,107,899,133"/>
</map>

View File

@@ -1 +1 @@
90ff97f917ffaf005ea0b06644ee1216
541595806fca1c87441b0347c6414c18

View File

@@ -83,7 +83,7 @@ var sectionId = 'dynsection-3';
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="96.5,-13.5 96.5,-32.5 150.5,-32.5 150.5,-13.5 96.5,-13.5"/>
<text text-anchor="middle" x="123.5" y="-20.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -173,7 +173,7 @@ var sectionId = 'dynsection-3';
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
<polygon fill="white" stroke="black" points="582.5,-38.5 582.5,-57.5 635.5,-57.5 635.5,-38.5 582.5,-38.5"/>
<text text-anchor="middle" x="609" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
</a>

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -37,7 +37,7 @@
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="96.5,-13.5 96.5,-32.5 150.5,-32.5 150.5,-13.5 96.5,-13.5"/>
<text text-anchor="middle" x="123.5" y="-20.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
@@ -127,7 +127,7 @@
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
<polygon fill="white" stroke="black" points="582.5,-38.5 582.5,-57.5 635.5,-57.5 635.5,-38.5 582.5,-38.5"/>
<text text-anchor="middle" x="609" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
</a>

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -2,17 +2,17 @@
<area shape="rect" id="node1" title=" " alt="" coords="5,132,56,159"/>
<area shape="rect" id="node2" href="$de/d75/qr__eigen__values_8cpp.html#a9bbf469d5525a816b0d6ca812119093d" title=" " alt="" coords="104,5,205,32"/>
<area shape="rect" id="node4" href="$d2/d3b/namespaceqr__algorithm.html#a28e2fa3e803abaea6c568dc45d69d8cc" title=" " alt="" coords="253,91,385,133"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/srand.html#" title=" " alt="" coords="115,208,195,235"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/srand#" title=" " alt="" coords="115,208,195,235"/>
<area shape="rect" id="node13" href="$de/d75/qr__eigen__values_8cpp.html#a1440a7779ac56f47a3f355ce4a8c7da0" title=" " alt="" coords="129,107,180,133"/>
<area shape="rect" id="node15" href="$de/d75/qr__eigen__values_8cpp.html#a0283886819c7c140a023582b7269e2d0" title=" " alt="" coords="129,157,180,184"/>
<area shape="rect" id="node16" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/chrono/c/time.html#" title=" " alt="" coords="118,259,191,285"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand.html#" title=" " alt="" coords="283,5,356,32"/>
<area shape="rect" id="node16" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/chrono/c/time#" title=" " alt="" coords="118,259,191,285"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand#" title=" " alt="" coords="283,5,356,32"/>
<area shape="rect" id="node5" href="$de/d75/qr__eigen__values_8cpp.html#abb8bf4c55e10685a5eb2ad3797fde1ae" title=" " alt="" coords="491,73,563,100"/>
<area shape="rect" id="node6" href="$d2/d3b/namespaceqr__algorithm.html#a73ce637634fc49e1d10d190eb388ebf1" title=" " alt="" coords="433,124,620,151"/>
<area shape="rect" id="node7" href="$d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35" title=" " alt="" coords="675,73,831,100"/>
<area shape="rect" id="node8" href="$d2/d3b/namespaceqr__algorithm.html#ad16da2183db22378435042f26af43d5f" title=" " alt="" coords="668,124,837,151"/>
<area shape="rect" id="node11" href="$d2/d3b/namespaceqr__algorithm.html#a6d3c7dce1f142141f509d09f6c0e25dc" title=" " alt="" coords="670,175,835,201"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="931,124,1002,151"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="931,124,1002,151"/>
<area shape="rect" id="node10" href="$d2/d3b/namespaceqr__algorithm.html#a8ea313a1a1b5f9d0e3e332c29c6446ec" title=" " alt="" coords="885,175,1048,201"/>
<area shape="rect" id="node14" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="283,157,355,184"/>
<area shape="rect" id="node14" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="283,157,355,184"/>
</map>

View File

@@ -1 +1 @@
d2b3e777c146fc05293f3da43e3376a7
f6e4a8c18cb1bc48e57ef2c411b8fd6c

View File

@@ -98,7 +98,7 @@ var sectionId = 'dynsection-2';
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/srand.html#" xlink:title=" ">
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/srand#" xlink:title=" ">
<polygon fill="white" stroke="black" points="82,-38.5 82,-57.5 142,-57.5 142,-38.5 82,-38.5"/>
<text text-anchor="middle" x="112" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::srand</text>
</a>
@@ -143,7 +143,7 @@ var sectionId = 'dynsection-2';
<!-- Node16 -->
<g id="node16" class="node">
<title>Node16</title>
<g id="a_node16"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/chrono/c/time.html#" xlink:title=" ">
<g id="a_node16"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/chrono/c/time#" xlink:title=" ">
<polygon fill="white" stroke="black" points="84.5,-0.5 84.5,-19.5 139.5,-19.5 139.5,-0.5 84.5,-0.5"/>
<text text-anchor="middle" x="112" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::time</text>
</a>
@@ -158,7 +158,7 @@ var sectionId = 'dynsection-2';
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand#" xlink:title=" ">
<polygon fill="white" stroke="black" points="208,-190.5 208,-209.5 263,-209.5 263,-190.5 208,-190.5"/>
<text text-anchor="middle" x="235.5" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::rand</text>
</a>
@@ -248,7 +248,7 @@ var sectionId = 'dynsection-2';
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
<polygon fill="white" stroke="black" points="694.5,-101.5 694.5,-120.5 747.5,-120.5 747.5,-101.5 694.5,-101.5"/>
<text text-anchor="middle" x="721" y="-108.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
</a>
@@ -290,7 +290,7 @@ var sectionId = 'dynsection-2';
<!-- Node14 -->
<g id="node14" class="node">
<title>Node14</title>
<g id="a_node14"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node14"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="208.5,-76.5 208.5,-95.5 262.5,-95.5 262.5,-76.5 208.5,-76.5"/>
<text text-anchor="middle" x="235.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -52,7 +52,7 @@
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/srand.html#" xlink:title=" ">
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/srand#" xlink:title=" ">
<polygon fill="white" stroke="black" points="82,-38.5 82,-57.5 142,-57.5 142,-38.5 82,-38.5"/>
<text text-anchor="middle" x="112" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::srand</text>
</a>
@@ -97,7 +97,7 @@
<!-- Node16 -->
<g id="node16" class="node">
<title>Node16</title>
<g id="a_node16"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/chrono/c/time.html#" xlink:title=" ">
<g id="a_node16"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/chrono/c/time#" xlink:title=" ">
<polygon fill="white" stroke="black" points="84.5,-0.5 84.5,-19.5 139.5,-19.5 139.5,-0.5 84.5,-0.5"/>
<text text-anchor="middle" x="112" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::time</text>
</a>
@@ -112,7 +112,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand.html#" xlink:title=" ">
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand#" xlink:title=" ">
<polygon fill="white" stroke="black" points="208,-190.5 208,-209.5 263,-209.5 263,-190.5 208,-190.5"/>
<text text-anchor="middle" x="235.5" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::rand</text>
</a>
@@ -202,7 +202,7 @@
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
<polygon fill="white" stroke="black" points="694.5,-101.5 694.5,-120.5 747.5,-120.5 747.5,-101.5 694.5,-101.5"/>
<text text-anchor="middle" x="721" y="-108.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
</a>
@@ -244,7 +244,7 @@
<!-- Node14 -->
<g id="node14" class="node">
<title>Node14</title>
<g id="a_node14"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<g id="a_node14"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
<polygon fill="white" stroke="black" points="208.5,-76.5 208.5,-95.5 262.5,-95.5 262.5,-76.5 208.5,-76.5"/>
<text text-anchor="middle" x="235.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,4 +1,4 @@
<map id="create_matrix" name="create_matrix">
<area shape="rect" id="node1" title=" " alt="" coords="5,5,107,32"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand.html#" title=" " alt="" coords="155,5,228,32"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand#" title=" " alt="" coords="155,5,228,32"/>
</map>

View File

@@ -1 +1 @@
ec9402605a190407422cafeb37b9f64c
8303e4c649929acc39cad9f818ee6ab7

View File

@@ -21,7 +21,7 @@
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand.html#" xlink:title=" ">
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand#" xlink:title=" ">
<polygon fill="white" stroke="black" points="112,-0.5 112,-19.5 167,-19.5 167,-0.5 112,-0.5"/>
<text text-anchor="middle" x="139.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::rand</text>
</a>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1,4 +1,4 @@
<map id="std::is_arithmetic&lt; uint256_t &gt;" name="std::is_arithmetic&lt; uint256_t &gt;">
<area shape="rect" id="node1" title=" " alt="" coords="5,80,128,121"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/types/integral_constant.html" title=" " alt="" coords="15,5,118,32"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/types/integral_constant" title=" " alt="" coords="15,5,118,32"/>
</map>

View File

@@ -1 +1 @@
7f6e0ef14ebc44a33a081665e38df858
913d5b81af31046d2f9d4f42d8959446

View File

@@ -22,8 +22,8 @@
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/types/integral_constant.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="7.5,-67.5 7.5,-86.5 84.5,-86.5 84.5,-67.5 7.5,-67.5"/>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/types/integral_constant" xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="7.5,-67.5 7.5,-86.5 84.5,-86.5 84.5,-67.5 7.5,-67.5"/>
<text text-anchor="middle" x="46" y="-74.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::true_type</text>
</a>
</g>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: sorting/merge_insertion_sort.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -208,24 +208,24 @@ template&lt;typename T , size_t N&gt; </div>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordtype">size_t</span> i = 0, j = 0;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> T *ptr = A-&gt;<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array/data.html">data</a>();</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">for</span> (i = start; i &lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">end</a>; i++) {</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> T temp = ptr[i];</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> j = i;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">while</span> (j &gt; start &amp;&amp; temp &lt; ptr[j - 1]) {</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> ptr[j] = ptr[j - 1];</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> j--;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> }</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="comment">// for (j = i; j &gt; start &amp;&amp; temp &lt; ptr[j - 1]; --j) {</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="comment">// ptr[j] = ptr[j - 1];</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> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> ptr[j] = temp;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> }</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 37</span> {</div>
<div class="line"><span class="lineno"> 38</span> <span class="keywordtype">size_t</span> i = 0, j = 0;</div>
<div class="line"><span class="lineno"> 39</span> T *ptr = A-&gt;<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array/data.html">data</a>();</div>
<div class="line"><span class="lineno"> 40</span> </div>
<div class="line"><span class="lineno"> 41</span> <span class="keywordflow">for</span> (i = start; i &lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">end</a>; i++) {</div>
<div class="line"><span class="lineno"> 42</span> T temp = ptr[i];</div>
<div class="line"><span class="lineno"> 43</span> j = i;</div>
<div class="line"><span class="lineno"> 44</span> <span class="keywordflow">while</span> (j &gt; start &amp;&amp; temp &lt; ptr[j - 1]) {</div>
<div class="line"><span class="lineno"> 45</span> ptr[j] = ptr[j - 1];</div>
<div class="line"><span class="lineno"> 46</span> j--;</div>
<div class="line"><span class="lineno"> 47</span> }</div>
<div class="line"><span class="lineno"> 48</span> <span class="comment">// for (j = i; j &gt; start &amp;&amp; temp &lt; ptr[j - 1]; --j) {</span></div>
<div class="line"><span class="lineno"> 49</span> <span class="comment">// ptr[j] = ptr[j - 1];</span></div>
<div class="line"><span class="lineno"> 50</span> <span class="comment">// }</span></div>
<div class="line"><span class="lineno"> 51</span> </div>
<div class="line"><span class="lineno"> 52</span> ptr[j] = temp;</div>
<div class="line"><span class="lineno"> 53</span> }</div>
<div class="line"><span class="lineno"> 54</span>}</div>
<div class="ttc" id="adata_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array/data.html">std::array::data</a></div><div class="ttdeci">T data(T... args)</div></div>
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a></div><div class="ttdeci">T end(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
@@ -255,11 +255,11 @@ Here is the call graph for this function:</div>
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><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> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a>(<span class="keyword">nullptr</span>));</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>();</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 159</span> {</div>
<div class="line"><span class="lineno"> 160</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a>(<span class="keyword">nullptr</span>));</div>
<div class="line"><span class="lineno"> 161</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>();</div>
<div class="line"><span class="lineno"> 162</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 163</span>}</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> merge_insertion_sort.cpp:132</div></div>
<div class="ttc" id="asrand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a></div><div class="ttdeci">T srand(T... args)</div></div>
<div class="ttc" id="atime_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a></div><div class="ttdeci">T time(T... args)</div></div>
@@ -337,31 +337,31 @@ template&lt;typename T , size_t N&gt; </div>
</table>
</dd>
</dl>
<div class="fragment"><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="keywordtype">size_t</span> firstIndex = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">min</a>;</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>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">auto</span> ptr = array-&gt;<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array/data.html">data</a>();</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;T, N + 1&gt;</a> tempArray{0};</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="comment">// While there are elements in the left or right runs</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> index = min; index &lt;= <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">max</a>; index++) {</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="comment">// If left run head exists and is &lt;= existing right run head.</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">if</span> (firstIndex &lt;= mid &amp;&amp;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> (secondIndex &gt; max || ptr[firstIndex] &lt;= ptr[secondIndex])) {</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> tempArray[index] = ptr[firstIndex];</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> firstIndex++;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> tempArray[index] = ptr[secondIndex];</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> secondIndex++;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> }</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> }</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">// transfer to the initial array</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/memcpy.html">memcpy</a>(ptr + min, tempArray.data() + min, (max - min) * <span class="keyword">sizeof</span>(T));</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="comment">// for (int index = min; index &lt;= max; index++) ptr[index] =</span></div>
<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 class="fragment"><div class="line"><span class="lineno"> 67</span> {</div>
<div class="line"><span class="lineno"> 68</span> <span class="keywordtype">size_t</span> firstIndex = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">min</a>;</div>
<div class="line"><span class="lineno"> 69</span> <span class="keywordtype">size_t</span> secondIndex = mid + 1;</div>
<div class="line"><span class="lineno"> 70</span> </div>
<div class="line"><span class="lineno"> 71</span> <span class="keyword">auto</span> ptr = array-&gt;<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array/data.html">data</a>();</div>
<div class="line"><span class="lineno"> 72</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;T, N + 1&gt;</a> tempArray{0};</div>
<div class="line"><span class="lineno"> 73</span> </div>
<div class="line"><span class="lineno"> 74</span> <span class="comment">// While there are elements in the left or right runs</span></div>
<div class="line"><span class="lineno"> 75</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> index = min; index &lt;= <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">max</a>; index++) {</div>
<div class="line"><span class="lineno"> 76</span> <span class="comment">// If left run head exists and is &lt;= existing right run head.</span></div>
<div class="line"><span class="lineno"> 77</span> <span class="keywordflow">if</span> (firstIndex &lt;= mid &amp;&amp;</div>
<div class="line"><span class="lineno"> 78</span> (secondIndex &gt; max || ptr[firstIndex] &lt;= ptr[secondIndex])) {</div>
<div class="line"><span class="lineno"> 79</span> tempArray[index] = ptr[firstIndex];</div>
<div class="line"><span class="lineno"> 80</span> firstIndex++;</div>
<div class="line"><span class="lineno"> 81</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno"> 82</span> tempArray[index] = ptr[secondIndex];</div>
<div class="line"><span class="lineno"> 83</span> secondIndex++;</div>
<div class="line"><span class="lineno"> 84</span> }</div>
<div class="line"><span class="lineno"> 85</span> }</div>
<div class="line"><span class="lineno"> 86</span> </div>
<div class="line"><span class="lineno"> 87</span> <span class="comment">// transfer to the initial array</span></div>
<div class="line"><span class="lineno"> 88</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/memcpy.html">memcpy</a>(ptr + min, tempArray.data() + min, (max - min) * <span class="keyword">sizeof</span>(T));</div>
<div class="line"><span class="lineno"> 89</span> <span class="comment">// for (int index = min; index &lt;= max; index++) ptr[index] =</span></div>
<div class="line"><span class="lineno"> 90</span> <span class="comment">// tempArray[index];</span></div>
<div class="line"><span class="lineno"> 91</span>}</div>
<div class="ttc" id="aarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a></div></div>
<div class="ttc" id="amax_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a></div><div class="ttdeci">T max(T... args)</div></div>
<div class="ttc" id="amemcpy_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/byte/memcpy.html">std::memcpy</a></div><div class="ttdeci">T memcpy(T... args)</div></div>
@@ -432,22 +432,22 @@ template&lt;typename T , size_t N&gt; </div>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> {</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <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) &lt;= threshold) {</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#a0cba4fbf287ab8cb978ed7f8fef886b1">InsertionSort</a>(array, min, max);</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="comment">// get the middle point</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordtype">size_t</span> mid = (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">max</a> + <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">min</a>) &gt;&gt; 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> <a class="code hl_function" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">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="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">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> <a class="code hl_function" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">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 class="fragment"><div class="line"><span class="lineno"> 108</span> {</div>
<div class="line"><span class="lineno"> 109</span> <span class="comment">// prerequisite</span></div>
<div class="line"><span class="lineno"> 110</span> <span class="keywordflow">if</span> ((max - min) &lt;= threshold) {</div>
<div class="line"><span class="lineno"> 111</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#a0cba4fbf287ab8cb978ed7f8fef886b1">InsertionSort</a>(array, min, max);</div>
<div class="line"><span class="lineno"> 112</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno"> 113</span> <span class="comment">// get the middle point</span></div>
<div class="line"><span class="lineno"> 114</span> <span class="keywordtype">size_t</span> mid = (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">max</a> + <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">min</a>) &gt;&gt; 1;</div>
<div class="line"><span class="lineno"> 115</span> </div>
<div class="line"><span class="lineno"> 116</span> <span class="comment">// apply merge sort to both parts of this</span></div>
<div class="line"><span class="lineno"> 117</span> <a class="code hl_function" href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort</a>(array, min, mid, threshold);</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"> 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> merge_sort.cpp:33</div></div>
<div class="ttc" id="agroup__sorting_html_gab6b14fea48d9841e29b9fc26be6e05d7"><div class="ttname"><a href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort</a></div><div class="ttdeci">void mergeSort(int *arr, int l, int r)</div><div class="ttdef"><b>Definition:</b> merge_sort.cpp:71</div></div>
<div 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&lt; T, N &gt; *A, size_t start, size_t end)</div><div class="ttdoc">Insertion merge algorithm.</div><div class="ttdef"><b>Definition:</b> merge_insertion_sort.cpp:37</div></div>
@@ -485,28 +485,28 @@ Here is the call graph for this function:</div>
<p>Function to test code using random arrays. </p>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
<div class="fragment"><div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> {</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keyword">constexpr</span> <span class="keywordtype">size_t</span> size = 30;</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;int, size&gt;</a> array{0};</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="comment">// input</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; i++) {</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> array[i] = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 100 - 50;</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; array[i] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<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> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> </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>(&amp;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(&amp;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>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; ++i) {</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; array[i] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> }</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(array), <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a>(array)));</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test passed\n&quot;</span>;</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 132</span> {</div>
<div class="line"><span class="lineno"> 133</span> <span class="keyword">constexpr</span> <span class="keywordtype">size_t</span> size = 30;</div>
<div class="line"><span class="lineno"> 134</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;int, size&gt;</a> array{0};</div>
<div class="line"><span class="lineno"> 135</span> <span class="comment">// input</span></div>
<div class="line"><span class="lineno"> 136</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; i++) {</div>
<div class="line"><span class="lineno"> 137</span> array[i] = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 100 - 50;</div>
<div class="line"><span class="lineno"> 138</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; array[i] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><span class="lineno"> 139</span> }</div>
<div class="line"><span class="lineno"> 140</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 141</span> </div>
<div class="line"><span class="lineno"> 142</span> <a class="code hl_function" href="../../de/d7b/merge__insertion__sort_8cpp.html#a0cba4fbf287ab8cb978ed7f8fef886b1">sorting::merge_insertion::InsertionSort</a>(&amp;array, 0, size);</div>
<div class="line"><span class="lineno"> 143</span> <span class="comment">// sorting::merge_insertion::mergeSort(&amp;array, 0, size, 10);</span></div>
<div class="line"><span class="lineno"> 144</span> </div>
<div class="line"><span class="lineno"> 145</span> <span class="comment">// output</span></div>
<div class="line"><span class="lineno"> 146</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; ++i) {</div>
<div class="line"><span class="lineno"> 147</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; array[i] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><span class="lineno"> 148</span> }</div>
<div class="line"><span class="lineno"> 149</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 150</span> </div>
<div class="line"><span class="lineno"> 151</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(array), <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a>(array)));</div>
<div class="line"><span class="lineno"> 152</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test passed\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 153</span>}</div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
@@ -521,7 +521,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_bb1b521853a9c46347182a9d10420771.html">sorting</a></li><li class="navelem"><a class="el" href="../../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.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>

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