Documentation for 6376bf46af

This commit is contained in:
github-actions
2023-09-27 18:42:32 +00:00
parent d28eba1fef
commit b5b4d78981
5708 changed files with 52275 additions and 51112 deletions

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: dynamic_programming/0_1_knapsack.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.7 -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
@@ -118,23 +118,23 @@ Include dependency graph for 0_1_knapsack.cpp:</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:dd/d24/namespacedynamic__programming"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d24/namespacedynamic__programming.html">dynamic_programming</a></td></tr>
<tr class="memitem:dd/d24/namespacedynamic__programming" id="r_dd/d24/namespacedynamic__programming"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d24/namespacedynamic__programming.html">dynamic_programming</a></td></tr>
<tr class="memdesc:dd/d24/namespacedynamic__programming"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dynamic Programming algorithms. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d7/daf/namespace_knapsack"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/daf/namespace_knapsack.html">Knapsack</a></td></tr>
<tr class="memitem:d7/daf/namespace_knapsack" id="r_d7/daf/namespace_knapsack"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/daf/namespace_knapsack.html">Knapsack</a></td></tr>
<tr class="memdesc:d7/daf/namespace_knapsack"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implementation of 0-1 <a class="el" href="../../d7/daf/namespace_knapsack.html" title="Implementation of 0-1 Knapsack problem.">Knapsack</a> problem. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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:a15edf30f336885e5b851f6b7199c6cd1"><td class="memTemplParams" colspan="2">template&lt;size_t n&gt; </td></tr>
<tr class="memitem:a15edf30f336885e5b851f6b7199c6cd1" id="r_a15edf30f336885e5b851f6b7199c6cd1"><td class="memTemplParams" colspan="2">template&lt;size_t n&gt; </td></tr>
<tr class="memitem:a15edf30f336885e5b851f6b7199c6cd1"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../db/d16/0__1__knapsack_8cpp.html#a15edf30f336885e5b851f6b7199c6cd1">dynamic_programming::knapsack::maxKnapsackValue</a> (const int capacity, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>&lt; int, n &gt; &amp;weight, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>&lt; int, n &gt; &amp;value)</td></tr>
<tr class="memdesc:a15edf30f336885e5b851f6b7199c6cd1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Picking up all those items whose combined weight is below the given capacity and calculating the value of those picked items. Trying all possible combinations will yield the maximum knapsack value. <br /></td></tr>
<tr class="separator:a15edf30f336885e5b851f6b7199c6cd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d16/0__1__knapsack_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d" id="r_aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d16/0__1__knapsack_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to test the above algorithm. <br /></td></tr>
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d16/0__1__knapsack_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4" id="r_ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d16/0__1__knapsack_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function. <br /></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
@@ -345,7 +345,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_8a20dd5bfd5341a725342bf72b6b686f.html">dynamic_programming</a></li><li class="navelem"><a class="el" href="../../db/d16/0__1__knapsack_8cpp.html">0_1_knapsack.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.7 </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.8 </li>
</ul>
</div>
</body>

View File

@@ -1,6 +1,6 @@
<map id="dynamic_programming::knapsack::maxKnapsackValue" name="dynamic_programming::knapsack::maxKnapsackValue">
<area shape="rect" id="Node000001" title="Picking up all those items whose combined weight is below the given capacity and calculating the valu..." alt="" coords="5,29,214,70"/>
<area shape="poly" id="edge2_Node000001_Node000001" title=" " alt="" coords="74,29,72,19,78,10,90,5,110,3,131,5,143,12,140,17,129,10,109,8,92,10,81,15,77,20,79,28"/>
<area shape="poly" id="edge2_Node000001_Node000001" title=" " alt="" coords="74,29,72,19,78,10,90,5,110,3,130,5,142,11,140,16,129,10,109,8,92,10,81,15,77,20,79,28"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max.html#" title=" " alt="" coords="262,37,334,63"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="214,47,247,47,247,52,214,52"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="214,47,246,47,246,52,214,52"/>
</map>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 8.1.0 (20230707.0739)
<!-- Generated by graphviz version 9.0.0 (20230911.1827)
-->
<!-- Title: dynamic_programming::knapsack::maxKnapsackValue Pages: 1 -->
<svg width="255pt" height="57pt"
@@ -32,8 +32,8 @@
<g id="edge2_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge2_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M53.1,-30.99C47.99,-40.06 56.33,-48.5 78.12,-48.5 90.38,-48.5 98.39,-45.83 102.13,-41.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="105.71,-42.27 103.15,-31.99 98.74,-41.62 105.71,-42.27"/>
<path fill="none" stroke="#63b8ff" d="M53.1,-30.99C47.99,-40.06 56.33,-48.5 78.12,-48.5 90.04,-48.5 97.94,-45.97 101.81,-42.2"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="105.26,-42.83 102.97,-32.49 98.31,-42 105.26,-42.83"/>
</a>
</g>
</g>
@@ -50,8 +50,8 @@
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M156.49,-15.25C165.07,-15.25 173.49,-15.25 181.22,-15.25"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="181,-18.75 191,-15.25 181,-11.75 181,-18.75"/>
<path fill="none" stroke="#63b8ff" d="M156.49,-15.25C164.87,-15.25 173.1,-15.25 180.68,-15.25"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="180.48,-18.75 190.48,-15.25 180.48,-11.75 180.48,-18.75"/>
</a>
</g>
</g>

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 8.1.0 (20230707.0739)
<!-- Generated by graphviz version 9.0.0 (20230911.1827)
-->
<!-- Title: dynamic_programming::knapsack::maxKnapsackValue Pages: 1 -->
<svg width="255pt" height="57pt"
@@ -22,8 +22,8 @@
<g id="edge2_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge2_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M53.1,-30.99C47.99,-40.06 56.33,-48.5 78.12,-48.5 90.38,-48.5 98.39,-45.83 102.13,-41.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="105.71,-42.27 103.15,-31.99 98.74,-41.62 105.71,-42.27"/>
<path fill="none" stroke="#63b8ff" d="M53.1,-30.99C47.99,-40.06 56.33,-48.5 78.12,-48.5 90.04,-48.5 97.94,-45.97 101.81,-42.2"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="105.26,-42.83 102.97,-32.49 98.31,-42 105.26,-42.83"/>
</a>
</g>
</g>
@@ -40,8 +40,8 @@
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M156.49,-15.25C165.07,-15.25 173.49,-15.25 181.22,-15.25"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="181,-18.75 191,-15.25 181,-11.75 181,-18.75"/>
<path fill="none" stroke="#63b8ff" d="M156.49,-15.25C164.87,-15.25 173.1,-15.25 180.68,-15.25"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="180.48,-18.75 190.48,-15.25 180.48,-11.75 180.48,-18.75"/>
</a>
</g>
</g>

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,5 +1,5 @@
<map id="test" name="test">
<area shape="rect" id="Node000001" title="Function to test the above algorithm." alt="" coords="5,5,49,31"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="97,5,168,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="49,16,82,16,82,21,49,21"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="49,16,81,16,81,21,49,21"/>
</map>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 8.1.0 (20230707.0739)
<!-- Generated by graphviz version 9.0.0 (20230911.1827)
-->
<!-- Title: test Pages: 1 -->
<svg width="130pt" height="27pt"
@@ -40,8 +40,8 @@
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M32.83,-9.62C39.94,-9.62 48.68,-9.62 57.32,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="57.08,-13.13 67.08,-9.62 57.08,-6.13 57.08,-13.13"/>
<path fill="none" stroke="#63b8ff" d="M32.83,-9.62C39.78,-9.62 48.3,-9.62 56.75,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="56.56,-13.13 66.56,-9.63 56.56,-6.13 56.56,-13.13"/>
</a>
</g>
</g>

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 8.1.0 (20230707.0739)
<!-- Generated by graphviz version 9.0.0 (20230911.1827)
-->
<!-- Title: test Pages: 1 -->
<svg width="130pt" height="27pt"
@@ -30,8 +30,8 @@
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M32.83,-9.62C39.94,-9.62 48.68,-9.62 57.32,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="57.08,-13.13 67.08,-9.62 57.08,-6.13 57.08,-13.13"/>
<path fill="none" stroke="#63b8ff" d="M32.83,-9.62C39.78,-9.62 48.3,-9.62 56.75,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="56.56,-13.13 66.56,-9.63 56.56,-6.13 56.56,-13.13"/>
</a>
</g>
</g>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1,7 +1,7 @@
<map id="main" name="main">
<area shape="rect" id="Node000001" title="Main function." alt="" coords="5,5,55,31"/>
<area shape="rect" id="Node000002" href="$db/d16/0__1__knapsack_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Function to test the above algorithm." alt="" coords="103,5,146,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,16,88,16,88,21,55,21"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,16,87,16,87,21,55,21"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="194,5,265,31"/>
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="146,16,179,16,179,21,146,21"/>
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="146,16,178,16,178,21,146,21"/>
</map>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 8.1.0 (20230707.0739)
<!-- Generated by graphviz version 9.0.0 (20230911.1827)
-->
<!-- Title: main Pages: 1 -->
<svg width="203pt" height="27pt"
@@ -40,8 +40,8 @@
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.2,-9.62C44.67,-9.62 53.52,-9.62 61.73,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.71,-13.13 71.71,-9.62 61.71,-6.13 61.71,-13.13"/>
<path fill="none" stroke="#63b8ff" d="M37.2,-9.62C44.58,-9.62 53.31,-9.62 61.45,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.2,-13.13 71.2,-9.63 61.2,-6.13 61.2,-13.13"/>
</a>
</g>
</g>
@@ -58,8 +58,8 @@
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M105.83,-9.62C112.94,-9.62 121.68,-9.62 130.32,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="130.08,-13.13 140.08,-9.62 130.08,-6.13 130.08,-13.13"/>
<path fill="none" stroke="#63b8ff" d="M105.83,-9.62C112.78,-9.62 121.3,-9.62 129.75,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="129.56,-13.13 139.56,-9.63 129.56,-6.13 129.56,-13.13"/>
</a>
</g>
</g>

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 8.1.0 (20230707.0739)
<!-- Generated by graphviz version 9.0.0 (20230911.1827)
-->
<!-- Title: main Pages: 1 -->
<svg width="203pt" height="27pt"
@@ -30,8 +30,8 @@
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.2,-9.62C44.67,-9.62 53.52,-9.62 61.73,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.71,-13.13 71.71,-9.62 61.71,-6.13 61.71,-13.13"/>
<path fill="none" stroke="#63b8ff" d="M37.2,-9.62C44.58,-9.62 53.31,-9.62 61.45,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.2,-13.13 71.2,-9.63 61.2,-6.13 61.2,-13.13"/>
</a>
</g>
</g>
@@ -48,8 +48,8 @@
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M105.83,-9.62C112.94,-9.62 121.68,-9.62 130.32,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="130.08,-13.13 140.08,-9.62 130.08,-6.13 130.08,-13.13"/>
<path fill="none" stroke="#63b8ff" d="M105.83,-9.62C112.78,-9.62 121.3,-9.62 129.75,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="129.56,-13.13 139.56,-9.63 129.56,-6.13 129.56,-13.13"/>
</a>
</g>
</g>

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB