Documentation for 0931d530ae

This commit is contained in:
github-actions
2023-01-22 19:44:10 +00:00
parent a448f64699
commit b48f6e8671
2457 changed files with 9513 additions and 8691 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.5"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: Sorting Algorithm</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
@@ -138,13 +138,13 @@ Functions</h2></td></tr>
<tr class="separator:gae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga135e4c638e3bcf548bd122b5f49a3e72"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ga135e4c638e3bcf548bd122b5f49a3e72"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d5/d4c/group__sorting.html#ga135e4c638e3bcf548bd122b5f49a3e72">displayElements</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; T &gt; &amp;arr)</td></tr>
<tr class="memdesc:ga135e4c638e3bcf548bd122b5f49a3e72"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility function used for printing the elements. Prints elements of the array after they're sorted using wiggle sort algorithm. <a href="../../d5/d4c/group__sorting.html#ga135e4c638e3bcf548bd122b5f49a3e72">More...</a><br /></td></tr>
<tr class="memdesc:ga135e4c638e3bcf548bd122b5f49a3e72"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility function used for printing the elements. Prints elements of the array after they're sorted using wiggle sort algorithm. <br /></td></tr>
<tr class="separator:ga135e4c638e3bcf548bd122b5f49a3e72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d4c/group__sorting.html#gaa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
<tr class="separator:gaa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p >The heapify procedure can be thought of as building a heap from the bottom up by successively sifting downward to establish the heap property.</p>
<p>The heapify procedure can be thought of as building a heap from the bottom up by successively sifting downward to establish the heap property.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">arr</td><td>array to be sorted </td></tr>
@@ -297,7 +297,7 @@ template&lt;typename T &gt; </div>
</tr>
</table>
</div><div class="memdoc">
<p >Utilizes heapify procedure to sort the array</p>
<p>Utilizes heapify procedure to sort the array</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">arr</td><td>array to be sorted </td></tr>
@@ -337,8 +337,8 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p >Main function</p>
<p >Driver Code </p>
<p>Main function</p>
<p>Driver Code </p>
<div class="fragment"><div class="line"><span class="lineno"> 90</span> {</div>
<div class="line"><span class="lineno"> 91</span> <span class="keywordtype">int</span> size;</div>
<div class="line"><span class="lineno"> 92</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Enter the number of elements : &quot;</span>;</div>
@@ -402,7 +402,7 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p >The <a class="el" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge()</a> function is used for merging two halves. The merge(arr, l, m, r) is key process that assumes that arr[l..m] and arr[m+1..r] are sorted and merges the two sorted sub-arrays into one.</p>
<p>The <a class="el" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge()</a> function is used for merging two halves. The merge(arr, l, m, r) is key process that assumes that arr[l..m] and arr[m+1..r] are sorted and merges the two sorted sub-arrays into one.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">arr</td><td>- array with two halves arr[l...m] and arr[m+1...r] </td></tr>
@@ -480,7 +480,7 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p >Merge sort is a divide and conquer algorithm, it divides the input array into two halves and calls itself for the two halves and then calls <a class="el" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge()</a> to merge the two halves</p>
<p>Merge sort is a divide and conquer algorithm, it divides the input array into two halves and calls itself for the two halves and then calls <a class="el" href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge()</a> to merge the two halves</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">arr</td><td>- array to be sorted </td></tr>
@@ -532,7 +532,7 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p >Utility function used to print the array after sorting </p>
<p>Utility function used to print the array after sorting </p>
<div class="fragment"><div class="line"><span class="lineno"> 84</span> {</div>
<div class="line"><span class="lineno"> 85</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; size; i++) <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; arr[i] &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><span class="lineno"> 86</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
@@ -562,7 +562,7 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p >Test function </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<p>Test function </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 106</span> {</div>
<div class="line"><span class="lineno"> 107</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a>(<span class="keyword">nullptr</span>)); <span class="comment">// initialize random number generator</span></div>
<div class="line"><span class="lineno"> 108</span> </div>
@@ -601,7 +601,7 @@ Here is the call graph for this function:</div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
-->
<!-- Title: displayElements Pages: 1 -->
<svg width="220pt" height="64pt"

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
-->
<!-- Title: heapSort Pages: 1 -->
<svg width="159pt" height="27pt"

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

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

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
-->
<!-- Title: mergeSort Pages: 1 -->
<svg width="150pt" height="45pt"

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

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

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB