mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-30 08:41:30 +08:00
Documentation for f4403718ef
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.20"/>
|
||||
<meta name="generator" content="Doxygen 1.9.1"/>
|
||||
<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"/>
|
||||
@@ -42,10 +42,10 @@
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.20 -->
|
||||
<!-- Generated by Doxygen 1.9.1 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
@@ -166,6 +166,7 @@ Algorithm</h3>
|
||||
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <a class="code" href="../../db/d16/0__1__knapsack_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>();</div>
|
||||
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> }</div>
|
||||
<div class="ttc" id="a0__1__knapsack_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../db/d16/0__1__knapsack_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Function to test above algorithm.</div><div class="ttdef"><b>Definition:</b> 0_1_knapsack.cpp:96</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -262,6 +263,8 @@ template<size_t n> </div>
|
||||
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="comment">// returning maximum value</span></div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">return</span> maxValue[items][capacity];</div>
|
||||
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> }</div>
|
||||
<div class="ttc" id="amax_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a></div><div class="ttdeci">T max(T... args)</div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -321,6 +324,10 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Maximum Knapsack value with "</span> << n2 << <span class="stringliteral">" items is "</span></div>
|
||||
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  << max_value2 << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> }</div>
|
||||
<div class="ttc" id="a0__1__knapsack_8cpp_html_a15edf30f336885e5b851f6b7199c6cd1"><div class="ttname"><a href="../../db/d16/0__1__knapsack_8cpp.html#a15edf30f336885e5b851f6b7199c6cd1">dynamic_programming::knapsack::maxKnapsackValue</a></div><div class="ttdeci">int maxKnapsackValue(const int capacity, const std::array< int, n > &weight, const std::array< int, n > &value)</div><div class="ttdoc">Picking up all those items whose combined weight is below given capacity and calculating value of tho...</div><div class="ttdef"><b>Definition:</b> 0_1_knapsack.cpp:51</div></div>
|
||||
<div class="ttc" id="aarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a></div></div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -332,18 +339,11 @@ Here is the call graph for this function:</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="a0__1__knapsack_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../db/d16/0__1__knapsack_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Function to test above algorithm.</div><div class="ttdef"><b>Definition:</b> 0_1_knapsack.cpp:96</div></div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="aarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
|
||||
<div class="ttc" id="a0__1__knapsack_8cpp_html_a15edf30f336885e5b851f6b7199c6cd1"><div class="ttname"><a href="../../db/d16/0__1__knapsack_8cpp.html#a15edf30f336885e5b851f6b7199c6cd1">dynamic_programming::knapsack::maxKnapsackValue</a></div><div class="ttdeci">int maxKnapsackValue(const int capacity, const std::array< int, n > &weight, const std::array< int, n > &value)</div><div class="ttdoc">Picking up all those items whose combined weight is below given capacity and calculating value of tho...</div><div class="ttdef"><b>Definition:</b> 0_1_knapsack.cpp:51</div></div>
|
||||
<div class="ttc" id="amax_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a></div><div class="ttdeci">T max(T... args)</div></div>
|
||||
<!-- start footer part -->
|
||||
<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="http://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </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.1 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" target="_top" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="193,-6 193,-25 248,-25 248,-6 193,-6"/>
|
||||
<text text-anchor="middle" x="220.5" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -21,7 +21,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" target="_top" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="69,-0.5 69,-19.5 123,-19.5 123,-0.5 69,-0.5"/>
|
||||
<text text-anchor="middle" x="96" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -36,7 +36,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" target="_top" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="143,-0.5 143,-19.5 197,-19.5 197,-0.5 143,-0.5"/>
|
||||
<text text-anchor="middle" x="170" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Reference in New Issue
Block a user