Documentation for 0d766b0f8a
@@ -116,11 +116,12 @@ $(function(){initNavTree('d6/d10/cut__rod_8cpp.html','../../'); initResizable(tr
|
||||
<div class="textblock"><code>#include <array></code><br />
|
||||
<code>#include <cassert></code><br />
|
||||
<code>#include <climits></code><br />
|
||||
<code>#include <cstdint></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for cut_rod.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d7/da4/cut__rod_8cpp__incl.svg" width="328" height="126"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d7/da4/cut__rod_8cpp__incl.svg" width="412" height="126"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
||||
@@ -172,12 +173,12 @@ Algorithm</h3>
|
||||
|
||||
<p>Main function. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 110</span> {</div>
|
||||
<div class="line"><span class="lineno"> 111</span> <span class="comment">// Testing</span></div>
|
||||
<div class="line"><span class="lineno"> 112</span> <a class="code hl_function" href="#aa8dca7b867074164d5f45b0f3851269d">test</a>();</div>
|
||||
<div class="line"><span class="lineno"> 113</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 114</span>}</div>
|
||||
<div class="ttc" id="acut__rod_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#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> cut_rod.cpp:71</div></div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 111</span> {</div>
|
||||
<div class="line"><span class="lineno"> 112</span> <span class="comment">// Testing</span></div>
|
||||
<div class="line"><span class="lineno"> 113</span> <a class="code hl_function" href="#aa8dca7b867074164d5f45b0f3851269d">test</a>();</div>
|
||||
<div class="line"><span class="lineno"> 114</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 115</span>}</div>
|
||||
<div class="ttc" id="acut__rod_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#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> cut_rod.cpp:72</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -228,26 +229,26 @@ template<size_t T> </div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 44</span> {</div>
|
||||
<div class="line"><span class="lineno"> 45</span> <span class="keywordtype">int</span> *profit =</div>
|
||||
<div class="line"><span class="lineno"> 46</span> <span class="keyword">new</span> <span class="keywordtype">int</span>[n + 1]; <span class="comment">// profit[i] will hold maximum profit for i inch rod</span></div>
|
||||
<div class="line"><span class="lineno"> 47</span> </div>
|
||||
<div class="line"><span class="lineno"> 48</span> profit[0] = 0; <span class="comment">// if length of rod is zero, then no profit</span></div>
|
||||
<div class="line"><span class="lineno"> 49</span> </div>
|
||||
<div class="line"><span class="lineno"> 50</span> <span class="comment">// outer loop will select size of rod, starting from 1 inch to n inch rod.</span></div>
|
||||
<div class="line"><span class="lineno"> 51</span> <span class="comment">// inner loop will evaluate the maximum profit we can get for i inch rod by</span></div>
|
||||
<div class="line"><span class="lineno"> 52</span> <span class="comment">// making every possible cut on it and will store it in profit[i].</span></div>
|
||||
<div class="line"><span class="lineno"> 53</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 1; i <= n; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 54</span> <span class="keywordtype">int</span> q = INT_MIN;</div>
|
||||
<div class="line"><span class="lineno"> 55</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 1; j <= i; j++) {</div>
|
||||
<div class="line"><span class="lineno"> 56</span> q = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a>(q, price[j - 1] + profit[i - j]);</div>
|
||||
<div class="line"><span class="lineno"> 57</span> }</div>
|
||||
<div class="line"><span class="lineno"> 58</span> profit[i] = q;</div>
|
||||
<div class="line"><span class="lineno"> 59</span> }</div>
|
||||
<div class="line"><span class="lineno"> 60</span> <span class="keyword">const</span> int16_t ans = profit[n];</div>
|
||||
<div class="line"><span class="lineno"> 61</span> <span class="keyword">delete</span>[] profit;</div>
|
||||
<div class="line"><span class="lineno"> 62</span> <span class="keywordflow">return</span> ans; <span class="comment">// returning maximum profit</span></div>
|
||||
<div class="line"><span class="lineno"> 63</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 45</span> {</div>
|
||||
<div class="line"><span class="lineno"> 46</span> <span class="keywordtype">int</span> *profit =</div>
|
||||
<div class="line"><span class="lineno"> 47</span> <span class="keyword">new</span> <span class="keywordtype">int</span>[n + 1]; <span class="comment">// profit[i] will hold maximum profit for i inch rod</span></div>
|
||||
<div class="line"><span class="lineno"> 48</span> </div>
|
||||
<div class="line"><span class="lineno"> 49</span> profit[0] = 0; <span class="comment">// if length of rod is zero, then no profit</span></div>
|
||||
<div class="line"><span class="lineno"> 50</span> </div>
|
||||
<div class="line"><span class="lineno"> 51</span> <span class="comment">// outer loop will select size of rod, starting from 1 inch to n inch rod.</span></div>
|
||||
<div class="line"><span class="lineno"> 52</span> <span class="comment">// inner loop will evaluate the maximum profit we can get for i inch rod by</span></div>
|
||||
<div class="line"><span class="lineno"> 53</span> <span class="comment">// making every possible cut on it and will store it in profit[i].</span></div>
|
||||
<div class="line"><span class="lineno"> 54</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 1; i <= n; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 55</span> <span class="keywordtype">int</span> q = INT_MIN;</div>
|
||||
<div class="line"><span class="lineno"> 56</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 1; j <= i; j++) {</div>
|
||||
<div class="line"><span class="lineno"> 57</span> q = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a>(q, price[j - 1] + profit[i - j]);</div>
|
||||
<div class="line"><span class="lineno"> 58</span> }</div>
|
||||
<div class="line"><span class="lineno"> 59</span> profit[i] = q;</div>
|
||||
<div class="line"><span class="lineno"> 60</span> }</div>
|
||||
<div class="line"><span class="lineno"> 61</span> <span class="keyword">const</span> int16_t ans = profit[n];</div>
|
||||
<div class="line"><span class="lineno"> 62</span> <span class="keyword">delete</span>[] profit;</div>
|
||||
<div class="line"><span class="lineno"> 63</span> <span class="keywordflow">return</span> ans; <span class="comment">// returning maximum profit</span></div>
|
||||
<div class="line"><span class="lineno"> 64</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><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -282,43 +283,43 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Function to test above algorithm. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 71</span> {</div>
|
||||
<div class="line"><span class="lineno"> 72</span> <span class="comment">// Test 1</span></div>
|
||||
<div class="line"><span class="lineno"> 73</span> <span class="keyword">const</span> int16_t n1 = 8; <span class="comment">// size of rod</span></div>
|
||||
<div class="line"><span class="lineno"> 74</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<int32_t, n1></a> price1 = {1,2,4,6,8,45,21,9}; <span class="comment">// price array</span></div>
|
||||
<div class="line"><span class="lineno"> 75</span> <span class="keyword">const</span> int64_t max_profit1 =</div>
|
||||
<div class="line"><span class="lineno"> 76</span> <a class="code hl_function" href="#a1cc523a30c18c63eac58220c3c494cfa">dynamic_programming::cut_rod::maxProfitByCuttingRod</a>(price1, n1);</div>
|
||||
<div class="line"><span class="lineno"> 77</span> <span class="keyword">const</span> int64_t expected_max_profit1 = 47;</div>
|
||||
<div class="line"><span class="lineno"> 78</span> assert(max_profit1 == expected_max_profit1);</div>
|
||||
<div class="line"><span class="lineno"> 79</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Maximum profit with "</span> << n1 << <span class="stringliteral">" inch road is "</span> << max_profit1</div>
|
||||
<div class="line"><span class="lineno"> 80</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 81</span> </div>
|
||||
<div class="line"><span class="lineno"> 82</span> <span class="comment">// Test 2</span></div>
|
||||
<div class="line"><span class="lineno"> 83</span> <span class="keyword">const</span> int16_t n2 = 30; <span class="comment">// size of rod</span></div>
|
||||
<div class="line"><span class="lineno"> 84</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<int32_t, n2></a> price2 = {</div>
|
||||
<div class="line"><span class="lineno"> 85</span> 1, 5, 8, 9, 10, 17, 17, 20, 24, 30, <span class="comment">// price array</span></div>
|
||||
<div class="line"><span class="lineno"> 86</span> 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,</div>
|
||||
<div class="line"><span class="lineno"> 87</span> 41, 42, 43, 44, 45, 46, 47, 48, 49, 50};</div>
|
||||
<div class="line"><span class="lineno"> 88</span> </div>
|
||||
<div class="line"><span class="lineno"> 89</span> <span class="keyword">const</span> int64_t max_profit2=</div>
|
||||
<div class="line"><span class="lineno"> 90</span> <a class="code hl_function" href="#a1cc523a30c18c63eac58220c3c494cfa">dynamic_programming::cut_rod::maxProfitByCuttingRod</a>(price2, n2);</div>
|
||||
<div class="line"><span class="lineno"> 91</span> <span class="keyword">const</span> int32_t expected_max_profit2 = 90;</div>
|
||||
<div class="line"><span class="lineno"> 92</span> assert(max_profit2 == expected_max_profit2);</div>
|
||||
<div class="line"><span class="lineno"> 93</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Maximum profit with "</span> << n2 << <span class="stringliteral">" inch road is "</span> << max_profit2</div>
|
||||
<div class="line"><span class="lineno"> 94</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 95</span> <span class="comment">// Test 3</span></div>
|
||||
<div class="line"><span class="lineno"> 96</span> <span class="keyword">const</span> int16_t n3 = 5; <span class="comment">// size of rod</span></div>
|
||||
<div class="line"><span class="lineno"> 97</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<int32_t, n3></a> price3 = {2,9,17,23,45}; <span class="comment">// price array</span></div>
|
||||
<div class="line"><span class="lineno"> 98</span> <span class="keyword">const</span> int64_t max_profit3 =</div>
|
||||
<div class="line"><span class="lineno"> 99</span> <a class="code hl_function" href="#a1cc523a30c18c63eac58220c3c494cfa">dynamic_programming::cut_rod::maxProfitByCuttingRod</a>(price3, n3);</div>
|
||||
<div class="line"><span class="lineno"> 100</span> <span class="keyword">const</span> int64_t expected_max_profit3 = 45;</div>
|
||||
<div class="line"><span class="lineno"> 101</span> assert(max_profit3 == expected_max_profit3);</div>
|
||||
<div class="line"><span class="lineno"> 102</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Maximum profit with "</span> << n3 << <span class="stringliteral">" inch road is "</span> << max_profit3</div>
|
||||
<div class="line"><span class="lineno"> 103</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 104</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 72</span> {</div>
|
||||
<div class="line"><span class="lineno"> 73</span> <span class="comment">// Test 1</span></div>
|
||||
<div class="line"><span class="lineno"> 74</span> <span class="keyword">const</span> int16_t n1 = 8; <span class="comment">// size of rod</span></div>
|
||||
<div class="line"><span class="lineno"> 75</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<int32_t, n1></a> price1 = {1, 2, 4, 6, 8, 45, 21, 9}; <span class="comment">// price array</span></div>
|
||||
<div class="line"><span class="lineno"> 76</span> <span class="keyword">const</span> int64_t max_profit1 =</div>
|
||||
<div class="line"><span class="lineno"> 77</span> <a class="code hl_function" href="#a1cc523a30c18c63eac58220c3c494cfa">dynamic_programming::cut_rod::maxProfitByCuttingRod</a>(price1, n1);</div>
|
||||
<div class="line"><span class="lineno"> 78</span> <span class="keyword">const</span> int64_t expected_max_profit1 = 47;</div>
|
||||
<div class="line"><span class="lineno"> 79</span> assert(max_profit1 == expected_max_profit1);</div>
|
||||
<div class="line"><span class="lineno"> 80</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Maximum profit with "</span> << n1 << <span class="stringliteral">" inch road is "</span> << max_profit1</div>
|
||||
<div class="line"><span class="lineno"> 81</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 82</span> </div>
|
||||
<div class="line"><span class="lineno"> 83</span> <span class="comment">// Test 2</span></div>
|
||||
<div class="line"><span class="lineno"> 84</span> <span class="keyword">const</span> int16_t n2 = 30; <span class="comment">// size of rod</span></div>
|
||||
<div class="line"><span class="lineno"> 85</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<int32_t, n2></a> price2 = {</div>
|
||||
<div class="line"><span class="lineno"> 86</span> 1, 5, 8, 9, 10, 17, 17, 20, 24, 30, <span class="comment">// price array</span></div>
|
||||
<div class="line"><span class="lineno"> 87</span> 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,</div>
|
||||
<div class="line"><span class="lineno"> 88</span> 41, 42, 43, 44, 45, 46, 47, 48, 49, 50};</div>
|
||||
<div class="line"><span class="lineno"> 89</span> </div>
|
||||
<div class="line"><span class="lineno"> 90</span> <span class="keyword">const</span> int64_t max_profit2 =</div>
|
||||
<div class="line"><span class="lineno"> 91</span> <a class="code hl_function" href="#a1cc523a30c18c63eac58220c3c494cfa">dynamic_programming::cut_rod::maxProfitByCuttingRod</a>(price2, n2);</div>
|
||||
<div class="line"><span class="lineno"> 92</span> <span class="keyword">const</span> int32_t expected_max_profit2 = 90;</div>
|
||||
<div class="line"><span class="lineno"> 93</span> assert(max_profit2 == expected_max_profit2);</div>
|
||||
<div class="line"><span class="lineno"> 94</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Maximum profit with "</span> << n2 << <span class="stringliteral">" inch road is "</span> << max_profit2</div>
|
||||
<div class="line"><span class="lineno"> 95</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 96</span> <span class="comment">// Test 3</span></div>
|
||||
<div class="line"><span class="lineno"> 97</span> <span class="keyword">const</span> int16_t n3 = 5; <span class="comment">// size of rod</span></div>
|
||||
<div class="line"><span class="lineno"> 98</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<int32_t, n3></a> price3 = {2, 9, 17, 23, 45}; <span class="comment">// price array</span></div>
|
||||
<div class="line"><span class="lineno"> 99</span> <span class="keyword">const</span> int64_t max_profit3 =</div>
|
||||
<div class="line"><span class="lineno"> 100</span> <a class="code hl_function" href="#a1cc523a30c18c63eac58220c3c494cfa">dynamic_programming::cut_rod::maxProfitByCuttingRod</a>(price3, n3);</div>
|
||||
<div class="line"><span class="lineno"> 101</span> <span class="keyword">const</span> int64_t expected_max_profit3 = 45;</div>
|
||||
<div class="line"><span class="lineno"> 102</span> assert(max_profit3 == expected_max_profit3);</div>
|
||||
<div class="line"><span class="lineno"> 103</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Maximum profit with "</span> << n3 << <span class="stringliteral">" inch road is "</span> << max_profit3</div>
|
||||
<div class="line"><span class="lineno"> 104</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 105</span>}</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="acut__rod_8cpp_html_a1cc523a30c18c63eac58220c3c494cfa"><div class="ttname"><a href="#a1cc523a30c18c63eac58220c3c494cfa">dynamic_programming::cut_rod::maxProfitByCuttingRod</a></div><div class="ttdeci">int maxProfitByCuttingRod(const std::array< int, T > &price, const uint64_t &n)</div><div class="ttdoc">Cuts the rod in different pieces and stores the maximum profit for each piece of the rod.</div><div class="ttdef"><b>Definition</b> cut_rod.cpp:44</div></div>
|
||||
<div class="ttc" id="acut__rod_8cpp_html_a1cc523a30c18c63eac58220c3c494cfa"><div class="ttname"><a href="#a1cc523a30c18c63eac58220c3c494cfa">dynamic_programming::cut_rod::maxProfitByCuttingRod</a></div><div class="ttdeci">int maxProfitByCuttingRod(const std::array< int, T > &price, const uint64_t &n)</div><div class="ttdoc">Cuts the rod in different pieces and stores the maximum profit for each piece of the rod.</div><div class="ttdef"><b>Definition</b> cut_rod.cpp:45</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>
|
||||
|
||||
@@ -749,11 +749,11 @@ template<typename T > </div>
|
||||
<p>Get matrix inverse using Row-transformations. Given matrix must be a square and non-singular. </p><dl class="section return"><dt>Returns</dt><dd>inverse matrix </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 251</span> {</div>
|
||||
<div class="line"><span class="lineno"> 252</span> <span class="comment">// Assuming A is square matrix</span></div>
|
||||
<div class="line"><span class="lineno"> 253</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = A.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>();</div>
|
||||
<div class="line"><span class="lineno"> 253</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = A.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>();</div>
|
||||
<div class="line"><span class="lineno"> 254</span> </div>
|
||||
<div class="line"><span class="lineno"> 255</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">matrix<double></a> inverse(N, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray<double></a>(N));</div>
|
||||
<div class="line"><span class="lineno"> 256</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row = 0; row < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; row++) {</div>
|
||||
<div class="line"><span class="lineno"> 257</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> col = 0; col < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; col++) {</div>
|
||||
<div class="line"><span class="lineno"> 256</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row = 0; row < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; row++) {</div>
|
||||
<div class="line"><span class="lineno"> 257</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> col = 0; col < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; col++) {</div>
|
||||
<div class="line"><span class="lineno"> 258</span> <span class="comment">// create identity matrix</span></div>
|
||||
<div class="line"><span class="lineno"> 259</span> inverse[row][col] = (row == col) ? 1.f : 0.f;</div>
|
||||
<div class="line"><span class="lineno"> 260</span> }</div>
|
||||
@@ -766,22 +766,22 @@ template<typename T > </div>
|
||||
<div class="line"><span class="lineno"> 267</span> </div>
|
||||
<div class="line"><span class="lineno"> 268</span> <span class="comment">// preallocate a temporary matrix identical to A</span></div>
|
||||
<div class="line"><span class="lineno"> 269</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">matrix<double></a> temp(N, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray<double></a>(N));</div>
|
||||
<div class="line"><span class="lineno"> 270</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row = 0; row < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; row++) {</div>
|
||||
<div class="line"><span class="lineno"> 271</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> col = 0; col < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; col++)</div>
|
||||
<div class="line"><span class="lineno"> 270</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row = 0; row < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; row++) {</div>
|
||||
<div class="line"><span class="lineno"> 271</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> col = 0; col < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; col++)</div>
|
||||
<div class="line"><span class="lineno"> 272</span> temp[row][col] = <span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(A[row][col]);</div>
|
||||
<div class="line"><span class="lineno"> 273</span> }</div>
|
||||
<div class="line"><span class="lineno"> 274</span> </div>
|
||||
<div class="line"><span class="lineno"> 275</span> <span class="comment">// start transformations</span></div>
|
||||
<div class="line"><span class="lineno"> 276</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row = 0; row < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; row++) {</div>
|
||||
<div class="line"><span class="lineno"> 277</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row2 = row; row2 < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> && temp[row][row] == 0; row2++) {</div>
|
||||
<div class="line"><span class="lineno"> 276</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row = 0; row < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; row++) {</div>
|
||||
<div class="line"><span class="lineno"> 277</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row2 = row; row2 < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> && temp[row][row] == 0; row2++) {</div>
|
||||
<div class="line"><span class="lineno"> 278</span> <span class="comment">// this to ensure diagonal elements are not 0</span></div>
|
||||
<div class="line"><span class="lineno"> 279</span> temp[row] = temp[row] + temp[row2];</div>
|
||||
<div class="line"><span class="lineno"> 280</span> inverse[row] = inverse[row] + inverse[row2];</div>
|
||||
<div class="line"><span class="lineno"> 281</span> }</div>
|
||||
<div class="line"><span class="lineno"> 282</span> </div>
|
||||
<div class="line"><span class="lineno"> 283</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> col2 = row; col2 < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> && temp[row][row] == 0; col2++) {</div>
|
||||
<div class="line"><span class="lineno"> 283</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> col2 = row; col2 < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> && temp[row][row] == 0; col2++) {</div>
|
||||
<div class="line"><span class="lineno"> 284</span> <span class="comment">// this to further ensure diagonal elements are not 0</span></div>
|
||||
<div class="line"><span class="lineno"> 285</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row2 = 0; row2 < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; row2++) {</div>
|
||||
<div class="line"><span class="lineno"> 285</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row2 = 0; row2 < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; row2++) {</div>
|
||||
<div class="line"><span class="lineno"> 286</span> temp[row2][row] = temp[row2][row] + temp[row2][col2];</div>
|
||||
<div class="line"><span class="lineno"> 287</span> inverse[row2][row] =</div>
|
||||
<div class="line"><span class="lineno"> 288</span> inverse[row2][row] + inverse[row2][col2];</div>
|
||||
@@ -799,7 +799,7 @@ template<typename T > </div>
|
||||
<div class="line"><span class="lineno"> 300</span> temp[row] = temp[row] / divisor;</div>
|
||||
<div class="line"><span class="lineno"> 301</span> inverse[row] = inverse[row] / divisor;</div>
|
||||
<div class="line"><span class="lineno"> 302</span> <span class="comment">// Row transformations</span></div>
|
||||
<div class="line"><span class="lineno"> 303</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row2 = 0; row2 < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; row2++) {</div>
|
||||
<div class="line"><span class="lineno"> 303</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> row2 = 0; row2 < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; row2++) {</div>
|
||||
<div class="line"><span class="lineno"> 304</span> <span class="keywordflow">if</span> (row2 == row)</div>
|
||||
<div class="line"><span class="lineno"> 305</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><span class="lineno"> 306</span> <span class="keywordtype">double</span> factor = temp[row2][row];</div>
|
||||
@@ -810,8 +810,8 @@ template<typename T > </div>
|
||||
<div class="line"><span class="lineno"> 311</span> </div>
|
||||
<div class="line"><span class="lineno"> 312</span> <span class="keywordflow">return</span> inverse;</div>
|
||||
<div class="line"><span class="lineno"> 313</span> }</div>
|
||||
<div class="ttc" id="adata__structures_2sparse__table_8cpp_html_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><div class="ttname"><a href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a></div><div class="ttdeci">constexpr uint32_t N</div><div class="ttdoc">A struct to represent sparse table for min() as their invariant function, for the given array A....</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:48</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="asparse__table_8cpp_html_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><div class="ttname"><a href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a></div><div class="ttdeci">constexpr uint32_t N</div><div class="ttdoc">A struct to represent sparse table for min() as their invariant function, for the given array A....</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:48</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -967,15 +967,15 @@ template<typename T1 , typename T2 > </div>
|
||||
<dl class="section return"><dt>Returns</dt><dd>determinant of generated random matrix</dd></dl>
|
||||
<dl class="section warning"><dt>Warning</dt><dd>There will need to be a balance between the matrix size and the range of random numbers. If the matrix is large, the range of random numbers must be small to have a well defined keys. Or if the matrix is smaller, the random numbers range can be larger. For an 8x8 matrix, range should be no more than \([0,10]\) </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 119</span> {</div>
|
||||
<div class="line"><span class="lineno"> 120</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#af7db62f21983565c64d5d42d2a49888e">M</a>->size(); i++) {</div>
|
||||
<div class="line"><span class="lineno"> 121</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#af7db62f21983565c64d5d42d2a49888e">M</a>[0][0].size(); j++) {</div>
|
||||
<div class="line"><span class="lineno"> 122</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#af7db62f21983565c64d5d42d2a49888e">M</a>[0][i][j] = <a class="code hl_function" href="#a629be41c1ab78850963e4ce14e1d11d9">rand_range<T1, T2></a>(a, b);</div>
|
||||
<div class="line"><span class="lineno"> 120</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#af7db62f21983565c64d5d42d2a49888e">M</a>->size(); i++) {</div>
|
||||
<div class="line"><span class="lineno"> 121</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#af7db62f21983565c64d5d42d2a49888e">M</a>[0][0].size(); j++) {</div>
|
||||
<div class="line"><span class="lineno"> 122</span> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#af7db62f21983565c64d5d42d2a49888e">M</a>[0][i][j] = <a class="code hl_function" href="#a629be41c1ab78850963e4ce14e1d11d9">rand_range<T1, T2></a>(a, b);</div>
|
||||
<div class="line"><span class="lineno"> 123</span> }</div>
|
||||
<div class="line"><span class="lineno"> 124</span> }</div>
|
||||
<div class="line"><span class="lineno"> 125</span> </div>
|
||||
<div class="line"><span class="lineno"> 126</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d1/dbe/lu__decomposition_8h.html#a3108d43bd32c6fb3b3c158476c51ba7f">determinant_lu</a>(*M);</div>
|
||||
<div class="line"><span class="lineno"> 127</span> }</div>
|
||||
<div class="ttc" id="adata__structures_2sparse__table_8cpp_html_af7db62f21983565c64d5d42d2a49888e"><div class="ttname"><a href="../../d6/d42/data__structures_2sparse__table_8cpp.html#af7db62f21983565c64d5d42d2a49888e">data_structures::sparse_table::M</a></div><div class="ttdeci">constexpr uint8_t M</div><div class="ttdoc">ceil(log2(N)).</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:49</div></div>
|
||||
<div class="ttc" id="asparse__table_8cpp_html_af7db62f21983565c64d5d42d2a49888e"><div class="ttname"><a href="../../d8/dab/sparse__table_8cpp.html#af7db62f21983565c64d5d42d2a49888e">data_structures::sparse_table::M</a></div><div class="ttdeci">constexpr uint8_t M</div><div class="ttdoc">ceil(log2(N)).</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:49</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
|
||||
@@ -115,12 +115,13 @@ $(function(){initNavTree('d6/d26/house__robber_8cpp.html','../../'); initResizab
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <cassert></code><br />
|
||||
<code>#include <climits></code><br />
|
||||
<code>#include <cstdint></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <vector></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for house_robber.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d4/dd7/house__robber_8cpp__incl.svg" width="335" height="126"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d4/dd7/house__robber_8cpp__incl.svg" width="419" height="126"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
||||
|
||||
@@ -426,11 +426,11 @@ template<size_t N> </div>
|
||||
<div class="line"><span class="lineno"> 152</span> avg_pred_error = 0.f;</div>
|
||||
<div class="line"><span class="lineno"> 153</span> </div>
|
||||
<div class="line"><span class="lineno"> 154</span> <span class="comment">// perform fit for each sample</span></div>
|
||||
<div class="line"><span class="lineno"> 155</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 155</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 156</span> <span class="keywordtype">double</span> err = <a class="code hl_function" href="#a74e3c6c037b67895014414c5d75465e5">fit</a>(X[i], Y[i]);</div>
|
||||
<div class="line"><span class="lineno"> 157</span> avg_pred_error += std::abs(err);</div>
|
||||
<div class="line"><span class="lineno"> 158</span> }</div>
|
||||
<div class="line"><span class="lineno"> 159</span> avg_pred_error /= <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>;</div>
|
||||
<div class="line"><span class="lineno"> 159</span> avg_pred_error /= <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>;</div>
|
||||
<div class="line"><span class="lineno"> 160</span> </div>
|
||||
<div class="line"><span class="lineno"> 161</span> <span class="comment">// Print updates every 200th iteration</span></div>
|
||||
<div class="line"><span class="lineno"> 162</span> <span class="comment">// if (iter % 100 == 0)</span></div>
|
||||
@@ -447,8 +447,8 @@ template<size_t N> </div>
|
||||
<div class="line"><span class="lineno"> 173</span> }</div>
|
||||
<div class="line"><span class="lineno"> 174</span> }</div>
|
||||
<div class="ttc" id="aclassmachine__learning_1_1adaline_html_a74e3c6c037b67895014414c5d75465e5"><div class="ttname"><a href="#a74e3c6c037b67895014414c5d75465e5">machine_learning::adaline::fit</a></div><div class="ttdeci">double fit(const std::vector< double > &x, const int &y)</div><div class="ttdef"><b>Definition</b> adaline_learning.cpp:119</div></div>
|
||||
<div class="ttc" id="adata__structures_2sparse__table_8cpp_html_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><div class="ttname"><a href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a></div><div class="ttdeci">constexpr uint32_t N</div><div class="ttdoc">A struct to represent sparse table for min() as their invariant function, for the given array A....</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:48</div></div>
|
||||
<div class="ttc" id="agroup__machine__learning_html_ga5118e5cbc4f0886e27b3a7a2544dded1"><div class="ttname"><a href="../../d9/d66/group__machine__learning.html#ga5118e5cbc4f0886e27b3a7a2544dded1">MAX_ITER</a></div><div class="ttdeci">constexpr int MAX_ITER</div><div class="ttdef"><b>Definition</b> adaline_learning.cpp:40</div></div>
|
||||
<div class="ttc" id="asparse__table_8cpp_html_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><div class="ttname"><a href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a></div><div class="ttdeci">constexpr uint32_t N</div><div class="ttdoc">A struct to represent sparse table for min() as their invariant function, for the given array A....</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:48</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
|
||||
@@ -1,321 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<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.12.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: data_structures/sparse_table.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<script type="text/javascript" src="../../clipboard.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../cookie.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(1); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search',true);
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d6/d42/data__structures_2sparse__table_8cpp.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> |
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#func-members">Functions</a> |
|
||||
<a href="#var-members">Variables</a> </div>
|
||||
<div class="headertitle"><div class="title">sparse_table.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Implementation of <a href="https://brilliant.org/wiki/sparse-table/" target="_blank">Sparse Table</a> for <code>min()</code> function.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <array></code><br />
|
||||
<code>#include <cassert></code><br />
|
||||
<code>#include <cstdint></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for sparse_table.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d88/data__structures_2sparse__table_8cpp__incl.svg" width="330" height="126"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html">data_structures::sparse_table::Sparse_table</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><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:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d3c/namespacedata__structures.html">data_structures</a></td></tr>
|
||||
<tr class="memdesc:d5/d3c/namespacedata__structures"><td class="mdescLeft"> </td><td class="mdescRight">for IO operations <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d55/namespacesparse__table.html">sparse_table</a></td></tr>
|
||||
<tr class="memdesc:d9/d55/namespacesparse__table"><td class="mdescLeft"> </td><td class="mdescRight">Functions for Implementation of <a href="https://brilliant.org/wiki/sparse-table/" target="_blank">Sparse Table</a> <br /></td></tr>
|
||||
<tr class="separator:"><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:aa8dca7b867074164d5f45b0f3851269d" id="r_aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</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:a0ddf1224851353fc92bfbff6f499fa97" id="r_a0ddf1224851353fc92bfbff6f499fa97"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#a0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</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><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
|
||||
Variables</h2></td></tr>
|
||||
<tr class="memitem:a10f3ffb3f6f7e1b83d556b9c8de89a5d" id="r_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><td class="memItemLeft" align="right" valign="top">constexpr uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a> = 12345</td></tr>
|
||||
<tr class="memdesc:a10f3ffb3f6f7e1b83d556b9c8de89a5d"><td class="mdescLeft"> </td><td class="mdescRight">A struct to represent sparse table for <code>min()</code> as their invariant function, for the given array <code>A</code>. The answer to queries are stored in the array ST. <br /></td></tr>
|
||||
<tr class="separator:a10f3ffb3f6f7e1b83d556b9c8de89a5d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af7db62f21983565c64d5d42d2a49888e" id="r_af7db62f21983565c64d5d42d2a49888e"><td class="memItemLeft" align="right" valign="top"><a id="af7db62f21983565c64d5d42d2a49888e" name="af7db62f21983565c64d5d42d2a49888e"></a>
|
||||
constexpr uint8_t </td><td class="memItemRight" valign="bottom"><b>data_structures::sparse_table::M</b> = 14</td></tr>
|
||||
<tr class="memdesc:af7db62f21983565c64d5d42d2a49888e"><td class="mdescLeft"> </td><td class="mdescRight">ceil(log2(N)). <br /></td></tr>
|
||||
<tr class="separator:af7db62f21983565c64d5d42d2a49888e"><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://brilliant.org/wiki/sparse-table/" target="_blank">Sparse Table</a> for <code>min()</code> function. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/manncodes" target="_blank">Mann Patel</a></dd></dl>
|
||||
<p>Sparse Table is a data structure, that allows answering range queries. It can answer most range queries in O(logn), but its true power is answering range minimum queries (or equivalent range maximum queries). For those queries it can compute the answer in O(1) time. The only drawback of this data structure is, that it can only be used on immutable arrays. This means, that the array cannot be changed between two queries.</p>
|
||||
<p>If any element in the array changes, the complete data structure has to be recomputed.</p>
|
||||
<dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000004">Todo</a></b></dt><dd>make stress tests.</dd></dl>
|
||||
<dl class="section warning"><dt>Warning</dt><dd>This sparse table is made for <code>min(a1,a2,...an)</code> duplicate invariant function. This implementation can be changed to other functions like <code><a class="el" href="../../d4/da0/gcd__iterative__euclidean_8cpp.html#ae48807fa2b7000afae599e67f327545e">gcd()</a></code>, <code><a class="el" href="../../d4/d21/least__common__multiple_8cpp.html#aa8d0e241db517813725e721a152e3a25">lcm()</a></code>, and <code>max()</code> by changing a few lines of code. </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a0ddf1224851353fc92bfbff6f499fa97" name="a0ddf1224851353fc92bfbff6f499fa97"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a0ddf1224851353fc92bfbff6f499fa97">◆ </a></span>main()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int main </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>argc</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">char *</td> <td class="paramname"><span class="paramname"><em>argv</em></span>[] )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Main function. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">argc</td><td>commandline argument count (ignored) </td></tr>
|
||||
<tr><td class="paramname">argv</td><td>commandline array of arguments (ignored) </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 162</span> {</div>
|
||||
<div class="line"><span class="lineno"> 163</span> <a class="code hl_function" href="#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><span class="lineno"> 164</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 165</span>}</div>
|
||||
<div class="ttc" id="adata__structures_2sparse__table_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:129</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d42/data__structures_2sparse__table_8cpp_a0ddf1224851353fc92bfbff6f499fa97_cgraph.svg" width="278" height="184"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa8dca7b867074164d5f45b0f3851269d">◆ </a></span>test()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static void test </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Self-test implementations. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<p>< array on which RMQ will be performed.</p>
|
||||
<p>< size of self test's array</p>
|
||||
<p>< declaring sparse tree</p>
|
||||
<p>< copying array to the struct</p>
|
||||
<p>< passing the array's size to the struct</p>
|
||||
<p>< precomputing sparse tree</p>
|
||||
<p>< as 1 is smallest from 1..9</p>
|
||||
<p>< as 2 is smallest from 2..6</p>
|
||||
<p>< as 3 is smallest from 3..8</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 129</span> {</div>
|
||||
<div class="line"><span class="lineno"> 130</span> <span class="comment">/* We take an array as an input on which we need to perform the ranged</span></div>
|
||||
<div class="line"><span class="lineno"> 131</span><span class="comment"> * minimum queries[RMQ](https://en.wikipedia.org/wiki/Range_minimum_query).</span></div>
|
||||
<div class="line"><span class="lineno"> 132</span><span class="comment"> */</span></div>
|
||||
<div class="line"><span class="lineno"> 133</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<int64_t, 10></a> testcase = {</div>
|
||||
<div class="line"><span class="lineno"> 134</span> 1, 2, 3, 4, 5,</div>
|
||||
<div class="line"><span class="lineno"> 135</span> 6, 7, 8, 9, 10}; <span class="comment">///< array on which RMQ will be performed.</span></div>
|
||||
<div class="line"><span class="lineno"> 136</span> <span class="keywordtype">size_t</span> testcase_size =</div>
|
||||
<div class="line"><span class="lineno"> 137</span> <span class="keyword">sizeof</span>(testcase) / <span class="keyword">sizeof</span>(testcase[0]); <span class="comment">///< size of self test's array</span></div>
|
||||
<div class="line"><span class="lineno"> 138</span> </div>
|
||||
<div class="line"><span class="lineno"> 139</span> <a class="code hl_struct" href="../../da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html">data_structures::sparse_table::Sparse_table</a></div>
|
||||
<div class="line"><span class="lineno"> 140</span> st{}; <span class="comment">///< declaring sparse tree</span></div>
|
||||
<div class="line"><span class="lineno"> 141</span> </div>
|
||||
<div class="line"><span class="lineno"> 142</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/copy.html">std::copy</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(testcase), <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a>(testcase),</div>
|
||||
<div class="line"><span class="lineno"> 143</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(st.A)); <span class="comment">///< copying array to the struct</span></div>
|
||||
<div class="line"><span class="lineno"> 144</span> st.n = testcase_size; <span class="comment">///< passing the array's size to the struct</span></div>
|
||||
<div class="line"><span class="lineno"> 145</span> </div>
|
||||
<div class="line"><span class="lineno"> 146</span> st.buildST(); <span class="comment">///< precomputing sparse tree</span></div>
|
||||
<div class="line"><span class="lineno"> 147</span> </div>
|
||||
<div class="line"><span class="lineno"> 148</span> <span class="comment">// pass queries of the form: [l,r]</span></div>
|
||||
<div class="line"><span class="lineno"> 149</span> assert(st.query(1, 9) == 1); <span class="comment">///< as 1 is smallest from 1..9</span></div>
|
||||
<div class="line"><span class="lineno"> 150</span> assert(st.query(2, 6) == 2); <span class="comment">///< as 2 is smallest from 2..6</span></div>
|
||||
<div class="line"><span class="lineno"> 151</span> assert(st.query(3, 8) == 3); <span class="comment">///< as 3 is smallest from 3..8</span></div>
|
||||
<div class="line"><span class="lineno"> 152</span> </div>
|
||||
<div class="line"><span class="lineno"> 153</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Self-test implementations passed!"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 154</span>}</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="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
|
||||
<div class="ttc" id="acopy_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/copy.html">std::copy</a></div><div class="ttdeci">T copy(T... args)</div></div>
|
||||
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a></div><div class="ttdeci">T end(T... args)</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="astructdata__structures_1_1sparse__table_1_1_sparse__table_html"><div class="ttname"><a href="../../da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html">data_structures::sparse_table::Sparse_table</a></div><div class="ttdef"><b>Definition</b> sparse_table.cpp:51</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d42/data__structures_2sparse__table_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="180" height="184"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Variable Documentation</h2>
|
||||
<a id="a10f3ffb3f6f7e1b83d556b9c8de89a5d" name="a10f3ffb3f6f7e1b83d556b9c8de89a5d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a10f3ffb3f6f7e1b83d556b9c8de89a5d">◆ </a></span>N</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">uint32_t data_structures::sparse_table::N = 12345</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">constexpr</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>A struct to represent sparse table for <code>min()</code> as their invariant function, for the given array <code>A</code>. The answer to queries are stored in the array ST. </p>
|
||||
<p>the maximum size of the array. </p>
|
||||
|
||||
</div>
|
||||
</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="../../dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html">data_structures</a></li><li class="navelem"><a class="el" href="../../d6/d42/data__structures_2sparse__table_8cpp.html">sparse_table.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.12.0 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,8 +0,0 @@
|
||||
var data__structures_2sparse__table_8cpp =
|
||||
[
|
||||
[ "data_structures::sparse_table::Sparse_table", "da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html", "da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table" ],
|
||||
[ "main", "d6/d42/data__structures_2sparse__table_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97", null ],
|
||||
[ "test", "d6/d42/data__structures_2sparse__table_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ],
|
||||
[ "M", "d6/d42/data__structures_2sparse__table_8cpp.html#af7db62f21983565c64d5d42d2a49888e", null ],
|
||||
[ "N", "d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d", null ]
|
||||
];
|
||||
@@ -1,13 +0,0 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="Node000001" title="Main function." alt="" coords="5,80,55,106"/>
|
||||
<area shape="rect" id="Node000002" href="$d6/d42/data__structures_2sparse__table_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Self-test implementations." alt="" coords="103,80,146,106"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,90,87,90,87,96,55,96"/>
|
||||
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/begin.html#" title=" " alt="" coords="194,5,272,31"/>
|
||||
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="141,77,192,40,196,38,199,42,196,44,144,82"/>
|
||||
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/copy.html#" title=" " alt="" coords="196,55,271,80"/>
|
||||
<area shape="poly" id="edge3_Node000002_Node000004" title=" " alt="" coords="146,85,180,77,181,82,147,90"/>
|
||||
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/end.html#" title=" " alt="" coords="199,104,267,130"/>
|
||||
<area shape="poly" id="edge4_Node000002_Node000005" title=" " alt="" coords="147,95,184,103,183,109,146,100"/>
|
||||
<area shape="rect" id="Node000006" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="198,153,269,179"/>
|
||||
<area shape="poly" id="edge5_Node000002_Node000006" title=" " alt="" coords="145,104,196,140,199,142,196,147,192,144,142,108"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
a17bd8492d565aaf305db600ec5f9464
|
||||
@@ -1,137 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="208pt" height="138pt"
|
||||
viewBox="0.00 0.00 208.25 138.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
|
||||
<style type="text/css"><![CDATA[
|
||||
.node, .edge {opacity: 0.7;}
|
||||
.node.selected, .edge.selected {opacity: 1;}
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 134.25)">
|
||||
<title>main</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Main function.">
|
||||
<polygon fill="#999999" stroke="#666666" points="37,-74.25 0,-74.25 0,-55 37,-55 37,-74.25"/>
|
||||
<text text-anchor="middle" x="18.5" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d6/d42/data__structures_2sparse__table_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Self-test implementations.">
|
||||
<polygon fill="white" stroke="#666666" points="105.5,-74.25 73,-74.25 73,-55 105.5,-55 105.5,-74.25"/>
|
||||
<text text-anchor="middle" x="89.25" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.2,-64.62C44.58,-64.62 53.31,-64.62 61.45,-64.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.2,-68.13 71.2,-64.63 61.2,-61.13 61.2,-68.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/begin.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="200.25,-130.25 141.5,-130.25 141.5,-111 200.25,-111 200.25,-130.25"/>
|
||||
<text text-anchor="middle" x="170.88" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::begin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M103.12,-74.57C113.37,-82.4 128.17,-93.47 141.5,-102.62 142.34,-103.2 143.2,-103.79 144.07,-104.37"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="141.98,-107.19 152.27,-109.72 145.81,-101.32 141.98,-107.19"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/copy.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="199.12,-93.25 142.62,-93.25 142.62,-74 199.12,-74 199.12,-93.25"/>
|
||||
<text text-anchor="middle" x="170.88" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::copy</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node4 -->
|
||||
<g id="edge3_Node000002_Node000004" class="edge">
|
||||
<title>Node2->Node4</title>
|
||||
<g id="a_edge3_Node000002_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.98,-68.38C113.25,-70.11 122.23,-72.26 131.14,-74.38"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="130.23,-77.76 140.77,-76.68 131.86,-70.96 130.23,-77.76"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/end.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="196.5,-56.25 145.25,-56.25 145.25,-37 196.5,-37 196.5,-56.25"/>
|
||||
<text text-anchor="middle" x="170.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::end</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node5 -->
|
||||
<g id="edge4_Node000002_Node000005" class="edge">
|
||||
<title>Node2->Node5</title>
|
||||
<g id="a_edge4_Node000002_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.98,-61.07C113.93,-59.27 123.93,-57.01 133.64,-54.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.31,-58.25 143.3,-52.63 132.77,-51.42 134.31,-58.25"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="197.62,-19.25 144.12,-19.25 144.12,0 197.62,0 197.62,-19.25"/>
|
||||
<text text-anchor="middle" x="170.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node6 -->
|
||||
<g id="edge5_Node000002_Node000006" class="edge">
|
||||
<title>Node2->Node6</title>
|
||||
<g id="a_edge5_Node000002_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M103.58,-54.66C113.84,-47.09 128.42,-36.49 141.5,-27.62 142.35,-27.05 143.21,-26.47 144.08,-25.89"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="145.81,-28.94 152.29,-20.56 142,-23.07 145.81,-28.94"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
<style type='text/css'>
|
||||
<![CDATA[
|
||||
[data-mouse-over-selected='false'] { opacity: 0.7; }
|
||||
[data-mouse-over-selected='true'] { opacity: 1.0; }
|
||||
]]>
|
||||
</style>
|
||||
<script type="application/ecmascript"><![CDATA[
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
highlightEdges();
|
||||
highlightAdjacentNodes();
|
||||
});
|
||||
]]></script>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 5.8 KiB |
@@ -1,111 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="208pt" height="138pt"
|
||||
viewBox="0.00 0.00 208.25 138.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 134.25)">
|
||||
<title>main</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Main function.">
|
||||
<polygon fill="#999999" stroke="#666666" points="37,-74.25 0,-74.25 0,-55 37,-55 37,-74.25"/>
|
||||
<text text-anchor="middle" x="18.5" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d6/d42/data__structures_2sparse__table_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Self-test implementations.">
|
||||
<polygon fill="white" stroke="#666666" points="105.5,-74.25 73,-74.25 73,-55 105.5,-55 105.5,-74.25"/>
|
||||
<text text-anchor="middle" x="89.25" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.2,-64.62C44.58,-64.62 53.31,-64.62 61.45,-64.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.2,-68.13 71.2,-64.63 61.2,-61.13 61.2,-68.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/begin.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="200.25,-130.25 141.5,-130.25 141.5,-111 200.25,-111 200.25,-130.25"/>
|
||||
<text text-anchor="middle" x="170.88" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::begin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M103.12,-74.57C113.37,-82.4 128.17,-93.47 141.5,-102.62 142.34,-103.2 143.2,-103.79 144.07,-104.37"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="141.98,-107.19 152.27,-109.72 145.81,-101.32 141.98,-107.19"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/copy.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="199.12,-93.25 142.62,-93.25 142.62,-74 199.12,-74 199.12,-93.25"/>
|
||||
<text text-anchor="middle" x="170.88" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::copy</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node4 -->
|
||||
<g id="edge3_Node000002_Node000004" class="edge">
|
||||
<title>Node2->Node4</title>
|
||||
<g id="a_edge3_Node000002_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.98,-68.38C113.25,-70.11 122.23,-72.26 131.14,-74.38"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="130.23,-77.76 140.77,-76.68 131.86,-70.96 130.23,-77.76"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/end.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="196.5,-56.25 145.25,-56.25 145.25,-37 196.5,-37 196.5,-56.25"/>
|
||||
<text text-anchor="middle" x="170.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::end</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node5 -->
|
||||
<g id="edge4_Node000002_Node000005" class="edge">
|
||||
<title>Node2->Node5</title>
|
||||
<g id="a_edge4_Node000002_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.98,-61.07C113.93,-59.27 123.93,-57.01 133.64,-54.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.31,-58.25 143.3,-52.63 132.77,-51.42 134.31,-58.25"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="197.62,-19.25 144.12,-19.25 144.12,0 197.62,0 197.62,-19.25"/>
|
||||
<text text-anchor="middle" x="170.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node6 -->
|
||||
<g id="edge5_Node000002_Node000006" class="edge">
|
||||
<title>Node2->Node6</title>
|
||||
<g id="a_edge5_Node000002_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M103.58,-54.66C113.84,-47.09 128.42,-36.49 141.5,-27.62 142.35,-27.05 143.21,-26.47 144.08,-25.89"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="145.81,-28.94 152.29,-20.56 142,-23.07 145.81,-28.94"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 5.0 KiB |
@@ -1,11 +0,0 @@
|
||||
<map id="test" name="test">
|
||||
<area shape="rect" id="Node000001" title="Self-test implementations." alt="" coords="5,80,49,106"/>
|
||||
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/begin.html#" title=" " alt="" coords="97,5,175,31"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="44,77,95,40,99,38,102,42,98,44,47,82"/>
|
||||
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/copy.html#" title=" " alt="" coords="98,55,174,80"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="49,85,82,77,83,82,50,90"/>
|
||||
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/end.html#" title=" " alt="" coords="102,104,170,130"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="50,95,87,103,86,109,49,100"/>
|
||||
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="100,153,172,179"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="48,104,98,140,102,142,99,147,95,144,45,108"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
acd42c1201f0e2f16635373df7f51fb9
|
||||
@@ -1,119 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="135pt" height="138pt"
|
||||
viewBox="0.00 0.00 135.25 138.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
|
||||
<style type="text/css"><![CDATA[
|
||||
.node, .edge {opacity: 0.7;}
|
||||
.node.selected, .edge.selected {opacity: 1;}
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 134.25)">
|
||||
<title>test</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Self-test implementations.">
|
||||
<polygon fill="#999999" stroke="#666666" points="32.5,-74.25 0,-74.25 0,-55 32.5,-55 32.5,-74.25"/>
|
||||
<text text-anchor="middle" x="16.25" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/begin.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="127.25,-130.25 68.5,-130.25 68.5,-111 127.25,-111 127.25,-130.25"/>
|
||||
<text text-anchor="middle" x="97.88" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::begin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M30.12,-74.57C40.37,-82.4 55.17,-93.47 68.5,-102.62 69.34,-103.2 70.2,-103.79 71.07,-104.37"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="68.98,-107.19 79.27,-109.72 72.81,-101.32 68.98,-107.19"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/copy.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="126.12,-93.25 69.62,-93.25 69.62,-74 126.12,-74 126.12,-93.25"/>
|
||||
<text text-anchor="middle" x="97.88" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::copy</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.98,-68.38C40.25,-70.11 49.23,-72.26 58.14,-74.38"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="57.23,-77.76 67.77,-76.68 58.86,-70.96 57.23,-77.76"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/end.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="123.5,-56.25 72.25,-56.25 72.25,-37 123.5,-37 123.5,-56.25"/>
|
||||
<text text-anchor="middle" x="97.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::end</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.98,-61.07C40.93,-59.27 50.93,-57.01 60.64,-54.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.31,-58.25 70.3,-52.63 59.77,-51.42 61.31,-58.25"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="124.62,-19.25 71.12,-19.25 71.12,0 124.62,0 124.62,-19.25"/>
|
||||
<text text-anchor="middle" x="97.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node5 -->
|
||||
<g id="edge4_Node000001_Node000005" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M30.58,-54.66C40.84,-47.09 55.42,-36.49 68.5,-27.62 69.35,-27.05 70.21,-26.47 71.08,-25.89"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="72.81,-28.94 79.29,-20.56 69,-23.07 72.81,-28.94"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
<style type='text/css'>
|
||||
<![CDATA[
|
||||
[data-mouse-over-selected='false'] { opacity: 0.7; }
|
||||
[data-mouse-over-selected='true'] { opacity: 1.0; }
|
||||
]]>
|
||||
</style>
|
||||
<script type="application/ecmascript"><![CDATA[
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
highlightEdges();
|
||||
highlightAdjacentNodes();
|
||||
});
|
||||
]]></script>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.9 KiB |
@@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: test Pages: 1 -->
|
||||
<svg width="135pt" height="138pt"
|
||||
viewBox="0.00 0.00 135.25 138.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 134.25)">
|
||||
<title>test</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Self-test implementations.">
|
||||
<polygon fill="#999999" stroke="#666666" points="32.5,-74.25 0,-74.25 0,-55 32.5,-55 32.5,-74.25"/>
|
||||
<text text-anchor="middle" x="16.25" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/begin.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="127.25,-130.25 68.5,-130.25 68.5,-111 127.25,-111 127.25,-130.25"/>
|
||||
<text text-anchor="middle" x="97.88" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::begin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M30.12,-74.57C40.37,-82.4 55.17,-93.47 68.5,-102.62 69.34,-103.2 70.2,-103.79 71.07,-104.37"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="68.98,-107.19 79.27,-109.72 72.81,-101.32 68.98,-107.19"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/copy.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="126.12,-93.25 69.62,-93.25 69.62,-74 126.12,-74 126.12,-93.25"/>
|
||||
<text text-anchor="middle" x="97.88" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::copy</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.98,-68.38C40.25,-70.11 49.23,-72.26 58.14,-74.38"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="57.23,-77.76 67.77,-76.68 58.86,-70.96 57.23,-77.76"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/end.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="123.5,-56.25 72.25,-56.25 72.25,-37 123.5,-37 123.5,-56.25"/>
|
||||
<text text-anchor="middle" x="97.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::end</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.98,-61.07C40.93,-59.27 50.93,-57.01 60.64,-54.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.31,-58.25 70.3,-52.63 59.77,-51.42 61.31,-58.25"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="124.62,-19.25 71.12,-19.25 71.12,0 124.62,0 124.62,-19.25"/>
|
||||
<text text-anchor="middle" x="97.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node5 -->
|
||||
<g id="edge4_Node000001_Node000005" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M30.58,-54.66C40.84,-47.09 55.42,-36.49 68.5,-27.62 69.35,-27.05 70.21,-26.47 71.08,-25.89"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="72.81,-28.94 79.29,-20.56 69,-23.07 72.81,-28.94"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.1 KiB |
@@ -1,13 +1,15 @@
|
||||
<map id="dynamic_programming/catalan_numbers.cpp" name="dynamic_programming/catalan_numbers.cpp">
|
||||
<area shape="rect" id="Node000001" title="Provides utilities to compute Catalan numbers using dynamic programming. A Catalan numbers satisfy th..." alt="" coords="132,5,284,46"/>
|
||||
<area shape="rect" id="Node000001" title="Provides utilities to compute Catalan numbers using dynamic programming. A Catalan numbers satisfy th..." alt="" coords="177,5,330,46"/>
|
||||
<area shape="rect" id="Node000002" title=" " alt="" coords="5,94,70,120"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="167,49,79,90,76,85,164,44"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="200,49,85,91,83,86,199,44"/>
|
||||
<area shape="rect" id="Node000003" title=" " alt="" coords="94,94,154,120"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="189,48,150,85,146,81,186,44"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="223,49,158,88,155,83,220,44"/>
|
||||
<area shape="rect" id="Node000004" title=" " alt="" coords="178,94,238,120"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="211,46,211,78,206,78,206,46"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="262,94,330,120"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="232,44,273,81,269,85,228,48"/>
|
||||
<area shape="rect" id="Node000006" title=" " alt="" coords="354,94,412,120"/>
|
||||
<area shape="poly" id="edge5_Node000001_Node000006" title=" " alt="" coords="253,44,343,85,341,90,251,49"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="245,48,225,82,220,79,240,45"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="262,94,339,120"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="267,45,287,79,283,82,263,48"/>
|
||||
<area shape="rect" id="Node000006" title=" " alt="" coords="362,94,430,120"/>
|
||||
<area shape="poly" id="edge5_Node000001_Node000006" title=" " alt="" coords="290,44,362,84,360,88,288,49"/>
|
||||
<area shape="rect" id="Node000007" title=" " alt="" coords="454,94,512,120"/>
|
||||
<area shape="poly" id="edge6_Node000001_Node000007" title=" " alt="" coords="312,44,440,88,439,93,310,49"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
22dc578df950d01f98750a5fa846aa7c
|
||||
7359691ff377a52b33b24cf28c02dfab
|
||||
@@ -4,8 +4,8 @@
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/catalan_numbers.cpp Pages: 1 -->
|
||||
<svg width="313pt" height="94pt"
|
||||
viewBox="0.00 0.00 312.62 93.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="388pt" height="94pt"
|
||||
viewBox="0.00 0.00 387.62 93.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Provides utilities to compute Catalan numbers using dynamic programming. A Catalan numbers satisfy th...">
|
||||
<polygon fill="#999999" stroke="#666666" points="209.25,-85.75 95,-85.75 95,-55.25 209.25,-55.25 209.25,-85.75"/>
|
||||
<text text-anchor="start" x="103" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="152.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/catalan_numbers.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="243.25,-85.75 129,-85.75 129,-55.25 243.25,-55.25 243.25,-85.75"/>
|
||||
<text text-anchor="start" x="137" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="186.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/catalan_numbers.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -42,8 +42,8 @@
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M120.16,-54.8C99.91,-45.48 73.91,-33.52 54.07,-24.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="55.68,-21.29 45.13,-20.29 52.75,-27.65 55.68,-21.29"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M145.66,-54.8C119.05,-45.12 84.57,-32.59 59.14,-23.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="60.51,-20.12 49.92,-20 58.12,-26.7 60.51,-20.12"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -60,8 +60,8 @@
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M136.55,-54.95C127.61,-46.59 116.33,-36.05 107.02,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="109.64,-25.01 99.94,-20.73 104.86,-30.12 109.64,-25.01"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M162.15,-54.95C147.38,-45.98 128.49,-34.52 113.63,-25.5"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="115.74,-22.68 105.37,-20.49 112.11,-28.67 115.74,-22.68"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -78,8 +78,8 @@
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M152.12,-54.95C152.12,-47.71 152.12,-38.84 152.12,-30.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="155.63,-31.21 152.13,-21.21 148.63,-31.21 155.63,-31.21"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M177.72,-54.95C173.29,-47.28 167.8,-37.77 163.05,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="166.16,-27.92 158.12,-21.01 160.09,-31.42 166.16,-27.92"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -87,8 +87,8 @@
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="243.38,-19.25 192.88,-19.25 192.88,0 243.38,0 243.38,-19.25"/>
|
||||
<text text-anchor="middle" x="218.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">numeric</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="250.12,-19.25 192.12,-19.25 192.12,0 250.12,0 250.12,-19.25"/>
|
||||
<text text-anchor="middle" x="221.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">functional</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -96,8 +96,8 @@
|
||||
<g id="edge4_Node000001_Node000005" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M168.44,-54.95C177.81,-46.59 189.62,-36.05 199.38,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="201.69,-29.98 206.82,-20.71 197.03,-24.75 201.69,-29.98"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M194.78,-54.95C199.34,-47.28 204.99,-37.77 209.88,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="212.85,-31.39 214.96,-21 206.84,-27.81 212.85,-31.39"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -105,8 +105,8 @@
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="304.62,-19.25 261.62,-19.25 261.62,0 304.62,0 304.62,-19.25"/>
|
||||
<text text-anchor="middle" x="283.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="318.38,-19.25 267.88,-19.25 267.88,0 318.38,0 318.38,-19.25"/>
|
||||
<text text-anchor="middle" x="293.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">numeric</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -114,8 +114,26 @@
|
||||
<g id="edge5_Node000001_Node000006" class="edge">
|
||||
<title>Node1->Node6</title>
|
||||
<g id="a_edge5_Node000001_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M184.84,-54.8C205.66,-45.44 232.42,-33.41 252.76,-24.27"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="253.97,-27.57 261.65,-20.27 251.1,-21.18 253.97,-27.57"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M212.85,-54.8C229.3,-45.74 250.3,-34.19 266.7,-25.16"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="268.32,-28.27 275.39,-20.38 264.94,-22.14 268.32,-28.27"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="379.62,-19.25 336.62,-19.25 336.62,0 379.62,0 379.62,-19.25"/>
|
||||
<text text-anchor="middle" x="358.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node7 -->
|
||||
<g id="edge6_Node000001_Node000007" class="edge">
|
||||
<title>Node1->Node7</title>
|
||||
<g id="a_edge6_Node000001_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M229.08,-54.8C258.99,-44.56 298.26,-31.12 325.59,-21.76"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="326.39,-25.19 334.72,-18.64 324.12,-18.56 326.39,-25.19"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 6.2 KiB |
@@ -4,17 +4,17 @@
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/catalan_numbers.cpp Pages: 1 -->
|
||||
<svg width="313pt" height="94pt"
|
||||
viewBox="0.00 0.00 312.62 93.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="388pt" height="94pt"
|
||||
viewBox="0.00 0.00 387.62 93.75" 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.75)">
|
||||
<title>dynamic_programming/catalan_numbers.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Provides utilities to compute Catalan numbers using dynamic programming. A Catalan numbers satisfy th...">
|
||||
<polygon fill="#999999" stroke="#666666" points="209.25,-85.75 95,-85.75 95,-55.25 209.25,-55.25 209.25,-85.75"/>
|
||||
<text text-anchor="start" x="103" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="152.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/catalan_numbers.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="243.25,-85.75 129,-85.75 129,-55.25 243.25,-55.25 243.25,-85.75"/>
|
||||
<text text-anchor="start" x="137" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="186.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/catalan_numbers.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -31,8 +31,8 @@
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M120.16,-54.8C99.91,-45.48 73.91,-33.52 54.07,-24.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="55.68,-21.29 45.13,-20.29 52.75,-27.65 55.68,-21.29"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M145.66,-54.8C119.05,-45.12 84.57,-32.59 59.14,-23.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="60.51,-20.12 49.92,-20 58.12,-26.7 60.51,-20.12"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -49,8 +49,8 @@
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M136.55,-54.95C127.61,-46.59 116.33,-36.05 107.02,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="109.64,-25.01 99.94,-20.73 104.86,-30.12 109.64,-25.01"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M162.15,-54.95C147.38,-45.98 128.49,-34.52 113.63,-25.5"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="115.74,-22.68 105.37,-20.49 112.11,-28.67 115.74,-22.68"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -67,8 +67,8 @@
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M152.12,-54.95C152.12,-47.71 152.12,-38.84 152.12,-30.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="155.63,-31.21 152.13,-21.21 148.63,-31.21 155.63,-31.21"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M177.72,-54.95C173.29,-47.28 167.8,-37.77 163.05,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="166.16,-27.92 158.12,-21.01 160.09,-31.42 166.16,-27.92"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -76,8 +76,8 @@
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="243.38,-19.25 192.88,-19.25 192.88,0 243.38,0 243.38,-19.25"/>
|
||||
<text text-anchor="middle" x="218.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">numeric</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="250.12,-19.25 192.12,-19.25 192.12,0 250.12,0 250.12,-19.25"/>
|
||||
<text text-anchor="middle" x="221.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">functional</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -85,8 +85,8 @@
|
||||
<g id="edge4_Node000001_Node000005" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M168.44,-54.95C177.81,-46.59 189.62,-36.05 199.38,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="201.69,-29.98 206.82,-20.71 197.03,-24.75 201.69,-29.98"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M194.78,-54.95C199.34,-47.28 204.99,-37.77 209.88,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="212.85,-31.39 214.96,-21 206.84,-27.81 212.85,-31.39"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -94,8 +94,8 @@
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="304.62,-19.25 261.62,-19.25 261.62,0 304.62,0 304.62,-19.25"/>
|
||||
<text text-anchor="middle" x="283.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="318.38,-19.25 267.88,-19.25 267.88,0 318.38,0 318.38,-19.25"/>
|
||||
<text text-anchor="middle" x="293.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">numeric</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -103,8 +103,26 @@
|
||||
<g id="edge5_Node000001_Node000006" class="edge">
|
||||
<title>Node1->Node6</title>
|
||||
<g id="a_edge5_Node000001_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M184.84,-54.8C205.66,-45.44 232.42,-33.41 252.76,-24.27"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="253.97,-27.57 261.65,-20.27 251.1,-21.18 253.97,-27.57"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M212.85,-54.8C229.3,-45.74 250.3,-34.19 266.7,-25.16"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="268.32,-28.27 275.39,-20.38 264.94,-22.14 268.32,-28.27"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="379.62,-19.25 336.62,-19.25 336.62,0 379.62,0 379.62,-19.25"/>
|
||||
<text text-anchor="middle" x="358.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node7 -->
|
||||
<g id="edge6_Node000001_Node000007" class="edge">
|
||||
<title>Node1->Node7</title>
|
||||
<g id="a_edge6_Node000001_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M229.08,-54.8C258.99,-44.56 298.26,-31.12 325.59,-21.76"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="326.39,-25.19 334.72,-18.64 324.12,-18.56 326.39,-25.19"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 5.5 KiB |
@@ -1,361 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<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.12.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: dynamic_programming/subset_sum.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<script type="text/javascript" src="../../clipboard.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../cookie.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(1); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search',true);
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d6/d80/dynamic__programming_2subset__sum_8cpp.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">subset_sum.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Implements [Sub-set sum problem] (<a href="https://en.wikipedia.org/wiki/Subset_sum_problem">https://en.wikipedia.org/wiki/Subset_sum_problem</a>) algorithm, which tells whether a subset with target sum exists or not.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <cassert></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <unordered_map></code><br />
|
||||
<code>#include <vector></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for subset_sum.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../dc/d53/dynamic__programming_2subset__sum_8cpp__incl.svg" width="387" height="126"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</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:"><td class="memItemLeft" align="right" valign="top">namespace  </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"> </td><td class="mdescRight">Dynamic Programming algorithms. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d3a/namespacesubset__sum.html">subset_sum</a></td></tr>
|
||||
<tr class="memdesc:dc/d3a/namespacesubset__sum"><td class="mdescLeft"> </td><td class="mdescRight">Functions for [Sub-set sum problem] (<a href="https://en.wikipedia.org/wiki/Subset_sum_problem">https://en.wikipedia.org/wiki/Subset_sum_problem</a>) algorithm. <br /></td></tr>
|
||||
<tr class="separator:"><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:a280fcfb2f6fe49a31c4da572e7032607" id="r_a280fcfb2f6fe49a31c4da572e7032607"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#a280fcfb2f6fe49a31c4da572e7032607">dynamic_programming::subset_sum::subset_sum_recursion</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > &arr, int targetSum, <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/unordered_map.html">std::unordered_map</a>< int, bool > > *dp, int index=0)</td></tr>
|
||||
<tr class="separator:a280fcfb2f6fe49a31c4da572e7032607"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac94e6c0dee11278ac0a5491f1b9a4a50" id="r_ac94e6c0dee11278ac0a5491f1b9a4a50"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac94e6c0dee11278ac0a5491f1b9a4a50">dynamic_programming::subset_sum::subset_sum_problem</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > &arr, const int targetSum)</td></tr>
|
||||
<tr class="separator:ac94e6c0dee11278ac0a5491f1b9a4a50"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa8dca7b867074164d5f45b0f3851269d" id="r_aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
|
||||
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft"> </td><td class="mdescRight">Test Function. <br /></td></tr>
|
||||
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4" id="r_ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</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>Implements [Sub-set sum problem] (<a href="https://en.wikipedia.org/wiki/Subset_sum_problem">https://en.wikipedia.org/wiki/Subset_sum_problem</a>) algorithm, which tells whether a subset with target sum exists or not. </p>
|
||||
<p>In this problem, we use dynamic programming to find if we can pull out a subset from an array whose sum is equal to a given target sum. The overall time complexity of the problem is O(n * targetSum) where n is the size of the array. For example, array = [1, -10, 2, 31, -6], targetSum = -14. Output: true => We can pick subset [-10, 2, -6] with sum as (-10) + 2 + (-6) = -14. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/KillerAV" target="_blank">KillerAV</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>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int main </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void</td> <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Main function. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 120</span> {</div>
|
||||
<div class="line"><span class="lineno"> 121</span> <a class="code hl_function" href="../../d0/dfe/backtracking_2subset__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// execute the test</span></div>
|
||||
<div class="line"><span class="lineno"> 122</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 123</span>}</div>
|
||||
<div class="ttc" id="abacktracking_2subset__sum_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../d0/dfe/backtracking_2subset__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Test implementations.</div><div class="ttdef"><b>Definition</b> subset_sum.cpp:58</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d80/dynamic__programming_2subset__sum_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="271" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac94e6c0dee11278ac0a5491f1b9a4a50" name="ac94e6c0dee11278ac0a5491f1b9a4a50"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac94e6c0dee11278ac0a5491f1b9a4a50">◆ </a></span>subset_sum_problem()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">bool dynamic_programming::subset_sum::subset_sum_problem </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > &</td> <td class="paramname"><span class="paramname"><em>arr</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const int</td> <td class="paramname"><span class="paramname"><em>targetSum</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Function implementing subset sum algorithm using top-down approach </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">arr</td><td>input array </td></tr>
|
||||
<tr><td class="paramname">targetSum</td><td>the target sum of the subset </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>true/false based on if the target sum subset exists or not. </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 70</span> {</div>
|
||||
<div class="line"><span class="lineno"> 71</span> <span class="keywordtype">size_t</span> n = arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>();</div>
|
||||
<div class="line"><span class="lineno"> 72</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::unordered_map<int, bool></a>> <a class="code hl_namespace" href="../../df/d88/namespacedp.html">dp</a>(n);</div>
|
||||
<div class="line"><span class="lineno"> 73</span> <span class="keywordflow">return</span> <a class="code hl_function" href="#a280fcfb2f6fe49a31c4da572e7032607">subset_sum_recursion</a>(arr, targetSum, &<a class="code hl_namespace" href="../../df/d88/namespacedp.html">dp</a>);</div>
|
||||
<div class="line"><span class="lineno"> 74</span>}</div>
|
||||
<div class="ttc" id="adynamic__programming_2subset__sum_8cpp_html_a280fcfb2f6fe49a31c4da572e7032607"><div class="ttname"><a href="#a280fcfb2f6fe49a31c4da572e7032607">dynamic_programming::subset_sum::subset_sum_recursion</a></div><div class="ttdeci">bool subset_sum_recursion(const std::vector< int > &arr, int targetSum, std::vector< std::unordered_map< int, bool > > *dp, int index=0)</div><div class="ttdef"><b>Definition</b> subset_sum.cpp:43</div></div>
|
||||
<div class="ttc" id="anamespacedp_html"><div class="ttname"><a href="../../df/d88/namespacedp.html">dp</a></div><div class="ttdoc">for std::vector</div><div class="ttdef"><b>Definition</b> partition_problem.cpp:39</div></div>
|
||||
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(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">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d80/dynamic__programming_2subset__sum_8cpp_ac94e6c0dee11278ac0a5491f1b9a4a50_cgraph.svg" width="527" height="135"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a280fcfb2f6fe49a31c4da572e7032607" name="a280fcfb2f6fe49a31c4da572e7032607"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a280fcfb2f6fe49a31c4da572e7032607">◆ </a></span>subset_sum_recursion()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">bool dynamic_programming::subset_sum::subset_sum_recursion </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > &</td> <td class="paramname"><span class="paramname"><em>arr</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>targetSum</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><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/unordered_map.html">std::unordered_map</a>< int, bool > > *</td> <td class="paramname"><span class="paramname"><em>dp</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>index</em></span><span class="paramdefsep"> = </span><span class="paramdefval">0</span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Recursive function using dynamic programming to find if the required sum subset exists or not. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">arr</td><td>input array </td></tr>
|
||||
<tr><td class="paramname">targetSum</td><td>the target sum of the subset </td></tr>
|
||||
<tr><td class="paramname">dp</td><td>the map storing the results </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>true/false based on if the target sum subset exists or not. </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 45</span> {</div>
|
||||
<div class="line"><span class="lineno"> 46</span> <span class="keywordflow">if</span> (targetSum == 0) { <span class="comment">// Found a valid subset with required sum.</span></div>
|
||||
<div class="line"><span class="lineno"> 47</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 48</span> }</div>
|
||||
<div class="line"><span class="lineno"> 49</span> <span class="keywordflow">if</span> (index == arr.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>()) { <span class="comment">// End of array</span></div>
|
||||
<div class="line"><span class="lineno"> 50</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 51</span> }</div>
|
||||
<div class="line"><span class="lineno"> 52</span> </div>
|
||||
<div class="line"><span class="lineno"> 53</span> <span class="keywordflow">if</span> ((*<a class="code hl_namespace" href="../../df/d88/namespacedp.html">dp</a>)[index].count(targetSum)) { <span class="comment">// Answer already present in map</span></div>
|
||||
<div class="line"><span class="lineno"> 54</span> <span class="keywordflow">return</span> (*<a class="code hl_namespace" href="../../df/d88/namespacedp.html">dp</a>)[index][targetSum];</div>
|
||||
<div class="line"><span class="lineno"> 55</span> }</div>
|
||||
<div class="line"><span class="lineno"> 56</span> </div>
|
||||
<div class="line"><span class="lineno"> 57</span> <span class="keywordtype">bool</span> ans =</div>
|
||||
<div class="line"><span class="lineno"> 58</span> <a class="code hl_function" href="#a280fcfb2f6fe49a31c4da572e7032607">subset_sum_recursion</a>(arr, targetSum - arr[index], <a class="code hl_namespace" href="../../df/d88/namespacedp.html">dp</a>, index + 1) ||</div>
|
||||
<div class="line"><span class="lineno"> 59</span> <a class="code hl_function" href="#a280fcfb2f6fe49a31c4da572e7032607">subset_sum_recursion</a>(arr, targetSum, <a class="code hl_namespace" href="../../df/d88/namespacedp.html">dp</a>, index + 1);</div>
|
||||
<div class="line"><span class="lineno"> 60</span> (*dp)[index][targetSum] = ans; <span class="comment">// Save ans in dp map.</span></div>
|
||||
<div class="line"><span class="lineno"> 61</span> <span class="keywordflow">return</span> ans;</div>
|
||||
<div class="line"><span class="lineno"> 62</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d80/dynamic__programming_2subset__sum_8cpp_a280fcfb2f6fe49a31c4da572e7032607_cgraph.svg" width="327" height="91"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa8dca7b867074164d5f45b0f3851269d">◆ </a></span>test()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static void test </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Test Function. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 82</span> {</div>
|
||||
<div class="line"><span class="lineno"> 83</span> <span class="comment">// custom input vector</span></div>
|
||||
<div class="line"><span class="lineno"> 84</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<int></a>> custom_input_arr(3);</div>
|
||||
<div class="line"><span class="lineno"> 85</span> custom_input_arr[0] = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a>{1, -10, 2, 31, -6};</div>
|
||||
<div class="line"><span class="lineno"> 86</span> custom_input_arr[1] = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a>{2, 3, 4};</div>
|
||||
<div class="line"><span class="lineno"> 87</span> custom_input_arr[2] = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a>{0, 1, 0, 1, 0};</div>
|
||||
<div class="line"><span class="lineno"> 88</span> </div>
|
||||
<div class="line"><span class="lineno"> 89</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> custom_input_target_sum(3);</div>
|
||||
<div class="line"><span class="lineno"> 90</span> custom_input_target_sum[0] = -14;</div>
|
||||
<div class="line"><span class="lineno"> 91</span> custom_input_target_sum[1] = 10;</div>
|
||||
<div class="line"><span class="lineno"> 92</span> custom_input_target_sum[2] = 2;</div>
|
||||
<div class="line"><span class="lineno"> 93</span> </div>
|
||||
<div class="line"><span class="lineno"> 94</span> <span class="comment">// calculated output vector by pal_part Function</span></div>
|
||||
<div class="line"><span class="lineno"> 95</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> calculated_output(3);</div>
|
||||
<div class="line"><span class="lineno"> 96</span> </div>
|
||||
<div class="line"><span class="lineno"> 97</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < 3; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 98</span> calculated_output[i] =</div>
|
||||
<div class="line"><span class="lineno"> 99</span> <a class="code hl_function" href="#ac94e6c0dee11278ac0a5491f1b9a4a50">dynamic_programming::subset_sum::subset_sum_problem</a>(</div>
|
||||
<div class="line"><span class="lineno"> 100</span> custom_input_arr[i], custom_input_target_sum[i]);</div>
|
||||
<div class="line"><span class="lineno"> 101</span> }</div>
|
||||
<div class="line"><span class="lineno"> 102</span> </div>
|
||||
<div class="line"><span class="lineno"> 103</span> <span class="comment">// expected output vector</span></div>
|
||||
<div class="line"><span class="lineno"> 104</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a> expected_output{<span class="keyword">true</span>, <span class="keyword">false</span>, <span class="keyword">true</span>};</div>
|
||||
<div class="line"><span class="lineno"> 105</span> </div>
|
||||
<div class="line"><span class="lineno"> 106</span> <span class="comment">// Testing implementation via assert function</span></div>
|
||||
<div class="line"><span class="lineno"> 107</span> <span class="comment">// It will throw error if any of the expected test fails</span></div>
|
||||
<div class="line"><span class="lineno"> 108</span> <span class="comment">// Else it will give nothing</span></div>
|
||||
<div class="line"><span class="lineno"> 109</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < 3; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 110</span> assert(expected_output[i] == calculated_output[i]);</div>
|
||||
<div class="line"><span class="lineno"> 111</span> }</div>
|
||||
<div class="line"><span class="lineno"> 112</span> </div>
|
||||
<div class="line"><span class="lineno"> 113</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"All tests passed successfully!\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 114</span>}</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="adynamic__programming_2subset__sum_8cpp_html_ac94e6c0dee11278ac0a5491f1b9a4a50"><div class="ttname"><a href="#ac94e6c0dee11278ac0a5491f1b9a4a50">dynamic_programming::subset_sum::subset_sum_problem</a></div><div class="ttdeci">bool subset_sum_problem(const std::vector< int > &arr, const int targetSum)</div><div class="ttdef"><b>Definition</b> subset_sum.cpp:70</div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</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="../../dir_8a20dd5bfd5341a725342bf72b6b686f.html">dynamic_programming</a></li><li class="navelem"><a class="el" href="../../d6/d80/dynamic__programming_2subset__sum_8cpp.html">subset_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.12.0 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +0,0 @@
|
||||
var dynamic__programming_2subset__sum_8cpp =
|
||||
[
|
||||
[ "main", "d6/d80/dynamic__programming_2subset__sum_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "subset_sum_problem", "d6/d80/dynamic__programming_2subset__sum_8cpp.html#ac94e6c0dee11278ac0a5491f1b9a4a50", null ],
|
||||
[ "subset_sum_recursion", "d6/d80/dynamic__programming_2subset__sum_8cpp.html#a280fcfb2f6fe49a31c4da572e7032607", null ],
|
||||
[ "test", "d6/d80/dynamic__programming_2subset__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]
|
||||
];
|
||||
@@ -1,6 +0,0 @@
|
||||
<map id="dynamic_programming::subset_sum::subset_sum_recursion" name="dynamic_programming::subset_sum::subset_sum_recursion">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,29,158,85"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000001" title=" " alt="" coords="45,29,46,19,52,10,64,5,82,3,101,5,113,12,110,17,99,10,81,8,66,10,56,14,51,21,51,29"/>
|
||||
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="206,44,321,70"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="158,54,190,54,190,60,158,60"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
5397729e96e04f8af03e081b7077d247
|
||||
@@ -1,76 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming::subset_sum::subset_sum_recursion Pages: 1 -->
|
||||
<svg width="245pt" height="68pt"
|
||||
viewBox="0.00 0.00 244.75 67.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
|
||||
<style type="text/css"><![CDATA[
|
||||
.node, .edge {opacity: 0.7;}
|
||||
.node.selected, .edge.selected {opacity: 1;}
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 63.75)">
|
||||
<title>dynamic_programming::subset_sum::subset_sum_recursion</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="114.25,-41.75 0,-41.75 0,0 114.25,0 114.25,-41.75"/>
|
||||
<text text-anchor="start" x="8" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">::subset_sum::subset</text>
|
||||
<text text-anchor="middle" x="57.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">_sum_recursion</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node1 -->
|
||||
<g id="edge2_Node000001_Node000001" class="edge">
|
||||
<title>Node1->Node1</title>
|
||||
<g id="a_edge2_Node000001_Node000001"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M31.95,-42.07C29.56,-51.55 37.95,-59.75 57.12,-59.75 68.21,-59.75 75.69,-57.01 79.57,-52.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="82.87,-54.09 81.93,-43.54 76.08,-52.37 82.87,-54.09"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="236.75,-30.5 150.25,-30.5 150.25,-11.25 236.75,-11.25 236.75,-30.5"/>
|
||||
<text text-anchor="middle" x="193.5" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M114.72,-20.88C122.63,-20.88 130.73,-20.88 138.58,-20.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="138.34,-24.38 148.34,-20.88 138.34,-17.38 138.34,-24.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
<style type='text/css'>
|
||||
<![CDATA[
|
||||
[data-mouse-over-selected='false'] { opacity: 0.7; }
|
||||
[data-mouse-over-selected='true'] { opacity: 1.0; }
|
||||
]]>
|
||||
</style>
|
||||
<script type="application/ecmascript"><![CDATA[
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
highlightEdges();
|
||||
highlightAdjacentNodes();
|
||||
});
|
||||
]]></script>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming::subset_sum::subset_sum_recursion Pages: 1 -->
|
||||
<svg width="245pt" height="68pt"
|
||||
viewBox="0.00 0.00 244.75 67.75" 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 63.75)">
|
||||
<title>dynamic_programming::subset_sum::subset_sum_recursion</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="114.25,-41.75 0,-41.75 0,0 114.25,0 114.25,-41.75"/>
|
||||
<text text-anchor="start" x="8" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">::subset_sum::subset</text>
|
||||
<text text-anchor="middle" x="57.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">_sum_recursion</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node1 -->
|
||||
<g id="edge2_Node000001_Node000001" class="edge">
|
||||
<title>Node1->Node1</title>
|
||||
<g id="a_edge2_Node000001_Node000001"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M31.95,-42.07C29.56,-51.55 37.95,-59.75 57.12,-59.75 68.21,-59.75 75.69,-57.01 79.57,-52.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="82.87,-54.09 81.93,-43.54 76.08,-52.37 82.87,-54.09"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="236.75,-30.5 150.25,-30.5 150.25,-11.25 236.75,-11.25 236.75,-30.5"/>
|
||||
<text text-anchor="middle" x="193.5" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M114.72,-20.88C122.63,-20.88 130.73,-20.88 138.58,-20.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="138.34,-24.38 148.34,-20.88 138.34,-17.38 138.34,-24.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
@@ -1,10 +0,0 @@
|
||||
<map id="dynamic_programming::subset_sum::subset_sum_problem" name="dynamic_programming::subset_sum::subset_sum_problem">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,29,158,85"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000001" title=" " alt="" coords="42,29,42,19,50,10,63,5,82,3,103,5,116,12,113,17,101,10,81,8,64,10,53,15,47,21,47,29"/>
|
||||
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="406,44,521,70"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="158,40,205,35,282,30,358,35,391,39,391,44,358,40,282,35,206,40,158,46"/>
|
||||
<area shape="rect" id="Node000003" href="$d6/d80/dynamic__programming_2subset__sum_8cpp.html#a280fcfb2f6fe49a31c4da572e7032607" title=" " alt="" coords="206,73,358,129"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000003" title=" " alt="" coords="159,71,191,79,190,84,158,77"/>
|
||||
<area shape="poly" id="edge4_Node000003_Node000002" title=" " alt="" coords="358,80,392,72,393,77,359,85"/>
|
||||
<area shape="poly" id="edge5_Node000003_Node000003" title=" " alt="" coords="246,73,246,63,253,54,265,49,282,47,301,49,313,56,310,61,300,54,282,52,266,54,256,58,251,65,251,73"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
070e9da9f48977b37a41f9f6d658adc6
|
||||
@@ -1,114 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming::subset_sum::subset_sum_problem Pages: 1 -->
|
||||
<svg width="395pt" height="101pt"
|
||||
viewBox="0.00 0.00 395.00 100.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
|
||||
<style type="text/css"><![CDATA[
|
||||
.node, .edge {opacity: 0.7;}
|
||||
.node.selected, .edge.selected {opacity: 1;}
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 96.75)">
|
||||
<title>dynamic_programming::subset_sum::subset_sum_problem</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="114.25,-74.75 0,-74.75 0,-33 114.25,-33 114.25,-74.75"/>
|
||||
<text text-anchor="start" x="8" y="-61.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="start" x="8" y="-50" font-family="Helvetica,sans-Serif" font-size="10.00">::subset_sum::subset</text>
|
||||
<text text-anchor="middle" x="57.12" y="-38.75" font-family="Helvetica,sans-Serif" font-size="10.00">_sum_problem</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node1 -->
|
||||
<g id="edge2_Node000001_Node000001" class="edge">
|
||||
<title>Node1->Node1</title>
|
||||
<g id="a_edge2_Node000001_Node000001"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M29.39,-75.07C26.75,-84.55 36,-92.75 57.12,-92.75 69.34,-92.75 77.58,-90.01 81.85,-85.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="85.14,-87.1 84.45,-76.53 78.4,-85.22 85.14,-87.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="387,-63.5 300.5,-63.5 300.5,-44.25 387,-44.25 387,-63.5"/>
|
||||
<text text-anchor="middle" x="343.75" y="-50" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M114.46,-64.53C126.25,-66.34 138.62,-67.93 150.25,-68.88 200.86,-72.97 213.95,-73.68 264.5,-68.88 272.55,-68.11 281,-66.91 289.25,-65.52"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="289.61,-69.01 298.83,-63.79 288.37,-62.12 289.61,-69.01"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:href="../../d6/d80/dynamic__programming_2subset__sum_8cpp.html#a280fcfb2f6fe49a31c4da572e7032607" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="264.5,-41.75 150.25,-41.75 150.25,0 264.5,0 264.5,-41.75"/>
|
||||
<text text-anchor="start" x="158.25" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="start" x="158.25" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">::subset_sum::subset</text>
|
||||
<text text-anchor="middle" x="207.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">_sum_recursion</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge3_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge3_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M114.59,-41.3C122.58,-39.53 130.86,-37.68 139.03,-35.87"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="139.58,-39.33 148.58,-33.74 138.06,-32.5 139.58,-39.33"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node2 -->
|
||||
<g id="edge4_Node000003_Node000002" class="edge">
|
||||
<title>Node3->Node2</title>
|
||||
<g id="a_edge4_Node000003_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M264.97,-34.77C273.45,-36.86 282.17,-39 290.55,-41.06"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="289.71,-44.45 300.26,-43.44 291.38,-37.66 289.71,-44.45"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node3 -->
|
||||
<g id="edge5_Node000003_Node000003" class="edge">
|
||||
<title>Node3->Node3</title>
|
||||
<g id="a_edge5_Node000003_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M182.2,-42.07C179.81,-51.55 188.2,-59.75 207.38,-59.75 218.46,-59.75 225.94,-57.01 229.82,-52.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="233.12,-54.09 232.18,-43.54 226.33,-52.37 233.12,-54.09"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
<style type='text/css'>
|
||||
<![CDATA[
|
||||
[data-mouse-over-selected='false'] { opacity: 0.7; }
|
||||
[data-mouse-over-selected='true'] { opacity: 1.0; }
|
||||
]]>
|
||||
</style>
|
||||
<script type="application/ecmascript"><![CDATA[
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
highlightEdges();
|
||||
highlightAdjacentNodes();
|
||||
});
|
||||
]]></script>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 5.1 KiB |
@@ -1,88 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming::subset_sum::subset_sum_problem Pages: 1 -->
|
||||
<svg width="395pt" height="101pt"
|
||||
viewBox="0.00 0.00 395.00 100.75" 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 96.75)">
|
||||
<title>dynamic_programming::subset_sum::subset_sum_problem</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="114.25,-74.75 0,-74.75 0,-33 114.25,-33 114.25,-74.75"/>
|
||||
<text text-anchor="start" x="8" y="-61.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="start" x="8" y="-50" font-family="Helvetica,sans-Serif" font-size="10.00">::subset_sum::subset</text>
|
||||
<text text-anchor="middle" x="57.12" y="-38.75" font-family="Helvetica,sans-Serif" font-size="10.00">_sum_problem</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node1 -->
|
||||
<g id="edge2_Node000001_Node000001" class="edge">
|
||||
<title>Node1->Node1</title>
|
||||
<g id="a_edge2_Node000001_Node000001"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M29.39,-75.07C26.75,-84.55 36,-92.75 57.12,-92.75 69.34,-92.75 77.58,-90.01 81.85,-85.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="85.14,-87.1 84.45,-76.53 78.4,-85.22 85.14,-87.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="387,-63.5 300.5,-63.5 300.5,-44.25 387,-44.25 387,-63.5"/>
|
||||
<text text-anchor="middle" x="343.75" y="-50" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M114.46,-64.53C126.25,-66.34 138.62,-67.93 150.25,-68.88 200.86,-72.97 213.95,-73.68 264.5,-68.88 272.55,-68.11 281,-66.91 289.25,-65.52"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="289.61,-69.01 298.83,-63.79 288.37,-62.12 289.61,-69.01"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:href="../../d6/d80/dynamic__programming_2subset__sum_8cpp.html#a280fcfb2f6fe49a31c4da572e7032607" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="264.5,-41.75 150.25,-41.75 150.25,0 264.5,0 264.5,-41.75"/>
|
||||
<text text-anchor="start" x="158.25" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="start" x="158.25" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">::subset_sum::subset</text>
|
||||
<text text-anchor="middle" x="207.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">_sum_recursion</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge3_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge3_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M114.59,-41.3C122.58,-39.53 130.86,-37.68 139.03,-35.87"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="139.58,-39.33 148.58,-33.74 138.06,-32.5 139.58,-39.33"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node2 -->
|
||||
<g id="edge4_Node000003_Node000002" class="edge">
|
||||
<title>Node3->Node2</title>
|
||||
<g id="a_edge4_Node000003_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M264.97,-34.77C273.45,-36.86 282.17,-39 290.55,-41.06"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="289.71,-44.45 300.26,-43.44 291.38,-37.66 289.71,-44.45"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node3 -->
|
||||
<g id="edge5_Node000003_Node000003" class="edge">
|
||||
<title>Node3->Node3</title>
|
||||
<g id="a_edge5_Node000003_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M182.2,-42.07C179.81,-51.55 188.2,-59.75 207.38,-59.75 218.46,-59.75 225.94,-57.01 229.82,-52.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="233.12,-54.09 232.18,-43.54 226.33,-52.37 233.12,-54.09"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.4 KiB |
@@ -1,7 +0,0 @@
|
||||
<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="$d0/dfe/backtracking_2subset__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Test implementations." alt="" coords="103,5,146,31"/>
|
||||
<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,178,16,178,21,146,21"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
01c94973a9e67ee0738ed591bd43bb2e
|
||||
@@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="203pt" height="27pt"
|
||||
viewBox="0.00 0.00 203.00 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
|
||||
<style type="text/css"><![CDATA[
|
||||
.node, .edge {opacity: 0.7;}
|
||||
.node.selected, .edge.selected {opacity: 1;}
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
|
||||
<title>main</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Main function.">
|
||||
<polygon fill="#999999" stroke="#666666" points="37,-19.25 0,-19.25 0,0 37,0 37,-19.25"/>
|
||||
<text text-anchor="middle" x="18.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d0/dfe/backtracking_2subset__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Test implementations.">
|
||||
<polygon fill="white" stroke="#666666" points="105.5,-19.25 73,-19.25 73,0 105.5,0 105.5,-19.25"/>
|
||||
<text text-anchor="middle" x="89.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<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>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="195,-19.25 141.5,-19.25 141.5,0 195,0 195,-19.25"/>
|
||||
<text text-anchor="middle" x="168.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<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>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
<style type='text/css'>
|
||||
<![CDATA[
|
||||
[data-mouse-over-selected='false'] { opacity: 0.7; }
|
||||
[data-mouse-over-selected='true'] { opacity: 1.0; }
|
||||
]]>
|
||||
</style>
|
||||
<script type="application/ecmascript"><![CDATA[
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
highlightEdges();
|
||||
highlightAdjacentNodes();
|
||||
});
|
||||
]]></script>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
@@ -1,57 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="203pt" height="27pt"
|
||||
viewBox="0.00 0.00 203.00 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
|
||||
<title>main</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Main function.">
|
||||
<polygon fill="#999999" stroke="#666666" points="37,-19.25 0,-19.25 0,0 37,0 37,-19.25"/>
|
||||
<text text-anchor="middle" x="18.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d0/dfe/backtracking_2subset__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Test implementations.">
|
||||
<polygon fill="white" stroke="#666666" points="105.5,-19.25 73,-19.25 73,0 105.5,0 105.5,-19.25"/>
|
||||
<text text-anchor="middle" x="89.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<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>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="195,-19.25 141.5,-19.25 141.5,0 195,0 195,-19.25"/>
|
||||
<text text-anchor="middle" x="168.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<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>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
@@ -235,8 +235,8 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 30</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 31</span> }</div>
|
||||
<div class="line"><span class="lineno"> 32</span> </div>
|
||||
<div class="line"><span class="lineno"> 33</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.num_digits();</div>
|
||||
<div class="line"><span class="lineno"> 34</span> <span class="keywordflow">for</span> (i = 0; i < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 33</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.num_digits();</div>
|
||||
<div class="line"><span class="lineno"> 34</span> <span class="keywordflow">for</span> (i = 0; i < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 35</span> <span class="keywordflow">if</span> (known_reslt[i] != <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.digit_char(i)) {</div>
|
||||
<div class="line"><span class="lineno"> 36</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cerr</a> << i << <span class="stringliteral">"^th digit mismatch! "</span> << known_reslt[i]</div>
|
||||
<div class="line"><span class="lineno"> 37</span> << <span class="stringliteral">" != "</span> << <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.digit_char(i) << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
@@ -247,7 +247,7 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 42</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Passed!"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 43</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 44</span>}</div>
|
||||
<div class="ttc" id="adata__structures_2sparse__table_8cpp_html_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><div class="ttname"><a href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a></div><div class="ttdeci">constexpr uint32_t N</div><div class="ttdoc">A struct to represent sparse table for min() as their invariant function, for the given array A....</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:48</div></div>
|
||||
<div class="ttc" id="asparse__table_8cpp_html_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><div class="ttname"><a href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a></div><div class="ttdeci">constexpr uint32_t N</div><div class="ttdoc">A struct to represent sparse table for min() as their invariant function, for the given array A....</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:48</div></div>
|
||||
<div class="ttc" id="astrlen_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/byte/strlen.html">std::strlen</a></div><div class="ttdeci">T strlen(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -294,8 +294,8 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 70</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 71</span> }</div>
|
||||
<div class="line"><span class="lineno"> 72</span> </div>
|
||||
<div class="line"><span class="lineno"> 73</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.num_digits();</div>
|
||||
<div class="line"><span class="lineno"> 74</span> <span class="keywordflow">for</span> (i = 0; i < <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 73</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.num_digits();</div>
|
||||
<div class="line"><span class="lineno"> 74</span> <span class="keywordflow">for</span> (i = 0; i < <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 75</span> <span class="keywordflow">if</span> (known_reslt[i] != <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.digit_char(i)) {</div>
|
||||
<div class="line"><span class="lineno"> 76</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cerr</a> << i << <span class="stringliteral">"^th digit mismatch! "</span> << known_reslt[i]</div>
|
||||
<div class="line"><span class="lineno"> 77</span> << <span class="stringliteral">" != "</span> << <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.digit_char(i) << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
|
||||