Documentation for ef209dfab3

This commit is contained in:
realstealthninja
2024-09-04 23:46:13 +00:00
parent 2fb0f6c4d8
commit 0ee61d53b7
58 changed files with 2369 additions and 167 deletions

View File

@@ -167,6 +167,12 @@ Functions</h2></td></tr>
<tr class="memitem:a6eb67c2f91c98cf4464f75b5882022de" id="r_a6eb67c2f91c98cf4464f75b5882022de"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a6eb67c2f91c98cf4464f75b5882022de"><td class="memTemplItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a6eb67c2f91c98cf4464f75b5882022de">quicksort</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; T &gt; arr, int32_t low, int32_t high)</td></tr>
<tr class="separator:a6eb67c2f91c98cf4464f75b5882022de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac8f44b28b4aa96444383030b28f8b34" id="r_aac8f44b28b4aa96444383030b28f8b34"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aac8f44b28b4aa96444383030b28f8b34">partition</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int &gt; &amp;arr, int start, int end)</td></tr>
<tr class="memdesc:aac8f44b28b4aa96444383030b28f8b34"><td class="mdescLeft">&#160;</td><td class="mdescRight">The partition function sorts the array from start to end and uses the last element as the pivot. <br /></td></tr>
<tr class="separator:aac8f44b28b4aa96444383030b28f8b34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a263595fd9a0163b5b997b89fab3a0dc5" id="r_a263595fd9a0163b5b997b89fab3a0dc5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a263595fd9a0163b5b997b89fab3a0dc5">iterativeQuickSort</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int &gt; &amp;arr)</td></tr>
<tr class="memdesc:a263595fd9a0163b5b997b89fab3a0dc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">The main sorting function. <br /></td></tr>
<tr class="separator:a263595fd9a0163b5b997b89fab3a0dc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3a775d99dbbb94c130a973df0cfddcf" id="r_ae3a775d99dbbb94c130a973df0cfddcf"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ae3a775d99dbbb94c130a973df0cfddcf"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#ae3a775d99dbbb94c130a973df0cfddcf">recursive_bubble_sort</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; T &gt; *nums, uint64_t n)</td></tr>
<tr class="memdesc:ae3a775d99dbbb94c130a973df0cfddcf"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is an implementation of the recursive_bubble_sort. A vector is passed to the function which is then dereferenced, so that the changes are reflected in the original vector. It also accepts a second parameter of type <code>int</code> and name <code>n</code>, which is the size of the array. <br /></td></tr>
@@ -202,6 +208,7 @@ Functions</h2></td></tr>
<p>Sorting algorithms</p>
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a> for std::assert for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a> for IO operations</p>
<p>Sorting algorithms</p>
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/stack.html">std::stack</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a> for assert</p>
<p>header files for collection of functions for a macro called assert which can be used to verify assumptions for io operations</p>
<p>Sorting algorithms</p>
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted()</a>, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap()</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a> for assert for initializing random number generator for IO operations</p>
@@ -545,6 +552,72 @@ Here is the call graph for this function:</div>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d5/d91/namespacesorting_a5f4bc75cca6dd8294af2d0e328006c68_cgraph.svg" width="350" height="110"><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="a263595fd9a0163b5b997b89fab3a0dc5" name="a263595fd9a0163b5b997b89fab3a0dc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a263595fd9a0163b5b997b89fab3a0dc5">&#9670;&#160;</a></span>iterativeQuickSort()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sorting::iterativeQuickSort </td>
<td>(</td>
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>arr</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The main sorting function. </p>
<p>The iterative quick sort uses the stack instead of recursion for saving and restoring the environment between calls. It does not need the end and start params, because it is not recursive. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">arr</td><td>array to be sorted </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 59</span>{</div>
<div class="line"><span class="lineno"> 60</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/stack.html">std::stack&lt;int&gt;</a> <a class="code hl_variable" href="../../dc/dc5/paranthesis__matching_8cpp.html#aa37d24a036d239b3b528f13b9de880c7">stack</a>;</div>
<div class="line"><span class="lineno"> 61</span> <span class="keywordtype">int</span> start = 0;</div>
<div class="line"><span class="lineno"> 62</span> <span class="keywordtype">int</span> end = arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>()-1;</div>
<div class="line"><span class="lineno"> 63</span> <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>.<a class="code hl_function" href="../../d1/dc2/classstack.html#a90df277532c23519aa7ac3c08ed90a1d">push</a>(start);</div>
<div class="line"><span class="lineno"> 64</span> <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>.<a class="code hl_function" href="../../d1/dc2/classstack.html#a90df277532c23519aa7ac3c08ed90a1d">push</a>(end);</div>
<div class="line"><span class="lineno"> 65</span> </div>
<div class="line"><span class="lineno"> 66</span> <span class="keywordflow">while</span>(!<a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>.empty())</div>
<div class="line"><span class="lineno"> 67</span> {</div>
<div class="line"><span class="lineno"> 68</span> end = <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>.<a class="code hl_function" href="../../d1/dc2/classstack.html#ae09630c4384903d187801921b2ddc709">top</a>();</div>
<div class="line"><span class="lineno"> 69</span> <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>.<a class="code hl_function" href="../../d1/dc2/classstack.html#a3647fb4418890f19e0dc414b8092b8b0">pop</a>();</div>
<div class="line"><span class="lineno"> 70</span> start = <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>.<a class="code hl_function" href="../../d1/dc2/classstack.html#ae09630c4384903d187801921b2ddc709">top</a>();</div>
<div class="line"><span class="lineno"> 71</span> <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>.<a class="code hl_function" href="../../d1/dc2/classstack.html#a3647fb4418890f19e0dc414b8092b8b0">pop</a>();</div>
<div class="line"><span class="lineno"> 72</span> </div>
<div class="line"><span class="lineno"> 73</span> <span class="keywordtype">int</span> pivotIndex = partition(arr,start,end);</div>
<div class="line"><span class="lineno"> 74</span> </div>
<div class="line"><span class="lineno"> 75</span> <span class="keywordflow">if</span>(pivotIndex -1 &gt; start)</div>
<div class="line"><span class="lineno"> 76</span> {</div>
<div class="line"><span class="lineno"> 77</span> <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>.<a class="code hl_function" href="../../d1/dc2/classstack.html#a90df277532c23519aa7ac3c08ed90a1d">push</a>(start);</div>
<div class="line"><span class="lineno"> 78</span> <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>.<a class="code hl_function" href="../../d1/dc2/classstack.html#a90df277532c23519aa7ac3c08ed90a1d">push</a>(pivotIndex-1);</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> <span class="keywordflow">if</span>(pivotIndex+1&lt;end)</div>
<div class="line"><span class="lineno"> 82</span> {</div>
<div class="line"><span class="lineno"> 83</span> <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>.<a class="code hl_function" href="../../d1/dc2/classstack.html#a90df277532c23519aa7ac3c08ed90a1d">push</a>(pivotIndex+1);</div>
<div class="line"><span class="lineno"> 84</span> <a class="code hl_class" href="../../d1/dc2/classstack.html">stack</a>.<a class="code hl_function" href="../../d1/dc2/classstack.html#a90df277532c23519aa7ac3c08ed90a1d">push</a>(end);</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>}</div>
<div class="ttc" id="aclassstack_html"><div class="ttname"><a href="../../d1/dc2/classstack.html">stack</a></div><div class="ttdoc">for std::invalid_argument</div><div class="ttdef"><b>Definition</b> stack.hpp:19</div></div>
<div class="ttc" id="aclassstack_html_a3647fb4418890f19e0dc414b8092b8b0"><div class="ttname"><a href="../../d1/dc2/classstack.html#a3647fb4418890f19e0dc414b8092b8b0">stack::pop</a></div><div class="ttdeci">void pop()</div><div class="ttdef"><b>Definition</b> stack.hpp:62</div></div>
<div class="ttc" id="aclassstack_html_a90df277532c23519aa7ac3c08ed90a1d"><div class="ttname"><a href="../../d1/dc2/classstack.html#a90df277532c23519aa7ac3c08ed90a1d">stack::push</a></div><div class="ttdeci">void push(const value_type &amp;item)</div><div class="ttdef"><b>Definition</b> stack.hpp:47</div></div>
<div class="ttc" id="aclassstack_html_ae09630c4384903d187801921b2ddc709"><div class="ttname"><a href="../../d1/dc2/classstack.html#ae09630c4384903d187801921b2ddc709">stack::top</a></div><div class="ttdeci">value_type top() const</div><div class="ttdef"><b>Definition</b> stack.hpp:56</div></div>
<div class="ttc" id="aparanthesis__matching_8cpp_html_aa37d24a036d239b3b528f13b9de880c7"><div class="ttname"><a href="../../dc/dc5/paranthesis__matching_8cpp.html#aa37d24a036d239b3b528f13b9de880c7">stack</a></div><div class="ttdeci">char stack[MAX]</div><div class="ttdef"><b>Definition</b> paranthesis_matching.cpp:20</div></div>
<div class="ttc" id="astack_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/stack.html">std::stack</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d5/d91/namespacesorting_a263595fd9a0163b5b997b89fab3a0dc5_cgraph.svg" width="520" height="234"><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="aa26de383227859210f14dcf12201a079" name="aa26de383227859210f14dcf12201a079"></a>
@@ -755,6 +828,61 @@ Here is the call graph for this function:</div>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d5/d91/namespacesorting_a27236b8d3df3832e1f1225576a122534_cgraph.svg" width="638" 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="aac8f44b28b4aa96444383030b28f8b34" name="aac8f44b28b4aa96444383030b28f8b34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac8f44b28b4aa96444383030b28f8b34">&#9670;&#160;</a></span>partition()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int sorting::partition </td>
<td>(</td>
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>arr</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>start</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>end</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>The partition function sorts the array from start to end and uses the last element as the pivot. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">arr</td><td>the array to be sorted </td></tr>
<tr><td class="paramname">start</td><td>starting index </td></tr>
<tr><td class="paramname">end</td><td>ending index </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int next index of the pivot </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 34</span>{</div>
<div class="line"><span class="lineno"> 35</span> <span class="keywordtype">int</span> pivot = arr[end];</div>
<div class="line"><span class="lineno"> 36</span> <span class="keywordtype">int</span> index = start - 1;</div>
<div class="line"><span class="lineno"> 37</span> </div>
<div class="line"><span class="lineno"> 38</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = start; j &lt; end; j++) {</div>
<div class="line"><span class="lineno"> 39</span> <span class="keywordflow">if</span> (arr[j] &lt;= pivot) {</div>
<div class="line"><span class="lineno"> 40</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a>(arr[++index], arr[j]);</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="line"><span class="lineno"> 44</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a>(arr[index + 1], arr[end]);</div>
<div class="line"><span class="lineno"> 45</span> <span class="keywordflow">return</span> index + 1;</div>
<div class="line"><span class="lineno"> 46</span>}</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d5/d91/namespacesorting_aac8f44b28b4aa96444383030b28f8b34_cgraph.svg" width="252" height="36"><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="a0e9e1b21a1684585e9e50f9afe4d53a3" name="a0e9e1b21a1684585e9e50f9afe4d53a3"></a>

View File

@@ -0,0 +1,17 @@
<map id="sorting::iterativeQuickSort" name="sorting::iterativeQuickSort">
<area shape="rect" id="Node000001" title="The main sorting function." alt="" coords="5,104,178,130"/>
<area shape="rect" id="Node000002" href="$d5/d91/namespacesorting.html#aac8f44b28b4aa96444383030b28f8b34" title="The partition function sorts the array from start to end and uses the last element as the pivot." alt="" coords="226,5,340,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="114,101,224,40,234,35,236,40,227,45,116,106"/>
<area shape="rect" id="Node000004" href="$d1/dc2/classstack.html#a3647fb4418890f19e0dc414b8092b8b0" title=" " alt="" coords="242,55,324,80"/>
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="144,101,226,79,228,84,145,106"/>
<area shape="rect" id="Node000005" href="$d1/dc2/classstack.html#a90df277532c23519aa7ac3c08ed90a1d" title=" " alt="" coords="239,104,328,130"/>
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="178,114,223,114,223,120,178,120"/>
<area shape="rect" id="Node000007" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="226,153,341,179"/>
<area shape="poly" id="edge6_Node000001_Node000007" title=" " alt="" coords="145,128,217,146,215,152,144,133"/>
<area shape="rect" id="Node000008" href="$d1/dc2/classstack.html#ae09630c4384903d187801921b2ddc709" title=" " alt="" coords="244,203,323,228"/>
<area shape="poly" id="edge7_Node000001_Node000008" title=" " alt="" coords="116,128,227,189,236,194,234,198,224,194,114,133"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="412,5,491,31"/>
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="341,16,397,16,397,21,341,21"/>
<area shape="rect" id="Node000006" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/memory/shared_ptr/make_shared.html#" title=" " alt="" coords="389,104,514,130"/>
<area shape="poly" id="edge5_Node000005_Node000006" title=" " alt="" coords="329,114,373,114,373,120,329,120"/>
</map>

View File

@@ -0,0 +1 @@
294ca56a54bd9dc9c0c33ab45e58117f

View File

@@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.0 (20240811.2233)
-->
<!-- Title: sorting::iterativeQuickSort Pages: 1 -->
<svg width="390pt" height="175pt"
viewBox="0.00 0.00 389.75 175.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 171.25)">
<title>sorting::iterativeQuickSort</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="The main sorting function.">
<polygon fill="#999999" stroke="#666666" points="129.25,-93.25 0,-93.25 0,-74 129.25,-74 129.25,-93.25"/>
<text text-anchor="middle" x="64.62" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">sorting::iterativeQuickSort</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d5/d91/namespacesorting.html#aac8f44b28b4aa96444383030b28f8b34" target="_top" xlink:title="The partition function sorts the array from start to end and uses the last element as the pivot.">
<polygon fill="white" stroke="#666666" points="251.38,-167.25 165.62,-167.25 165.62,-148 251.38,-148 251.38,-167.25"/>
<text text-anchor="middle" x="208.5" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">sorting::partition</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M82.25,-93.71C101.78,-105.39 135.34,-124.9 165.25,-139.62 167.52,-140.74 169.87,-141.86 172.25,-142.95"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="170.78,-146.13 181.34,-146.99 173.62,-139.73 170.78,-146.13"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a xlink:href="../../d1/dc2/classstack.html#a3647fb4418890f19e0dc414b8092b8b0" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="239.38,-130.25 177.62,-130.25 177.62,-111 239.38,-111 239.38,-130.25"/>
<text text-anchor="middle" x="208.5" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">stack::pop</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;Node4</title>
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M104.39,-93.74C123.6,-98.74 146.79,-104.79 166.31,-109.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="165.3,-113.24 175.86,-112.37 167.07,-106.46 165.3,-113.24"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../d1/dc2/classstack.html#a90df277532c23519aa7ac3c08ed90a1d" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="242,-93.25 175,-93.25 175,-74 242,-74 242,-93.25"/>
<text text-anchor="middle" x="208.5" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">stack::push</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4_Node000001_Node000005" class="edge">
<title>Node1&#45;&gt;Node5</title>
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M129.51,-83.62C140.96,-83.62 152.66,-83.62 163.39,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="163.09,-87.13 173.09,-83.63 163.09,-80.13 163.09,-87.13"/>
</a>
</g>
</g>
<!-- Node7 -->
<g id="Node000007" class="node">
<title>Node7</title>
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="251.75,-56.25 165.25,-56.25 165.25,-37 251.75,-37 251.75,-56.25"/>
<text text-anchor="middle" x="208.5" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node7 -->
<g id="edge6_Node000001_Node000007" class="edge">
<title>Node1&#45;&gt;Node7</title>
<g id="a_edge6_Node000001_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M104.39,-73.51C120.97,-69.19 140.52,-64.09 158.12,-59.5"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="158.52,-63.02 167.31,-57.11 156.75,-56.24 158.52,-63.02"/>
</a>
</g>
</g>
<!-- Node8 -->
<g id="Node000008" class="node">
<title>Node8</title>
<g id="a_Node000008"><a xlink:href="../../d1/dc2/classstack.html#ae09630c4384903d187801921b2ddc709" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="238.25,-19.25 178.75,-19.25 178.75,0 238.25,0 238.25,-19.25"/>
<text text-anchor="middle" x="208.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">stack::top</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node8 -->
<g id="edge7_Node000001_Node000008" class="edge">
<title>Node1&#45;&gt;Node8</title>
<g id="a_edge7_Node000001_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M82.25,-73.54C101.78,-61.86 135.34,-42.35 165.25,-27.62 167.52,-26.51 169.87,-25.39 172.25,-24.3"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="173.62,-27.52 181.34,-20.26 170.78,-21.12 173.62,-27.52"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="364.12,-167.25 305.38,-167.25 305.38,-148 364.12,-148 364.12,-167.25"/>
<text text-anchor="middle" x="334.75" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M251.57,-157.62C265.18,-157.62 280.23,-157.62 293.69,-157.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="293.53,-161.13 303.53,-157.63 293.53,-154.13 293.53,-161.13"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/memory/shared_ptr/make_shared.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="381.75,-93.25 287.75,-93.25 287.75,-74 381.75,-74 381.75,-93.25"/>
<text text-anchor="middle" x="334.75" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_shared</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge5_Node000005_Node000006" class="edge">
<title>Node5&#45;&gt;Node6</title>
<g id="a_edge5_Node000005_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M242.47,-83.62C252.82,-83.62 264.57,-83.62 276.11,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="276.01,-87.13 286.01,-83.63 276.01,-80.13 276.01,-87.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.0 (20240811.2233)
-->
<!-- Title: sorting::iterativeQuickSort Pages: 1 -->
<svg width="390pt" height="175pt"
viewBox="0.00 0.00 389.75 175.25" 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 171.25)">
<title>sorting::iterativeQuickSort</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="The main sorting function.">
<polygon fill="#999999" stroke="#666666" points="129.25,-93.25 0,-93.25 0,-74 129.25,-74 129.25,-93.25"/>
<text text-anchor="middle" x="64.62" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">sorting::iterativeQuickSort</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d5/d91/namespacesorting.html#aac8f44b28b4aa96444383030b28f8b34" target="_top" xlink:title="The partition function sorts the array from start to end and uses the last element as the pivot.">
<polygon fill="white" stroke="#666666" points="251.38,-167.25 165.62,-167.25 165.62,-148 251.38,-148 251.38,-167.25"/>
<text text-anchor="middle" x="208.5" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">sorting::partition</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M82.25,-93.71C101.78,-105.39 135.34,-124.9 165.25,-139.62 167.52,-140.74 169.87,-141.86 172.25,-142.95"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="170.78,-146.13 181.34,-146.99 173.62,-139.73 170.78,-146.13"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a xlink:href="../../d1/dc2/classstack.html#a3647fb4418890f19e0dc414b8092b8b0" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="239.38,-130.25 177.62,-130.25 177.62,-111 239.38,-111 239.38,-130.25"/>
<text text-anchor="middle" x="208.5" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">stack::pop</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;Node4</title>
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M104.39,-93.74C123.6,-98.74 146.79,-104.79 166.31,-109.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="165.3,-113.24 175.86,-112.37 167.07,-106.46 165.3,-113.24"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../d1/dc2/classstack.html#a90df277532c23519aa7ac3c08ed90a1d" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="242,-93.25 175,-93.25 175,-74 242,-74 242,-93.25"/>
<text text-anchor="middle" x="208.5" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">stack::push</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4_Node000001_Node000005" class="edge">
<title>Node1&#45;&gt;Node5</title>
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M129.51,-83.62C140.96,-83.62 152.66,-83.62 163.39,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="163.09,-87.13 173.09,-83.63 163.09,-80.13 163.09,-87.13"/>
</a>
</g>
</g>
<!-- Node7 -->
<g id="Node000007" class="node">
<title>Node7</title>
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="251.75,-56.25 165.25,-56.25 165.25,-37 251.75,-37 251.75,-56.25"/>
<text text-anchor="middle" x="208.5" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node7 -->
<g id="edge6_Node000001_Node000007" class="edge">
<title>Node1&#45;&gt;Node7</title>
<g id="a_edge6_Node000001_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M104.39,-73.51C120.97,-69.19 140.52,-64.09 158.12,-59.5"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="158.52,-63.02 167.31,-57.11 156.75,-56.24 158.52,-63.02"/>
</a>
</g>
</g>
<!-- Node8 -->
<g id="Node000008" class="node">
<title>Node8</title>
<g id="a_Node000008"><a xlink:href="../../d1/dc2/classstack.html#ae09630c4384903d187801921b2ddc709" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="238.25,-19.25 178.75,-19.25 178.75,0 238.25,0 238.25,-19.25"/>
<text text-anchor="middle" x="208.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">stack::top</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node8 -->
<g id="edge7_Node000001_Node000008" class="edge">
<title>Node1&#45;&gt;Node8</title>
<g id="a_edge7_Node000001_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M82.25,-73.54C101.78,-61.86 135.34,-42.35 165.25,-27.62 167.52,-26.51 169.87,-25.39 172.25,-24.3"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="173.62,-27.52 181.34,-20.26 170.78,-21.12 173.62,-27.52"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="364.12,-167.25 305.38,-167.25 305.38,-148 364.12,-148 364.12,-167.25"/>
<text text-anchor="middle" x="334.75" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M251.57,-157.62C265.18,-157.62 280.23,-157.62 293.69,-157.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="293.53,-161.13 303.53,-157.63 293.53,-154.13 293.53,-161.13"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/memory/shared_ptr/make_shared.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="381.75,-93.25 287.75,-93.25 287.75,-74 381.75,-74 381.75,-93.25"/>
<text text-anchor="middle" x="334.75" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_shared</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge5_Node000005_Node000006" class="edge">
<title>Node5&#45;&gt;Node6</title>
<g id="a_edge5_Node000005_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M242.47,-83.62C252.82,-83.62 264.57,-83.62 276.11,-83.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="276.01,-87.13 286.01,-83.63 276.01,-80.13 276.01,-87.13"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@@ -0,0 +1,5 @@
<map id="sorting::partition" name="sorting::partition">
<area shape="rect" id="Node000001" title="The partition function sorts the array from start to end and uses the last element as the pivot." alt="" coords="5,5,120,31"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="168,5,246,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="120,16,152,16,152,21,120,21"/>
</map>

View File

@@ -0,0 +1 @@
f199f7b9b09e1c37660325651551806f

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.0 (20240811.2233)
-->
<!-- Title: sorting::partition Pages: 1 -->
<svg width="189pt" height="27pt"
viewBox="0.00 0.00 188.50 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
<title>sorting::partition</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="The partition function sorts the array from start to end and uses the last element as the pivot.">
<polygon fill="#999999" stroke="#666666" points="85.75,-19.25 0,-19.25 0,0 85.75,0 85.75,-19.25"/>
<text text-anchor="middle" x="42.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">sorting::partition</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="180.5,-19.25 121.75,-19.25 121.75,0 180.5,0 180.5,-19.25"/>
<text text-anchor="middle" x="151.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M86.17,-9.62C94.01,-9.62 102.18,-9.62 109.95,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="109.84,-13.13 119.84,-9.63 109.84,-6.13 109.84,-13.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.0 (20240811.2233)
-->
<!-- Title: sorting::partition Pages: 1 -->
<svg width="189pt" height="27pt"
viewBox="0.00 0.00 188.50 27.25" 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 23.25)">
<title>sorting::partition</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="The partition function sorts the array from start to end and uses the last element as the pivot.">
<polygon fill="#999999" stroke="#666666" points="85.75,-19.25 0,-19.25 0,0 85.75,0 85.75,-19.25"/>
<text text-anchor="middle" x="42.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">sorting::partition</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="180.5,-19.25 121.75,-19.25 121.75,0 180.5,0 180.5,-19.25"/>
<text text-anchor="middle" x="151.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M86.17,-9.62C94.01,-9.62 102.18,-9.62 109.95,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="109.84,-13.13 119.84,-9.63 109.84,-6.13 109.84,-13.13"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB