Documentation for 0931d530ae
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: search::sublist_search::Node Pages: 1 -->
|
||||
<svg width="163pt" height="38pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: others/decimal_to_binary.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -123,7 +123,7 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Function to convert decimal number to binary representation. </p>
|
||||
<div class="textblock"><p>Function to convert decimal number to binary representation. </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
@@ -172,7 +172,7 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This method converts the bit representation and stores it as a decimal number. </p>
|
||||
<p>This method converts the bit representation and stores it as a decimal number. </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 11</span> {</div>
|
||||
<div class="line"><span class="lineno"> 12</span> <span class="keywordtype">int</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/remainder.html">remainder</a>, binary = 0, var = 1;</div>
|
||||
<div class="line"><span class="lineno"> 13</span> </div>
|
||||
@@ -210,7 +210,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This method stores each bit value from LSB to MSB and then prints them back from MSB to LSB </p>
|
||||
<p>This method stores each bit value from LSB to MSB and then prints them back from MSB to LSB </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 27</span> {</div>
|
||||
<div class="line"><span class="lineno"> 28</span> <span class="keywordtype">int</span> num_bits = 0;</div>
|
||||
<div class="line"><span class="lineno"> 29</span> <span class="keywordtype">char</span> bit_string[50];</div>
|
||||
@@ -244,7 +244,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_9510827d0b234b3cc54b29892f217477.html">others</a></li><li class="navelem"><a class="el" href="../../df/d06/decimal__to__binary_8cpp.html">decimal_to_binary.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: method2 Pages: 1 -->
|
||||
<svg width="152pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: method1 Pages: 1 -->
|
||||
<svg width="152pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: math/fibonacci.cpp Pages: 1 -->
|
||||
<svg width="130pt" height="82pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: pancake_sort Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -104,14 +104,14 @@ $(document).ready(function(){initNavTree('df/d10/namespacepancake__sort.html','.
|
||||
<p>Functions for <a href="https://en.wikipedia.org/wiki/Pancake_sorting" target="_blank">Pancake sort</a> algorithm.
|
||||
<a href="../../df/d10/namespacepancake__sort.html#details">More...</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Functions for <a href="https://en.wikipedia.org/wiki/Pancake_sorting" target="_blank">Pancake sort</a> algorithm. </p>
|
||||
<div class="textblock"><p>Functions for <a href="https://en.wikipedia.org/wiki/Pancake_sorting" target="_blank">Pancake sort</a> algorithm. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../df/d10/namespacepancake__sort.html">pancake_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.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: Member List</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -113,7 +113,7 @@ $(document).ready(function(){initNavTree('de/d9d/classdata__structures_1_1linked
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: numerical_methods/midpoint_integral_method.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -132,32 +132,32 @@ Namespaces</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a7072493d1f0f8a91b2a71d4cc456c09c"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d11/midpoint__integral__method_8cpp.html#a7072493d1f0f8a91b2a71d4cc456c09c">numerical_methods::midpoint_rule::midpoint</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a> N, const double <a class="el" href="../../d1/df3/hash__search_8cpp.html#a566eaf0ffafd50bc61e644561fd27001">h</a>, const double a, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a>< double(double)> &func)</td></tr>
|
||||
<tr class="memdesc:a7072493d1f0f8a91b2a71d4cc456c09c"><td class="mdescLeft"> </td><td class="mdescRight">Main function for implementing the Midpoint Integral Method implementation. <a href="../../df/d11/midpoint__integral__method_8cpp.html#a7072493d1f0f8a91b2a71d4cc456c09c">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a7072493d1f0f8a91b2a71d4cc456c09c"><td class="mdescLeft"> </td><td class="mdescRight">Main function for implementing the Midpoint Integral Method implementation. <br /></td></tr>
|
||||
<tr class="separator:a7072493d1f0f8a91b2a71d4cc456c09c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7ee8e824ef3e138a9a21883b26d97226"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d11/midpoint__integral__method_8cpp.html#a7ee8e824ef3e138a9a21883b26d97226">numerical_methods::midpoint_rule::f</a> (double x)</td></tr>
|
||||
<tr class="memdesc:a7ee8e824ef3e138a9a21883b26d97226"><td class="mdescLeft"> </td><td class="mdescRight">A function f(x) that will be used to test the method. <a href="../../df/d11/midpoint__integral__method_8cpp.html#a7ee8e824ef3e138a9a21883b26d97226">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a7ee8e824ef3e138a9a21883b26d97226"><td class="mdescLeft"> </td><td class="mdescRight">A function f(x) that will be used to test the method. <br /></td></tr>
|
||||
<tr class="separator:a7ee8e824ef3e138a9a21883b26d97226"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae682ee71af44b1e9e884849cc6a6b040"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d11/midpoint__integral__method_8cpp.html#ae682ee71af44b1e9e884849cc6a6b040">numerical_methods::midpoint_rule::g</a> (double x)</td></tr>
|
||||
<tr class="memdesc:ae682ee71af44b1e9e884849cc6a6b040"><td class="mdescLeft"> </td><td class="mdescRight">A function g(x) that will be used to test the method. <a href="../../df/d11/midpoint__integral__method_8cpp.html#ae682ee71af44b1e9e884849cc6a6b040">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae682ee71af44b1e9e884849cc6a6b040"><td class="mdescLeft"> </td><td class="mdescRight">A function g(x) that will be used to test the method. <br /></td></tr>
|
||||
<tr class="separator:ae682ee71af44b1e9e884849cc6a6b040"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae9f66040f8e0ba73c1c741261c22a52a"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d11/midpoint__integral__method_8cpp.html#ae9f66040f8e0ba73c1c741261c22a52a">numerical_methods::midpoint_rule::k</a> (double x)</td></tr>
|
||||
<tr class="memdesc:ae9f66040f8e0ba73c1c741261c22a52a"><td class="mdescLeft"> </td><td class="mdescRight">A function k(x) that will be used to test the method. <a href="../../df/d11/midpoint__integral__method_8cpp.html#ae9f66040f8e0ba73c1c741261c22a52a">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae9f66040f8e0ba73c1c741261c22a52a"><td class="mdescLeft"> </td><td class="mdescRight">A function k(x) that will be used to test the method. <br /></td></tr>
|
||||
<tr class="separator:ae9f66040f8e0ba73c1c741261c22a52a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad53616fb4fa6880ae876bcba53365c51"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d11/midpoint__integral__method_8cpp.html#ad53616fb4fa6880ae876bcba53365c51">numerical_methods::midpoint_rule::l</a> (double x)</td></tr>
|
||||
<tr class="memdesc:ad53616fb4fa6880ae876bcba53365c51"><td class="mdescLeft"> </td><td class="mdescRight">A function l(x) that will be used to test the method. <a href="../../df/d11/midpoint__integral__method_8cpp.html#ad53616fb4fa6880ae876bcba53365c51">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ad53616fb4fa6880ae876bcba53365c51"><td class="mdescLeft"> </td><td class="mdescRight">A function l(x) that will be used to test the method. <br /></td></tr>
|
||||
<tr class="separator:ad53616fb4fa6880ae876bcba53365c51"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a2ae48a41e43dc6ab11b962742349646e"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d11/midpoint__integral__method_8cpp.html#a2ae48a41e43dc6ab11b962742349646e">test</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a> N, double <a class="el" href="../../d1/df3/hash__search_8cpp.html#a566eaf0ffafd50bc61e644561fd27001">h</a>, double a, double b, bool used_argv_parameters)</td></tr>
|
||||
<tr class="memdesc:a2ae48a41e43dc6ab11b962742349646e"><td class="mdescLeft"> </td><td class="mdescRight">Self-test implementations. <a href="../../df/d11/midpoint__integral__method_8cpp.html#a2ae48a41e43dc6ab11b962742349646e">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a2ae48a41e43dc6ab11b962742349646e"><td class="mdescLeft"> </td><td class="mdescRight">Self-test implementations. <br /></td></tr>
|
||||
<tr class="separator:a2ae48a41e43dc6ab11b962742349646e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d11/midpoint__integral__method_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
|
||||
<tr class="memdesc:a3c04138a5bfe5d72780bb7e82a18e627"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <a href="../../df/d11/midpoint__integral__method_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a3c04138a5bfe5d72780bb7e82a18e627"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <br /></td></tr>
|
||||
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >A numerical method for easy <a href="https://en.wikipedia.org/wiki/Midpoint_method" target="_blank">approximation of integrals</a> </p>
|
||||
<p >The idea is to split the interval into N of intervals and use as interpolation points the xi for which it applies that xi = x0 + i*h, where h is a step defined as h = (b-a)/N where a and b are the first and last points of the interval of the integration [a, b].</p>
|
||||
<p >We create a table of the xi and their corresponding f(xi) values and we evaluate the integral by the formula: I = h * {f(x0+h/2) + f(x1+h/2) + ... + f(xN-1+h/2)}</p>
|
||||
<p >Arguments can be passed as parameters from the command line argv[1] = N, argv[2] = a, argv[3] = b. In this case if the default values N=16, a=1, b=3 are changed then the tests/assert are disabled.</p>
|
||||
<div class="textblock"><p>A numerical method for easy <a href="https://en.wikipedia.org/wiki/Midpoint_method" target="_blank">approximation of integrals</a> </p>
|
||||
<p>The idea is to split the interval into N of intervals and use as interpolation points the xi for which it applies that xi = x0 + i*h, where h is a step defined as h = (b-a)/N where a and b are the first and last points of the interval of the integration [a, b].</p>
|
||||
<p>We create a table of the xi and their corresponding f(xi) values and we evaluate the integral by the formula: I = h * {f(x0+h/2) + f(x1+h/2) + ... + f(xN-1+h/2)}</p>
|
||||
<p>Arguments can be passed as parameters from the command line argv[1] = N, argv[2] = a, argv[3] = b. In this case if the default values N=16, a=1, b=3 are changed then the tests/assert are disabled.</p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/ggkogkou" target="_blank">ggkogkou</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a7ee8e824ef3e138a9a21883b26d97226" name="a7ee8e824ef3e138a9a21883b26d97226"></a>
|
||||
@@ -335,11 +335,11 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<p >Number of intervals to divide the integration interval.</p>
|
||||
<p >MUST BE EVEN</p>
|
||||
<p >Starting and ending point of the integration in</p>
|
||||
<p >the real axis</p>
|
||||
<p >Step, calculated by a, b and N</p>
|
||||
<p>Number of intervals to divide the integration interval.</p>
|
||||
<p>MUST BE EVEN</p>
|
||||
<p>Starting and ending point of the integration in</p>
|
||||
<p>the real axis</p>
|
||||
<p>Step, calculated by a, b and N</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 162</span> {</div>
|
||||
<div class="line"><span class="lineno"> 163</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> =</div>
|
||||
<div class="line"><span class="lineno"> 164</span> 16; <span class="comment">/// Number of intervals to divide the integration interval.</span><span class="comment"></span></div>
|
||||
@@ -599,7 +599,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="../../df/d11/midpoint__integral__method_8cpp.html">midpoint_integral_method.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="200pt" height="75pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="225pt" height="177pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: numerical_methods::midpoint_rule::midpoint Pages: 1 -->
|
||||
<svg width="246pt" height="138pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: numerical_methods::midpoint_rule::f Pages: 1 -->
|
||||
<svg width="204pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: numerical_methods::midpoint_rule::l Pages: 1 -->
|
||||
<svg width="200pt" height="38pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: numerical_methods::midpoint_rule::g Pages: 1 -->
|
||||
<svg width="205pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: numerical_methods::midpoint_rule::k Pages: 1 -->
|
||||
<svg width="205pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: sorting/dnf_sort.cpp Pages: 1 -->
|
||||
<svg width="266pt" height="82pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: stack_using_queue Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -104,14 +104,14 @@ $(document).ready(function(){initNavTree('df/d1c/namespacestack__using__queue.ht
|
||||
<p>Functions for the <a href="https://www.studytonight.com/data-structures/stack-using-queue" target="_blank">Stack Using Queue</a> implementation.
|
||||
<a href="../../df/d1c/namespacestack__using__queue.html#details">More...</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Functions for the <a href="https://www.studytonight.com/data-structures/stack-using-queue" target="_blank">Stack Using Queue</a> implementation. </p>
|
||||
<div class="textblock"><p>Functions for the <a href="https://www.studytonight.com/data-structures/stack-using-queue" target="_blank">Stack Using Queue</a> implementation. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../df/d1c/namespacestack__using__queue.html">stack_using_queue</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: data_structures/dsu_union_rank.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -125,18 +125,18 @@ Classes</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ae7880ce913f3058a35ff106d5be9e243"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d28/dsu__union__rank_8cpp.html#ae7880ce913f3058a35ff106d5be9e243">test1</a> ()</td></tr>
|
||||
<tr class="memdesc:ae7880ce913f3058a35ff106d5be9e243"><td class="mdescLeft"> </td><td class="mdescRight">Self-implementations, 1st test. <a href="../../df/d28/dsu__union__rank_8cpp.html#ae7880ce913f3058a35ff106d5be9e243">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae7880ce913f3058a35ff106d5be9e243"><td class="mdescLeft"> </td><td class="mdescRight">Self-implementations, 1st test. <br /></td></tr>
|
||||
<tr class="separator:ae7880ce913f3058a35ff106d5be9e243"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a45d94ead4cf4e1ff9f87c38bc99f59ae"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d28/dsu__union__rank_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae">test2</a> ()</td></tr>
|
||||
<tr class="memdesc:a45d94ead4cf4e1ff9f87c38bc99f59ae"><td class="mdescLeft"> </td><td class="mdescRight">Self-implementations, 2nd test. <a href="../../df/d28/dsu__union__rank_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a45d94ead4cf4e1ff9f87c38bc99f59ae"><td class="mdescLeft"> </td><td class="mdescRight">Self-implementations, 2nd test. <br /></td></tr>
|
||||
<tr class="separator:a45d94ead4cf4e1ff9f87c38bc99f59ae"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d28/dsu__union__rank_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <a href="../../df/d28/dsu__union__rank_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <br /></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p ><a href="https://en.wikipedia.org/wiki/Disjoint-set-data_structure" target="_blank">DSU (Disjoint sets)</a> </p>
|
||||
<p >dsu : It is a very powerful data structure which keeps track of different clusters(sets) of elements, these sets are disjoint(doesnot have a common
|
||||
<div class="textblock"><p><a href="https://en.wikipedia.org/wiki/Disjoint-set-data_structure" target="_blank">DSU (Disjoint sets)</a> </p>
|
||||
<p>dsu : It is a very powerful data structure which keeps track of different clusters(sets) of elements, these sets are disjoint(doesnot have a common
|
||||
element). Disjoint sets uses cases : for finding connected components in a graph, used in Kruskal's algorithm for finding <a class="el" href="../../d4/d12/namespace_minimum.html" title="Implementation of Minimum Edit Distance algorithm.">Minimum</a> Spanning tree. Operations that can be performed: 1) UnionSet(i,j): add(element i and j to the set) 2) findSet(i): returns the representative of the set to which i belogngs to. 3) getParents(i): prints the parent of i and so on and so forth. Below is the class-based approach which uses the heuristic of union-ranks. Using union-rank in findSet(i),we are able to get to the representative of i in slightly delayed O(logN) time but it allows us to keep tracks of the parent of i. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/AayushVyasKIIT" target="_blank">AayushVyasKIIT</a> </dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d3/dae/dsu__path__compression_8cpp.html" title="DSU (Disjoint sets)">dsu_path_compression.cpp</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
@@ -200,9 +200,9 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Self-implementations, 1st test. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<p >< number of elements</p>
|
||||
<p >< object of class disjoint sets</p>
|
||||
<p >< performs union operation on 1 and 2</p>
|
||||
<p>< number of elements</p>
|
||||
<p>< object of class disjoint sets</p>
|
||||
<p>< performs union operation on 1 and 2</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 133</span> {</div>
|
||||
<div class="line"><span class="lineno"> 134</span> <span class="comment">/* checks the parents in the resultant structures */</span></div>
|
||||
<div class="line"><span class="lineno"> 135</span> uint64_t n = 10; <span class="comment">///< number of elements</span></div>
|
||||
@@ -261,11 +261,11 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Self-implementations, 2nd test. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<p >< number of elements</p>
|
||||
<p >< object of class disjoint sets</p>
|
||||
<p >performs union operation on 1 and 2</p>
|
||||
<p >keeping track of the changes using parent pointers</p>
|
||||
<p >makes sure algorithm works fine</p>
|
||||
<p>< number of elements</p>
|
||||
<p>< object of class disjoint sets</p>
|
||||
<p>performs union operation on 1 and 2</p>
|
||||
<p>keeping track of the changes using parent pointers</p>
|
||||
<p>makes sure algorithm works fine</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 157</span> {</div>
|
||||
<div class="line"><span class="lineno"> 158</span> <span class="comment">// checks the parents in the resultant structures</span></div>
|
||||
<div class="line"><span class="lineno"> 159</span> uint64_t n = 10; <span class="comment">///< number of elements</span></div>
|
||||
@@ -302,7 +302,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="../../df/d28/dsu__union__rank_8cpp.html">dsu_union_rank.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test2 Pages: 1 -->
|
||||
<svg width="380pt" height="138pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="454pt" height="139pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test1 Pages: 1 -->
|
||||
<svg width="380pt" height="138pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: ciphers/elliptic_curve_key_exchange.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -136,36 +136,36 @@ Namespaces</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
|
||||
Typedefs</h2></td></tr>
|
||||
<tr class="memitem:af0a6e3521629c25c2b5d620f26429830"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">ciphers::elliptic_curve_key_exchange::Point</a></td></tr>
|
||||
<tr class="memdesc:af0a6e3521629c25c2b5d620f26429830"><td class="mdescLeft"> </td><td class="mdescRight">Definition of struct <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a>. <a href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:af0a6e3521629c25c2b5d620f26429830"><td class="mdescLeft"> </td><td class="mdescRight">Definition of struct <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a>. <br /></td></tr>
|
||||
<tr class="separator:af0a6e3521629c25c2b5d620f26429830"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ac00616a4e40d3cd5cfb4da87d9ff9af0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#ac00616a4e40d3cd5cfb4da87d9ff9af0">ciphers::elliptic_curve_key_exchange::exp</a> (<a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> number, <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> <a class="el" href="../../df/def/power__for__huge__numbers_8cpp.html#ae249a2af508aa94266023ce8aa81426f">power</a>, const <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> &mod)</td></tr>
|
||||
<tr class="memdesc:ac00616a4e40d3cd5cfb4da87d9ff9af0"><td class="mdescLeft"> </td><td class="mdescRight">This function calculates number raised to exponent power under modulo mod using <a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/modular_exponentiation.cpp" target="_blank">Modular Exponentiation</a>. <a href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#ac00616a4e40d3cd5cfb4da87d9ff9af0">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ac00616a4e40d3cd5cfb4da87d9ff9af0"><td class="mdescLeft"> </td><td class="mdescRight">This function calculates number raised to exponent power under modulo mod using <a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/modular_exponentiation.cpp" target="_blank">Modular Exponentiation</a>. <br /></td></tr>
|
||||
<tr class="separator:ac00616a4e40d3cd5cfb4da87d9ff9af0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:acc5fe9c2032fb7582c38a20d1fa69bcf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d8/dc8/struct_point.html">Point</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#acc5fe9c2032fb7582c38a20d1fa69bcf">ciphers::elliptic_curve_key_exchange::addition</a> (<a class="el" href="../../d8/dc8/struct_point.html">Point</a> a, <a class="el" href="../../d8/dc8/struct_point.html">Point</a> b, const <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> &curve_a_coeff, <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> mod)</td></tr>
|
||||
<tr class="memdesc:acc5fe9c2032fb7582c38a20d1fa69bcf"><td class="mdescLeft"> </td><td class="mdescRight">Addition of points. <a href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#acc5fe9c2032fb7582c38a20d1fa69bcf">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:acc5fe9c2032fb7582c38a20d1fa69bcf"><td class="mdescLeft"> </td><td class="mdescRight">Addition of points. <br /></td></tr>
|
||||
<tr class="separator:acc5fe9c2032fb7582c38a20d1fa69bcf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a17f3d667241b88115a95282cdd719cb2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d8/dc8/struct_point.html">Point</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#a17f3d667241b88115a95282cdd719cb2">ciphers::elliptic_curve_key_exchange::multiply</a> (const <a class="el" href="../../d8/dc8/struct_point.html">Point</a> &a, const <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> &curve_a_coeff, <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> p, const <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> &mod)</td></tr>
|
||||
<tr class="memdesc:a17f3d667241b88115a95282cdd719cb2"><td class="mdescLeft"> </td><td class="mdescRight">multiply <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a> and integer <a href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#a17f3d667241b88115a95282cdd719cb2">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a17f3d667241b88115a95282cdd719cb2"><td class="mdescLeft"> </td><td class="mdescRight">multiply <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a> and integer <br /></td></tr>
|
||||
<tr class="separator:a17f3d667241b88115a95282cdd719cb2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8800c8a84d77dadadb05ad5e83b77ef4"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d2c/elliptic__curve__key__exchange_8cpp.html#a8800c8a84d77dadadb05ad5e83b77ef4">uint128_t_tests</a> ()</td></tr>
|
||||
<tr class="memdesc:a8800c8a84d77dadadb05ad5e83b77ef4"><td class="mdescLeft"> </td><td class="mdescRight">Function to test the <a class="el" href="../../db/d9a/classuint128__t.html" title="class for 128-bit unsigned integer">uint128_t</a> header. <a href="../../df/d2c/elliptic__curve__key__exchange_8cpp.html#a8800c8a84d77dadadb05ad5e83b77ef4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a8800c8a84d77dadadb05ad5e83b77ef4"><td class="mdescLeft"> </td><td class="mdescRight">Function to test the <a class="el" href="../../db/d9a/classuint128__t.html" title="class for 128-bit unsigned integer">uint128_t</a> header. <br /></td></tr>
|
||||
<tr class="separator:a8800c8a84d77dadadb05ad5e83b77ef4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a37775d1724ffe404c088dabbc8da91ae"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d2c/elliptic__curve__key__exchange_8cpp.html#a37775d1724ffe404c088dabbc8da91ae">uint256_t_tests</a> ()</td></tr>
|
||||
<tr class="memdesc:a37775d1724ffe404c088dabbc8da91ae"><td class="mdescLeft"> </td><td class="mdescRight">Function to test the <a class="el" href="../../d1/d83/classuint256__t.html" title="class for 256-bit unsigned integer">uint256_t</a> header. <a href="../../df/d2c/elliptic__curve__key__exchange_8cpp.html#a37775d1724ffe404c088dabbc8da91ae">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a37775d1724ffe404c088dabbc8da91ae"><td class="mdescLeft"> </td><td class="mdescRight">Function to test the <a class="el" href="../../d1/d83/classuint256__t.html" title="class for 256-bit unsigned integer">uint256_t</a> header. <br /></td></tr>
|
||||
<tr class="separator:a37775d1724ffe404c088dabbc8da91ae"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d2c/elliptic__curve__key__exchange_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Function to test the provided algorithm above. <a href="../../df/d2c/elliptic__curve__key__exchange_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Function to test the provided algorithm above. <br /></td></tr>
|
||||
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d2c/elliptic__curve__key__exchange_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <a href="../../df/d2c/elliptic__curve__key__exchange_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <br /></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Implementation of <a href="https://cryptobook.nakov.com/asymmetric-key-ciphers/ecdh-key-exchange" target="_blank">Elliptic Curve Diffie Hellman Key Exchange</a>. </p>
|
||||
<p >The ECDH (Elliptic Curve Diffie–Hellman Key Exchange) is anonymous key agreement scheme, which allows two parties, each having an elliptic-curve public–private key pair, to establish a shared secret over an insecure channel. ECDH is very similar to the classical DHKE (Diffie–Hellman Key Exchange) algorithm, but it uses ECC point multiplication instead of modular exponentiations. ECDH is based on the following property of EC points: (a * G) * b = (b * G) * a If we have two secret numbers a and b (two private keys, belonging to Alice and Bob) and an ECC elliptic curve with generator point G, we can exchange over an insecure channel the values (a * G) and (b * G) (the public keys of Alice and Bob) and then we can derive a shared secret: secret = (a * G) * b = (b * G) * a. Pretty simple. The above equation takes the following form: alicePubKey * bobPrivKey = bobPubKey * alicePrivKey = secret </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/AshishYUO" target="_blank">Ashish Daulatabad</a> </dd></dl>
|
||||
<div class="textblock"><p>Implementation of <a href="https://cryptobook.nakov.com/asymmetric-key-ciphers/ecdh-key-exchange" target="_blank">Elliptic Curve Diffie Hellman Key Exchange</a>. </p>
|
||||
<p>The ECDH (Elliptic Curve Diffie–Hellman Key Exchange) is anonymous key agreement scheme, which allows two parties, each having an elliptic-curve public–private key pair, to establish a shared secret over an insecure channel. ECDH is very similar to the classical DHKE (Diffie–Hellman Key Exchange) algorithm, but it uses ECC point multiplication instead of modular exponentiations. ECDH is based on the following property of EC points: (a * G) * b = (b * G) * a If we have two secret numbers a and b (two private keys, belonging to Alice and Bob) and an ECC elliptic curve with generator point G, we can exchange over an insecure channel the values (a * G) and (b * G) (the public keys of Alice and Bob) and then we can derive a shared secret: secret = (a * G) * b = (b * G) * a. Pretty simple. The above equation takes the following form: alicePubKey * bobPrivKey = bobPubKey * alicePrivKey = secret </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/AshishYUO" target="_blank">Ashish Daulatabad</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
@@ -411,7 +411,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_4d6e05837bf820fb089a8a8cdf2f42b7.html">ciphers</a></li><li class="navelem"><a class="el" href="../../df/d2c/elliptic__curve__key__exchange_8cpp.html">elliptic_curve_key_exchange.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="131pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="255pt" height="119pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: probability/geometric_dist.cpp Pages: 1 -->
|
||||
<!--zoomable 93 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: probability/geometric_dist.cpp Pages: 1 -->
|
||||
<svg width="504pt" height="93pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: data_structures/bloom_filter.cpp Pages: 1 -->
|
||||
<svg width="419pt" height="93pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: probability::windowed_median::WindowedMedian Class Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -118,25 +118,25 @@ Collaboration diagram for probability::windowed_median::WindowedMedian:</div>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:aac676369661d15a3eb782c0fee77d45d"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#aac676369661d15a3eb782c0fee77d45d">WindowedMedian</a> (size_type windowSize)</td></tr>
|
||||
<tr class="memdesc:aac676369661d15a3eb782c0fee77d45d"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a <a class="el" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html" title="A class to calculate the median of a leading sliding window at the back of a stream of integer values...">WindowedMedian</a> object. <a href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#aac676369661d15a3eb782c0fee77d45d">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:aac676369661d15a3eb782c0fee77d45d"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a <a class="el" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html" title="A class to calculate the median of a leading sliding window at the back of a stream of integer values...">WindowedMedian</a> object. <br /></td></tr>
|
||||
<tr class="separator:aac676369661d15a3eb782c0fee77d45d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6b52b7851750f28d53508e63c52a69f7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#a6b52b7851750f28d53508e63c52a69f7">insert</a> (int value)</td></tr>
|
||||
<tr class="memdesc:a6b52b7851750f28d53508e63c52a69f7"><td class="mdescLeft"> </td><td class="mdescRight">Insert a new value to the stream. <a href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#a6b52b7851750f28d53508e63c52a69f7">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a6b52b7851750f28d53508e63c52a69f7"><td class="mdescLeft"> </td><td class="mdescRight">Insert a new value to the stream. <br /></td></tr>
|
||||
<tr class="separator:a6b52b7851750f28d53508e63c52a69f7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a938cafbdf70dc01e86e9bb12d29ec65d"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#a938cafbdf70dc01e86e9bb12d29ec65d">getMedian</a> () const</td></tr>
|
||||
<tr class="memdesc:a938cafbdf70dc01e86e9bb12d29ec65d"><td class="mdescLeft"> </td><td class="mdescRight">Gets the median of the values in the sliding window. <a href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#a938cafbdf70dc01e86e9bb12d29ec65d">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a938cafbdf70dc01e86e9bb12d29ec65d"><td class="mdescLeft"> </td><td class="mdescRight">Gets the median of the values in the sliding window. <br /></td></tr>
|
||||
<tr class="separator:a938cafbdf70dc01e86e9bb12d29ec65d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a61804988fcb1a6caf640f8291979aaa6"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#a61804988fcb1a6caf640f8291979aaa6">getMedianNaive</a> () const</td></tr>
|
||||
<tr class="memdesc:a61804988fcb1a6caf640f8291979aaa6"><td class="mdescLeft"> </td><td class="mdescRight">A naive and inefficient method to obtain the median of the sliding window. Used for testing! <a href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#a61804988fcb1a6caf640f8291979aaa6">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a61804988fcb1a6caf640f8291979aaa6"><td class="mdescLeft"> </td><td class="mdescRight">A naive and inefficient method to obtain the median of the sliding window. Used for testing! <br /></td></tr>
|
||||
<tr class="separator:a61804988fcb1a6caf640f8291979aaa6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
|
||||
Private Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a3a7f57679e9cd6c9f042dfd0612b2b24"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#a3a7f57679e9cd6c9f042dfd0612b2b24">insertToSorted</a> (int value)</td></tr>
|
||||
<tr class="memdesc:a3a7f57679e9cd6c9f042dfd0612b2b24"><td class="mdescLeft"> </td><td class="mdescRight">Inserts a value to a sorted multi-value BST. <a href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#a3a7f57679e9cd6c9f042dfd0612b2b24">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a3a7f57679e9cd6c9f042dfd0612b2b24"><td class="mdescLeft"> </td><td class="mdescRight">Inserts a value to a sorted multi-value BST. <br /></td></tr>
|
||||
<tr class="separator:a3a7f57679e9cd6c9f042dfd0612b2b24"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af544e271ea19a6fd69a6b3ed6816453e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#af544e271ea19a6fd69a6b3ed6816453e">eraseFromSorted</a> (int value)</td></tr>
|
||||
<tr class="memdesc:af544e271ea19a6fd69a6b3ed6816453e"><td class="mdescLeft"> </td><td class="mdescRight">Erases a value from a sorted multi-value BST. <a href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#af544e271ea19a6fd69a6b3ed6816453e">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:af544e271ea19a6fd69a6b3ed6816453e"><td class="mdescLeft"> </td><td class="mdescRight">Erases a value from a sorted multi-value BST. <br /></td></tr>
|
||||
<tr class="separator:af544e271ea19a6fd69a6b3ed6816453e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
|
||||
@@ -155,7 +155,7 @@ const size_type </td><td class="memItemRight" valign="bottom"><b>_windowSiz
|
||||
<tr class="separator:a55ae3543a76045dffcb5ec7904a32a20"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >A class to calculate the median of a leading sliding window at the back of a stream of integer values. </p>
|
||||
<div class="textblock"><p>A class to calculate the median of a leading sliding window at the back of a stream of integer values. </p>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="aac676369661d15a3eb782c0fee77d45d" name="aac676369661d15a3eb782c0fee77d45d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aac676369661d15a3eb782c0fee77d45d">◆ </a></span>WindowedMedian()</h2>
|
||||
@@ -225,10 +225,10 @@ const size_type </td><td class="memItemRight" valign="bottom"><b>_windowSiz
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<p >If the erased value is on the left branch or the median itself and the number of elements is even, the new median will be the right child of the current one</p>
|
||||
<p >O(1) - traversing one step to the right child</p>
|
||||
<p >However, if the erased value is on the right branch or the median itself, and the number of elements is odd, the new median will be the left child of the current one</p>
|
||||
<p >Find the (first) position of the value we want to erase, and erase it</p>
|
||||
<p>If the erased value is on the left branch or the median itself and the number of elements is even, the new median will be the right child of the current one</p>
|
||||
<p>O(1) - traversing one step to the right child</p>
|
||||
<p>However, if the erased value is on the right branch or the median itself, and the number of elements is odd, the new median will be the left child of the current one</p>
|
||||
<p>Find the (first) position of the value we want to erase, and erase it</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 95</span> {</div>
|
||||
<div class="line"><span class="lineno"> 96</span> <span class="keyword">const</span> <span class="keyword">auto</span> sz = <a class="code hl_variable" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#aacd76f078632faee1a8788d031e6c2de">_sortedValues</a>.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/multiset/size.html">size</a>();</div>
|
||||
<div class="line"><span class="lineno"> 97</span><span class="comment"></span> </div>
|
||||
@@ -290,7 +290,7 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Gets the median of the values in the sliding window. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Median of sliding window. For even window size return the average between the two values in the middle </dd></dl>
|
||||
<p >O(1)</p>
|
||||
<p>O(1)</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 148</span> {</div>
|
||||
<div class="line"><span class="lineno"> 149</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#aacd76f078632faee1a8788d031e6c2de">_sortedValues</a>.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/multiset/size.html">size</a>() % 2 != 0) {</div>
|
||||
<div class="line"><span class="lineno"> 150</span> <span class="keywordflow">return</span> *<a class="code hl_variable" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#a55ae3543a76045dffcb5ec7904a32a20">_itMedian</a>; <span class="comment">// O(1)</span></div>
|
||||
@@ -332,9 +332,9 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>A naive and inefficient method to obtain the median of the sliding window. Used for testing! </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Median of sliding window. For even window size return the average between the two values in the middle </dd></dl>
|
||||
<p >Sort window - O(NlogN)</p>
|
||||
<p >Find value in the middle - O(N)</p>
|
||||
<p >O(N)</p>
|
||||
<p>Sort window - O(NlogN)</p>
|
||||
<p>Find value in the middle - O(N)</p>
|
||||
<p>O(N)</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 161</span> {</div>
|
||||
<div class="line"><span class="lineno"> 162</span> <span class="keyword">auto</span> window = <a class="code hl_variable" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#a825a7aaef844c9f743a27b268e8569b2">_window</a>;</div>
|
||||
<div class="line"><span class="lineno"> 163</span> window.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list/sort.html">sort</a>(); <span class="comment">/// Sort window - O(NlogN)</span></div>
|
||||
@@ -389,10 +389,10 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<p >Push new value to the back of the sliding window - O(1)</p>
|
||||
<p >If exceeding size of window, pop from its left side</p>
|
||||
<p >Erase from the multi-value BST the window left side value</p>
|
||||
<p >Pop the left side value from the window - O(1)</p>
|
||||
<p>Push new value to the back of the sliding window - O(1)</p>
|
||||
<p>If exceeding size of window, pop from its left side</p>
|
||||
<p>Erase from the multi-value BST the window left side value</p>
|
||||
<p>Pop the left side value from the window - O(1)</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 129</span> {<span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 130</span><span class="comment"> /// Push new value to the back of the sliding window - O(1)</span></div>
|
||||
<div class="line"><span class="lineno"> 131</span><span class="comment"></span> <a class="code hl_variable" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#a825a7aaef844c9f743a27b268e8569b2">_window</a>.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list/push_back.html">push_back</a>(value);</div>
|
||||
@@ -451,11 +451,11 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<p >Insert value to BST - O(logN)</p>
|
||||
<p >For the first value, set median iterator to BST root</p>
|
||||
<p >If new value goes to left tree branch, and number of elements is even, the new median in the balanced tree is the left child of the median before the insertion</p>
|
||||
<p >However, if the new value goes to the right branch, the previous median's right child is the new median in the balanced tree</p>
|
||||
<p >O(1) - traversing one step to the right child</p>
|
||||
<p>Insert value to BST - O(logN)</p>
|
||||
<p>For the first value, set median iterator to BST root</p>
|
||||
<p>If new value goes to left tree branch, and number of elements is even, the new median in the balanced tree is the left child of the median before the insertion</p>
|
||||
<p>However, if the new value goes to the right branch, the previous median's right child is the new median in the balanced tree</p>
|
||||
<p>O(1) - traversing one step to the right child</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 69</span> {</div>
|
||||
<div class="line"><span class="lineno"> 70</span> <a class="code hl_variable" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#aacd76f078632faee1a8788d031e6c2de">_sortedValues</a>.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/multiset/insert.html">insert</a>(value); <span class="comment">/// Insert value to BST - O(logN)</span></div>
|
||||
<div class="line"><span class="lineno"> 71</span> <span class="keyword">const</span> <span class="keyword">auto</span> sz = <a class="code hl_variable" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html#aacd76f078632faee1a8788d031e6c2de">_sortedValues</a>.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/multiset/size.html">size</a>();</div>
|
||||
@@ -508,7 +508,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >an iterator that points to the root of the multi-value BST </p>
|
||||
<p>an iterator that points to the root of the multi-value BST </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -531,7 +531,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >a DS to represent a balanced multi-value binary search tree (BST) </p>
|
||||
<p>a DS to represent a balanced multi-value binary search tree (BST) </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -544,7 +544,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="../../d4/ded/namespaceprobability.html">probability</a></li><li class="navelem"><b>windowed_median</b></li><li class="navelem"><a class="el" href="../../df/d34/classprobability_1_1windowed__median_1_1_windowed_median.html">WindowedMedian</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: probability::windowed_median::WindowedMedian::insertToSorted Pages: 1 -->
|
||||
<svg width="282pt" height="101pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: probability::windowed_median::WindowedMedian::getMedianNaive Pages: 1 -->
|
||||
<svg width="252pt" height="49pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: probability::windowed_median::WindowedMedian::insert Pages: 1 -->
|
||||
<svg width="455pt" height="279pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: probability::windowed_median::WindowedMedian::getMedian Pages: 1 -->
|
||||
<svg width="276pt" height="49pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: probability::windowed_median::WindowedMedian::eraseFromSorted Pages: 1 -->
|
||||
<svg width="282pt" height="101pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: backtracking/minimax.cpp Pages: 1 -->
|
||||
<svg width="254pt" height="82pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: search/interpolation_search2.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -121,7 +121,7 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p ><a href="https://en.wikipedia.org/wiki/Interpolation_search" target="_blank">Interpolation search</a> algorithm </p>
|
||||
<div class="textblock"><p><a href="https://en.wikipedia.org/wiki/Interpolation_search" target="_blank">Interpolation search</a> algorithm </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="aa3ec659ec8394d186c761df81ad1f629" name="aa3ec659ec8394d186c761df81ad1f629"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa3ec659ec8394d186c761df81ad1f629">◆ </a></span>InterpolationSearch()</h2>
|
||||
@@ -154,7 +154,7 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >function to search the value in an array using interpolation search </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>function to search the value in an array using interpolation search </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">arr</td><td>array to search in </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>value to search for </td></tr>
|
||||
@@ -198,8 +198,8 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >main function </p>
|
||||
<p >< passed array A inside the InterpolationSearch function</p>
|
||||
<p>main function </p>
|
||||
<p>< passed array A inside the InterpolationSearch function</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 32</span> {</div>
|
||||
<div class="line"><span class="lineno"> 33</span> <span class="keywordtype">int</span> A[] = {2, 4, 5, 7, 13, 14, 15, 23};</div>
|
||||
<div class="line"><span class="lineno"> 34</span> <span class="keywordtype">int</span> x = 17;</div>
|
||||
@@ -229,7 +229,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="../../df/d39/interpolation__search2_8cpp.html">interpolation_search2.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="183pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: search/exponential_search.cpp Pages: 1 -->
|
||||
<svg width="256pt" height="93pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: data_structures/binary_search_tree2.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -130,34 +130,34 @@ Classes</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a8c882f43e1e52948a7841a8bfb091350"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d42/binary__search__tree2_8cpp.html#a8c882f43e1e52948a7841a8bfb091350">test_insert</a> ()</td></tr>
|
||||
<tr class="memdesc:a8c882f43e1e52948a7841a8bfb091350"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing <a class="el" href="../../d8/dee/avltree_8cpp.html#a2473fe7416332495b2678ebe89652e4b">insert()</a>. <a href="../../df/d42/binary__search__tree2_8cpp.html#a8c882f43e1e52948a7841a8bfb091350">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a8c882f43e1e52948a7841a8bfb091350"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing <a class="el" href="../../d8/dee/avltree_8cpp.html#a2473fe7416332495b2678ebe89652e4b">insert()</a>. <br /></td></tr>
|
||||
<tr class="separator:a8c882f43e1e52948a7841a8bfb091350"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab1333c3ea06dcad896ee204bbd407c4e"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d42/binary__search__tree2_8cpp.html#ab1333c3ea06dcad896ee204bbd407c4e">test_remove</a> ()</td></tr>
|
||||
<tr class="memdesc:ab1333c3ea06dcad896ee204bbd407c4e"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing remove(). <a href="../../df/d42/binary__search__tree2_8cpp.html#ab1333c3ea06dcad896ee204bbd407c4e">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ab1333c3ea06dcad896ee204bbd407c4e"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing remove(). <br /></td></tr>
|
||||
<tr class="separator:ab1333c3ea06dcad896ee204bbd407c4e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1d42876440ac5346e2850a32497385c3"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d42/binary__search__tree2_8cpp.html#a1d42876440ac5346e2850a32497385c3">test_contains</a> ()</td></tr>
|
||||
<tr class="memdesc:a1d42876440ac5346e2850a32497385c3"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing contains(). <a href="../../df/d42/binary__search__tree2_8cpp.html#a1d42876440ac5346e2850a32497385c3">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a1d42876440ac5346e2850a32497385c3"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing contains(). <br /></td></tr>
|
||||
<tr class="separator:a1d42876440ac5346e2850a32497385c3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af2847a901160fd45b4044550e9921cb4"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d42/binary__search__tree2_8cpp.html#af2847a901160fd45b4044550e9921cb4">test_find_min</a> ()</td></tr>
|
||||
<tr class="memdesc:af2847a901160fd45b4044550e9921cb4"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing find_min(). <a href="../../df/d42/binary__search__tree2_8cpp.html#af2847a901160fd45b4044550e9921cb4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:af2847a901160fd45b4044550e9921cb4"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing find_min(). <br /></td></tr>
|
||||
<tr class="separator:af2847a901160fd45b4044550e9921cb4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9856b68e2cba50d2e26a1cbe374e0365"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d42/binary__search__tree2_8cpp.html#a9856b68e2cba50d2e26a1cbe374e0365">test_find_max</a> ()</td></tr>
|
||||
<tr class="memdesc:a9856b68e2cba50d2e26a1cbe374e0365"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing find_max(). <a href="../../df/d42/binary__search__tree2_8cpp.html#a9856b68e2cba50d2e26a1cbe374e0365">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a9856b68e2cba50d2e26a1cbe374e0365"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing find_max(). <br /></td></tr>
|
||||
<tr class="separator:a9856b68e2cba50d2e26a1cbe374e0365"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a06f35064850e891d6fda0093c0d9ee6e"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d42/binary__search__tree2_8cpp.html#a06f35064850e891d6fda0093c0d9ee6e">test_get_elements_inorder</a> ()</td></tr>
|
||||
<tr class="memdesc:a06f35064850e891d6fda0093c0d9ee6e"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing get_elements_inorder(). <a href="../../df/d42/binary__search__tree2_8cpp.html#a06f35064850e891d6fda0093c0d9ee6e">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a06f35064850e891d6fda0093c0d9ee6e"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing get_elements_inorder(). <br /></td></tr>
|
||||
<tr class="separator:a06f35064850e891d6fda0093c0d9ee6e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab00b8d0f21aeb5fbddb6decf3bcb640a"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d42/binary__search__tree2_8cpp.html#ab00b8d0f21aeb5fbddb6decf3bcb640a">test_get_elements_preorder</a> ()</td></tr>
|
||||
<tr class="memdesc:ab00b8d0f21aeb5fbddb6decf3bcb640a"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing get_elements_preorder(). <a href="../../df/d42/binary__search__tree2_8cpp.html#ab00b8d0f21aeb5fbddb6decf3bcb640a">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ab00b8d0f21aeb5fbddb6decf3bcb640a"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing get_elements_preorder(). <br /></td></tr>
|
||||
<tr class="separator:ab00b8d0f21aeb5fbddb6decf3bcb640a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a94b76f781fcbe1ad0e3397ace6bb1965"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d42/binary__search__tree2_8cpp.html#a94b76f781fcbe1ad0e3397ace6bb1965">test_get_elements_postorder</a> ()</td></tr>
|
||||
<tr class="memdesc:a94b76f781fcbe1ad0e3397ace6bb1965"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing get_elements_postorder(). <a href="../../df/d42/binary__search__tree2_8cpp.html#a94b76f781fcbe1ad0e3397ace6bb1965">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a94b76f781fcbe1ad0e3397ace6bb1965"><td class="mdescLeft"> </td><td class="mdescRight">Function for testing get_elements_postorder(). <br /></td></tr>
|
||||
<tr class="separator:a94b76f781fcbe1ad0e3397ace6bb1965"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d42/binary__search__tree2_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >A generic <a href="https://en.wikipedia.org/wiki/Binary_search_tree" target="_blank">binary search tree</a> implementation. Here you can find more information about the algorithm: <a href="https://www.scaler.com/topics/data-structures/binary-search-tree/" target="_blank">Scaler - Binary Search tree</a>. </p>
|
||||
<div class="textblock"><p>A generic <a href="https://en.wikipedia.org/wiki/Binary_search_tree" target="_blank">binary search tree</a> implementation. Here you can find more information about the algorithm: <a href="https://www.scaler.com/topics/data-structures/binary-search-tree/" target="_blank">Scaler - Binary Search tree</a>. </p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d3/d26/binary__search__tree_8cpp.html" title="A simple tree implementation using structured nodes.">binary_search_tree.cpp</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
@@ -644,7 +644,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="../../df/d42/binary__search__tree2_8cpp.html">binary_search_tree2.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_get_elements_inorder Pages: 1 -->
|
||||
<svg width="426pt" height="142pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_contains Pages: 1 -->
|
||||
<svg width="218pt" height="160pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_insert Pages: 1 -->
|
||||
<svg width="205pt" height="274pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_get_elements_postorder Pages: 1 -->
|
||||
<svg width="454pt" height="142pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_find_max Pages: 1 -->
|
||||
<svg width="221pt" height="160pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_get_elements_preorder Pages: 1 -->
|
||||
<svg width="438pt" height="142pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_remove Pages: 1 -->
|
||||
<svg width="349pt" height="378pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test_find_min Pages: 1 -->
|
||||
<svg width="218pt" height="160pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: n_queens_all_solutions Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -104,14 +104,14 @@ $(document).ready(function(){initNavTree('df/d44/namespacen__queens__all__soluti
|
||||
<p>Functions for the <a href="https://en.wikipedia.org/wiki/Eight_queens_puzzle" target="_blank">Eight Queens</a> puzzle with all solutions.
|
||||
<a href="../../df/d44/namespacen__queens__all__solutions.html#details">More...</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Functions for the <a href="https://en.wikipedia.org/wiki/Eight_queens_puzzle" target="_blank">Eight Queens</a> puzzle with all solutions. </p>
|
||||
<div class="textblock"><p>Functions for the <a href="https://en.wikipedia.org/wiki/Eight_queens_puzzle" target="_blank">Eight Queens</a> puzzle with all solutions. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../df/d44/namespacen__queens__all__solutions.html">n_queens_all_solutions</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: cpu_scheduling_algorithms/fcfs_scheduling.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -135,22 +135,22 @@ Classes</h2></td></tr>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a18920aa331faf4476b251c8cdb2c2bec"><td class="memTemplParams" colspan="2">template<typename S , typename T , typename E > </td></tr>
|
||||
<tr class="memitem:a18920aa331faf4476b251c8cdb2c2bec"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../df/d47/fcfs__scheduling_8cpp.html#a18920aa331faf4476b251c8cdb2c2bec">sortcol</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/tuple.html">tuple</a>< S, T, E > &t1, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/tuple.html">tuple</a>< S, T, E > &t2)</td></tr>
|
||||
<tr class="memdesc:a18920aa331faf4476b251c8cdb2c2bec"><td class="mdescLeft"> </td><td class="mdescRight">Comparator function for sorting a vector. <a href="../../df/d47/fcfs__scheduling_8cpp.html#a18920aa331faf4476b251c8cdb2c2bec">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a18920aa331faf4476b251c8cdb2c2bec"><td class="mdescLeft"> </td><td class="mdescRight">Comparator function for sorting a vector. <br /></td></tr>
|
||||
<tr class="separator:a18920aa331faf4476b251c8cdb2c2bec"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8f2b90cb64d63a7080965e66a05ccf86"><td class="memTemplParams" colspan="2">template<typename S , typename T , typename E > </td></tr>
|
||||
<tr class="memitem:a8f2b90cb64d63a7080965e66a05ccf86"><td class="memTemplItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/tuple.html">tuple</a>< S, T, E, double, double, double > > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../df/d47/fcfs__scheduling_8cpp.html#a8f2b90cb64d63a7080965e66a05ccf86">get_final_status</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/tuple.html">tuple</a>< uint32_t, uint32_t, uint32_t > > input)</td></tr>
|
||||
<tr class="memdesc:a8f2b90cb64d63a7080965e66a05ccf86"><td class="mdescLeft"> </td><td class="mdescRight">Function to be used for testing purposes. This function guarantees the correct solution for <a class="el" href="../../dd/dca/class_f_c_f_s.html" title="Class which implements the FCFS scheduling algorithm.">FCFS</a> scheduling algorithm. <a href="../../df/d47/fcfs__scheduling_8cpp.html#a8f2b90cb64d63a7080965e66a05ccf86">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a8f2b90cb64d63a7080965e66a05ccf86"><td class="mdescLeft"> </td><td class="mdescRight">Function to be used for testing purposes. This function guarantees the correct solution for <a class="el" href="../../dd/dca/class_f_c_f_s.html" title="Class which implements the FCFS scheduling algorithm.">FCFS</a> scheduling algorithm. <br /></td></tr>
|
||||
<tr class="separator:a8f2b90cb64d63a7080965e66a05ccf86"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d47/fcfs__scheduling_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Self-test implementations. <a href="../../df/d47/fcfs__scheduling_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Self-test implementations. <br /></td></tr>
|
||||
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d47/fcfs__scheduling_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Entry point of the program. <a href="../../df/d47/fcfs__scheduling_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Entry point of the program. <br /></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Implementation of <a class="el" href="../../dd/dca/class_f_c_f_s.html" title="Class which implements the FCFS scheduling algorithm.">FCFS</a> CPU scheduling algorithm. </p>
|
||||
<p ><a class="el" href="../../dd/dca/class_f_c_f_s.html" title="Class which implements the FCFS scheduling algorithm.">FCFS</a> is a non-preemptive CPU scheduling algorithm in which whichever process arrives first, gets executed first. If two or more processes arrive simultaneously, the process with smaller process ID gets executed first. <a class="el" href="../../">https://bit.ly/3ABNXOC</a>Pratyush Vatsa </p>
|
||||
<div class="textblock"><p>Implementation of <a class="el" href="../../dd/dca/class_f_c_f_s.html" title="Class which implements the FCFS scheduling algorithm.">FCFS</a> CPU scheduling algorithm. </p>
|
||||
<p><a class="el" href="../../dd/dca/class_f_c_f_s.html" title="Class which implements the FCFS scheduling algorithm.">FCFS</a> is a non-preemptive CPU scheduling algorithm in which whichever process arrives first, gets executed first. If two or more processes arrive simultaneously, the process with smaller process ID gets executed first. <a class="el" href="../../">https://bit.ly/3ABNXOC</a>Pratyush Vatsa </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a8f2b90cb64d63a7080965e66a05ccf86" name="a8f2b90cb64d63a7080965e66a05ccf86"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a8f2b90cb64d63a7080965e66a05ccf86">◆ </a></span>get_final_status()</h2>
|
||||
@@ -376,7 +376,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_cc8e79ed9d2b7756c78e8d0c87c6c0c7.html">cpu_scheduling_algorithms</a></li><li class="navelem"><a class="el" href="../../df/d47/fcfs__scheduling_8cpp.html">fcfs_scheduling.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="354pt" height="294pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="428pt" height="294pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: data_structures/stack.hpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -134,7 +134,7 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:a990a87f74d83899124b2254bef8d0e98"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >This class specifies the basic operation on a stack as a linked list. </p>
|
||||
<div class="textblock"><p>This class specifies the basic operation on a stack as a linked list. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd>danghai </dd>
|
||||
<dd>
|
||||
<a href="https://github.com/vil02" target="_blank">Piotr Idzik</a> </dd></dl>
|
||||
@@ -181,7 +181,7 @@ template<typename <a class="el" href="../../db/d8b/struct_node.html">Node</a>
|
||||
<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="../../df/d47/stack_8hpp.html">stack.hpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: data_structures/stack.hpp Source File</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -231,7 +231,7 @@ $(document).ready(function(){initNavTree('df/d47/stack_8hpp_source.html','../../
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html">data_structures</a></li><li class="navelem"><a class="el" href="../../df/d47/stack_8hpp.html">stack.hpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: selection_sort_recursive Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -104,14 +104,14 @@ $(document).ready(function(){initNavTree('df/d4a/namespaceselection__sort__recur
|
||||
<p>Functions for the <a href="https://en.wikipedia.org/wiki/Selection_sort" target="_blank">Selection sort</a> implementation using recursion.
|
||||
<a href="../../df/d4a/namespaceselection__sort__recursive.html#details">More...</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Functions for the <a href="https://en.wikipedia.org/wiki/Selection_sort" target="_blank">Selection sort</a> implementation using recursion. </p>
|
||||
<div class="textblock"><p>Functions for the <a href="https://en.wikipedia.org/wiki/Selection_sort" target="_blank">Selection sort</a> implementation using recursion. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../df/d4a/namespaceselection__sort__recursive.html">selection_sort_recursive</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: Member List</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -118,7 +118,7 @@ $(document).ready(function(){initNavTree('d6/dae/classothers_1_1lru__cache_1_1_l
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: hashing/chaining.cpp Pages: 1 -->
|
||||
<svg width="256pt" height="82pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: greedy_algorithms/jumpgame.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -118,18 +118,18 @@ Include dependency graph for jumpgame.cpp:</div>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:af205390325e8c999bd68b93fa5252755"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d64/jumpgame_8cpp.html#af205390325e8c999bd68b93fa5252755">canJump</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > &nums)</td></tr>
|
||||
<tr class="memdesc:af205390325e8c999bd68b93fa5252755"><td class="mdescLeft"> </td><td class="mdescRight">This function implements the above algorithm. <a href="../../df/d64/jumpgame_8cpp.html#af205390325e8c999bd68b93fa5252755">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:af205390325e8c999bd68b93fa5252755"><td class="mdescLeft"> </td><td class="mdescRight">This function implements the above algorithm. <br /></td></tr>
|
||||
<tr class="separator:af205390325e8c999bd68b93fa5252755"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d64/jumpgame_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Function to test above algorithm. <a href="../../df/d64/jumpgame_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Function to test above algorithm. <br /></td></tr>
|
||||
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d64/jumpgame_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <a href="../../df/d64/jumpgame_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <br /></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Implementation of an algorithm to solve the <a href="../../(https://leetcode.com/problems/jump-game/)" target="_blank">jumping game</a> problem. </p>
|
||||
<p ><b>Problem statement:</b> Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index. This solution takes in input as a vector and output as a boolean to check if you can reach the last position. We name the indices good and bad based on whether we can reach the destination if we start at that position. We initialize the last index as lastPos. Here, we start from the end of the array and check if we can ever reach the first index. We check if the sum of the index and the maximum jump count given is greater than or equal to the lastPos. If yes, then that is the last position you can reach starting from the back. After the end of the loop, if we reach the lastPos as 0, then the destination can be reached from the start position. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/rakshaa2000" target="_blank">Rakshaa Viswanathan</a> </dd></dl>
|
||||
<div class="textblock"><p>Implementation of an algorithm to solve the <a href="../../(https://leetcode.com/problems/jump-game/)" target="_blank">jumping game</a> problem. </p>
|
||||
<p><b>Problem statement:</b> Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index. This solution takes in input as a vector and output as a boolean to check if you can reach the last position. We name the indices good and bad based on whether we can reach the destination if we start at that position. We initialize the last index as lastPos. Here, we start from the end of the array and check if we can ever reach the first index. We check if the sum of the index and the maximum jump count given is greater than or equal to the lastPos. If yes, then that is the last position you can reach starting from the back. After the end of the loop, if we reach the lastPos as 0, then the destination can be reached from the start position. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/rakshaa2000" target="_blank">Rakshaa Viswanathan</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="af205390325e8c999bd68b93fa5252755" name="af205390325e8c999bd68b93fa5252755"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af205390325e8c999bd68b93fa5252755">◆ </a></span>canJump()</h2>
|
||||
@@ -268,7 +268,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_0eaa691bd54ab0922ca7f50599de6d22.html">greedy_algorithms</a></li><li class="navelem"><a class="el" href="../../df/d64/jumpgame_8cpp.html">jumpgame.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="256pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="330pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: canJump Pages: 1 -->
|
||||
<svg width="187pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: math/vector_cross_product.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -129,31 +129,31 @@ Namespaces</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a225732399c5c076976eae5b180a9f8c9"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>< double, 3 > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d66/vector__cross__product_8cpp.html#a225732399c5c076976eae5b180a9f8c9">math::vector_cross::cross</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>< double, 3 > &A, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>< double, 3 > &B)</td></tr>
|
||||
<tr class="memdesc:a225732399c5c076976eae5b180a9f8c9"><td class="mdescLeft"> </td><td class="mdescRight">Function to calculate the cross product of the passed arrays containing the direction ratios of the two mathematical vectors. <a href="../../df/d66/vector__cross__product_8cpp.html#a225732399c5c076976eae5b180a9f8c9">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a225732399c5c076976eae5b180a9f8c9"><td class="mdescLeft"> </td><td class="mdescRight">Function to calculate the cross product of the passed arrays containing the direction ratios of the two mathematical vectors. <br /></td></tr>
|
||||
<tr class="separator:a225732399c5c076976eae5b180a9f8c9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a4b2a9757a87c18e1642d72410ecfaba8"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d66/vector__cross__product_8cpp.html#a4b2a9757a87c18e1642d72410ecfaba8">math::vector_cross::mag</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>< double, 3 > &vec)</td></tr>
|
||||
<tr class="memdesc:a4b2a9757a87c18e1642d72410ecfaba8"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the magnitude of the mathematical vector from it's direction ratios. <a href="../../df/d66/vector__cross__product_8cpp.html#a4b2a9757a87c18e1642d72410ecfaba8">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a4b2a9757a87c18e1642d72410ecfaba8"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the magnitude of the mathematical vector from it's direction ratios. <br /></td></tr>
|
||||
<tr class="separator:a4b2a9757a87c18e1642d72410ecfaba8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d66/vector__cross__product_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">namespace math <a href="../../df/d66/vector__cross__product_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">namespace math <br /></td></tr>
|
||||
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d66/vector__cross__product_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main Function. <a href="../../df/d66/vector__cross__product_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main Function. <br /></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Calculates the <a href="https://en.wikipedia.org/wiki/Cross_product" target="_blank">Cross Product</a> and the magnitude of two mathematical 3D vectors. </p>
|
||||
<p >Cross Product of two vectors gives a vector. Direction Ratios of a vector are the numeric parts of the given vector. They are the tree parts of the vector which determine the magnitude (value) of the vector. The method of finding a cross product is the same as finding the determinant of an order 3 matrix consisting of the first row with unit vectors of magnitude 1, the second row with the direction ratios of the first vector and the third row with the direction ratios of the second vector. The magnitude of a vector is it's value expressed as a number. Let the direction ratios of the first vector, P be: a, b, c Let the direction ratios of the second vector, Q be: x, y, z Therefore the calculation for the cross product can be arranged as:</p>
|
||||
<div class="textblock"><p>Calculates the <a href="https://en.wikipedia.org/wiki/Cross_product" target="_blank">Cross Product</a> and the magnitude of two mathematical 3D vectors. </p>
|
||||
<p>Cross Product of two vectors gives a vector. Direction Ratios of a vector are the numeric parts of the given vector. They are the tree parts of the vector which determine the magnitude (value) of the vector. The method of finding a cross product is the same as finding the determinant of an order 3 matrix consisting of the first row with unit vectors of magnitude 1, the second row with the direction ratios of the first vector and the third row with the direction ratios of the second vector. The magnitude of a vector is it's value expressed as a number. Let the direction ratios of the first vector, P be: a, b, c Let the direction ratios of the second vector, Q be: x, y, z Therefore the calculation for the cross product can be arranged as:</p>
|
||||
<div class="fragment"><div class="line">P x Q:</div>
|
||||
<div class="line"> 1 1 1</div>
|
||||
<div class="line"> a b c</div>
|
||||
<div class="line"> x y z</div>
|
||||
</div><!-- fragment --><p >The direction ratios (DR) are calculated as follows: 1st DR, J: (b * z) - (c * y) 2nd DR, A: -((a * z) - (c * x)) 3rd DR, N: (a * y) - (b * x)</p>
|
||||
<p >Therefore, the direction ratios of the cross product are: J, A, N The following C++ Program calculates the direction ratios of the cross products of two vector. The program uses a function, cross() for doing so. The direction ratios for the first and the second vector has to be passed one by one seperated by a space character.</p>
|
||||
<p >Magnitude of a vector is the square root of the sum of the squares of the direction ratios.</p>
|
||||
</div><!-- fragment --><p>The direction ratios (DR) are calculated as follows: 1st DR, J: (b * z) - (c * y) 2nd DR, A: -((a * z) - (c * x)) 3rd DR, N: (a * y) - (b * x)</p>
|
||||
<p>Therefore, the direction ratios of the cross product are: J, A, N The following C++ Program calculates the direction ratios of the cross products of two vector. The program uses a function, cross() for doing so. The direction ratios for the first and the second vector has to be passed one by one seperated by a space character.</p>
|
||||
<p>Magnitude of a vector is the square root of the sum of the squares of the direction ratios.</p>
|
||||
<h3><a class="anchor" id="autotoc_md86"></a>
|
||||
Example:</h3>
|
||||
<p >An example of a running instance of the executable program: </p><pre class="fragment">Pass the first Vector: 1 2 3
|
||||
<p>An example of a running instance of the executable program: </p><pre class="fragment">Pass the first Vector: 1 2 3
|
||||
</pre><p> Pass the second Vector: 4 5 6 The cross product is: -3 6 -3 Magnitude: 7.34847</p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Shreyas-OwO" target="_blank">Shreyas Sable</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
@@ -192,7 +192,7 @@ Example:</h3>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>the direction ratios of the cross product. </dd></dl>
|
||||
<p >Performs the cross product as shown in @algorithm.</p>
|
||||
<p>Performs the cross product as shown in @algorithm.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 69</span> {</div>
|
||||
<div class="line"><span class="lineno"> 70</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<double, 3></a> product;<span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 71</span><span class="comment"> /// Performs the cross product as shown in @algorithm.</span></div>
|
||||
@@ -266,12 +266,12 @@ Here is the call graph for this function:</div>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Main Function. </p>
|
||||
<p >Asks the user to enter the direction ratios for each of the two mathematical vectors using <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> </p><dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<p >Tests the functions with sample input before asking for user input.</p>
|
||||
<p >Gets the values for the first vector.</p>
|
||||
<p >Gets the values for the second vector.</p>
|
||||
<p >Displays the output out.</p>
|
||||
<p >Displays the magnitude of the cross product.</p>
|
||||
<p>Asks the user to enter the direction ratios for each of the two mathematical vectors using <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> </p><dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<p>Tests the functions with sample input before asking for user input.</p>
|
||||
<p>Gets the values for the first vector.</p>
|
||||
<p>Gets the values for the second vector.</p>
|
||||
<p>Displays the output out.</p>
|
||||
<p>Displays the magnitude of the cross product.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 109</span> {</div>
|
||||
<div class="line"><span class="lineno"> 110</span><span class="comment"></span> </div>
|
||||
<div class="line"><span class="lineno"> 111</span><span class="comment"> /// Tests the functions with sample input before asking for user input.</span></div>
|
||||
@@ -336,10 +336,10 @@ Here is the call graph for this function:</div>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>namespace math </p>
|
||||
<p >test function.</p>
|
||||
<p >test the cross() and the mag() functions. </p>
|
||||
<p >Tests the cross() function.</p>
|
||||
<p >Tests the mag() function.</p>
|
||||
<p>test function.</p>
|
||||
<p>test the cross() and the mag() functions. </p>
|
||||
<p>Tests the cross() function.</p>
|
||||
<p>Tests the mag() function.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 94</span> {<span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 95</span><span class="comment"> /// Tests the cross() function.</span></div>
|
||||
<div class="line"><span class="lineno"> 96</span><span class="comment"></span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<double, 3></a> t_vec = <a class="code hl_function" href="../../df/d66/vector__cross__product_8cpp.html#a225732399c5c076976eae5b180a9f8c9">math::vector_cross::cross</a>({1, 2, 3}, {4, 5, 6});</div>
|
||||
@@ -358,7 +358,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="../../df/d66/vector__cross__product_8cpp.html">vector_cross_product.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: math::vector_cross::cross Pages: 1 -->
|
||||
<svg width="109pt" height="56pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: math::vector_cross::mag Pages: 1 -->
|
||||
<svg width="133pt" height="45pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="136pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: ciphers::elliptic_curve_key_exchange Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -117,24 +117,24 @@ Classes</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
|
||||
Typedefs</h2></td></tr>
|
||||
<tr class="memitem:af0a6e3521629c25c2b5d620f26429830"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">ciphers::elliptic_curve_key_exchange::Point</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a></td></tr>
|
||||
<tr class="memdesc:af0a6e3521629c25c2b5d620f26429830"><td class="mdescLeft"> </td><td class="mdescRight">Definition of struct <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a>. <a href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:af0a6e3521629c25c2b5d620f26429830"><td class="mdescLeft"> </td><td class="mdescRight">Definition of struct <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a>. <br /></td></tr>
|
||||
<tr class="separator:af0a6e3521629c25c2b5d620f26429830"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ac00616a4e40d3cd5cfb4da87d9ff9af0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#ac00616a4e40d3cd5cfb4da87d9ff9af0">exp</a> (<a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> number, <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> <a class="el" href="../../df/def/power__for__huge__numbers_8cpp.html#ae249a2af508aa94266023ce8aa81426f">power</a>, const <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> &mod)</td></tr>
|
||||
<tr class="memdesc:ac00616a4e40d3cd5cfb4da87d9ff9af0"><td class="mdescLeft"> </td><td class="mdescRight">This function calculates number raised to exponent power under modulo mod using <a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/modular_exponentiation.cpp" target="_blank">Modular Exponentiation</a>. <a href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#ac00616a4e40d3cd5cfb4da87d9ff9af0">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ac00616a4e40d3cd5cfb4da87d9ff9af0"><td class="mdescLeft"> </td><td class="mdescRight">This function calculates number raised to exponent power under modulo mod using <a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/modular_exponentiation.cpp" target="_blank">Modular Exponentiation</a>. <br /></td></tr>
|
||||
<tr class="separator:ac00616a4e40d3cd5cfb4da87d9ff9af0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:acc5fe9c2032fb7582c38a20d1fa69bcf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">Point</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#acc5fe9c2032fb7582c38a20d1fa69bcf">addition</a> (<a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">Point</a> a, <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">Point</a> b, const <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> &curve_a_coeff, <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> mod)</td></tr>
|
||||
<tr class="memdesc:acc5fe9c2032fb7582c38a20d1fa69bcf"><td class="mdescLeft"> </td><td class="mdescRight">Addition of points. <a href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#acc5fe9c2032fb7582c38a20d1fa69bcf">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:acc5fe9c2032fb7582c38a20d1fa69bcf"><td class="mdescLeft"> </td><td class="mdescRight">Addition of points. <br /></td></tr>
|
||||
<tr class="separator:acc5fe9c2032fb7582c38a20d1fa69bcf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a17f3d667241b88115a95282cdd719cb2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">Point</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#a17f3d667241b88115a95282cdd719cb2">multiply</a> (const <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">Point</a> &a, const <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> &curve_a_coeff, <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> p, const <a class="el" href="../../d1/d83/classuint256__t.html">uint256_t</a> &mod)</td></tr>
|
||||
<tr class="memdesc:a17f3d667241b88115a95282cdd719cb2"><td class="mdescLeft"> </td><td class="mdescRight">multiply <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a> and integer <a href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#a17f3d667241b88115a95282cdd719cb2">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a17f3d667241b88115a95282cdd719cb2"><td class="mdescLeft"> </td><td class="mdescRight">multiply <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a> and integer <br /></td></tr>
|
||||
<tr class="separator:a17f3d667241b88115a95282cdd719cb2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >namespace <a class="el" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html" title="namespace elliptic_curve_key_exchange">elliptic_curve_key_exchange</a> </p>
|
||||
<p >Demonstration of <a href="https://cryptobook.nakov.com/asymmetric-key-ciphers/ecdh-key-exchange" target="_blank">Elliptic Curve Diffie-Hellman</a> key exchange. </p>
|
||||
<div class="textblock"><p>namespace <a class="el" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html" title="namespace elliptic_curve_key_exchange">elliptic_curve_key_exchange</a> </p>
|
||||
<p>Demonstration of <a href="https://cryptobook.nakov.com/asymmetric-key-ciphers/ecdh-key-exchange" target="_blank">Elliptic Curve Diffie-Hellman</a> key exchange. </p>
|
||||
</div><h2 class="groupheader">Typedef Documentation</h2>
|
||||
<a id="af0a6e3521629c25c2b5d620f26429830" name="af0a6e3521629c25c2b5d620f26429830"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af0a6e3521629c25c2b5d620f26429830">◆ </a></span>Point</h2>
|
||||
@@ -149,7 +149,7 @@ Functions</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Definition of struct <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a>. </p>
|
||||
<p >Definition of <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a> in the curve. </p>
|
||||
<p>Definition of <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a> in the curve. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -193,7 +193,7 @@ Functions</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Addition of points. </p>
|
||||
<p >Add given point to generate third point. More description can be found <a href="https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Point_addition" target="_blank">here</a>, and <a href="https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Point_doubling" target="_blank">here</a> </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>Add given point to generate third point. More description can be found <a href="https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Point_addition" target="_blank">here</a>, and <a href="https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Point_doubling" target="_blank">here</a> </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">a</td><td>First point </td></tr>
|
||||
<tr><td class="paramname">b</td><td>Second point </td></tr>
|
||||
@@ -203,10 +203,10 @@ Functions</h2></td></tr>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>the resultant point </dd></dl>
|
||||
<p >Slope</p>
|
||||
<p >value zero</p>
|
||||
<p >slope when the line is tangent to curve. This operation is performed while doubling. Taking derivative of <code>y^2 = x^3 + ax + b</code> => <code>2y dy = (3 * x^2 + a)dx</code> => <code>(dy/dx) = (3x^2 + a)/(2y)</code></p>
|
||||
<p >if y co-ordinate is zero, the slope is infinite, return inf. else calculate the slope (here % mod and store in lambda)</p>
|
||||
<p>Slope</p>
|
||||
<p>value zero</p>
|
||||
<p>slope when the line is tangent to curve. This operation is performed while doubling. Taking derivative of <code>y^2 = x^3 + ax + b</code> => <code>2y dy = (3 * x^2 + a)dx</code> => <code>(dy/dx) = (3x^2 + a)/(2y)</code></p>
|
||||
<p>if y co-ordinate is zero, the slope is infinite, return inf. else calculate the slope (here % mod and store in lambda)</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 111</span> {</div>
|
||||
<div class="line"><span class="lineno"> 112</span> <a class="code hl_class" href="../../d1/d83/classuint256__t.html">uint256_t</a> lambda(0); <span class="comment">/// Slope</span></div>
|
||||
<div class="line"><span class="lineno"> 113</span> <a class="code hl_class" href="../../d1/d83/classuint256__t.html">uint256_t</a> zero(0); <span class="comment">/// value zero</span></div>
|
||||
@@ -370,7 +370,7 @@ Here is the call graph for this function:</div>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>multiply <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a> and integer </p>
|
||||
<p >Multiply <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a> by a scalar factor (here it is a private key p). The multiplication is called as <a href="https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Double-and-add" target="_blank">double and add method</a> </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p>Multiply <a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a> by a scalar factor (here it is a private key p). The multiplication is called as <a href="https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Double-and-add" target="_blank">double and add method</a> </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">a</td><td><a class="el" href="../../d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html" title="Definition of struct Point.">Point</a> to multiply </td></tr>
|
||||
<tr><td class="paramname">curve_a_coeff</td><td>Coefficient of given curve (y^2 = x^3 + ax + b) % mod </td></tr>
|
||||
@@ -421,7 +421,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="../../d6/d4e/namespaceciphers.html">ciphers</a></li><li class="navelem"><a class="el" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html">elliptic_curve_key_exchange</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: ciphers::elliptic_curve_key_exchange::multiply Pages: 1 -->
|
||||
<!--zoomable 38 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: ciphers::elliptic_curve_key_exchange::multiply Pages: 1 -->
|
||||
<svg width="606pt" height="38pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: ciphers::elliptic_curve_key_exchange::exp Pages: 1 -->
|
||||
<svg width="284pt" height="38pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: ciphers::elliptic_curve_key_exchange::addition Pages: 1 -->
|
||||
<svg width="445pt" height="38pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: math/modular_division.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -127,20 +127,20 @@ Namespaces</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a66cdf93153cbd1408bd74ac68961d179"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d72/modular__division_8cpp.html#a66cdf93153cbd1408bd74ac68961d179">math::modular_division::power</a> (uint64_t a, uint64_t b, uint64_t c)</td></tr>
|
||||
<tr class="memdesc:a66cdf93153cbd1408bd74ac68961d179"><td class="mdescLeft"> </td><td class="mdescRight">This function calculates a raised to exponent b under modulo c using modular exponentiation. <a href="../../df/d72/modular__division_8cpp.html#a66cdf93153cbd1408bd74ac68961d179">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a66cdf93153cbd1408bd74ac68961d179"><td class="mdescLeft"> </td><td class="mdescRight">This function calculates a raised to exponent b under modulo c using modular exponentiation. <br /></td></tr>
|
||||
<tr class="separator:a66cdf93153cbd1408bd74ac68961d179"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a905e368ae121beb7e7ea35349ddcdac7"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d72/modular__division_8cpp.html#a905e368ae121beb7e7ea35349ddcdac7">math::modular_division::mod_division</a> (uint64_t a, uint64_t b, uint64_t p)</td></tr>
|
||||
<tr class="memdesc:a905e368ae121beb7e7ea35349ddcdac7"><td class="mdescLeft"> </td><td class="mdescRight">This function calculates modular division. <a href="../../df/d72/modular__division_8cpp.html#a905e368ae121beb7e7ea35349ddcdac7">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a905e368ae121beb7e7ea35349ddcdac7"><td class="mdescLeft"> </td><td class="mdescRight">This function calculates modular division. <br /></td></tr>
|
||||
<tr class="separator:a905e368ae121beb7e7ea35349ddcdac7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d72/modular__division_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
|
||||
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0ddf1224851353fc92bfbff6f499fa97"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d72/modular__division_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr>
|
||||
<tr class="memdesc:a0ddf1224851353fc92bfbff6f499fa97"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <a href="../../df/d72/modular__division_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a0ddf1224851353fc92bfbff6f499fa97"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <br /></td></tr>
|
||||
<tr class="separator:a0ddf1224851353fc92bfbff6f499fa97"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >An algorithm to divide two numbers under modulo p <a href="https://www.geeksforgeeks.org/modular-division" target="_blank">Modular Division</a> </p>
|
||||
<p >To calculate division of two numbers under modulo p Modulo operator is not distributive under division, therefore we first have to calculate the inverse of divisor using <a href="https://en.wikipedia.org/wiki/Fermat%27s_little_theorem" target="_blank">Fermat's little theorem</a> Now, we can multiply the dividend with the inverse of divisor and modulo is distributive over multiplication operation. Let, We have 3 numbers a, b, p To compute (a/b)p (a/b)p ≡ (a*(inverse(b)))p ≡ ((ap)*inverse(b)p)p NOTE: For the existence of inverse of 'b', 'b' and 'p' must be coprime For simplicity we take p as prime Time Complexity: O(log(b)) Example: ( 24 / 3 ) % 5 => 8 % 5 = 3 — (i) Now the inverse of 3 is 2 (24 * 2) % 5 = (24 % 5) * (2 % 5) = (4 * 2) % 5 = 3 — (ii) (i) and (ii) are equal hence the answer is correct. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d8/d53/modular__inverse__fermat__little__theorem_8cpp.html" title="C++ Program to find the modular inverse using Fermat's Little Theorem">modular_inverse_fermat_little_theorem.cpp</a>, <a class="el" href="../../d0/d6d/modular__exponentiation_8cpp.html" title="C++ Program for Modular Exponentiation Iteratively.">modular_exponentiation.cpp</a> </dd></dl>
|
||||
<div class="textblock"><p>An algorithm to divide two numbers under modulo p <a href="https://www.geeksforgeeks.org/modular-division" target="_blank">Modular Division</a> </p>
|
||||
<p>To calculate division of two numbers under modulo p Modulo operator is not distributive under division, therefore we first have to calculate the inverse of divisor using <a href="https://en.wikipedia.org/wiki/Fermat%27s_little_theorem" target="_blank">Fermat's little theorem</a> Now, we can multiply the dividend with the inverse of divisor and modulo is distributive over multiplication operation. Let, We have 3 numbers a, b, p To compute (a/b)p (a/b)p ≡ (a*(inverse(b)))p ≡ ((ap)*inverse(b)p)p NOTE: For the existence of inverse of 'b', 'b' and 'p' must be coprime For simplicity we take p as prime Time Complexity: O(log(b)) Example: ( 24 / 3 ) % 5 => 8 % 5 = 3 — (i) Now the inverse of 3 is 2 (24 * 2) % 5 = (24 % 5) * (2 % 5) = (4 * 2) % 5 = 3 — (ii) (i) and (ii) are equal hence the answer is correct. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d8/d53/modular__inverse__fermat__little__theorem_8cpp.html" title="C++ Program to find the modular inverse using Fermat's Little Theorem">modular_inverse_fermat_little_theorem.cpp</a>, <a class="el" href="../../d0/d6d/modular__exponentiation_8cpp.html" title="C++ Program for Modular Exponentiation Iteratively.">modular_exponentiation.cpp</a> </dd></dl>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/shubhamamsa" target="_blank">Shubham Yadav</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a0ddf1224851353fc92bfbff6f499fa97" name="a0ddf1224851353fc92bfbff6f499fa97"></a>
|
||||
@@ -234,8 +234,8 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a/b modulo c </dd></dl>
|
||||
<p >Calculate the inverse of b</p>
|
||||
<p >Calculate the final result</p>
|
||||
<p>Calculate the inverse of b</p>
|
||||
<p>Calculate the final result</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 74</span> {</div>
|
||||
<div class="line"><span class="lineno"> 75</span> uint64_t inverse = <a class="code hl_function" href="../../df/def/power__for__huge__numbers_8cpp.html#ae249a2af508aa94266023ce8aa81426f">power</a>(b, p - 2, p) % p; <span class="comment">/// Calculate the inverse of b</span></div>
|
||||
<div class="line"><span class="lineno"> 76</span> uint64_t <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> =</div>
|
||||
@@ -295,12 +295,12 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a raised to power b modulo c </dd></dl>
|
||||
<p >Initialize the answer to be returned</p>
|
||||
<p >Update a if it is more than or equal to c</p>
|
||||
<p >In case a is divisible by c;</p>
|
||||
<p >If b is odd, multiply a with answer</p>
|
||||
<p >b must be even now</p>
|
||||
<p >b = b/2</p>
|
||||
<p>Initialize the answer to be returned</p>
|
||||
<p>Update a if it is more than or equal to c</p>
|
||||
<p>In case a is divisible by c;</p>
|
||||
<p>If b is odd, multiply a with answer</p>
|
||||
<p>b must be even now</p>
|
||||
<p>b = b/2</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 49</span> {</div>
|
||||
<div class="line"><span class="lineno"> 50</span> uint64_t ans = 1; <span class="comment">/// Initialize the answer to be returned</span></div>
|
||||
<div class="line"><span class="lineno"> 51</span> a = a % c; <span class="comment">/// Update a if it is more than or equal to c</span></div>
|
||||
@@ -343,7 +343,7 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Function for testing power function. test cases and assert statement. </p><dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
|
||||
<p>Function for testing power function. test cases and assert statement. </p><dl class="section return"><dt>Returns</dt><dd><code>void</code> </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 88</span> {</div>
|
||||
<div class="line"><span class="lineno"> 89</span> uint64_t test_case_1 = <a class="code hl_function" href="../../df/d72/modular__division_8cpp.html#a905e368ae121beb7e7ea35349ddcdac7">math::modular_division::mod_division</a>(8, 2, 2);</div>
|
||||
<div class="line"><span class="lineno"> 90</span> assert(test_case_1 == 0);</div>
|
||||
@@ -379,7 +379,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="../../df/d72/modular__division_8cpp.html">modular_division.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="205pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: math::modular_division::mod_division Pages: 1 -->
|
||||
<svg width="125pt" height="56pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="131pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: subarray_sum Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -104,14 +104,14 @@ $(document).ready(function(){initNavTree('df/d74/namespacesubarray__sum.html','.
|
||||
<p>Functions for the <a href="https://en.wikipedia.org/wiki/Subset_sum_problem" target="_blank">Subset sum</a> implementation.
|
||||
<a href="../../df/d74/namespacesubarray__sum.html#details">More...</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Functions for the <a href="https://en.wikipedia.org/wiki/Subset_sum_problem" target="_blank">Subset sum</a> implementation. </p>
|
||||
<div class="textblock"><p>Functions for the <a href="https://en.wikipedia.org/wiki/Subset_sum_problem" target="_blank">Subset sum</a> implementation. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../df/d74/namespacesubarray__sum.html">subarray_sum</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: graph/connected_components.cpp Pages: 1 -->
|
||||
<svg width="266pt" height="82pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: Member List</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -110,7 +110,7 @@ $(document).ready(function(){initNavTree('de/d4f/structmath_1_1_point.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.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: graph/breadth_first_search.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -141,21 +141,21 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p ><a href="https://en.wikipedia.org/wiki/Breadth-first_search" target="_blank">Breadth First Search Algorithm (Breadth First Search)</a> </p>
|
||||
<div class="textblock"><p><a href="https://en.wikipedia.org/wiki/Breadth-first_search" target="_blank">Breadth First Search Algorithm (Breadth First Search)</a> </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/ayaankhan98" target="_blank">Ayaan Khan</a> </dd>
|
||||
<dd>
|
||||
<a href="https://github.com/gpamangkp" target="_blank">Aman Kumar Pandey</a></dd></dl>
|
||||
<p>Breadth First Search also quoted as BFS is a <a class="el" href="../../da/d9a/class_graph.html">Graph</a> Traversal Algorithm. Time Complexity O(|V| + |E|) where V are the number of vertices and E are the number of edges in the graph.</p>
|
||||
<p >Applications of Breadth First Search are</p>
|
||||
<p>Applications of Breadth First Search are</p>
|
||||
<ol type="1">
|
||||
<li>Finding shortest path between two vertices say u and v, with path length measured by number of edges (an advantage over depth first search algorithm)</li>
|
||||
<li>Ford-Fulkerson Method for computing the maximum flow in a flow network.</li>
|
||||
<li>Testing bipartiteness of a graph.</li>
|
||||
<li>Cheney's Algorithm, Copying garbage collection.</li>
|
||||
</ol>
|
||||
<p >And there are many more...</p>
|
||||
<p>And there are many more...</p>
|
||||
<h4>working</h4>
|
||||
<p >In the implementation below we first created a graph using the adjacency list representation of graph. Breadth First Search Works as follows it requires a vertex as a start vertex, Start vertex is that vertex from where you want to start traversing the graph. We maintain a bool array or a vector to keep track of the vertices which we have visited so that we do not traverse the visited vertices again and again and eventually fall into an infinite loop. Along with this boolen array we use a <a class="el" href="../../dc/db5/struct_queue.html">Queue</a>.</p>
|
||||
<p>In the implementation below we first created a graph using the adjacency list representation of graph. Breadth First Search Works as follows it requires a vertex as a start vertex, Start vertex is that vertex from where you want to start traversing the graph. We maintain a bool array or a vector to keep track of the vertices which we have visited so that we do not traverse the visited vertices again and again and eventually fall into an infinite loop. Along with this boolen array we use a <a class="el" href="../../dc/db5/struct_queue.html">Queue</a>.</p>
|
||||
<ol type="1">
|
||||
<li>First we mark the start vertex as visited.</li>
|
||||
<li>Push this visited vertex in the <a class="el" href="../../dc/db5/struct_queue.html">Queue</a>.</li>
|
||||
@@ -181,7 +181,7 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Main function </p>
|
||||
<p>Main function </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 186</span> {</div>
|
||||
<div class="line"><span class="lineno"> 187</span> <a class="code hl_function" href="../../df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a>();</div>
|
||||
<div class="line"><span class="lineno"> 188</span> <span class="keywordtype">size_t</span> edges = 0;</div>
|
||||
@@ -238,10 +238,10 @@ Here is the call graph for this function:</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Test function </p>
|
||||
<p >Test 1 Begin</p>
|
||||
<p >Test 2 Begin</p>
|
||||
<p >Test 3 Begins</p>
|
||||
<p>Test function </p>
|
||||
<p>Test 1 Begin</p>
|
||||
<p>Test 2 Begin</p>
|
||||
<p>Test 3 Begins</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 139</span> {<span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 140</span><span class="comment"> /// Test 1 Begin</span></div>
|
||||
<div class="line"><span class="lineno"> 141</span><span class="comment"></span> <a class="code hl_class" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph<int></a> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>;</div>
|
||||
@@ -305,7 +305,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_12552d7fa429bf94a2e32e5cf39f7e69.html">graph</a></li><li class="navelem"><a class="el" href="../../df/d82/breadth__first__search_8cpp.html">breadth_first_search.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: tests Pages: 1 -->
|
||||
<svg width="334pt" height="138pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="408pt" height="162pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: graph::HKGraph Pages: 1 -->
|
||||
<svg width="222pt" height="192pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: strings/rabin_karp.cpp Pages: 1 -->
|
||||
<svg width="256pt" height="82pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: data_structures/sparse_table.cpp Pages: 1 -->
|
||||
<svg width="186pt" height="93pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: dp Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -104,15 +104,15 @@ $(document).ready(function(){initNavTree('df/d88/namespacedp.html','../../'); in
|
||||
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>
|
||||
<a href="../../df/d88/namespacedp.html#details">More...</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> </p>
|
||||
<p >for assert for IO Operations for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/accumulate.html">std::accumulate</a> </p>
|
||||
<div class="textblock"><p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> </p>
|
||||
<p>for assert for IO Operations for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/accumulate.html">std::accumulate</a> </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../df/d88/namespacedp.html">dp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: trie_operations Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -104,14 +104,14 @@ $(document).ready(function(){initNavTree('df/d8e/namespacetrie__operations.html'
|
||||
<p>Functions for <a href="https://iq.opengenus.org/autocomplete-using-trie-data-structure/" target="_blank">Trie datastructure</a> implementation.
|
||||
<a href="../../df/d8e/namespacetrie__operations.html#details">More...</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Functions for <a href="https://iq.opengenus.org/autocomplete-using-trie-data-structure/" target="_blank">Trie datastructure</a> implementation. </p>
|
||||
<div class="textblock"><p>Functions for <a href="https://iq.opengenus.org/autocomplete-using-trie-data-structure/" target="_blank">Trie datastructure</a> implementation. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../df/d8e/namespacetrie__operations.html">trie_operations</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: backtracking/wildcard_matching.cpp Pages: 1 -->
|
||||
<svg width="192pt" height="93pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: Member List</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -117,7 +117,7 @@ $(document).ready(function(){initNavTree('dd/d1c/classhash__chain.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.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: backtracking/subarray_sum.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -129,18 +129,18 @@ Namespaces</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:af5687bbd9faf927fbd363c71e0baba5e"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d94/subarray__sum_8cpp.html#af5687bbd9faf927fbd363c71e0baba5e">backtracking::subarray_sum::subarray_sum</a> (int64_t sum, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int64_t > &in_arr)</td></tr>
|
||||
<tr class="memdesc:af5687bbd9faf927fbd363c71e0baba5e"><td class="mdescLeft"> </td><td class="mdescRight">The main function that implements the count of the subarrays. <a href="../../df/d94/subarray__sum_8cpp.html#af5687bbd9faf927fbd363c71e0baba5e">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:af5687bbd9faf927fbd363c71e0baba5e"><td class="mdescLeft"> </td><td class="mdescRight">The main function that implements the count of the subarrays. <br /></td></tr>
|
||||
<tr class="separator:af5687bbd9faf927fbd363c71e0baba5e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d94/subarray__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Self-test implementations. <a href="../../df/d94/subarray__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Self-test implementations. <br /></td></tr>
|
||||
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d94/subarray__sum_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <a href="../../df/d94/subarray__sum_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <br /></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p ><a href="https://en.wikipedia.org/wiki/Subset_sum_problem" target="_blank">Subset-sum</a> (only continuous subsets) problem </p>
|
||||
<p >We are given an array and a sum value. The algorithms find all the subarrays of that array with sum equal to the given sum and return such subarrays count. This approach will have \(O(n)\) time complexity and \(O(n)\) space complexity. NOTE: In this problem, we are only referring to the continuous subsets as subarrays everywhere. Subarrays can be created using deletion operation at the end of the front of an array only. The parent array is also counted in subarrays having 0 number of deletion operations.</p>
|
||||
<div class="textblock"><p><a href="https://en.wikipedia.org/wiki/Subset_sum_problem" target="_blank">Subset-sum</a> (only continuous subsets) problem </p>
|
||||
<p>We are given an array and a sum value. The algorithms find all the subarrays of that array with sum equal to the given sum and return such subarrays count. This approach will have \(O(n)\) time complexity and \(O(n)\) space complexity. NOTE: In this problem, we are only referring to the continuous subsets as subarrays everywhere. Subarrays can be created using deletion operation at the end of the front of an array only. The parent array is also counted in subarrays having 0 number of deletion operations.</p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Swastyy" target="_blank">Swastika Gupta</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
@@ -331,7 +331,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_c11585dfcef32a26e29098facab6c144.html">backtracking</a></li><li class="navelem"><a class="el" href="../../df/d94/subarray__sum_8cpp.html">subarray_sum.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="131pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="205pt" height="27pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: backtracking::subarray_sum::subarray_sum Pages: 1 -->
|
||||
<svg width="285pt" height="113pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: std::is_unsigned< uint256_t > Struct Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -121,7 +121,7 @@ Collaboration diagram for std::is_unsigned< uint256_t >:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../d8/dcc/namespacestd.html">std</a></li><li class="navelem"><a class="el" href="../../df/d99/structstd_1_1is__unsigned_3_01uint256__t_01_4.html">is_unsigned< uint256_t ></a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: graph::is_graph_bipartite::Graph Pages: 1 -->
|
||||
<svg width="198pt" height="181pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: FCFS< S, T, E > Pages: 1 -->
|
||||
<!--zoomable 179 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: FCFS< S, T, E > Pages: 1 -->
|
||||
<svg width="529pt" height="179pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
@@ -0,0 +1,8 @@
|
||||
<map id="bit_manipulation/travelling_salesman_using_bit_manipulation.cpp" name="bit_manipulation/travelling_salesman_using_bit_manipulation.cpp">
|
||||
<area shape="rect" id="node1" title="Implementation to [Travelling Salesman problem using bit-masking] (https://www.geeksforgeeks...." alt="" coords="106,5,355,45"/>
|
||||
<area shape="rect" id="node2" title=" " alt="" coords="5,93,80,119"/>
|
||||
<area shape="rect" id="node3" title=" " alt="" coords="105,93,170,119"/>
|
||||
<area shape="rect" id="node4" title=" " alt="" coords="195,93,267,119"/>
|
||||
<area shape="rect" id="node5" title=" " alt="" coords="291,93,349,119"/>
|
||||
<area shape="rect" id="node6" title=" " alt="" coords="373,93,427,119"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
9d031c15cfba5793068e4562076e4bf5
|
||||
@@ -0,0 +1,97 @@
|
||||
<?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.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: bit_manipulation/travelling_salesman_using_bit_manipulation.cpp Pages: 1 -->
|
||||
<svg width="324pt" height="93pt"
|
||||
viewBox="0.00 0.00 324.00 93.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 89)">
|
||||
<title>bit_manipulation/travelling_salesman_using_bit_manipulation.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Implementation to [Travelling Salesman problem using bit-masking] (https://www.geeksforgeeks....">
|
||||
<polygon fill="#999999" stroke="#666666" points="262.5,-85 75.5,-85 75.5,-55 262.5,-55 262.5,-85"/>
|
||||
<text text-anchor="start" x="83.5" y="-73" font-family="Helvetica,sans-Serif" font-size="10.00">bit_manipulation/travelling</text>
|
||||
<text text-anchor="middle" x="169" y="-62" font-family="Helvetica,sans-Serif" font-size="10.00">_salesman_using_bit_manipulation.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="56,-19 0,-19 0,0 56,0 56,-19"/>
|
||||
<text text-anchor="middle" x="28" y="-7" font-family="Helvetica,sans-Serif" font-size="10.00">algorithm</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="#63b8ff" d="M134.15,-54.54C111.4,-45.1 81.94,-32.88 59.83,-23.71"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.3,-20.53 50.72,-19.93 58.61,-26.99 61.3,-20.53"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="123.5,-19 74.5,-19 74.5,0 123.5,0 123.5,-19"/>
|
||||
<text text-anchor="middle" x="99" y="-7" font-family="Helvetica,sans-Serif" font-size="10.00">cassert</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="#63b8ff" d="M151.7,-54.54C141.53,-46.04 128.66,-35.29 118.18,-26.53"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="120.46,-23.87 110.54,-20.15 115.97,-29.24 120.46,-23.87"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="196,-19 142,-19 142,0 196,0 196,-19"/>
|
||||
<text text-anchor="middle" x="169" y="-7" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="#63b8ff" d="M169,-54.54C169,-47.34 169,-38.53 169,-30.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="172.5,-30.69 169,-20.69 165.5,-30.69 172.5,-30.69"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="258,-19 214,-19 214,0 258,0 258,-19"/>
|
||||
<text text-anchor="middle" x="236" y="-7" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<path fill="none" stroke="#63b8ff" d="M185.56,-54.54C195.29,-46.04 207.61,-35.29 217.64,-26.53"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="219.69,-29.38 224.92,-20.17 215.09,-24.11 219.69,-29.38"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="316,-19 276,-19 276,0 316,0 316,-19"/>
|
||||
<text text-anchor="middle" x="296" y="-7" font-family="Helvetica,sans-Serif" font-size="10.00">limits</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node1->Node6</title>
|
||||
<path fill="none" stroke="#63b8ff" d="M200.39,-54.54C220.6,-45.23 246.69,-33.22 266.51,-24.09"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="267.8,-27.34 275.42,-19.98 264.87,-20.98 267.8,-27.34"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: numerical_methods/successive_approximation.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,7 +124,7 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Method of successive approximations using <a href="https://en.wikipedia.org/wiki/Fixed-point_iteration" target="_blank">fixed-point iteration</a> method. </p>
|
||||
<div class="textblock"><p>Method of successive approximations using <a href="https://en.wikipedia.org/wiki/Fixed-point_iteration" target="_blank">fixed-point iteration</a> method. </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a79c1d08919ff7780a5d7723172602389" name="a79c1d08919ff7780a5d7723172602389"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a79c1d08919ff7780a5d7723172602389">◆ </a></span>eq()</h2>
|
||||
@@ -149,7 +149,7 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >equation 1 </p><p class="formulaDsp">
|
||||
<p>equation 1 </p><p class="formulaDsp">
|
||||
\[f(y) = 3y - \cos y -2\]
|
||||
</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 12</span>{ <span class="keywordflow">return</span> (3 * y) - <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/cos.html">cos</a>(y) - 2; }</div>
|
||||
@@ -180,7 +180,7 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >equation 2 </p><p class="formulaDsp">
|
||||
<p>equation 2 </p><p class="formulaDsp">
|
||||
\[f(y) = \frac{\cos y+2}{2}\]
|
||||
</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 17</span>{ <span class="keywordflow">return</span> 0.5 * (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/cos.html">cos</a>(y) + 2); }</div>
|
||||
@@ -202,7 +202,7 @@ Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Main function </p>
|
||||
<p>Main function </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 20</span> {</div>
|
||||
<div class="line"><span class="lineno"> 21</span> <span class="keywordtype">float</span> y, x1, x2, x3, <a class="code hl_function" href="../../d8/d77/namespacemachine__learning.html#a6f1c98c016ad34ff3d9f39372161bd35">sum</a>, s, a, f1, f2, gd;</div>
|
||||
<div class="line"><span class="lineno"> 22</span> <span class="keywordtype">int</span> i, n;</div>
|
||||
@@ -244,7 +244,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="../../df/dc8/successive__approximation_8cpp.html">successive_approximation.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
|
||||
<!-- Generated by graphviz version 7.0.6 (20230106.0513)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="114pt" height="64pt"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: strings Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -104,17 +104,17 @@ $(document).ready(function(){initNavTree('df/dcb/namespacestrings.html','../../'
|
||||
<p>Algorithms with strings.
|
||||
<a href="../../df/dcb/namespacestrings.html#details">More...</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Algorithms with strings. </p>
|
||||
<p >for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> STL</p>
|
||||
<p >for assert for IO operations for string</p>
|
||||
<p >Algorithms with strings </p>
|
||||
<div class="textblock"><p>Algorithms with strings. </p>
|
||||
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> STL</p>
|
||||
<p>for assert for IO operations for string</p>
|
||||
<p>Algorithms with strings </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../df/dcb/namespacestrings.html">strings</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: graph Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -122,50 +122,50 @@ Classes</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a9125ceb66bfbec3093bba64c2c1e99e2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">addEdge</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > > *adj, int u, int v)</td></tr>
|
||||
<tr class="memdesc:a9125ceb66bfbec3093bba64c2c1e99e2"><td class="mdescLeft"> </td><td class="mdescRight">Function that add edge between two nodes or vertices of graph. <a href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a9125ceb66bfbec3093bba64c2c1e99e2"><td class="mdescLeft"> </td><td class="mdescRight">Function that add edge between two nodes or vertices of graph. <br /></td></tr>
|
||||
<tr class="separator:a9125ceb66bfbec3093bba64c2c1e99e2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3ae80bc4c6a79d041b4f3a6589eb7fb8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a3ae80bc4c6a79d041b4f3a6589eb7fb8">explore</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > > *adj, int u, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< bool > *visited)</td></tr>
|
||||
<tr class="memdesc:a3ae80bc4c6a79d041b4f3a6589eb7fb8"><td class="mdescLeft"> </td><td class="mdescRight">Utility function for depth first seach algorithm this function explores the vertex which is passed into. <a href="../../df/dce/namespacegraph.html#a3ae80bc4c6a79d041b4f3a6589eb7fb8">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a3ae80bc4c6a79d041b4f3a6589eb7fb8"><td class="mdescLeft"> </td><td class="mdescRight">Utility function for depth first seach algorithm this function explores the vertex which is passed into. <br /></td></tr>
|
||||
<tr class="separator:a3ae80bc4c6a79d041b4f3a6589eb7fb8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a83ab16e96cec644109a58dfc9329bc2b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a83ab16e96cec644109a58dfc9329bc2b">getConnectedComponents</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > > *adj)</td></tr>
|
||||
<tr class="memdesc:a83ab16e96cec644109a58dfc9329bc2b"><td class="mdescLeft"> </td><td class="mdescRight">Function that perfoms depth first search algorithm on graph and calculated the number of connected components. <a href="../../df/dce/namespacegraph.html#a83ab16e96cec644109a58dfc9329bc2b">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a83ab16e96cec644109a58dfc9329bc2b"><td class="mdescLeft"> </td><td class="mdescRight">Function that perfoms depth first search algorithm on graph and calculated the number of connected components. <br /></td></tr>
|
||||
<tr class="separator:a83ab16e96cec644109a58dfc9329bc2b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad4016cfc80485a43748895a2c26c7d08"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#ad4016cfc80485a43748895a2c26c7d08">addEdge</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< size_t > > *adj, size_t u, size_t v)</td></tr>
|
||||
<tr class="memdesc:ad4016cfc80485a43748895a2c26c7d08"><td class="mdescLeft"> </td><td class="mdescRight">Adds and edge between two vertices of graph say u and v in this case. <a href="../../df/dce/namespacegraph.html#ad4016cfc80485a43748895a2c26c7d08">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ad4016cfc80485a43748895a2c26c7d08"><td class="mdescLeft"> </td><td class="mdescRight">Adds and edge between two vertices of graph say u and v in this case. <br /></td></tr>
|
||||
<tr class="separator:ad4016cfc80485a43748895a2c26c7d08"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a64c1db5aad7502c6f08e4652f6edd463"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a64c1db5aad7502c6f08e4652f6edd463">explore</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< size_t > > &adj, size_t v, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< bool > *visited)</td></tr>
|
||||
<tr class="memdesc:a64c1db5aad7502c6f08e4652f6edd463"><td class="mdescLeft"> </td><td class="mdescRight">Explores the given vertex, exploring a vertex means traversing over all the vertices which are connected to the vertex that is currently being explored. <a href="../../df/dce/namespacegraph.html#a64c1db5aad7502c6f08e4652f6edd463">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a64c1db5aad7502c6f08e4652f6edd463"><td class="mdescLeft"> </td><td class="mdescRight">Explores the given vertex, exploring a vertex means traversing over all the vertices which are connected to the vertex that is currently being explored. <br /></td></tr>
|
||||
<tr class="separator:a64c1db5aad7502c6f08e4652f6edd463"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab5428a3519267a28bba4b4310cfbb6ae"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#ab5428a3519267a28bba4b4310cfbb6ae">depth_first_search</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< size_t > > &adj, size_t start)</td></tr>
|
||||
<tr class="memdesc:ab5428a3519267a28bba4b4310cfbb6ae"><td class="mdescLeft"> </td><td class="mdescRight">initiates depth first search algorithm. <a href="../../df/dce/namespacegraph.html#ab5428a3519267a28bba4b4310cfbb6ae">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ab5428a3519267a28bba4b4310cfbb6ae"><td class="mdescLeft"> </td><td class="mdescRight">initiates depth first search algorithm. <br /></td></tr>
|
||||
<tr class="separator:ab5428a3519267a28bba4b4310cfbb6ae"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0e30e0dca68cb6e4f671440819b35b6a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a0e30e0dca68cb6e4f671440819b35b6a">addEdge</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair</a>< int, int > > > *adj, int u, int v, int w)</td></tr>
|
||||
<tr class="memdesc:a0e30e0dca68cb6e4f671440819b35b6a"><td class="mdescLeft"> </td><td class="mdescRight">Function that add edge between two nodes or vertices of graph. <a href="../../df/dce/namespacegraph.html#a0e30e0dca68cb6e4f671440819b35b6a">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a0e30e0dca68cb6e4f671440819b35b6a"><td class="mdescLeft"> </td><td class="mdescRight">Function that add edge between two nodes or vertices of graph. <br /></td></tr>
|
||||
<tr class="separator:a0e30e0dca68cb6e4f671440819b35b6a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:adc68cbc8ba09eb1142265935c0d45b84"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84">dijkstra</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair</a>< int, int > > > *adj, int s, int t)</td></tr>
|
||||
<tr class="memdesc:adc68cbc8ba09eb1142265935c0d45b84"><td class="mdescLeft"> </td><td class="mdescRight">Function runs the dijkstra algorithm for some source vertex and target vertex in the graph and returns the shortest distance of target from the source. <a href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:adc68cbc8ba09eb1142265935c0d45b84"><td class="mdescLeft"> </td><td class="mdescRight">Function runs the dijkstra algorithm for some source vertex and target vertex in the graph and returns the shortest distance of target from the source. <br /></td></tr>
|
||||
<tr class="separator:adc68cbc8ba09eb1142265935c0d45b84"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8e1b547cd407c0774e63f0dc95cda9e7"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a8e1b547cd407c0774e63f0dc95cda9e7">checkBipartite</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int64_t > > &graph, int64_t index, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int64_t > *visited)</td></tr>
|
||||
<tr class="memdesc:a8e1b547cd407c0774e63f0dc95cda9e7"><td class="mdescLeft"> </td><td class="mdescRight">function to check whether the passed graph is bipartite or not <a href="../../df/dce/namespacegraph.html#a8e1b547cd407c0774e63f0dc95cda9e7">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a8e1b547cd407c0774e63f0dc95cda9e7"><td class="mdescLeft"> </td><td class="mdescRight">function to check whether the passed graph is bipartite or not <br /></td></tr>
|
||||
<tr class="separator:a8e1b547cd407c0774e63f0dc95cda9e7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a84b0551489c613a681cc83b34450da4b"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a84b0551489c613a681cc83b34450da4b">isBipartite</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int64_t > > &graph)</td></tr>
|
||||
<tr class="memdesc:a84b0551489c613a681cc83b34450da4b"><td class="mdescLeft"> </td><td class="mdescRight">returns true if the given graph is bipartite else returns false <a href="../../df/dce/namespacegraph.html#a84b0551489c613a681cc83b34450da4b">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:a84b0551489c613a681cc83b34450da4b"><td class="mdescLeft"> </td><td class="mdescRight">returns true if the given graph is bipartite else returns false <br /></td></tr>
|
||||
<tr class="separator:a84b0551489c613a681cc83b34450da4b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab7706341d006e20d1ae58274187a3346"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#ab7706341d006e20d1ae58274187a3346">TravellingSalesmanProblem</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< uint32_t > > *cities, int32_t src, uint32_t V)</td></tr>
|
||||
<tr class="memdesc:ab7706341d006e20d1ae58274187a3346"><td class="mdescLeft"> </td><td class="mdescRight">Function calculates the minimum path distance that will cover all the cities starting from the source. <a href="../../df/dce/namespacegraph.html#ab7706341d006e20d1ae58274187a3346">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ab7706341d006e20d1ae58274187a3346"><td class="mdescLeft"> </td><td class="mdescRight">Function calculates the minimum path distance that will cover all the cities starting from the source. <br /></td></tr>
|
||||
<tr class="separator:ab7706341d006e20d1ae58274187a3346"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p ><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> Algorithms. </p>
|
||||
<p >Check whether a given graph is bipartite or not.</p>
|
||||
<p >for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></p>
|
||||
<p ><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> algorithms.</p>
|
||||
<p >for IO operations for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/set.html">std::set</a></p>
|
||||
<p ><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> Algorithms</p>
|
||||
<p >A bipartite graph is the one whose nodes can be divided into two disjoint sets in such a way that the nodes in a set are not connected to each other at all, i.e. no intra-set connections. The only connections that exist are that of inter-set, i.e. the nodes from one set are connected to a subset of nodes in the other set. In this implementation, using a graph in the form of adjacency list, check whether the given graph is a bipartite or not.</p>
|
||||
<p >References used: <a href="https://www.geeksforgeeks.org/bipartite-graph/" target="_blank">GeeksForGeeks</a> </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/tushar2407" target="_blank">tushar2407</a> for assert for IO operations for queue data structure for vector data structure</dd></dl>
|
||||
<div class="textblock"><p><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> Algorithms. </p>
|
||||
<p>Check whether a given graph is bipartite or not.</p>
|
||||
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></p>
|
||||
<p><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> algorithms.</p>
|
||||
<p>for IO operations for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/set.html">std::set</a></p>
|
||||
<p><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> Algorithms</p>
|
||||
<p>A bipartite graph is the one whose nodes can be divided into two disjoint sets in such a way that the nodes in a set are not connected to each other at all, i.e. no intra-set connections. The only connections that exist are that of inter-set, i.e. the nodes from one set are connected to a subset of nodes in the other set. In this implementation, using a graph in the form of adjacency list, check whether the given graph is a bipartite or not.</p>
|
||||
<p>References used: <a href="https://www.geeksforgeeks.org/bipartite-graph/" target="_blank">GeeksForGeeks</a> </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/tushar2407" target="_blank">tushar2407</a> for assert for IO operations for queue data structure for vector data structure</dd></dl>
|
||||
<p>Graphical algorithms</p>
|
||||
<p >for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a> for assert for IO operations for limits of integral types for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> </p>
|
||||
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a> for assert for IO operations for limits of integral types for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a9125ceb66bfbec3093bba64c2c1e99e2" name="a9125ceb66bfbec3093bba64c2c1e99e2"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a9125ceb66bfbec3093bba64c2c1e99e2">◆ </a></span>addEdge() <span class="overload">[1/3]</span></h2>
|
||||
@@ -372,15 +372,15 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>boolean </dd></dl>
|
||||
<p >< stores the neighbouring node indexes in squence of being reached</p>
|
||||
<p >insert the current node into the queue</p>
|
||||
<p >mark the current node as travelled</p>
|
||||
<p >< stores the neighbour of the current node</p>
|
||||
<p >check whether the neighbour node is travelled already or not</p>
|
||||
<p >colour the neighbouring node with different colour than the current node</p>
|
||||
<p >insert the neighbouring node into the queue</p>
|
||||
<p >if both the current node and its neighbour has the same state then it is not a bipartite graph</p>
|
||||
<p >return true when all the connected nodes of the current nodes are travelled and satisify all the above conditions</p>
|
||||
<p>< stores the neighbouring node indexes in squence of being reached</p>
|
||||
<p>insert the current node into the queue</p>
|
||||
<p>mark the current node as travelled</p>
|
||||
<p>< stores the neighbour of the current node</p>
|
||||
<p>check whether the neighbour node is travelled already or not</p>
|
||||
<p>colour the neighbouring node with different colour than the current node</p>
|
||||
<p>insert the neighbouring node into the queue</p>
|
||||
<p>if both the current node and its neighbour has the same state then it is not a bipartite graph</p>
|
||||
<p>return true when all the connected nodes of the current nodes are travelled and satisify all the above conditions</p>
|
||||
<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/queue.html">std::queue<int64_t></a> q; <span class="comment">///< stores the neighbouring node indexes in squence</span><span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 39</span><span class="comment"> /// of being reached</span></div>
|
||||
@@ -512,15 +512,15 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>shortest distance if target is reachable from source else -1 in case if target is not reachable from source. </dd></dl>
|
||||
<p >n denotes the number of vertices in graph</p>
|
||||
<p >setting all the distances initially to INF</p>
|
||||
<p >creating a min heap using priority queue first element of pair contains the distance second element of pair contains the vertex</p>
|
||||
<p >pushing the source vertex 's' with 0 distance in min heap</p>
|
||||
<p >marking the distance of source as 0</p>
|
||||
<p >second element of pair denotes the node / vertex</p>
|
||||
<p >first element of pair denotes the distance</p>
|
||||
<p >for all the reachable vertex from the currently exploring vertex we will try to minimize the distance</p>
|
||||
<p >minimizing distances</p>
|
||||
<p>n denotes the number of vertices in graph</p>
|
||||
<p>setting all the distances initially to INF</p>
|
||||
<p>creating a min heap using priority queue first element of pair contains the distance second element of pair contains the vertex</p>
|
||||
<p>pushing the source vertex 's' with 0 distance in min heap</p>
|
||||
<p>marking the distance of source as 0</p>
|
||||
<p>second element of pair denotes the node / vertex</p>
|
||||
<p>first element of pair denotes the distance</p>
|
||||
<p>for all the reachable vertex from the currently exploring vertex we will try to minimize the distance</p>
|
||||
<p>minimizing distances</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 66</span> {<span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 67</span><span class="comment"> /// n denotes the number of vertices in graph</span></div>
|
||||
<div class="line"><span class="lineno"> 68</span><span class="comment"></span> <span class="keywordtype">int</span> n = adj-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>();</div>
|
||||
@@ -769,8 +769,8 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>booleans </dd></dl>
|
||||
<p >< stores boolean values which signify whether that node had been visited or not</p>
|
||||
<p >if the current node is not visited then check whether the sub-graph of that node is a bipartite or not</p>
|
||||
<p>< stores boolean values which signify whether that node had been visited or not</p>
|
||||
<p>if the current node is not visited then check whether the sub-graph of that node is a bipartite or not</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 75</span> {</div>
|
||||
<div class="line"><span class="lineno"> 76</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int64_t></a> visited(</div>
|
||||
<div class="line"><span class="lineno"> 77</span> <a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a>.size()); <span class="comment">///< stores boolean values</span><span class="comment"></span></div>
|
||||
@@ -891,7 +891,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="../../df/dce/namespacegraph.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.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>
|
||||
|
||||