Documentation for 0d766b0f8a
@@ -206,7 +206,7 @@ Protected Member Functions</h2></td></tr>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 95</span> : <a class="code hl_class" href="../../da/d9a/class_graph.html">Graph</a>(undirected_edges.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() + 1, undirected_edges), <a class="code hl_variable" href="#ab22a97bf6209a085fc2d788c3c0dacbe">root</a>(root_) {</div>
|
||||
<div class="line"><span class="lineno"> 96</span> <a class="code hl_function" href="#ae6928f3ebd491541e9570e746b877c1e">populate_parents</a>();</div>
|
||||
<div class="line"><span class="lineno"> 97</span> }</div>
|
||||
<div class="ttc" id="aclass_graph_html"><div class="ttname"><a href="../../da/d9a/class_graph.html">Graph</a></div><div class="ttdef"><b>Definition</b> bellman_ford.cpp:13</div></div>
|
||||
<div class="ttc" id="aclass_graph_html"><div class="ttname"><a href="../../da/d9a/class_graph.html">Graph</a></div><div class="ttdef"><b>Definition</b> bellman_ford.cpp:14</div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_rooted_tree_html_ab22a97bf6209a085fc2d788c3c0dacbe"><div class="ttname"><a href="#ab22a97bf6209a085fc2d788c3c0dacbe">graph::RootedTree::root</a></div><div class="ttdeci">int root</div><div class="ttdoc">Index of the root vertex.</div><div class="ttdef"><b>Definition</b> lowest_common_ancestor.cpp:108</div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_rooted_tree_html_ae6928f3ebd491541e9570e746b877c1e"><div class="ttname"><a href="#ae6928f3ebd491541e9570e746b877c1e">graph::RootedTree::populate_parents</a></div><div class="ttdeci">void populate_parents()</div><div class="ttdoc">Calculate the parents for all the vertices in the tree. Implements the breadth first search algorithm...</div><div class="ttdef"><b>Definition</b> lowest_common_ancestor.cpp:117</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>
|
||||
|
||||
@@ -208,11 +208,11 @@ static constexpr uint8_t </td><td class="memItemRight" valign="bottom"><b>E
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 47</span> {</div>
|
||||
<div class="line"><span class="lineno"> 48</span> english.resize(ENGLISH_ALPHABET_SIZE, <span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><span class="lineno"> 49</span> endOfWord = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 50</span> frequency = 0;</div>
|
||||
<div class="line"><span class="lineno"> 51</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 50</span> {</div>
|
||||
<div class="line"><span class="lineno"> 51</span> english.resize(ENGLISH_ALPHABET_SIZE, <span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><span class="lineno"> 52</span> endOfWord = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 53</span> frequency = 0;</div>
|
||||
<div class="line"><span class="lineno"> 54</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -238,11 +238,11 @@ static constexpr uint8_t </td><td class="memItemRight" valign="bottom"><b>E
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 53</span> {</div>
|
||||
<div class="line"><span class="lineno"> 54</span> english = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>.english;</div>
|
||||
<div class="line"><span class="lineno"> 55</span> endOfWord = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>.endOfWord;</div>
|
||||
<div class="line"><span class="lineno"> 56</span> frequency = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>.frequency;</div>
|
||||
<div class="line"><span class="lineno"> 57</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 56</span> {</div>
|
||||
<div class="line"><span class="lineno"> 57</span> english = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>.english;</div>
|
||||
<div class="line"><span class="lineno"> 58</span> endOfWord = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>.endOfWord;</div>
|
||||
<div class="line"><span class="lineno"> 59</span> frequency = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>.frequency;</div>
|
||||
<div class="line"><span class="lineno"> 60</span> }</div>
|
||||
<div class="ttc" id="astructnode_html"><div class="ttname"><a href="../../d5/da1/structnode.html">node</a></div><div class="ttdef"><b>Definition</b> binary_search_tree.cpp:11</div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
@@ -269,14 +269,14 @@ static constexpr uint8_t </td><td class="memItemRight" valign="bottom"><b>E
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 90</span> {</div>
|
||||
<div class="line"><span class="lineno"> 91</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 92</span> <span class="keywordflow">for</span> (i = 0; i < ENGLISH_ALPHABET_SIZE; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 93</span> <span class="keywordflow">if</span> (english[i]) {</div>
|
||||
<div class="line"><span class="lineno"> 94</span> <span class="keyword">delete</span> english[i];</div>
|
||||
<div class="line"><span class="lineno"> 95</span> }</div>
|
||||
<div class="line"><span class="lineno"> 96</span> }</div>
|
||||
<div class="line"><span class="lineno"> 97</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 93</span> {</div>
|
||||
<div class="line"><span class="lineno"> 94</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 95</span> <span class="keywordflow">for</span> (i = 0; i < ENGLISH_ALPHABET_SIZE; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 96</span> <span class="keywordflow">if</span> (english[i]) {</div>
|
||||
<div class="line"><span class="lineno"> 97</span> <span class="keyword">delete</span> english[i];</div>
|
||||
<div class="line"><span class="lineno"> 98</span> }</div>
|
||||
<div class="line"><span class="lineno"> 99</span> }</div>
|
||||
<div class="line"><span class="lineno"> 100</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -303,69 +303,69 @@ static constexpr uint8_t </td><td class="memItemRight" valign="bottom"><b>E
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 150</span> {</div>
|
||||
<div class="line"><span class="lineno"> 151</span> Tnode *cur_pos = <span class="keyword">this</span>,</div>
|
||||
<div class="line"><span class="lineno"> 152</span> *delete_from = <span class="keyword">this</span>; <span class="comment">// Current pointer pointing to root</span></div>
|
||||
<div class="line"><span class="lineno"> 153</span> <span class="keywordtype">int</span> letter_index = 0, delete_from_index = 0, i = 0, n = entry.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>();</div>
|
||||
<div class="line"><span class="lineno"> 154</span> </div>
|
||||
<div class="line"><span class="lineno"> 155</span> <span class="keywordflow">for</span> (i = 0; i < n; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 156</span> <span class="comment">// To ignore case</span></div>
|
||||
<div class="line"><span class="lineno"> 157</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(entry[i]) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 158</span> </div>
|
||||
<div class="line"><span class="lineno"> 159</span> <span class="comment">// Display error message when given entry is not present in the tree</span></div>
|
||||
<div class="line"><span class="lineno"> 160</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 161</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">"Entry not Found"</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"> 162</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 163</span> }</div>
|
||||
<div class="line"><span class="lineno"> 164</span> <span class="comment">// If the current node is end of word for the current prefix or if it</span></div>
|
||||
<div class="line"><span class="lineno"> 165</span> <span class="comment">// has 2 or more branches It cannot be deleted while deleting the</span></div>
|
||||
<div class="line"><span class="lineno"> 166</span> <span class="comment">// required entry.</span></div>
|
||||
<div class="line"><span class="lineno"> 167</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="#afca808362c13273ca8c8ae7d58e8eee0">numberOfChildren</a>(cur_pos) > 1 || cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 168</span> delete_from = cur_pos; <span class="comment">// denotes the beginning of the shortest</span></div>
|
||||
<div class="line"><span class="lineno"> 169</span> <span class="comment">// suffix that is allowed to be deleted</span></div>
|
||||
<div class="line"><span class="lineno"> 170</span> delete_from_index = i - 1; <span class="comment">// Beginning index of the suffix</span></div>
|
||||
<div class="line"><span class="lineno"> 171</span> <span class="comment">// corresponding to the 'entry'</span></div>
|
||||
<div class="line"><span class="lineno"> 172</span> }</div>
|
||||
<div class="line"><span class="lineno"> 173</span> </div>
|
||||
<div class="line"><span class="lineno"> 174</span> <span class="comment">// Traversing through the entry</span></div>
|
||||
<div class="line"><span class="lineno"> 175</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 176</span> }</div>
|
||||
<div class="line"><span class="lineno"> 177</span> </div>
|
||||
<div class="line"><span class="lineno"> 178</span> <span class="comment">// cur_pos now points to the last char of entry. Display message if that</span></div>
|
||||
<div class="line"><span class="lineno"> 179</span> <span class="comment">// entry does not exist</span></div>
|
||||
<div class="line"><span class="lineno"> 180</span> <span class="keywordflow">if</span> (!cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 181</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">"Entry not Found"</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"> 182</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 183</span> }</div>
|
||||
<div class="line"><span class="lineno"> 184</span> </div>
|
||||
<div class="line"><span class="lineno"> 185</span> <span class="comment">// If cur_pos is not a leaf node, unmark end of word and assign 0 to it's</span></div>
|
||||
<div class="line"><span class="lineno"> 186</span> <span class="comment">// frequency for deletion</span></div>
|
||||
<div class="line"><span class="lineno"> 187</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="#afca808362c13273ca8c8ae7d58e8eee0">numberOfChildren</a>(cur_pos)) {</div>
|
||||
<div class="line"><span class="lineno"> 188</span> cur_pos->endOfWord = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 189</span> cur_pos->frequency = 0;</div>
|
||||
<div class="line"><span class="lineno"> 190</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 191</span> }</div>
|
||||
<div class="line"><span class="lineno"> 192</span> </div>
|
||||
<div class="line"><span class="lineno"> 193</span> <span class="comment">// The first character of the suffix to be deleted</span></div>
|
||||
<div class="line"><span class="lineno"> 194</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(entry[delete_from_index + 1]) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 195</span> <span class="comment">// Point cur_pos to the next node</span></div>
|
||||
<div class="line"><span class="lineno"> 196</span> cur_pos = delete_from->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 197</span> <span class="comment">// Sever the connection from the main trie</span></div>
|
||||
<div class="line"><span class="lineno"> 198</span> delete_from->english[letter_index] = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 199</span> </div>
|
||||
<div class="line"><span class="lineno"> 200</span> <span class="comment">// If number of characters in the suffix are more than 1, recursively delete</span></div>
|
||||
<div class="line"><span class="lineno"> 201</span> <span class="comment">// each character starting from cur_pos using the helper function</span></div>
|
||||
<div class="line"><span class="lineno"> 202</span> <span class="keywordflow">if</span> (n > delete_from_index + 2) {</div>
|
||||
<div class="line"><span class="lineno"> 203</span> <a class="code hl_function" href="#adef6940391f981ab86767775176b7169">DeleteFrom</a>(cur_pos, entry, delete_from_index + 2);</div>
|
||||
<div class="line"><span class="lineno"> 204</span> }</div>
|
||||
<div class="line"><span class="lineno"> 205</span> <span class="comment">// If the suffix is only 1 char in length</span></div>
|
||||
<div class="line"><span class="lineno"> 206</span> <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 207</span> <span class="keyword">delete</span> cur_pos;</div>
|
||||
<div class="line"><span class="lineno"> 208</span> }</div>
|
||||
<div class="line"><span class="lineno"> 209</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 153</span> {</div>
|
||||
<div class="line"><span class="lineno"> 154</span> Tnode *cur_pos = <span class="keyword">this</span>,</div>
|
||||
<div class="line"><span class="lineno"> 155</span> *delete_from = <span class="keyword">this</span>; <span class="comment">// Current pointer pointing to root</span></div>
|
||||
<div class="line"><span class="lineno"> 156</span> <span class="keywordtype">int</span> letter_index = 0, delete_from_index = 0, i = 0, n = entry.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>();</div>
|
||||
<div class="line"><span class="lineno"> 157</span> </div>
|
||||
<div class="line"><span class="lineno"> 158</span> <span class="keywordflow">for</span> (i = 0; i < n; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 159</span> <span class="comment">// To ignore case</span></div>
|
||||
<div class="line"><span class="lineno"> 160</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(entry[i]) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 161</span> </div>
|
||||
<div class="line"><span class="lineno"> 162</span> <span class="comment">// Display error message when given entry is not present in the tree</span></div>
|
||||
<div class="line"><span class="lineno"> 163</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 164</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">"Entry not Found"</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"> 165</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 166</span> }</div>
|
||||
<div class="line"><span class="lineno"> 167</span> <span class="comment">// If the current node is end of word for the current prefix or if it</span></div>
|
||||
<div class="line"><span class="lineno"> 168</span> <span class="comment">// has 2 or more branches It cannot be deleted while deleting the</span></div>
|
||||
<div class="line"><span class="lineno"> 169</span> <span class="comment">// required entry.</span></div>
|
||||
<div class="line"><span class="lineno"> 170</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="#afca808362c13273ca8c8ae7d58e8eee0">numberOfChildren</a>(cur_pos) > 1 || cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 171</span> delete_from = cur_pos; <span class="comment">// denotes the beginning of the shortest</span></div>
|
||||
<div class="line"><span class="lineno"> 172</span> <span class="comment">// suffix that is allowed to be deleted</span></div>
|
||||
<div class="line"><span class="lineno"> 173</span> delete_from_index = i - 1; <span class="comment">// Beginning index of the suffix</span></div>
|
||||
<div class="line"><span class="lineno"> 174</span> <span class="comment">// corresponding to the 'entry'</span></div>
|
||||
<div class="line"><span class="lineno"> 175</span> }</div>
|
||||
<div class="line"><span class="lineno"> 176</span> </div>
|
||||
<div class="line"><span class="lineno"> 177</span> <span class="comment">// Traversing through the entry</span></div>
|
||||
<div class="line"><span class="lineno"> 178</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 179</span> }</div>
|
||||
<div class="line"><span class="lineno"> 180</span> </div>
|
||||
<div class="line"><span class="lineno"> 181</span> <span class="comment">// cur_pos now points to the last char of entry. Display message if that</span></div>
|
||||
<div class="line"><span class="lineno"> 182</span> <span class="comment">// entry does not exist</span></div>
|
||||
<div class="line"><span class="lineno"> 183</span> <span class="keywordflow">if</span> (!cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 184</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">"Entry not Found"</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"> 185</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 186</span> }</div>
|
||||
<div class="line"><span class="lineno"> 187</span> </div>
|
||||
<div class="line"><span class="lineno"> 188</span> <span class="comment">// If cur_pos is not a leaf node, unmark end of word and assign 0 to it's</span></div>
|
||||
<div class="line"><span class="lineno"> 189</span> <span class="comment">// frequency for deletion</span></div>
|
||||
<div class="line"><span class="lineno"> 190</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="#afca808362c13273ca8c8ae7d58e8eee0">numberOfChildren</a>(cur_pos)) {</div>
|
||||
<div class="line"><span class="lineno"> 191</span> cur_pos->endOfWord = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 192</span> cur_pos->frequency = 0;</div>
|
||||
<div class="line"><span class="lineno"> 193</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 194</span> }</div>
|
||||
<div class="line"><span class="lineno"> 195</span> </div>
|
||||
<div class="line"><span class="lineno"> 196</span> <span class="comment">// The first character of the suffix to be deleted</span></div>
|
||||
<div class="line"><span class="lineno"> 197</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(entry[delete_from_index + 1]) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 198</span> <span class="comment">// Point cur_pos to the next node</span></div>
|
||||
<div class="line"><span class="lineno"> 199</span> cur_pos = delete_from->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 200</span> <span class="comment">// Sever the connection from the main trie</span></div>
|
||||
<div class="line"><span class="lineno"> 201</span> delete_from->english[letter_index] = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 202</span> </div>
|
||||
<div class="line"><span class="lineno"> 203</span> <span class="comment">// If number of characters in the suffix are more than 1, recursively delete</span></div>
|
||||
<div class="line"><span class="lineno"> 204</span> <span class="comment">// each character starting from cur_pos using the helper function</span></div>
|
||||
<div class="line"><span class="lineno"> 205</span> <span class="keywordflow">if</span> (n > delete_from_index + 2) {</div>
|
||||
<div class="line"><span class="lineno"> 206</span> <a class="code hl_function" href="#adef6940391f981ab86767775176b7169">DeleteFrom</a>(cur_pos, entry, delete_from_index + 2);</div>
|
||||
<div class="line"><span class="lineno"> 207</span> }</div>
|
||||
<div class="line"><span class="lineno"> 208</span> <span class="comment">// If the suffix is only 1 char in length</span></div>
|
||||
<div class="line"><span class="lineno"> 209</span> <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 210</span> <span class="keyword">delete</span> cur_pos;</div>
|
||||
<div class="line"><span class="lineno"> 211</span> }</div>
|
||||
<div class="line"><span class="lineno"> 212</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="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_adef6940391f981ab86767775176b7169"><div class="ttname"><a href="#adef6940391f981ab86767775176b7169">operations_on_datastructures::trie_operations::Tnode::DeleteFrom</a></div><div class="ttdeci">void DeleteFrom(Tnode *delete_from, std::string delete_string, int remove_index)</div><div class="ttdoc">Function recursively deletes the substring character by character iterating through the string to be ...</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:134</div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_afca808362c13273ca8c8ae7d58e8eee0"><div class="ttname"><a href="#afca808362c13273ca8c8ae7d58e8eee0">operations_on_datastructures::trie_operations::Tnode::numberOfChildren</a></div><div class="ttdeci">uint8_t numberOfChildren(Tnode *node)</div><div class="ttdoc">Function to count the number of children a node in the trie has.</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:69</div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_adef6940391f981ab86767775176b7169"><div class="ttname"><a href="#adef6940391f981ab86767775176b7169">operations_on_datastructures::trie_operations::Tnode::DeleteFrom</a></div><div class="ttdeci">void DeleteFrom(Tnode *delete_from, std::string delete_string, int remove_index)</div><div class="ttdoc">Function recursively deletes the substring character by character iterating through the string to be ...</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:137</div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_afca808362c13273ca8c8ae7d58e8eee0"><div class="ttname"><a href="#afca808362c13273ca8c8ae7d58e8eee0">operations_on_datastructures::trie_operations::Tnode::numberOfChildren</a></div><div class="ttdeci">uint8_t numberOfChildren(Tnode *node)</div><div class="ttdoc">Function to count the number of children a node in the trie has.</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:72</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="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">std::string::size</a></div><div class="ttdeci">T size(T... args)</div></div>
|
||||
<div class="ttc" id="atolower_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">std::tolower</a></div><div class="ttdeci">T tolower(T... args)</div></div>
|
||||
@@ -410,16 +410,16 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 135</span> {</div>
|
||||
<div class="line"><span class="lineno"> 136</span> <span class="keywordflow">if</span> (delete_string.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() == remove_index) {</div>
|
||||
<div class="line"><span class="lineno"> 137</span> <span class="keywordtype">int</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(delete_string[remove_index]) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 138</span> </div>
|
||||
<div class="line"><span class="lineno"> 139</span> <a class="code hl_function" href="#adef6940391f981ab86767775176b7169">DeleteFrom</a>(delete_from->english[letter_index], delete_string,</div>
|
||||
<div class="line"><span class="lineno"> 140</span> remove_index + 1);</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 138</span> {</div>
|
||||
<div class="line"><span class="lineno"> 139</span> <span class="keywordflow">if</span> (delete_string.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() == remove_index) {</div>
|
||||
<div class="line"><span class="lineno"> 140</span> <span class="keywordtype">int</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(delete_string[remove_index]) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 141</span> </div>
|
||||
<div class="line"><span class="lineno"> 142</span> <span class="keyword">delete</span> delete_from;</div>
|
||||
<div class="line"><span class="lineno"> 143</span> }</div>
|
||||
<div class="line"><span class="lineno"> 144</span>}</div>
|
||||
<div class="line"><span class="lineno"> 142</span> <a class="code hl_function" href="#adef6940391f981ab86767775176b7169">DeleteFrom</a>(delete_from->english[letter_index], delete_string,</div>
|
||||
<div class="line"><span class="lineno"> 143</span> remove_index + 1);</div>
|
||||
<div class="line"><span class="lineno"> 144</span> </div>
|
||||
<div class="line"><span class="lineno"> 145</span> <span class="keyword">delete</span> delete_from;</div>
|
||||
<div class="line"><span class="lineno"> 146</span> }</div>
|
||||
<div class="line"><span class="lineno"> 147</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -450,25 +450,25 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 104</span> {</div>
|
||||
<div class="line"><span class="lineno"> 105</span> Tnode *cur_pos = <span class="keyword">this</span>;</div>
|
||||
<div class="line"><span class="lineno"> 106</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><span class="lineno"> 107</span> </div>
|
||||
<div class="line"><span class="lineno"> 108</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : entry) {</div>
|
||||
<div class="line"><span class="lineno"> 109</span> <span class="comment">// To ignore case</span></div>
|
||||
<div class="line"><span class="lineno"> 110</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 111</span> </div>
|
||||
<div class="line"><span class="lineno"> 112</span> <span class="comment">// Allocate a node for each character of entry if not present in the</span></div>
|
||||
<div class="line"><span class="lineno"> 113</span> <span class="comment">// trie</span></div>
|
||||
<div class="line"><span class="lineno"> 114</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 115</span> cur_pos->english[letter_index] = <span class="keyword">new</span> Tnode();</div>
|
||||
<div class="line"><span class="lineno"> 116</span> }</div>
|
||||
<div class="line"><span class="lineno"> 117</span> </div>
|
||||
<div class="line"><span class="lineno"> 118</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 119</span> }</div>
|
||||
<div class="line"><span class="lineno"> 120</span> <span class="comment">// cur_pos points to the last char, mark it as end of word</span></div>
|
||||
<div class="line"><span class="lineno"> 121</span> cur_pos->endOfWord = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 122</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 107</span> {</div>
|
||||
<div class="line"><span class="lineno"> 108</span> Tnode *cur_pos = <span class="keyword">this</span>;</div>
|
||||
<div class="line"><span class="lineno"> 109</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><span class="lineno"> 110</span> </div>
|
||||
<div class="line"><span class="lineno"> 111</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : entry) {</div>
|
||||
<div class="line"><span class="lineno"> 112</span> <span class="comment">// To ignore case</span></div>
|
||||
<div class="line"><span class="lineno"> 113</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 114</span> </div>
|
||||
<div class="line"><span class="lineno"> 115</span> <span class="comment">// Allocate a node for each character of entry if not present in the</span></div>
|
||||
<div class="line"><span class="lineno"> 116</span> <span class="comment">// trie</span></div>
|
||||
<div class="line"><span class="lineno"> 117</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 118</span> cur_pos->english[letter_index] = <span class="keyword">new</span> Tnode();</div>
|
||||
<div class="line"><span class="lineno"> 119</span> }</div>
|
||||
<div class="line"><span class="lineno"> 120</span> </div>
|
||||
<div class="line"><span class="lineno"> 121</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 122</span> }</div>
|
||||
<div class="line"><span class="lineno"> 123</span> <span class="comment">// cur_pos points to the last char, mark it as end of word</span></div>
|
||||
<div class="line"><span class="lineno"> 124</span> cur_pos->endOfWord = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 125</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -503,10 +503,10 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>count of the number of children of the given node (max 26) </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 69</span> {</div>
|
||||
<div class="line"><span class="lineno"> 70</span> <span class="keywordflow">return</span> ENGLISH_ALPHABET_SIZE -</div>
|
||||
<div class="line"><span class="lineno"> 71</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/count.html">std::count</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a>->english.begin(), <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>->english.end(), <span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><span class="lineno"> 72</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 72</span> {</div>
|
||||
<div class="line"><span class="lineno"> 73</span> <span class="keywordflow">return</span> ENGLISH_ALPHABET_SIZE -</div>
|
||||
<div class="line"><span class="lineno"> 74</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/count.html">std::count</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a>->english.begin(), <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>->english.end(), <span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><span class="lineno"> 75</span> }</div>
|
||||
<div class="ttc" id="acount_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/count.html">std::count</a></div><div class="ttdeci">T count(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -538,59 +538,59 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 365</span> {</div>
|
||||
<div class="line"><span class="lineno"> 366</span> Tnode *cur_pos = <span class="keyword">nullptr</span>, *prev_pos = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 367</span> cur_pos = prev_pos = <span class="keyword">this</span>; <span class="comment">// maintaining 2 pointers, initialized to root</span></div>
|
||||
<div class="line"><span class="lineno"> 368</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><span class="lineno"> 369</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> prefix =</div>
|
||||
<div class="line"><span class="lineno"> 370</span> <span class="stringliteral">""</span>; <span class="comment">// variable storing the updated value of longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 371</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue.html">std::priority_queue<std::pair<int, std::string></a> ></div>
|
||||
<div class="line"><span class="lineno"> 372</span> suggestions; <span class="comment">// max heap to store (frequency, word) in descending order</span></div>
|
||||
<div class="line"><span class="lineno"> 373</span> <span class="comment">// of freq</span></div>
|
||||
<div class="line"><span class="lineno"> 374</span> </div>
|
||||
<div class="line"><span class="lineno"> 375</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue.html">std::priority_queue<std::pair<int, std::string></a> > *Suggestions =</div>
|
||||
<div class="line"><span class="lineno"> 376</span> &suggestions;</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 368</span> {</div>
|
||||
<div class="line"><span class="lineno"> 369</span> Tnode *cur_pos = <span class="keyword">nullptr</span>, *prev_pos = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 370</span> cur_pos = prev_pos = <span class="keyword">this</span>; <span class="comment">// maintaining 2 pointers, initialized to root</span></div>
|
||||
<div class="line"><span class="lineno"> 371</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><span class="lineno"> 372</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> prefix =</div>
|
||||
<div class="line"><span class="lineno"> 373</span> <span class="stringliteral">""</span>; <span class="comment">// variable storing the updated value of longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 374</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue.html">std::priority_queue<std::pair<int, std::string></a> ></div>
|
||||
<div class="line"><span class="lineno"> 375</span> suggestions; <span class="comment">// max heap to store (frequency, word) in descending order</span></div>
|
||||
<div class="line"><span class="lineno"> 376</span> <span class="comment">// of freq</span></div>
|
||||
<div class="line"><span class="lineno"> 377</span> </div>
|
||||
<div class="line"><span class="lineno"> 378</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : key) {</div>
|
||||
<div class="line"><span class="lineno"> 379</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 380</span> prev_pos = cur_pos; <span class="comment">// Previous pointer updated to point to the last</span></div>
|
||||
<div class="line"><span class="lineno"> 381</span> <span class="comment">// char of the longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 382</span> </div>
|
||||
<div class="line"><span class="lineno"> 383</span> <span class="comment">// When the node for the character does not exist, longest prefix has</span></div>
|
||||
<div class="line"><span class="lineno"> 384</span> <span class="comment">// been determined and SuggestFreqAutocomplete is called</span></div>
|
||||
<div class="line"><span class="lineno"> 385</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 386</span> <a class="code hl_function" href="#a9e556f52c837190ecf4265b1f05cfe9c">SuggestFreqAutocomplete</a>(prev_pos, prefix, Suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 387</span> <span class="comment">// To display the top 3 results</span></div>
|
||||
<div class="line"><span class="lineno"> 388</span> <a class="code hl_function" href="#aacafb8c9f3ebac7ac6c01d9645bb67b6">SelectionTop_3</a>(Suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 389</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">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><span class="lineno"> 390</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"> 391</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 392</span> }</div>
|
||||
<div class="line"><span class="lineno"> 393</span> <span class="comment">// Updating the longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 394</span> prefix += char(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i));</div>
|
||||
<div class="line"><span class="lineno"> 395</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 396</span> }</div>
|
||||
<div class="line"><span class="lineno"> 397</span> <span class="comment">// If the key is a valid entry of trie, display it @ top of the suggestions</span></div>
|
||||
<div class="line"><span class="lineno"> 398</span> <span class="keywordflow">if</span> (cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 399</span> (cur_pos->frequency)++;</div>
|
||||
<div class="line"><span class="lineno"> 400</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << key << <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"> 401</span> }</div>
|
||||
<div class="line"><span class="lineno"> 402</span> </div>
|
||||
<div class="line"><span class="lineno"> 403</span> (void)prev_pos; <span class="comment">// Idiom to ignore previous pointer</span></div>
|
||||
<div class="line"><span class="lineno"> 404</span> </div>
|
||||
<div class="line"><span class="lineno"> 405</span> <span class="comment">// Call for Suggestions when the search key is present as an entry/a prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 406</span> <span class="comment">// in the trie</span></div>
|
||||
<div class="line"><span class="lineno"> 407</span> <a class="code hl_function" href="#a9e556f52c837190ecf4265b1f05cfe9c">SuggestFreqAutocomplete</a>(cur_pos, prefix, Suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 408</span> <span class="comment">// Display the top 3 results</span></div>
|
||||
<div class="line"><span class="lineno"> 409</span> <a class="code hl_function" href="#aacafb8c9f3ebac7ac6c01d9645bb67b6">SelectionTop_3</a>(Suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 410</span> </div>
|
||||
<div class="line"><span class="lineno"> 411</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">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><span class="lineno"> 412</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"> 413</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 414</span>}</div>
|
||||
<div class="line"><span class="lineno"> 378</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue.html">std::priority_queue<std::pair<int, std::string></a> > *Suggestions =</div>
|
||||
<div class="line"><span class="lineno"> 379</span> &suggestions;</div>
|
||||
<div class="line"><span class="lineno"> 380</span> </div>
|
||||
<div class="line"><span class="lineno"> 381</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : key) {</div>
|
||||
<div class="line"><span class="lineno"> 382</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 383</span> prev_pos = cur_pos; <span class="comment">// Previous pointer updated to point to the last</span></div>
|
||||
<div class="line"><span class="lineno"> 384</span> <span class="comment">// char of the longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 385</span> </div>
|
||||
<div class="line"><span class="lineno"> 386</span> <span class="comment">// When the node for the character does not exist, longest prefix has</span></div>
|
||||
<div class="line"><span class="lineno"> 387</span> <span class="comment">// been determined and SuggestFreqAutocomplete is called</span></div>
|
||||
<div class="line"><span class="lineno"> 388</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 389</span> <a class="code hl_function" href="#a9e556f52c837190ecf4265b1f05cfe9c">SuggestFreqAutocomplete</a>(prev_pos, prefix, Suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 390</span> <span class="comment">// To display the top 3 results</span></div>
|
||||
<div class="line"><span class="lineno"> 391</span> <a class="code hl_function" href="#aacafb8c9f3ebac7ac6c01d9645bb67b6">SelectionTop_3</a>(Suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 392</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">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><span class="lineno"> 393</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"> 394</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 395</span> }</div>
|
||||
<div class="line"><span class="lineno"> 396</span> <span class="comment">// Updating the longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 397</span> prefix += char(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i));</div>
|
||||
<div class="line"><span class="lineno"> 398</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 399</span> }</div>
|
||||
<div class="line"><span class="lineno"> 400</span> <span class="comment">// If the key is a valid entry of trie, display it @ top of the suggestions</span></div>
|
||||
<div class="line"><span class="lineno"> 401</span> <span class="keywordflow">if</span> (cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 402</span> (cur_pos->frequency)++;</div>
|
||||
<div class="line"><span class="lineno"> 403</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << key << <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"> 404</span> }</div>
|
||||
<div class="line"><span class="lineno"> 405</span> </div>
|
||||
<div class="line"><span class="lineno"> 406</span> (void)prev_pos; <span class="comment">// Idiom to ignore previous pointer</span></div>
|
||||
<div class="line"><span class="lineno"> 407</span> </div>
|
||||
<div class="line"><span class="lineno"> 408</span> <span class="comment">// Call for Suggestions when the search key is present as an entry/a prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 409</span> <span class="comment">// in the trie</span></div>
|
||||
<div class="line"><span class="lineno"> 410</span> <a class="code hl_function" href="#a9e556f52c837190ecf4265b1f05cfe9c">SuggestFreqAutocomplete</a>(cur_pos, prefix, Suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 411</span> <span class="comment">// Display the top 3 results</span></div>
|
||||
<div class="line"><span class="lineno"> 412</span> <a class="code hl_function" href="#aacafb8c9f3ebac7ac6c01d9645bb67b6">SelectionTop_3</a>(Suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 413</span> </div>
|
||||
<div class="line"><span class="lineno"> 414</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">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><span class="lineno"> 415</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"> 416</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 417</span>}</div>
|
||||
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_a9e556f52c837190ecf4265b1f05cfe9c"><div class="ttname"><a href="#a9e556f52c837190ecf4265b1f05cfe9c">operations_on_datastructures::trie_operations::Tnode::SuggestFreqAutocomplete</a></div><div class="ttdeci">void SuggestFreqAutocomplete(Tnode *new_root, const std::string &prefix, std::priority_queue< std::pair< int, std::string > > *suggestions)</div><div class="ttdoc">Recursive function to suggest most frequently searched entries of trie which have a given common pref...</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:337</div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_aacafb8c9f3ebac7ac6c01d9645bb67b6"><div class="ttname"><a href="#aacafb8c9f3ebac7ac6c01d9645bb67b6">operations_on_datastructures::trie_operations::Tnode::SelectionTop_3</a></div><div class="ttdeci">void SelectionTop_3(std::priority_queue< std::pair< int, std::string > > *suggestions)</div><div class="ttdoc">Function to display the 3 suggestions with highest frequency of search hits.</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:317</div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_a9e556f52c837190ecf4265b1f05cfe9c"><div class="ttname"><a href="#a9e556f52c837190ecf4265b1f05cfe9c">operations_on_datastructures::trie_operations::Tnode::SuggestFreqAutocomplete</a></div><div class="ttdeci">void SuggestFreqAutocomplete(Tnode *new_root, const std::string &prefix, std::priority_queue< std::pair< int, std::string > > *suggestions)</div><div class="ttdoc">Recursive function to suggest most frequently searched entries of trie which have a given common pref...</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:340</div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_aacafb8c9f3ebac7ac6c01d9645bb67b6"><div class="ttname"><a href="#aacafb8c9f3ebac7ac6c01d9645bb67b6">operations_on_datastructures::trie_operations::Tnode::SelectionTop_3</a></div><div class="ttdeci">void SelectionTop_3(std::priority_queue< std::pair< int, std::string > > *suggestions)</div><div class="ttdoc">Function to display the 3 suggestions with highest frequency of search hits.</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:320</div></div>
|
||||
<div class="ttc" id="apriority_queue_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/priority_queue.html">std::priority_queue</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -625,27 +625,27 @@ Here is the call graph for this function:</div>
|
||||
<dl class="section return"><dt>Returns</dt><dd>true if the key is found </dd>
|
||||
<dd>
|
||||
false if the key is not found </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 217</span> {</div>
|
||||
<div class="line"><span class="lineno"> 218</span> Tnode *cur_pos = <span class="keyword">this</span>;</div>
|
||||
<div class="line"><span class="lineno"> 219</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><span class="lineno"> 220</span> </div>
|
||||
<div class="line"><span class="lineno"> 221</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : key) {</div>
|
||||
<div class="line"><span class="lineno"> 222</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 223</span> <span class="comment">// If any character in the order of the key is absent, word not found!</span></div>
|
||||
<div class="line"><span class="lineno"> 224</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 225</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 226</span> }</div>
|
||||
<div class="line"><span class="lineno"> 227</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 228</span> }</div>
|
||||
<div class="line"><span class="lineno"> 229</span> <span class="comment">// Word is only present in the trie if the key is a valid complete entry and</span></div>
|
||||
<div class="line"><span class="lineno"> 230</span> <span class="comment">// not just a prefix.</span></div>
|
||||
<div class="line"><span class="lineno"> 231</span> <span class="keywordflow">if</span> (cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 232</span> (cur_pos->frequency)++;</div>
|
||||
<div class="line"><span class="lineno"> 233</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 234</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 235</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 236</span> }</div>
|
||||
<div class="line"><span class="lineno"> 237</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 220</span> {</div>
|
||||
<div class="line"><span class="lineno"> 221</span> Tnode *cur_pos = <span class="keyword">this</span>;</div>
|
||||
<div class="line"><span class="lineno"> 222</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><span class="lineno"> 223</span> </div>
|
||||
<div class="line"><span class="lineno"> 224</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : key) {</div>
|
||||
<div class="line"><span class="lineno"> 225</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 226</span> <span class="comment">// If any character in the order of the key is absent, word not found!</span></div>
|
||||
<div class="line"><span class="lineno"> 227</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 228</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 229</span> }</div>
|
||||
<div class="line"><span class="lineno"> 230</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 231</span> }</div>
|
||||
<div class="line"><span class="lineno"> 232</span> <span class="comment">// Word is only present in the trie if the key is a valid complete entry and</span></div>
|
||||
<div class="line"><span class="lineno"> 233</span> <span class="comment">// not just a prefix.</span></div>
|
||||
<div class="line"><span class="lineno"> 234</span> <span class="keywordflow">if</span> (cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 235</span> (cur_pos->frequency)++;</div>
|
||||
<div class="line"><span class="lineno"> 236</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 237</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 238</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 239</span> }</div>
|
||||
<div class="line"><span class="lineno"> 240</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -671,46 +671,46 @@ false if the key is not found </dd></dl>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 271</span> {</div>
|
||||
<div class="line"><span class="lineno"> 272</span> Tnode *cur_pos = <span class="keyword">nullptr</span>, *prev_pos = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 273</span> cur_pos = prev_pos = <span class="keyword">this</span>; <span class="comment">// maintaining 2 pointers, initialized to root</span></div>
|
||||
<div class="line"><span class="lineno"> 274</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><span class="lineno"> 275</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> prefix =</div>
|
||||
<div class="line"><span class="lineno"> 276</span> <span class="stringliteral">""</span>; <span class="comment">// variable storing the updated value of longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 277</span> </div>
|
||||
<div class="line"><span class="lineno"> 278</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : key) {</div>
|
||||
<div class="line"><span class="lineno"> 279</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 280</span> prev_pos = cur_pos; <span class="comment">// Previous pointer updated to point to the last</span></div>
|
||||
<div class="line"><span class="lineno"> 281</span> <span class="comment">// char of the longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 282</span> </div>
|
||||
<div class="line"><span class="lineno"> 283</span> <span class="comment">// When the node for the character does not exist, longest prefix has</span></div>
|
||||
<div class="line"><span class="lineno"> 284</span> <span class="comment">// been determined and SuggestAutocomplete is called</span></div>
|
||||
<div class="line"><span class="lineno"> 285</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 286</span> <a class="code hl_function" href="#a097913c4badec2b60d50a171ecc299fe">SuggestAutocomplete</a>(prev_pos, prefix);</div>
|
||||
<div class="line"><span class="lineno"> 287</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">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><span class="lineno"> 288</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"> 289</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 290</span> }</div>
|
||||
<div class="line"><span class="lineno"> 291</span> <span class="comment">// Updating the longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 292</span> prefix += char(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i));</div>
|
||||
<div class="line"><span class="lineno"> 293</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 294</span> }</div>
|
||||
<div class="line"><span class="lineno"> 295</span> <span class="comment">// If the key is a valid entry of trie, display it @ top of the suggestions</span></div>
|
||||
<div class="line"><span class="lineno"> 296</span> <span class="keywordflow">if</span> (cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 297</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << key << <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"> 298</span> (cur_pos->frequency)++;</div>
|
||||
<div class="line"><span class="lineno"> 299</span> }</div>
|
||||
<div class="line"><span class="lineno"> 300</span> </div>
|
||||
<div class="line"><span class="lineno"> 301</span> (void)prev_pos; <span class="comment">// Idiom to ignore previous pointer</span></div>
|
||||
<div class="line"><span class="lineno"> 302</span> </div>
|
||||
<div class="line"><span class="lineno"> 303</span> <span class="comment">// Call for suggestions when the search key is present as an entry/a prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 304</span> <span class="comment">// in the trie</span></div>
|
||||
<div class="line"><span class="lineno"> 305</span> <a class="code hl_function" href="#a097913c4badec2b60d50a171ecc299fe">SuggestAutocomplete</a>(cur_pos, prefix);</div>
|
||||
<div class="line"><span class="lineno"> 306</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">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><span class="lineno"> 307</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"> 308</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 309</span>}</div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_a097913c4badec2b60d50a171ecc299fe"><div class="ttname"><a href="#a097913c4badec2b60d50a171ecc299fe">operations_on_datastructures::trie_operations::Tnode::SuggestAutocomplete</a></div><div class="ttdeci">void SuggestAutocomplete(Tnode *new_root, const std::string &prefix)</div><div class="ttdoc">Recursive function to suggest all the entries of trie which have a given common prefix.</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:246</div></div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 274</span> {</div>
|
||||
<div class="line"><span class="lineno"> 275</span> Tnode *cur_pos = <span class="keyword">nullptr</span>, *prev_pos = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 276</span> cur_pos = prev_pos = <span class="keyword">this</span>; <span class="comment">// maintaining 2 pointers, initialized to root</span></div>
|
||||
<div class="line"><span class="lineno"> 277</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><span class="lineno"> 278</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> prefix =</div>
|
||||
<div class="line"><span class="lineno"> 279</span> <span class="stringliteral">""</span>; <span class="comment">// variable storing the updated value of longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 280</span> </div>
|
||||
<div class="line"><span class="lineno"> 281</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : key) {</div>
|
||||
<div class="line"><span class="lineno"> 282</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 283</span> prev_pos = cur_pos; <span class="comment">// Previous pointer updated to point to the last</span></div>
|
||||
<div class="line"><span class="lineno"> 284</span> <span class="comment">// char of the longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 285</span> </div>
|
||||
<div class="line"><span class="lineno"> 286</span> <span class="comment">// When the node for the character does not exist, longest prefix has</span></div>
|
||||
<div class="line"><span class="lineno"> 287</span> <span class="comment">// been determined and SuggestAutocomplete is called</span></div>
|
||||
<div class="line"><span class="lineno"> 288</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 289</span> <a class="code hl_function" href="#a097913c4badec2b60d50a171ecc299fe">SuggestAutocomplete</a>(prev_pos, prefix);</div>
|
||||
<div class="line"><span class="lineno"> 290</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">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><span class="lineno"> 291</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"> 292</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 293</span> }</div>
|
||||
<div class="line"><span class="lineno"> 294</span> <span class="comment">// Updating the longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 295</span> prefix += char(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i));</div>
|
||||
<div class="line"><span class="lineno"> 296</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 297</span> }</div>
|
||||
<div class="line"><span class="lineno"> 298</span> <span class="comment">// If the key is a valid entry of trie, display it @ top of the suggestions</span></div>
|
||||
<div class="line"><span class="lineno"> 299</span> <span class="keywordflow">if</span> (cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 300</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << key << <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"> 301</span> (cur_pos->frequency)++;</div>
|
||||
<div class="line"><span class="lineno"> 302</span> }</div>
|
||||
<div class="line"><span class="lineno"> 303</span> </div>
|
||||
<div class="line"><span class="lineno"> 304</span> (void)prev_pos; <span class="comment">// Idiom to ignore previous pointer</span></div>
|
||||
<div class="line"><span class="lineno"> 305</span> </div>
|
||||
<div class="line"><span class="lineno"> 306</span> <span class="comment">// Call for suggestions when the search key is present as an entry/a prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 307</span> <span class="comment">// in the trie</span></div>
|
||||
<div class="line"><span class="lineno"> 308</span> <a class="code hl_function" href="#a097913c4badec2b60d50a171ecc299fe">SuggestAutocomplete</a>(cur_pos, prefix);</div>
|
||||
<div class="line"><span class="lineno"> 309</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">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><span class="lineno"> 310</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"> 311</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 312</span>}</div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_a097913c4badec2b60d50a171ecc299fe"><div class="ttname"><a href="#a097913c4badec2b60d50a171ecc299fe">operations_on_datastructures::trie_operations::Tnode::SuggestAutocomplete</a></div><div class="ttdeci">void SuggestAutocomplete(Tnode *new_root, const std::string &prefix)</div><div class="ttdoc">Recursive function to suggest all the entries of trie which have a given common prefix.</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:249</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -741,15 +741,15 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 318</span> {</div>
|
||||
<div class="line"><span class="lineno"> 319</span> <span class="comment">// Display Either top 3 or total number of suggestions, whichever is smaller</span></div>
|
||||
<div class="line"><span class="lineno"> 320</span> <span class="keywordtype">int</span> n = suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/size.html">size</a>(), Top = 0;</div>
|
||||
<div class="line"><span class="lineno"> 321</span> Top = n < 3 ? n : 3;</div>
|
||||
<div class="line"><span class="lineno"> 322</span> <span class="keywordflow">while</span> (Top--) {</div>
|
||||
<div class="line"><span class="lineno"> 323</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/top.html">top</a>().second << <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"> 324</span> suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/pop.html">pop</a>();</div>
|
||||
<div class="line"><span class="lineno"> 325</span> }</div>
|
||||
<div class="line"><span class="lineno"> 326</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 321</span> {</div>
|
||||
<div class="line"><span class="lineno"> 322</span> <span class="comment">// Display Either top 3 or total number of suggestions, whichever is smaller</span></div>
|
||||
<div class="line"><span class="lineno"> 323</span> <span class="keywordtype">int</span> n = suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/size.html">size</a>(), Top = 0;</div>
|
||||
<div class="line"><span class="lineno"> 324</span> Top = n < 3 ? n : 3;</div>
|
||||
<div class="line"><span class="lineno"> 325</span> <span class="keywordflow">while</span> (Top--) {</div>
|
||||
<div class="line"><span class="lineno"> 326</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/top.html">top</a>().second << <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"> 327</span> suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/pop.html">pop</a>();</div>
|
||||
<div class="line"><span class="lineno"> 328</span> }</div>
|
||||
<div class="line"><span class="lineno"> 329</span>}</div>
|
||||
<div class="ttc" id="apop_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/priority_queue/pop.html">std::priority_queue::pop</a></div><div class="ttdeci">T pop(T... args)</div></div>
|
||||
<div class="ttc" id="atop_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/priority_queue/top.html">std::priority_queue::top</a></div><div class="ttdeci">T top(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
@@ -787,22 +787,22 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 246</span> {</div>
|
||||
<div class="line"><span class="lineno"> 247</span> <span class="comment">// Iterate through all 26 nodes as we have to print all strings with the</span></div>
|
||||
<div class="line"><span class="lineno"> 248</span> <span class="comment">// given prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 249</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 250</span> <span class="keywordflow">for</span> (i = 0; i < ENGLISH_ALPHABET_SIZE; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 251</span> <span class="keywordflow">if</span> (new_root->english[i] != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 252</span> <span class="comment">// Print the sugestion only if it's a valid complete entry and not</span></div>
|
||||
<div class="line"><span class="lineno"> 253</span> <span class="comment">// just a prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 254</span> <span class="keywordflow">if</span> (new_root->english[i]->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 255</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << prefix + char(i + 97) << <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"> 256</span> }</div>
|
||||
<div class="line"><span class="lineno"> 257</span> </div>
|
||||
<div class="line"><span class="lineno"> 258</span> <a class="code hl_function" href="#a097913c4badec2b60d50a171ecc299fe">SuggestAutocomplete</a>(new_root->english[i], prefix + <span class="keywordtype">char</span>(i + 97));</div>
|
||||
<div class="line"><span class="lineno"> 259</span> }</div>
|
||||
<div class="line"><span class="lineno"> 260</span> }</div>
|
||||
<div class="line"><span class="lineno"> 261</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 249</span> {</div>
|
||||
<div class="line"><span class="lineno"> 250</span> <span class="comment">// Iterate through all 26 nodes as we have to print all strings with the</span></div>
|
||||
<div class="line"><span class="lineno"> 251</span> <span class="comment">// given prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 252</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 253</span> <span class="keywordflow">for</span> (i = 0; i < ENGLISH_ALPHABET_SIZE; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 254</span> <span class="keywordflow">if</span> (new_root->english[i] != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 255</span> <span class="comment">// Print the sugestion only if it's a valid complete entry and not</span></div>
|
||||
<div class="line"><span class="lineno"> 256</span> <span class="comment">// just a prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 257</span> <span class="keywordflow">if</span> (new_root->english[i]->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 258</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << prefix + char(i + 97) << <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"> 259</span> }</div>
|
||||
<div class="line"><span class="lineno"> 260</span> </div>
|
||||
<div class="line"><span class="lineno"> 261</span> <a class="code hl_function" href="#a097913c4badec2b60d50a171ecc299fe">SuggestAutocomplete</a>(new_root->english[i], prefix + <span class="keywordtype">char</span>(i + 97));</div>
|
||||
<div class="line"><span class="lineno"> 262</span> }</div>
|
||||
<div class="line"><span class="lineno"> 263</span> }</div>
|
||||
<div class="line"><span class="lineno"> 264</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -844,22 +844,22 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 339</span> {</div>
|
||||
<div class="line"><span class="lineno"> 340</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 341</span> <span class="keywordflow">for</span> (i = 0; i < ENGLISH_ALPHABET_SIZE; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 342</span> <span class="keywordflow">if</span> (new_root->english[i] != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 343</span> <span class="comment">// Add to sugestions only if it's a valid complete entry and not</span></div>
|
||||
<div class="line"><span class="lineno"> 344</span> <span class="comment">// just a prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 345</span> <span class="keywordflow">if</span> (new_root->english[i]->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 346</span> suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/push.html">push</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair/make_pair.html">std::make_pair</a>(</div>
|
||||
<div class="line"><span class="lineno"> 347</span> new_root->english[i]->frequency, prefix + <span class="keywordtype">char</span>(i + 97)));</div>
|
||||
<div class="line"><span class="lineno"> 348</span> }</div>
|
||||
<div class="line"><span class="lineno"> 349</span> </div>
|
||||
<div class="line"><span class="lineno"> 350</span> <a class="code hl_function" href="#a9e556f52c837190ecf4265b1f05cfe9c">SuggestFreqAutocomplete</a>(new_root->english[i], prefix + <span class="keywordtype">char</span>(i + 97),</div>
|
||||
<div class="line"><span class="lineno"> 351</span> suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 352</span> }</div>
|
||||
<div class="line"><span class="lineno"> 353</span> }</div>
|
||||
<div class="line"><span class="lineno"> 354</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 342</span> {</div>
|
||||
<div class="line"><span class="lineno"> 343</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 344</span> <span class="keywordflow">for</span> (i = 0; i < ENGLISH_ALPHABET_SIZE; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 345</span> <span class="keywordflow">if</span> (new_root->english[i] != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 346</span> <span class="comment">// Add to sugestions only if it's a valid complete entry and not</span></div>
|
||||
<div class="line"><span class="lineno"> 347</span> <span class="comment">// just a prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 348</span> <span class="keywordflow">if</span> (new_root->english[i]->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 349</span> suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/push.html">push</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair/make_pair.html">std::make_pair</a>(</div>
|
||||
<div class="line"><span class="lineno"> 350</span> new_root->english[i]->frequency, prefix + <span class="keywordtype">char</span>(i + 97)));</div>
|
||||
<div class="line"><span class="lineno"> 351</span> }</div>
|
||||
<div class="line"><span class="lineno"> 352</span> </div>
|
||||
<div class="line"><span class="lineno"> 353</span> <a class="code hl_function" href="#a9e556f52c837190ecf4265b1f05cfe9c">SuggestFreqAutocomplete</a>(new_root->english[i], prefix + <span class="keywordtype">char</span>(i + 97),</div>
|
||||
<div class="line"><span class="lineno"> 354</span> suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 355</span> }</div>
|
||||
<div class="line"><span class="lineno"> 356</span> }</div>
|
||||
<div class="line"><span class="lineno"> 357</span>}</div>
|
||||
<div class="ttc" id="amake_pair_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/pair/make_pair.html">std::make_pair</a></div><div class="ttdeci">T make_pair(T... args)</div></div>
|
||||
<div class="ttc" id="apush_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/priority_queue/push.html">std::priority_queue::push</a></div><div class="ttdeci">T push(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
var backtracking_2subset__sum_8cpp =
|
||||
[
|
||||
[ "main", "d0/dfe/backtracking_2subset__sum_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "number_of_subsets", "d0/dfe/backtracking_2subset__sum_8cpp.html#a7cb50d36a59427a33f64a266dac83d99", null ],
|
||||
[ "test", "d0/dfe/backtracking_2subset__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]
|
||||
];
|
||||
@@ -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,11 +1,13 @@
|
||||
<map id="dynamic_programming/longest_increasing_subsequence.cpp" name="dynamic_programming/longest_increasing_subsequence.cpp">
|
||||
<area shape="rect" id="Node000001" title="Calculate the length of the longest increasing subsequence in an array." alt="" coords="91,5,243,61"/>
|
||||
<area shape="rect" id="Node000001" title="Calculate the length of the longest increasing subsequence in an array." alt="" coords="131,5,283,61"/>
|
||||
<area shape="rect" id="Node000002" title=" " alt="" coords="5,109,70,135"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="128,64,69,103,66,98,125,59"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="155,64,76,104,73,99,153,59"/>
|
||||
<area shape="rect" id="Node000003" title=" " alt="" coords="93,109,152,135"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="156,62,138,96,134,94,151,60"/>
|
||||
<area shape="rect" id="Node000004" title=" " alt="" coords="176,109,248,135"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="183,60,201,94,196,96,179,62"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="272,109,329,135"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="210,59,270,98,267,103,207,64"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="183,63,147,100,143,96,179,59"/>
|
||||
<area shape="rect" id="Node000004" title=" " alt="" coords="177,109,237,135"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="210,61,210,93,204,93,204,61"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="260,109,332,135"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="236,59,274,96,271,100,233,63"/>
|
||||
<area shape="rect" id="Node000006" title=" " alt="" coords="356,109,413,135"/>
|
||||
<area shape="poly" id="edge5_Node000001_Node000006" title=" " alt="" coords="264,59,347,99,344,104,261,64"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
22ce28b1900f34151ccc6b52483055e5
|
||||
d830c34964806014bd0b0afdc32cf0d4
|
||||
@@ -4,8 +4,8 @@
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/longest_increasing_subsequence.cpp Pages: 1 -->
|
||||
<svg width="251pt" height="105pt"
|
||||
viewBox="0.00 0.00 250.62 105.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="314pt" height="105pt"
|
||||
viewBox="0.00 0.00 313.62 105.00" 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,10 +23,10 @@
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Calculate the length of the longest increasing subsequence in an array.">
|
||||
<polygon fill="#999999" stroke="#666666" points="178.25,-97 64,-97 64,-55.25 178.25,-55.25 178.25,-97"/>
|
||||
<text text-anchor="start" x="72" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="start" x="72" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">/longest_increasing</text>
|
||||
<text text-anchor="middle" x="121.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">_subsequence.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="208.25,-97 94,-97 94,-55.25 208.25,-55.25 208.25,-97"/>
|
||||
<text text-anchor="start" x="102" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="start" x="102" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">/longest_increasing</text>
|
||||
<text text-anchor="middle" x="151.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">_subsequence.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -43,8 +43,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="M90.7,-54.89C76.53,-45.47 59.96,-34.46 46.9,-25.77"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="49.21,-23.11 38.95,-20.48 45.34,-28.93 49.21,-23.11"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M111.29,-54.89C92.01,-45.1 69.34,-33.59 51.95,-24.76"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="53.73,-21.74 43.23,-20.33 50.56,-27.98 53.73,-21.74"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -61,8 +61,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="M110.86,-55.07C106.75,-47.03 102.03,-37.8 97.96,-29.84"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="101.13,-28.35 93.46,-21.04 94.89,-31.54 101.13,-28.35"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M131.54,-55.07C122.96,-46.29 113,-36.09 104.78,-27.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="107.53,-25.49 98.04,-20.78 102.53,-30.38 107.53,-25.49"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -70,8 +70,8 @@
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="181.88,-19.25 128.38,-19.25 128.38,0 181.88,0 181.88,-19.25"/>
|
||||
<text text-anchor="middle" x="155.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="173.75,-19.25 128.5,-19.25 128.5,0 173.75,0 173.75,-19.25"/>
|
||||
<text text-anchor="middle" x="151.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstdint</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -79,8 +79,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="M131.7,-55.07C135.94,-47.03 140.8,-37.8 145,-29.84"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="148.07,-31.51 149.64,-21.03 141.88,-28.25 148.07,-31.51"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M151.12,-55.07C151.12,-47.4 151.12,-38.64 151.12,-30.95"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="154.63,-31.21 151.13,-21.21 147.63,-31.21 154.63,-31.21"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -88,8 +88,8 @@
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="242.62,-19.25 199.62,-19.25 199.62,0 242.62,0 242.62,-19.25"/>
|
||||
<text text-anchor="middle" x="221.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="244.88,-19.25 191.38,-19.25 191.38,0 244.88,0 244.88,-19.25"/>
|
||||
<text text-anchor="middle" x="218.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -97,8 +97,26 @@
|
||||
<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="M152.49,-54.89C167.1,-45.47 184.18,-34.46 197.65,-25.77"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="199.36,-28.83 205.87,-20.46 195.57,-22.94 199.36,-28.83"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M171.96,-55.07C181.08,-46.29 191.67,-36.09 200.41,-27.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="202.84,-30.2 207.61,-20.75 197.98,-25.16 202.84,-30.2"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="305.62,-19.25 262.62,-19.25 262.62,0 305.62,0 305.62,-19.25"/>
|
||||
<text text-anchor="middle" x="284.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node6 -->
|
||||
<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="M192.84,-54.89C213.13,-45.06 237,-33.48 255.24,-24.63"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="256.69,-27.82 264.17,-20.3 253.64,-21.52 256.69,-27.82"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 5.6 KiB |
@@ -4,18 +4,18 @@
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/longest_increasing_subsequence.cpp Pages: 1 -->
|
||||
<svg width="251pt" height="105pt"
|
||||
viewBox="0.00 0.00 250.62 105.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="314pt" height="105pt"
|
||||
viewBox="0.00 0.00 313.62 105.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 101)">
|
||||
<title>dynamic_programming/longest_increasing_subsequence.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Calculate the length of the longest increasing subsequence in an array.">
|
||||
<polygon fill="#999999" stroke="#666666" points="178.25,-97 64,-97 64,-55.25 178.25,-55.25 178.25,-97"/>
|
||||
<text text-anchor="start" x="72" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="start" x="72" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">/longest_increasing</text>
|
||||
<text text-anchor="middle" x="121.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">_subsequence.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="208.25,-97 94,-97 94,-55.25 208.25,-55.25 208.25,-97"/>
|
||||
<text text-anchor="start" x="102" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="start" x="102" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">/longest_increasing</text>
|
||||
<text text-anchor="middle" x="151.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">_subsequence.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -32,8 +32,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="M90.7,-54.89C76.53,-45.47 59.96,-34.46 46.9,-25.77"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="49.21,-23.11 38.95,-20.48 45.34,-28.93 49.21,-23.11"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M111.29,-54.89C92.01,-45.1 69.34,-33.59 51.95,-24.76"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="53.73,-21.74 43.23,-20.33 50.56,-27.98 53.73,-21.74"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -50,8 +50,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="M110.86,-55.07C106.75,-47.03 102.03,-37.8 97.96,-29.84"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="101.13,-28.35 93.46,-21.04 94.89,-31.54 101.13,-28.35"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M131.54,-55.07C122.96,-46.29 113,-36.09 104.78,-27.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="107.53,-25.49 98.04,-20.78 102.53,-30.38 107.53,-25.49"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -59,8 +59,8 @@
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="181.88,-19.25 128.38,-19.25 128.38,0 181.88,0 181.88,-19.25"/>
|
||||
<text text-anchor="middle" x="155.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="173.75,-19.25 128.5,-19.25 128.5,0 173.75,0 173.75,-19.25"/>
|
||||
<text text-anchor="middle" x="151.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstdint</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -68,8 +68,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="M131.7,-55.07C135.94,-47.03 140.8,-37.8 145,-29.84"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="148.07,-31.51 149.64,-21.03 141.88,-28.25 148.07,-31.51"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M151.12,-55.07C151.12,-47.4 151.12,-38.64 151.12,-30.95"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="154.63,-31.21 151.13,-21.21 147.63,-31.21 154.63,-31.21"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -77,8 +77,8 @@
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="242.62,-19.25 199.62,-19.25 199.62,0 242.62,0 242.62,-19.25"/>
|
||||
<text text-anchor="middle" x="221.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="244.88,-19.25 191.38,-19.25 191.38,0 244.88,0 244.88,-19.25"/>
|
||||
<text text-anchor="middle" x="218.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -86,8 +86,26 @@
|
||||
<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="M152.49,-54.89C167.1,-45.47 184.18,-34.46 197.65,-25.77"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="199.36,-28.83 205.87,-20.46 195.57,-22.94 199.36,-28.83"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M171.96,-55.07C181.08,-46.29 191.67,-36.09 200.41,-27.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="202.84,-30.2 207.61,-20.75 197.98,-25.16 202.84,-30.2"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="305.62,-19.25 262.62,-19.25 262.62,0 305.62,0 305.62,-19.25"/>
|
||||
<text text-anchor="middle" x="284.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node6 -->
|
||||
<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="M192.84,-54.89C213.13,-45.06 237,-33.48 255.24,-24.63"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="256.69,-27.82 264.17,-20.3 253.64,-21.52 256.69,-27.82"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.9 KiB |
@@ -1,11 +1,11 @@
|
||||
<map id="dynamic_programming/unbounded_0_1_knapsack.cpp" name="dynamic_programming/unbounded_0_1_knapsack.cpp">
|
||||
<area shape="rect" id="Node000001" title="Implementation of the Unbounded 0/1 Knapsack Problem." alt="" coords="70,5,274,46"/>
|
||||
<area shape="rect" id="Node000002" title=" " alt="" coords="5,94,77,120"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="140,49,75,88,72,83,138,44"/>
|
||||
<area shape="rect" id="Node000003" title=" " alt="" coords="100,94,158,120"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="163,48,145,81,141,79,159,45"/>
|
||||
<area shape="rect" id="Node000004" title=" " alt="" coords="182,94,246,120"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="185,45,203,79,198,81,180,48"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="271,94,331,120"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="205,44,270,83,267,88,202,49"/>
|
||||
<area shape="rect" id="Node000001" title="Implementation of the Unbounded 0/1 Knapsack Problem." alt="" coords="66,5,270,46"/>
|
||||
<area shape="rect" id="Node000002" title=" " alt="" coords="5,94,70,120"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="137,49,72,88,69,83,134,44"/>
|
||||
<area shape="rect" id="Node000003" title=" " alt="" coords="94,94,154,120"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="160,48,141,82,136,79,155,45"/>
|
||||
<area shape="rect" id="Node000004" title=" " alt="" coords="178,94,249,120"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="182,45,201,79,197,82,177,48"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="273,94,330,120"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="203,44,269,83,267,88,200,49"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
58458697f53a27e81fff0097907f30e3
|
||||
4b0254f68e88baad8c3ce510d394b7d2
|
||||
@@ -5,7 +5,7 @@
|
||||
-->
|
||||
<!-- Title: dynamic_programming/unbounded_0_1_knapsack.cpp Pages: 1 -->
|
||||
<svg width="252pt" height="94pt"
|
||||
viewBox="0.00 0.00 252.38 93.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
viewBox="0.00 0.00 251.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="Implementation of the Unbounded 0/1 Knapsack Problem.">
|
||||
<polygon fill="#999999" stroke="#666666" points="201.38,-85.75 48.12,-85.75 48.12,-55.25 201.38,-55.25 201.38,-85.75"/>
|
||||
<text text-anchor="start" x="56.12" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="124.75" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/unbounded_0_1_knapsack.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="198.75,-85.75 45.5,-85.75 45.5,-55.25 198.75,-55.25 198.75,-85.75"/>
|
||||
<text text-anchor="start" x="53.5" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="122.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/unbounded_0_1_knapsack.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -33,8 +33,8 @@
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="53.5,-19.25 0,-19.25 0,0 53.5,0 53.5,-19.25"/>
|
||||
<text text-anchor="middle" x="26.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="48.25,-19.25 0,-19.25 0,0 48.25,0 48.25,-19.25"/>
|
||||
<text text-anchor="middle" x="24.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cassert</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="M100.27,-54.8C85.35,-45.83 66.33,-34.41 51.38,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="53.45,-22.58 43.08,-20.43 49.85,-28.58 53.45,-22.58"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M97.65,-54.8C82.72,-45.83 63.71,-34.41 48.76,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="50.83,-22.58 40.45,-20.43 47.22,-28.58 50.83,-22.58"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -51,8 +51,8 @@
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="114.25,-19.25 71.25,-19.25 71.25,0 114.25,0 114.25,-19.25"/>
|
||||
<text text-anchor="middle" x="92.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="111.75,-19.25 66.5,-19.25 66.5,0 111.75,0 111.75,-19.25"/>
|
||||
<text text-anchor="middle" x="89.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstdint</text>
|
||||
</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="M116.84,-54.95C112.72,-47.36 107.62,-37.99 103.18,-29.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="106.26,-28.15 98.41,-21.03 100.11,-31.49 106.26,-28.15"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M113.97,-54.95C109.67,-47.28 104.34,-37.77 99.73,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="102.89,-28.03 94.95,-21.02 96.79,-31.46 102.89,-28.03"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -69,8 +69,8 @@
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="180.88,-19.25 132.62,-19.25 132.62,0 180.88,0 180.88,-19.25"/>
|
||||
<text text-anchor="middle" x="156.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cassert</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="182.88,-19.25 129.38,-19.25 129.38,0 182.88,0 182.88,-19.25"/>
|
||||
<text text-anchor="middle" x="156.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</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="M132.66,-54.95C136.78,-47.36 141.88,-37.99 146.32,-29.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="149.39,-31.49 151.09,-21.03 143.24,-28.15 149.39,-31.49"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M130.53,-54.95C134.96,-47.28 140.45,-37.77 145.2,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="148.16,-31.42 150.13,-21.01 142.09,-27.92 148.16,-31.42"/>
|
||||
</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="244.38,-19.25 199.12,-19.25 199.12,0 244.38,0 244.38,-19.25"/>
|
||||
<text text-anchor="middle" x="221.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstdint</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="243.62,-19.25 200.62,-19.25 200.62,0 243.62,0 243.62,-19.25"/>
|
||||
<text text-anchor="middle" x="222.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</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="M148.73,-54.95C163.5,-45.98 182.38,-34.52 197.25,-25.5"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="198.77,-28.67 205.5,-20.49 195.14,-22.68 198.77,-28.67"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M147.1,-54.8C162.33,-45.83 181.73,-34.41 196.99,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="198.64,-28.51 205.48,-20.42 195.09,-22.48 198.64,-28.51"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
@@ -5,16 +5,16 @@
|
||||
-->
|
||||
<!-- Title: dynamic_programming/unbounded_0_1_knapsack.cpp Pages: 1 -->
|
||||
<svg width="252pt" height="94pt"
|
||||
viewBox="0.00 0.00 252.38 93.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
viewBox="0.00 0.00 251.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/unbounded_0_1_knapsack.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Implementation of the Unbounded 0/1 Knapsack Problem.">
|
||||
<polygon fill="#999999" stroke="#666666" points="201.38,-85.75 48.12,-85.75 48.12,-55.25 201.38,-55.25 201.38,-85.75"/>
|
||||
<text text-anchor="start" x="56.12" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="124.75" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/unbounded_0_1_knapsack.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="198.75,-85.75 45.5,-85.75 45.5,-55.25 198.75,-55.25 198.75,-85.75"/>
|
||||
<text text-anchor="start" x="53.5" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="122.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/unbounded_0_1_knapsack.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -22,8 +22,8 @@
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="53.5,-19.25 0,-19.25 0,0 53.5,0 53.5,-19.25"/>
|
||||
<text text-anchor="middle" x="26.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="48.25,-19.25 0,-19.25 0,0 48.25,0 48.25,-19.25"/>
|
||||
<text text-anchor="middle" x="24.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cassert</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="M100.27,-54.8C85.35,-45.83 66.33,-34.41 51.38,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="53.45,-22.58 43.08,-20.43 49.85,-28.58 53.45,-22.58"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M97.65,-54.8C82.72,-45.83 63.71,-34.41 48.76,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="50.83,-22.58 40.45,-20.43 47.22,-28.58 50.83,-22.58"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -40,8 +40,8 @@
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="114.25,-19.25 71.25,-19.25 71.25,0 114.25,0 114.25,-19.25"/>
|
||||
<text text-anchor="middle" x="92.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="111.75,-19.25 66.5,-19.25 66.5,0 111.75,0 111.75,-19.25"/>
|
||||
<text text-anchor="middle" x="89.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstdint</text>
|
||||
</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="M116.84,-54.95C112.72,-47.36 107.62,-37.99 103.18,-29.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="106.26,-28.15 98.41,-21.03 100.11,-31.49 106.26,-28.15"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M113.97,-54.95C109.67,-47.28 104.34,-37.77 99.73,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="102.89,-28.03 94.95,-21.02 96.79,-31.46 102.89,-28.03"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -58,8 +58,8 @@
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="180.88,-19.25 132.62,-19.25 132.62,0 180.88,0 180.88,-19.25"/>
|
||||
<text text-anchor="middle" x="156.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cassert</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="182.88,-19.25 129.38,-19.25 129.38,0 182.88,0 182.88,-19.25"/>
|
||||
<text text-anchor="middle" x="156.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</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="M132.66,-54.95C136.78,-47.36 141.88,-37.99 146.32,-29.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="149.39,-31.49 151.09,-21.03 143.24,-28.15 149.39,-31.49"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M130.53,-54.95C134.96,-47.28 140.45,-37.77 145.2,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="148.16,-31.42 150.13,-21.01 142.09,-27.92 148.16,-31.42"/>
|
||||
</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="244.38,-19.25 199.12,-19.25 199.12,0 244.38,0 244.38,-19.25"/>
|
||||
<text text-anchor="middle" x="221.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstdint</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="243.62,-19.25 200.62,-19.25 200.62,0 243.62,0 243.62,-19.25"/>
|
||||
<text text-anchor="middle" x="222.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</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="M148.73,-54.95C163.5,-45.98 182.38,-34.52 197.25,-25.5"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="198.77,-28.67 205.5,-20.49 195.14,-22.68 198.77,-28.67"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M147.1,-54.8C162.33,-45.83 181.73,-34.41 196.99,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="198.64,-28.51 205.48,-20.42 195.09,-22.48 198.64,-28.51"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -5,7 +5,7 @@
|
||||
<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/armstrong_number.cpp File Reference</title>
|
||||
<title>Algorithms_in_C++: dynamic_programming/armstrong_number_templated.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>
|
||||
@@ -78,7 +78,7 @@ $(function() {
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d1/db7/dynamic__programming_2armstrong__number_8cpp.html','../../'); initResizable(true); });
|
||||
$(function(){initNavTree('d1/da7/armstrong__number__templated_8cpp.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
@@ -107,7 +107,7 @@ $(function(){initNavTree('d1/db7/dynamic__programming_2armstrong__number_8cpp.ht
|
||||
<div class="summary">
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">armstrong_number.cpp File Reference</div></div>
|
||||
<div class="headertitle"><div class="title">armstrong_number_templated.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
@@ -117,9 +117,9 @@ $(function(){initNavTree('d1/db7/dynamic__programming_2armstrong__number_8cpp.ht
|
||||
<code>#include <cmath></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for armstrong_number.cpp:</div>
|
||||
Include dependency graph for armstrong_number_templated.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/ddf/dynamic__programming_2armstrong__number_8cpp__incl.svg" width="252" 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="../../d2/dc5/armstrong__number__templated_8cpp__incl.svg" width="252" 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>
|
||||
@@ -171,11 +171,11 @@ Functions</h2></td></tr>
|
||||
<div class="line"><span class="lineno"> 91</span> <a class="code hl_function" href="#a483bb8ccf42aaf7375a83e91490eda1e">tests</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><span class="lineno"> 92</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 93</span>}</div>
|
||||
<div class="ttc" id="adynamic__programming_2armstrong__number_8cpp_html_a483bb8ccf42aaf7375a83e91490eda1e"><div class="ttname"><a href="#a483bb8ccf42aaf7375a83e91490eda1e">tests</a></div><div class="ttdeci">static void tests()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> armstrong_number.cpp:71</div></div>
|
||||
<div class="ttc" id="aarmstrong__number__templated_8cpp_html_a483bb8ccf42aaf7375a83e91490eda1e"><div class="ttname"><a href="#a483bb8ccf42aaf7375a83e91490eda1e">tests</a></div><div class="ttdeci">static void tests()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> armstrong_number_templated.cpp:71</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="../../d1/db7/dynamic__programming_2armstrong__number_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="479" height="52"><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="../../d1/da7/armstrong__number__templated_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="479" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -220,11 +220,11 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 83</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 have successfully passed!\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 84</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="anamespacedynamic__programming_html_af046365a8d77a1267acc082f86135a26"><div class="ttname"><a href="../../dd/d24/namespacedynamic__programming.html#af046365a8d77a1267acc082f86135a26">dynamic_programming::is_armstrong</a></div><div class="ttdeci">bool is_armstrong(const T &number)</div><div class="ttdoc">Checks if the given number is armstrong or not.</div><div class="ttdef"><b>Definition</b> armstrong_number.cpp:39</div></div>
|
||||
<div class="ttc" id="anamespacedynamic__programming_html_af046365a8d77a1267acc082f86135a26"><div class="ttname"><a href="../../dd/d24/namespacedynamic__programming.html#af046365a8d77a1267acc082f86135a26">dynamic_programming::is_armstrong</a></div><div class="ttdeci">bool is_armstrong(const T &number)</div><div class="ttdoc">Checks if the given number is armstrong or not.</div><div class="ttdef"><b>Definition</b> armstrong_number_templated.cpp:39</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="../../d1/db7/dynamic__programming_2armstrong__number_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.svg" width="382" height="52"><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="../../d1/da7/armstrong__number__templated_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.svg" width="382" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -234,7 +234,7 @@ Here is the call graph for this function:</div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_8a20dd5bfd5341a725342bf72b6b686f.html">dynamic_programming</a></li><li class="navelem"><a class="el" href="../../d1/db7/dynamic__programming_2armstrong__number_8cpp.html">armstrong_number.cpp</a></li>
|
||||
<li class="navelem"><a class="el" href="../../dir_8a20dd5bfd5341a725342bf72b6b686f.html">dynamic_programming</a></li><li class="navelem"><a class="el" href="../../d1/da7/armstrong__number__templated_8cpp.html">armstrong_number_templated.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>
|
||||
6
d1/da7/armstrong__number__templated_8cpp.js
Normal file
@@ -0,0 +1,6 @@
|
||||
var armstrong__number__templated_8cpp =
|
||||
[
|
||||
[ "is_armstrong", "d1/da7/armstrong__number__templated_8cpp.html#af046365a8d77a1267acc082f86135a26", null ],
|
||||
[ "main", "d1/da7/armstrong__number__templated_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "tests", "d1/da7/armstrong__number__templated_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e", null ]
|
||||
];
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -1,6 +1,6 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="Node000001" title="Main function." alt="" coords="5,13,55,38"/>
|
||||
<area shape="rect" id="Node000002" href="$d1/db7/dynamic__programming_2armstrong__number_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" title="Self-test implementations." alt="" coords="103,13,153,38"/>
|
||||
<area shape="rect" id="Node000002" href="$d1/da7/armstrong__number__templated_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" title="Self-test implementations." alt="" coords="103,13,153,38"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,23,88,23,88,28,55,28"/>
|
||||
<area shape="rect" id="Node000003" href="$dd/d24/namespacedynamic__programming.html#af046365a8d77a1267acc082f86135a26" title="Checks if the given number is armstrong or not." alt="" coords="201,5,353,46"/>
|
||||
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="153,23,186,23,186,28,153,28"/>
|
||||
@@ -0,0 +1 @@
|
||||
ec3c99204a91eb6d2db419fdce5fbf07
|
||||
@@ -31,7 +31,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d1/db7/dynamic__programming_2armstrong__number_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" target="_top" xlink:title="Self-test implementations.">
|
||||
<g id="a_Node000002"><a xlink:href="../../d1/da7/armstrong__number__templated_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" target="_top" xlink:title="Self-test implementations.">
|
||||
<polygon fill="white" stroke="#666666" points="110.75,-24.88 73,-24.88 73,-5.63 110.75,-5.63 110.75,-24.88"/>
|
||||
<text text-anchor="middle" x="91.88" y="-11.38" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
|
||||
</a>
|
||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
@@ -20,7 +20,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d1/db7/dynamic__programming_2armstrong__number_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" target="_top" xlink:title="Self-test implementations.">
|
||||
<g id="a_Node000002"><a xlink:href="../../d1/da7/armstrong__number__templated_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" target="_top" xlink:title="Self-test implementations.">
|
||||
<polygon fill="white" stroke="#666666" points="110.75,-24.88 73,-24.88 73,-5.63 110.75,-5.63 110.75,-24.88"/>
|
||||
<text text-anchor="middle" x="91.88" y="-11.38" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
|
||||
</a>
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
@@ -1,6 +0,0 @@
|
||||
var dynamic__programming_2armstrong__number_8cpp =
|
||||
[
|
||||
[ "is_armstrong", "d1/db7/dynamic__programming_2armstrong__number_8cpp.html#af046365a8d77a1267acc082f86135a26", null ],
|
||||
[ "main", "d1/db7/dynamic__programming_2armstrong__number_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "tests", "d1/db7/dynamic__programming_2armstrong__number_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e", null ]
|
||||
];
|
||||
@@ -1 +0,0 @@
|
||||
6472f459d0a32076394714e5a2f4b152
|
||||
@@ -1,19 +1,21 @@
|
||||
<map id="Graph" name="Graph">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="585,172,641,198"/>
|
||||
<area shape="rect" id="Node000002" href="$d7/d77/class_edge.html" title=" " alt="" coords="319,5,370,31"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="386,17,426,21,473,31,520,48,563,75,583,98,597,124,612,171,607,172,592,126,578,101,559,79,518,53,471,36,425,26,385,22"/>
|
||||
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/map.html" title=" " alt="" coords="258,56,431,111"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="447,92,506,106,562,131,587,149,604,170,600,173,583,153,560,135,504,111,446,97"/>
|
||||
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="5,63,153,104"/>
|
||||
<area shape="poly" id="edge3_Node000003_Node000004" title=" " alt="" coords="168,81,257,81,257,86,168,86"/>
|
||||
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="266,135,423,176"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="439,163,585,179,584,184,438,168"/>
|
||||
<area shape="rect" id="Node000006" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="284,200,405,226"/>
|
||||
<area shape="poly" id="edge5_Node000001_Node000006" title=" " alt="" coords="420,210,489,206,561,197,584,191,585,197,561,202,489,211,420,215"/>
|
||||
<area shape="rect" id="Node000007" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="270,250,419,290"/>
|
||||
<area shape="poly" id="edge6_Node000001_Node000007" title=" " alt="" coords="434,263,497,252,560,229,582,214,599,196,603,200,585,218,562,234,499,257,435,268"/>
|
||||
<area shape="rect" id="Node000008" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/tuple.html" title=" " alt="" coords="15,250,143,290"/>
|
||||
<area shape="poly" id="edge7_Node000007_Node000008" title=" " alt="" coords="158,268,269,268,269,273,158,273"/>
|
||||
<area shape="rect" id="Node000009" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/bitset.html" title=" " alt="" coords="273,315,416,340"/>
|
||||
<area shape="poly" id="edge8_Node000001_Node000009" title=" " alt="" coords="430,324,497,311,530,298,559,280,577,262,591,239,606,197,611,199,596,242,582,265,563,285,532,303,499,316,431,329"/>
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="585,174,641,200"/>
|
||||
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="276,8,413,33"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="429,24,498,41,532,56,563,77,583,100,597,126,612,173,607,175,592,128,578,103,559,81,530,61,496,46,428,29"/>
|
||||
<area shape="rect" id="Node000003" href="$d7/d77/class_edge.html" title=" " alt="" coords="53,8,105,33"/>
|
||||
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="120,18,275,18,275,23,120,23"/>
|
||||
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/map.html" title=" " alt="" coords="258,58,431,114"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="447,94,506,109,562,133,587,152,604,172,600,176,583,155,560,137,504,114,446,99"/>
|
||||
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="5,65,153,106"/>
|
||||
<area shape="poly" id="edge4_Node000004_Node000005" title=" " alt="" coords="168,83,257,83,257,88,168,88"/>
|
||||
<area shape="rect" id="Node000006" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="266,137,423,178"/>
|
||||
<area shape="poly" id="edge5_Node000001_Node000006" title=" " alt="" coords="439,165,585,181,584,187,438,171"/>
|
||||
<area shape="rect" id="Node000007" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="284,202,405,228"/>
|
||||
<area shape="poly" id="edge6_Node000001_Node000007" title=" " alt="" coords="420,212,489,208,561,199,584,194,585,199,561,205,489,214,420,217"/>
|
||||
<area shape="rect" id="Node000008" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="270,252,419,293"/>
|
||||
<area shape="poly" id="edge7_Node000001_Node000008" title=" " alt="" coords="434,265,497,254,560,232,582,216,599,199,603,202,585,220,562,236,499,259,435,271"/>
|
||||
<area shape="rect" id="Node000009" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/tuple.html" title=" " alt="" coords="15,252,143,293"/>
|
||||
<area shape="poly" id="edge8_Node000008_Node000009" title=" " alt="" coords="158,270,269,270,269,275,158,275"/>
|
||||
<area shape="rect" id="Node000010" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/bitset.html" title=" " alt="" coords="273,317,416,342"/>
|
||||
<area shape="poly" id="edge9_Node000001_Node000010" title=" " alt="" coords="430,326,497,313,530,300,559,283,577,264,591,241,606,200,611,201,596,244,582,267,563,287,532,305,499,318,431,331"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
473d9285f6b814132d52a27d5da1ab97
|
||||
ff1e3808bc1707202b3c553605f4077d
|
||||
@@ -4,8 +4,8 @@
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: Graph Pages: 1 -->
|
||||
<svg width="485pt" height="259pt"
|
||||
viewBox="0.00 0.00 485.00 259.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="485pt" height="261pt"
|
||||
viewBox="0.00 0.00 485.00 260.88" 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">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
]]></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 255.25)">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 256.88)">
|
||||
<title>Graph</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
@@ -31,9 +31,9 @@
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d7/d77/class_edge.html" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="273.5,-251.25 235,-251.25 235,-232 273.5,-232 273.5,-251.25"/>
|
||||
<text text-anchor="middle" x="254.25" y="-237.75" font-family="Helvetica,sans-Serif" font-size="10.00">Edge</text>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="305.75,-251.25 202.75,-251.25 202.75,-232 305.75,-232 305.75,-251.25"/>
|
||||
<text text-anchor="middle" x="254.25" y="-237.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< Edge ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -41,8 +41,8 @@
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node2->Node1</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M285.18,-240.8C320.45,-238.32 379.02,-229.3 416.75,-197.62 439.25,-178.74 449.31,-143.59 453.03,-126.48"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="285.05,-237.3 275.26,-241.35 285.43,-244.29 285.05,-237.3"/>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M317.5,-237.12C350.19,-231.9 389.08,-220.86 416.75,-197.62 439.25,-178.74 449.31,-143.59 453.03,-126.48"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="317.13,-233.64 307.73,-238.52 318.12,-240.57 317.13,-233.64"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="377" y="-234.57" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> edges</text>
|
||||
@@ -50,7 +50,26 @@
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/map.html" xlink:title=" ">
|
||||
<g id="a_Node000003"><a xlink:href="../../d7/d77/class_edge.html" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="74.5,-251.25 36,-251.25 36,-232 74.5,-232 74.5,-251.25"/>
|
||||
<text text-anchor="middle" x="55.25" y="-237.75" font-family="Helvetica,sans-Serif" font-size="10.00">Edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node2 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node3->Node2</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M86.04,-241.62C116.84,-241.62 165.5,-241.62 202.41,-241.62"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="86.3,-238.13 76.3,-241.63 86.3,-245.13 86.3,-238.13"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="149.88" y="-243.38" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> elements</text>
|
||||
</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/container/map.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="319.25,-213.5 189.25,-213.5 189.25,-171.75 319.25,-171.75 319.25,-213.5"/>
|
||||
<text text-anchor="start" x="197.25" y="-200" font-family="Helvetica,sans-Serif" font-size="10.00">std::map< unsigned</text>
|
||||
<text text-anchor="start" x="197.25" y="-188.75" font-family="Helvetica,sans-Serif" font-size="10.00"> int, std::vector< unsigned</text>
|
||||
@@ -58,63 +77,43 @@
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node1 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node3->Node1</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<!-- Node4->Node1 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node4->Node1</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M330.71,-184.48C359.01,-179.13 390.61,-170.28 416.75,-155.62 429.63,-148.4 440.97,-135.5 447.87,-126.52"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="330.37,-180.99 321.12,-186.17 331.58,-187.88 330.37,-180.99"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="377" y="-184.24" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> m_adjList</text>
|
||||
</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/container/vector.html" xlink:title=" ">
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="110.5,-207.88 0,-207.88 0,-177.38 110.5,-177.38 110.5,-207.88"/>
|
||||
<text text-anchor="start" x="8" y="-194.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< unsigned</text>
|
||||
<text text-anchor="middle" x="55.25" y="-183.12" font-family="Helvetica,sans-Serif" font-size="10.00"> int ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node3 -->
|
||||
<g id="edge3_Node000003_Node000004" class="edge">
|
||||
<title>Node4->Node3</title>
|
||||
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
|
||||
<!-- Node5->Node4 -->
|
||||
<g id="edge4_Node000004_Node000005" class="edge">
|
||||
<title>Node5->Node4</title>
|
||||
<g id="a_edge4_Node000004_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M122.23,-192.62C143.79,-192.62 167.68,-192.62 189.1,-192.62"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="122.38,-189.13 112.38,-192.63 122.38,-196.13 122.38,-189.13"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="149.88" y="-194.38" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> elements</text>
|
||||
</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/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="313.25,-153.88 195.25,-153.88 195.25,-123.38 313.25,-123.38 313.25,-153.88"/>
|
||||
<text text-anchor="start" x="203.25" y="-140.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< std::vector</text>
|
||||
<text text-anchor="middle" x="254.25" y="-129.12" font-family="Helvetica,sans-Serif" font-size="10.00">< int > ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node1 -->
|
||||
<g id="edge4_Node000001_Node000005" class="edge">
|
||||
<title>Node5->Node1</title>
|
||||
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M324.75,-130.97C363.41,-126.7 408.77,-121.71 434.44,-118.88"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="324.59,-127.46 315.03,-132.04 325.35,-134.42 324.59,-127.46"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="377" y="-141.94" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> capacity</text>
|
||||
<text text-anchor="middle" x="377" y="-130.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey">residual_capacity</text>
|
||||
</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/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="299.75,-105.25 208.75,-105.25 208.75,-86 299.75,-86 299.75,-105.25"/>
|
||||
<text text-anchor="middle" x="254.25" y="-91.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< int ></text>
|
||||
<polygon fill="white" stroke="#666666" points="313.25,-153.88 195.25,-153.88 195.25,-123.38 313.25,-123.38 313.25,-153.88"/>
|
||||
<text text-anchor="start" x="203.25" y="-140.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< std::vector</text>
|
||||
<text text-anchor="middle" x="254.25" y="-129.12" font-family="Helvetica,sans-Serif" font-size="10.00">< int > ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -122,19 +121,19 @@
|
||||
<g id="edge5_Node000001_Node000006" class="edge">
|
||||
<title>Node6->Node1</title>
|
||||
<g id="a_edge5_Node000001_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M311.24,-95.89C342.49,-96.82 382.01,-99.28 416.75,-105.38 422.6,-106.4 428.82,-108.01 434.5,-109.69"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="311.72,-92.4 301.64,-95.66 311.55,-99.4 311.72,-92.4"/>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M324.75,-130.97C363.41,-126.7 408.77,-121.71 434.44,-118.88"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="324.59,-127.46 315.03,-132.04 325.35,-134.42 324.59,-127.46"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="377" y="-107.12" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> parent</text>
|
||||
<text text-anchor="middle" x="377" y="-141.94" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> capacity</text>
|
||||
<text text-anchor="middle" x="377" y="-130.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey">residual_capacity</text>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="310.25,-67.88 198.25,-67.88 198.25,-37.38 310.25,-37.38 310.25,-67.88"/>
|
||||
<text text-anchor="start" x="206.25" y="-54.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< std::tuple</text>
|
||||
<text text-anchor="middle" x="254.25" y="-43.12" font-family="Helvetica,sans-Serif" font-size="10.00">< int, int, int > ></text>
|
||||
<polygon fill="white" stroke="#666666" points="299.75,-105.25 208.75,-105.25 208.75,-86 299.75,-86 299.75,-105.25"/>
|
||||
<text text-anchor="middle" x="254.25" y="-91.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< int ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -142,45 +141,65 @@
|
||||
<g id="edge6_Node000001_Node000007" class="edge">
|
||||
<title>Node7->Node1</title>
|
||||
<g id="a_edge6_Node000001_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M311.24,-95.89C342.49,-96.82 382.01,-99.28 416.75,-105.38 422.6,-106.4 428.82,-108.01 434.5,-109.69"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="311.72,-92.4 301.64,-95.66 311.55,-99.4 311.72,-92.4"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="377" y="-107.12" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> parent</text>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="310.25,-67.88 198.25,-67.88 198.25,-37.38 310.25,-37.38 310.25,-67.88"/>
|
||||
<text text-anchor="start" x="206.25" y="-54.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< std::tuple</text>
|
||||
<text text-anchor="middle" x="254.25" y="-43.12" font-family="Helvetica,sans-Serif" font-size="10.00">< int, int, int > ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node1 -->
|
||||
<g id="edge7_Node000001_Node000008" class="edge">
|
||||
<title>Node8->Node1</title>
|
||||
<g id="a_edge7_Node000001_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M321.7,-55.93C351.96,-59.54 387.46,-66.82 416.75,-81.38 428.86,-87.39 439.87,-98.46 446.91,-106.59"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="322.21,-52.47 311.89,-54.89 321.46,-59.43 322.21,-52.47"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="377" y="-83.12" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> edge_participated</text>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/tuple.html" xlink:title=" ">
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/tuple.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#bfbfbf" points="103,-67.88 7.5,-67.88 7.5,-37.38 103,-37.38 103,-67.88"/>
|
||||
<text text-anchor="start" x="15.5" y="-54.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::tuple< int, int,</text>
|
||||
<text text-anchor="middle" x="55.25" y="-43.12" font-family="Helvetica,sans-Serif" font-size="10.00"> int ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node7 -->
|
||||
<g id="edge7_Node000007_Node000008" class="edge">
|
||||
<title>Node8->Node7</title>
|
||||
<g id="a_edge7_Node000007_Node000008"><a xlink:title=" ">
|
||||
<!-- Node9->Node8 -->
|
||||
<g id="edge8_Node000008_Node000009" class="edge">
|
||||
<title>Node9->Node8</title>
|
||||
<g id="a_edge8_Node000008_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M114.81,-52.62C141.16,-52.62 172.12,-52.62 198.07,-52.62"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="114.95,-49.13 104.95,-52.63 114.95,-56.13 114.95,-49.13"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="149.88" y="-54.38" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> elements</text>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/bitset.html" xlink:title=" ">
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/bitset.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="307.62,-19.25 200.88,-19.25 200.88,0 307.62,0 307.62,-19.25"/>
|
||||
<text text-anchor="middle" x="254.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::bitset< MAXN ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node1 -->
|
||||
<g id="edge8_Node000001_Node000009" class="edge">
|
||||
<title>Node9->Node1</title>
|
||||
<g id="a_edge8_Node000001_Node000009"><a xlink:title=" ">
|
||||
<!-- Node10->Node1 -->
|
||||
<g id="edge9_Node000001_Node000010" class="edge">
|
||||
<title>Node10->Node1</title>
|
||||
<g id="a_edge9_Node000001_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M319.05,-10.37C351.13,-13.66 388.98,-22.33 416.75,-43.38 437.89,-59.39 448.39,-90.51 452.58,-106.54"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="319.74,-6.91 309.48,-9.54 319.14,-13.89 319.74,-6.91"/>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 12 KiB |
@@ -4,9 +4,9 @@
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: Graph Pages: 1 -->
|
||||
<svg width="485pt" height="259pt"
|
||||
viewBox="0.00 0.00 485.00 259.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 255.25)">
|
||||
<svg width="485pt" height="261pt"
|
||||
viewBox="0.00 0.00 485.00 260.88" 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 256.88)">
|
||||
<title>Graph</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
@@ -20,9 +20,9 @@
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d7/d77/class_edge.html" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="273.5,-251.25 235,-251.25 235,-232 273.5,-232 273.5,-251.25"/>
|
||||
<text text-anchor="middle" x="254.25" y="-237.75" font-family="Helvetica,sans-Serif" font-size="10.00">Edge</text>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="305.75,-251.25 202.75,-251.25 202.75,-232 305.75,-232 305.75,-251.25"/>
|
||||
<text text-anchor="middle" x="254.25" y="-237.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< Edge ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -30,8 +30,8 @@
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node2->Node1</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M285.18,-240.8C320.45,-238.32 379.02,-229.3 416.75,-197.62 439.25,-178.74 449.31,-143.59 453.03,-126.48"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="285.05,-237.3 275.26,-241.35 285.43,-244.29 285.05,-237.3"/>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M317.5,-237.12C350.19,-231.9 389.08,-220.86 416.75,-197.62 439.25,-178.74 449.31,-143.59 453.03,-126.48"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="317.13,-233.64 307.73,-238.52 318.12,-240.57 317.13,-233.64"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="377" y="-234.57" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> edges</text>
|
||||
@@ -39,7 +39,26 @@
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/map.html" xlink:title=" ">
|
||||
<g id="a_Node000003"><a xlink:href="../../d7/d77/class_edge.html" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="74.5,-251.25 36,-251.25 36,-232 74.5,-232 74.5,-251.25"/>
|
||||
<text text-anchor="middle" x="55.25" y="-237.75" font-family="Helvetica,sans-Serif" font-size="10.00">Edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node2 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node3->Node2</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M86.04,-241.62C116.84,-241.62 165.5,-241.62 202.41,-241.62"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="86.3,-238.13 76.3,-241.63 86.3,-245.13 86.3,-238.13"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="149.88" y="-243.38" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> elements</text>
|
||||
</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/container/map.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="319.25,-213.5 189.25,-213.5 189.25,-171.75 319.25,-171.75 319.25,-213.5"/>
|
||||
<text text-anchor="start" x="197.25" y="-200" font-family="Helvetica,sans-Serif" font-size="10.00">std::map< unsigned</text>
|
||||
<text text-anchor="start" x="197.25" y="-188.75" font-family="Helvetica,sans-Serif" font-size="10.00"> int, std::vector< unsigned</text>
|
||||
@@ -47,63 +66,43 @@
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node1 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node3->Node1</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<!-- Node4->Node1 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node4->Node1</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M330.71,-184.48C359.01,-179.13 390.61,-170.28 416.75,-155.62 429.63,-148.4 440.97,-135.5 447.87,-126.52"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="330.37,-180.99 321.12,-186.17 331.58,-187.88 330.37,-180.99"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="377" y="-184.24" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> m_adjList</text>
|
||||
</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/container/vector.html" xlink:title=" ">
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="110.5,-207.88 0,-207.88 0,-177.38 110.5,-177.38 110.5,-207.88"/>
|
||||
<text text-anchor="start" x="8" y="-194.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< unsigned</text>
|
||||
<text text-anchor="middle" x="55.25" y="-183.12" font-family="Helvetica,sans-Serif" font-size="10.00"> int ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node3 -->
|
||||
<g id="edge3_Node000003_Node000004" class="edge">
|
||||
<title>Node4->Node3</title>
|
||||
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
|
||||
<!-- Node5->Node4 -->
|
||||
<g id="edge4_Node000004_Node000005" class="edge">
|
||||
<title>Node5->Node4</title>
|
||||
<g id="a_edge4_Node000004_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M122.23,-192.62C143.79,-192.62 167.68,-192.62 189.1,-192.62"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="122.38,-189.13 112.38,-192.63 122.38,-196.13 122.38,-189.13"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="149.88" y="-194.38" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> elements</text>
|
||||
</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/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="313.25,-153.88 195.25,-153.88 195.25,-123.38 313.25,-123.38 313.25,-153.88"/>
|
||||
<text text-anchor="start" x="203.25" y="-140.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< std::vector</text>
|
||||
<text text-anchor="middle" x="254.25" y="-129.12" font-family="Helvetica,sans-Serif" font-size="10.00">< int > ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node1 -->
|
||||
<g id="edge4_Node000001_Node000005" class="edge">
|
||||
<title>Node5->Node1</title>
|
||||
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M324.75,-130.97C363.41,-126.7 408.77,-121.71 434.44,-118.88"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="324.59,-127.46 315.03,-132.04 325.35,-134.42 324.59,-127.46"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="377" y="-141.94" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> capacity</text>
|
||||
<text text-anchor="middle" x="377" y="-130.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey">residual_capacity</text>
|
||||
</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/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="299.75,-105.25 208.75,-105.25 208.75,-86 299.75,-86 299.75,-105.25"/>
|
||||
<text text-anchor="middle" x="254.25" y="-91.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< int ></text>
|
||||
<polygon fill="white" stroke="#666666" points="313.25,-153.88 195.25,-153.88 195.25,-123.38 313.25,-123.38 313.25,-153.88"/>
|
||||
<text text-anchor="start" x="203.25" y="-140.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< std::vector</text>
|
||||
<text text-anchor="middle" x="254.25" y="-129.12" font-family="Helvetica,sans-Serif" font-size="10.00">< int > ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -111,19 +110,19 @@
|
||||
<g id="edge5_Node000001_Node000006" class="edge">
|
||||
<title>Node6->Node1</title>
|
||||
<g id="a_edge5_Node000001_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M311.24,-95.89C342.49,-96.82 382.01,-99.28 416.75,-105.38 422.6,-106.4 428.82,-108.01 434.5,-109.69"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="311.72,-92.4 301.64,-95.66 311.55,-99.4 311.72,-92.4"/>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M324.75,-130.97C363.41,-126.7 408.77,-121.71 434.44,-118.88"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="324.59,-127.46 315.03,-132.04 325.35,-134.42 324.59,-127.46"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="377" y="-107.12" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> parent</text>
|
||||
<text text-anchor="middle" x="377" y="-141.94" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> capacity</text>
|
||||
<text text-anchor="middle" x="377" y="-130.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey">residual_capacity</text>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="310.25,-67.88 198.25,-67.88 198.25,-37.38 310.25,-37.38 310.25,-67.88"/>
|
||||
<text text-anchor="start" x="206.25" y="-54.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< std::tuple</text>
|
||||
<text text-anchor="middle" x="254.25" y="-43.12" font-family="Helvetica,sans-Serif" font-size="10.00">< int, int, int > ></text>
|
||||
<polygon fill="white" stroke="#666666" points="299.75,-105.25 208.75,-105.25 208.75,-86 299.75,-86 299.75,-105.25"/>
|
||||
<text text-anchor="middle" x="254.25" y="-91.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< int ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -131,45 +130,65 @@
|
||||
<g id="edge6_Node000001_Node000007" class="edge">
|
||||
<title>Node7->Node1</title>
|
||||
<g id="a_edge6_Node000001_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M311.24,-95.89C342.49,-96.82 382.01,-99.28 416.75,-105.38 422.6,-106.4 428.82,-108.01 434.5,-109.69"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="311.72,-92.4 301.64,-95.66 311.55,-99.4 311.72,-92.4"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="377" y="-107.12" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> parent</text>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="310.25,-67.88 198.25,-67.88 198.25,-37.38 310.25,-37.38 310.25,-67.88"/>
|
||||
<text text-anchor="start" x="206.25" y="-54.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< std::tuple</text>
|
||||
<text text-anchor="middle" x="254.25" y="-43.12" font-family="Helvetica,sans-Serif" font-size="10.00">< int, int, int > ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node1 -->
|
||||
<g id="edge7_Node000001_Node000008" class="edge">
|
||||
<title>Node8->Node1</title>
|
||||
<g id="a_edge7_Node000001_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M321.7,-55.93C351.96,-59.54 387.46,-66.82 416.75,-81.38 428.86,-87.39 439.87,-98.46 446.91,-106.59"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="322.21,-52.47 311.89,-54.89 321.46,-59.43 322.21,-52.47"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="377" y="-83.12" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> edge_participated</text>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/tuple.html" xlink:title=" ">
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/tuple.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#bfbfbf" points="103,-67.88 7.5,-67.88 7.5,-37.38 103,-37.38 103,-67.88"/>
|
||||
<text text-anchor="start" x="15.5" y="-54.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::tuple< int, int,</text>
|
||||
<text text-anchor="middle" x="55.25" y="-43.12" font-family="Helvetica,sans-Serif" font-size="10.00"> int ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node7 -->
|
||||
<g id="edge7_Node000007_Node000008" class="edge">
|
||||
<title>Node8->Node7</title>
|
||||
<g id="a_edge7_Node000007_Node000008"><a xlink:title=" ">
|
||||
<!-- Node9->Node8 -->
|
||||
<g id="edge8_Node000008_Node000009" class="edge">
|
||||
<title>Node9->Node8</title>
|
||||
<g id="a_edge8_Node000008_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M114.81,-52.62C141.16,-52.62 172.12,-52.62 198.07,-52.62"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="114.95,-49.13 104.95,-52.63 114.95,-56.13 114.95,-49.13"/>
|
||||
</a>
|
||||
</g>
|
||||
<text text-anchor="middle" x="149.88" y="-54.38" font-family="Helvetica,sans-Serif" font-size="10.00" fill="grey"> elements</text>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/bitset.html" xlink:title=" ">
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/bitset.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="307.62,-19.25 200.88,-19.25 200.88,0 307.62,0 307.62,-19.25"/>
|
||||
<text text-anchor="middle" x="254.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::bitset< MAXN ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node1 -->
|
||||
<g id="edge8_Node000001_Node000009" class="edge">
|
||||
<title>Node9->Node1</title>
|
||||
<g id="a_edge8_Node000001_Node000009"><a xlink:title=" ">
|
||||
<!-- Node10->Node1 -->
|
||||
<g id="edge9_Node000001_Node000010" class="edge">
|
||||
<title>Node10->Node1</title>
|
||||
<g id="a_edge9_Node000001_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M319.05,-10.37C351.13,-13.66 388.98,-22.33 416.75,-43.38 437.89,-59.39 448.39,-90.51 452.58,-106.54"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="319.74,-6.91 309.48,-9.54 319.14,-13.89 319.74,-6.91"/>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 11 KiB |
@@ -194,7 +194,7 @@ Functions</h2></td></tr>
|
||||
<div class="line"><span class="lineno"> 151</span> print(mdist, V);</div>
|
||||
<div class="line"><span class="lineno"> 152</span>}</div>
|
||||
<div class="ttc" id="anamespacegraph_html"><div class="ttname"><a href="../../df/dce/namespacegraph.html">graph</a></div><div class="ttdoc">Graph Algorithms.</div></div>
|
||||
<div class="ttc" id="anamespacegreedy__algorithms_1_1dijkstra_html_af6cb29ca6dc5771439f6ea7262058a71"><div class="ttname"><a href="#af6cb29ca6dc5771439f6ea7262058a71">greedy_algorithms::dijkstra::minimum_distance</a></div><div class="ttdeci">int minimum_distance(std::vector< int > mdist, std::vector< bool > vset, int V)</div><div class="ttdoc">Utility function that finds the vertex with the minimum distance in mdist.</div><div class="ttdef"><b>Definition</b> dijkstra.cpp:82</div></div>
|
||||
<div class="ttc" id="anamespacegreedy__algorithms_1_1dijkstra_html_af6cb29ca6dc5771439f6ea7262058a71"><div class="ttname"><a href="#af6cb29ca6dc5771439f6ea7262058a71">greedy_algorithms::dijkstra::minimum_distance</a></div><div class="ttdeci">int minimum_distance(std::vector< int > mdist, std::vector< bool > vset, int V)</div><div class="ttdoc">Utility function that finds the vertex with the minimum distance in mdist.</div><div class="ttdef"><b>Definition</b> dijkstra_greedy.cpp:82</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>
|
||||
|
||||
@@ -114,12 +114,13 @@ $(function(){initNavTree('d2/d45/segtree_8cpp.html','../../'); initResizable(tru
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <cassert></code><br />
|
||||
<code>#include <cmath></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 segtree.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../de/db6/segtree_8cpp__incl.svg" width="334" height="111"><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="../../de/db6/segtree_8cpp__incl.svg" width="418" height="111"><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="func-members" name="func-members"></a>
|
||||
@@ -190,7 +191,7 @@ Functions</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> </p>
|
||||
<p>for assert for log2 for IO operations</p>
|
||||
<p>for assert for log2 for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint64_t</a> for IO operations</p>
|
||||
<p>Constructs the initial segment tree</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
@@ -203,18 +204,18 @@ Functions</h2></td></tr>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 38</span> {</div>
|
||||
<div class="line"><span class="lineno"> 39</span> <span class="keywordflow">if</span> (low == high) {</div>
|
||||
<div class="line"><span class="lineno"> 40</span> (*segtree)[pos] = arr[low];</div>
|
||||
<div class="line"><span class="lineno"> 41</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 42</span> }</div>
|
||||
<div class="line"><span class="lineno"> 43</span> </div>
|
||||
<div class="line"><span class="lineno"> 44</span> uint64_t mid = (low + high) / 2;</div>
|
||||
<div class="line"><span class="lineno"> 45</span> <a class="code hl_function" href="#ae752659b7c1719d68fdb2ca538a93696">ConsTree</a>(arr, segtree, low, mid, 2 * pos + 1);</div>
|
||||
<div class="line"><span class="lineno"> 46</span> <a class="code hl_function" href="#ae752659b7c1719d68fdb2ca538a93696">ConsTree</a>(arr, segtree, mid + 1, high, 2 * pos + 2);</div>
|
||||
<div class="line"><span class="lineno"> 47</span> (*segtree)[pos] = (*segtree)[2 * pos + 1] + (*segtree)[2 * pos + 2];</div>
|
||||
<div class="line"><span class="lineno"> 48</span>}</div>
|
||||
<div class="ttc" id="asegtree_8cpp_html_ae752659b7c1719d68fdb2ca538a93696"><div class="ttname"><a href="#ae752659b7c1719d68fdb2ca538a93696">ConsTree</a></div><div class="ttdeci">void ConsTree(const std::vector< int64_t > &arr, std::vector< int64_t > *segtree, uint64_t low, uint64_t high, uint64_t pos)</div><div class="ttdoc">for std::vector</div><div class="ttdef"><b>Definition</b> segtree.cpp:37</div></div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 39</span> {</div>
|
||||
<div class="line"><span class="lineno"> 40</span> <span class="keywordflow">if</span> (low == high) {</div>
|
||||
<div class="line"><span class="lineno"> 41</span> (*segtree)[pos] = arr[low];</div>
|
||||
<div class="line"><span class="lineno"> 42</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 43</span> }</div>
|
||||
<div class="line"><span class="lineno"> 44</span> </div>
|
||||
<div class="line"><span class="lineno"> 45</span> uint64_t mid = (low + high) / 2;</div>
|
||||
<div class="line"><span class="lineno"> 46</span> <a class="code hl_function" href="#ae752659b7c1719d68fdb2ca538a93696">ConsTree</a>(arr, segtree, low, mid, 2 * pos + 1);</div>
|
||||
<div class="line"><span class="lineno"> 47</span> <a class="code hl_function" href="#ae752659b7c1719d68fdb2ca538a93696">ConsTree</a>(arr, segtree, mid + 1, high, 2 * pos + 2);</div>
|
||||
<div class="line"><span class="lineno"> 48</span> (*segtree)[pos] = (*segtree)[2 * pos + 1] + (*segtree)[2 * pos + 2];</div>
|
||||
<div class="line"><span class="lineno"> 49</span>}</div>
|
||||
<div class="ttc" id="asegtree_8cpp_html_ae752659b7c1719d68fdb2ca538a93696"><div class="ttname"><a href="#ae752659b7c1719d68fdb2ca538a93696">ConsTree</a></div><div class="ttdeci">void ConsTree(const std::vector< int64_t > &arr, std::vector< int64_t > *segtree, uint64_t low, uint64_t high, uint64_t pos)</div><div class="ttdoc">for std::vector</div><div class="ttdef"><b>Definition</b> segtree.cpp:38</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -240,66 +241,66 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<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"> 167</span> {</div>
|
||||
<div class="line"><span class="lineno"> 168</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"> 169</span> </div>
|
||||
<div class="line"><span class="lineno"> 170</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">"Enter number of elements: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 171</span> </div>
|
||||
<div class="line"><span class="lineno"> 172</span> uint64_t n = 0;</div>
|
||||
<div class="line"><span class="lineno"> 173</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> n;</div>
|
||||
<div class="line"><span class="lineno"> 174</span> </div>
|
||||
<div class="line"><span class="lineno"> 175</span> <span class="keyword">auto</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">max</a> = <span class="keyword">static_cast<</span>uint64_t<span class="keyword">></span>(2 * <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/pow.html">pow</a>(2, <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/ceil.html">ceil</a>(log2(n))) - 1);</div>
|
||||
<div class="line"><span class="lineno"> 176</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int64_t></a> arr(n), lazy(max), segtree(max);</div>
|
||||
<div class="line"><span class="lineno"> 177</span> </div>
|
||||
<div class="line"><span class="lineno"> 178</span> <span class="keywordtype">int</span> choice = 0;</div>
|
||||
<div class="line"><span class="lineno"> 179</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">"\nDo you wish to enter each number?:\n"</span></div>
|
||||
<div class="line"><span class="lineno"> 180</span> <span class="stringliteral">"1: Yes\n"</span></div>
|
||||
<div class="line"><span class="lineno"> 181</span> <span class="stringliteral">"0: No (default initialize them to 0)\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 182</span> </div>
|
||||
<div class="line"><span class="lineno"> 183</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> choice;</div>
|
||||
<div class="line"><span class="lineno"> 184</span> <span class="keywordflow">if</span> (choice == 1) {</div>
|
||||
<div class="line"><span class="lineno"> 185</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">"Enter "</span> << n << <span class="stringliteral">" numbers:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 186</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i <= n; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 187</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << i << <span class="stringliteral">": "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 188</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> arr[i];</div>
|
||||
<div class="line"><span class="lineno"> 189</span> }</div>
|
||||
<div class="line"><span class="lineno"> 190</span> }</div>
|
||||
<div class="line"><span class="lineno"> 191</span> </div>
|
||||
<div class="line"><span class="lineno"> 192</span> <a class="code hl_function" href="#ae752659b7c1719d68fdb2ca538a93696">ConsTree</a>(arr, &segtree, 0, n - 1, 0);</div>
|
||||
<div class="line"><span class="lineno"> 193</span> </div>
|
||||
<div class="line"><span class="lineno"> 194</span> <span class="keywordflow">do</span> {</div>
|
||||
<div class="line"><span class="lineno"> 195</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">"\nMake your choice:\n"</span></div>
|
||||
<div class="line"><span class="lineno"> 196</span> <span class="stringliteral">"1: Range update (input)\n"</span></div>
|
||||
<div class="line"><span class="lineno"> 197</span> <span class="stringliteral">"2: Range query (output)\n"</span></div>
|
||||
<div class="line"><span class="lineno"> 198</span> <span class="stringliteral">"0: Exit\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 199</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> choice;</div>
|
||||
<div class="line"><span class="lineno"> 200</span> </div>
|
||||
<div class="line"><span class="lineno"> 201</span> <span class="keywordflow">if</span> (choice == 1) {</div>
|
||||
<div class="line"><span class="lineno"> 202</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">"Enter 1-indexed lower bound, upper bound & value:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 203</span> </div>
|
||||
<div class="line"><span class="lineno"> 204</span> uint64_t p = 1, q = 1, v = 0;</div>
|
||||
<div class="line"><span class="lineno"> 205</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> p >> q >> v;</div>
|
||||
<div class="line"><span class="lineno"> 206</span> <a class="code hl_function" href="#abd3e818681fb2e29cf08f4f60f82c8e0">update</a>(&segtree, &lazy, p - 1, q - 1, v, 0, n - 1, 0);</div>
|
||||
<div class="line"><span class="lineno"> 207</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (choice == 2) {</div>
|
||||
<div class="line"><span class="lineno"> 208</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">"Enter 1-indexed lower bound & upper bound:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 209</span> </div>
|
||||
<div class="line"><span class="lineno"> 210</span> uint64_t p = 1, q = 1;</div>
|
||||
<div class="line"><span class="lineno"> 211</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> p >> q;</div>
|
||||
<div class="line"><span class="lineno"> 212</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_function" href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a>(&segtree, &lazy, p - 1, q - 1, 0, n - 1, 0);</div>
|
||||
<div class="line"><span class="lineno"> 213</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">"\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 214</span> }</div>
|
||||
<div class="line"><span class="lineno"> 215</span> } <span class="keywordflow">while</span> (choice > 0);</div>
|
||||
<div class="line"><span class="lineno"> 216</span> </div>
|
||||
<div class="line"><span class="lineno"> 217</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 218</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 168</span> {</div>
|
||||
<div class="line"><span class="lineno"> 169</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"> 170</span> </div>
|
||||
<div class="line"><span class="lineno"> 171</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">"Enter number of elements: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 172</span> </div>
|
||||
<div class="line"><span class="lineno"> 173</span> uint64_t n = 0;</div>
|
||||
<div class="line"><span class="lineno"> 174</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> n;</div>
|
||||
<div class="line"><span class="lineno"> 175</span> </div>
|
||||
<div class="line"><span class="lineno"> 176</span> <span class="keyword">auto</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">max</a> = <span class="keyword">static_cast<</span>uint64_t<span class="keyword">></span>(2 * <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/pow.html">pow</a>(2, <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/ceil.html">ceil</a>(log2(n))) - 1);</div>
|
||||
<div class="line"><span class="lineno"> 177</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int64_t></a> arr(n), lazy(max), segtree(max);</div>
|
||||
<div class="line"><span class="lineno"> 178</span> </div>
|
||||
<div class="line"><span class="lineno"> 179</span> <span class="keywordtype">int</span> choice = 0;</div>
|
||||
<div class="line"><span class="lineno"> 180</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">"\nDo you wish to enter each number?:\n"</span></div>
|
||||
<div class="line"><span class="lineno"> 181</span> <span class="stringliteral">"1: Yes\n"</span></div>
|
||||
<div class="line"><span class="lineno"> 182</span> <span class="stringliteral">"0: No (default initialize them to 0)\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 183</span> </div>
|
||||
<div class="line"><span class="lineno"> 184</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> choice;</div>
|
||||
<div class="line"><span class="lineno"> 185</span> <span class="keywordflow">if</span> (choice == 1) {</div>
|
||||
<div class="line"><span class="lineno"> 186</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">"Enter "</span> << n << <span class="stringliteral">" numbers:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 187</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i <= n; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 188</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << i << <span class="stringliteral">": "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 189</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> arr[i];</div>
|
||||
<div class="line"><span class="lineno"> 190</span> }</div>
|
||||
<div class="line"><span class="lineno"> 191</span> }</div>
|
||||
<div class="line"><span class="lineno"> 192</span> </div>
|
||||
<div class="line"><span class="lineno"> 193</span> <a class="code hl_function" href="#ae752659b7c1719d68fdb2ca538a93696">ConsTree</a>(arr, &segtree, 0, n - 1, 0);</div>
|
||||
<div class="line"><span class="lineno"> 194</span> </div>
|
||||
<div class="line"><span class="lineno"> 195</span> <span class="keywordflow">do</span> {</div>
|
||||
<div class="line"><span class="lineno"> 196</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">"\nMake your choice:\n"</span></div>
|
||||
<div class="line"><span class="lineno"> 197</span> <span class="stringliteral">"1: Range update (input)\n"</span></div>
|
||||
<div class="line"><span class="lineno"> 198</span> <span class="stringliteral">"2: Range query (output)\n"</span></div>
|
||||
<div class="line"><span class="lineno"> 199</span> <span class="stringliteral">"0: Exit\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 200</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> choice;</div>
|
||||
<div class="line"><span class="lineno"> 201</span> </div>
|
||||
<div class="line"><span class="lineno"> 202</span> <span class="keywordflow">if</span> (choice == 1) {</div>
|
||||
<div class="line"><span class="lineno"> 203</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">"Enter 1-indexed lower bound, upper bound & value:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 204</span> </div>
|
||||
<div class="line"><span class="lineno"> 205</span> uint64_t p = 1, q = 1, v = 0;</div>
|
||||
<div class="line"><span class="lineno"> 206</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> p >> q >> v;</div>
|
||||
<div class="line"><span class="lineno"> 207</span> <a class="code hl_function" href="#abd3e818681fb2e29cf08f4f60f82c8e0">update</a>(&segtree, &lazy, p - 1, q - 1, v, 0, n - 1, 0);</div>
|
||||
<div class="line"><span class="lineno"> 208</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (choice == 2) {</div>
|
||||
<div class="line"><span class="lineno"> 209</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">"Enter 1-indexed lower bound & upper bound:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 210</span> </div>
|
||||
<div class="line"><span class="lineno"> 211</span> uint64_t p = 1, q = 1;</div>
|
||||
<div class="line"><span class="lineno"> 212</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> p >> q;</div>
|
||||
<div class="line"><span class="lineno"> 213</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_function" href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a>(&segtree, &lazy, p - 1, q - 1, 0, n - 1, 0);</div>
|
||||
<div class="line"><span class="lineno"> 214</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">"\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 215</span> }</div>
|
||||
<div class="line"><span class="lineno"> 216</span> } <span class="keywordflow">while</span> (choice > 0);</div>
|
||||
<div class="line"><span class="lineno"> 217</span> </div>
|
||||
<div class="line"><span class="lineno"> 218</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 219</span>}</div>
|
||||
<div class="ttc" id="abasic_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</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="aceil_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/ceil.html">std::ceil</a></div><div class="ttdeci">T ceil(T... args)</div></div>
|
||||
<div class="ttc" id="amax_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a></div><div class="ttdeci">T max(T... args)</div></div>
|
||||
<div class="ttc" id="apow_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/pow.html">std::pow</a></div><div class="ttdeci">T pow(T... args)</div></div>
|
||||
<div class="ttc" id="asegtree_8cpp_html_a423a97ea0c7ea6e33b5844a6858d902d"><div class="ttname"><a href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a></div><div class="ttdeci">int64_t query(std::vector< int64_t > *segtree, std::vector< int64_t > *lazy, uint64_t qlow, uint64_t qhigh, uint64_t low, uint64_t high, uint64_t pos)</div><div class="ttdoc">Returns the sum of all elements in a range.</div><div class="ttdef"><b>Definition</b> segtree.cpp:62</div></div>
|
||||
<div class="ttc" id="asegtree_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementation.</div><div class="ttdef"><b>Definition</b> segtree.cpp:146</div></div>
|
||||
<div class="ttc" id="asegtree_8cpp_html_abd3e818681fb2e29cf08f4f60f82c8e0"><div class="ttname"><a href="#abd3e818681fb2e29cf08f4f60f82c8e0">update</a></div><div class="ttdeci">void update(std::vector< int64_t > *segtree, std::vector< int64_t > *lazy, int64_t start, int64_t end, int64_t delta, uint64_t low, uint64_t high, uint64_t pos)</div><div class="ttdoc">Updates a range of the segment tree.</div><div class="ttdef"><b>Definition</b> segtree.cpp:102</div></div>
|
||||
<div class="ttc" id="asegtree_8cpp_html_a423a97ea0c7ea6e33b5844a6858d902d"><div class="ttname"><a href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a></div><div class="ttdeci">int64_t query(std::vector< int64_t > *segtree, std::vector< int64_t > *lazy, uint64_t qlow, uint64_t qhigh, uint64_t low, uint64_t high, uint64_t pos)</div><div class="ttdoc">Returns the sum of all elements in a range.</div><div class="ttdef"><b>Definition</b> segtree.cpp:63</div></div>
|
||||
<div class="ttc" id="asegtree_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementation.</div><div class="ttdef"><b>Definition</b> segtree.cpp:147</div></div>
|
||||
<div class="ttc" id="asegtree_8cpp_html_abd3e818681fb2e29cf08f4f60f82c8e0"><div class="ttname"><a href="#abd3e818681fb2e29cf08f4f60f82c8e0">update</a></div><div class="ttdeci">void update(std::vector< int64_t > *segtree, std::vector< int64_t > *lazy, int64_t start, int64_t end, int64_t delta, uint64_t low, uint64_t high, uint64_t pos)</div><div class="ttdoc">Updates a range of the segment tree.</div><div class="ttdef"><b>Definition</b> segtree.cpp:103</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>
|
||||
@@ -367,30 +368,30 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>result of the range query for this function call </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 64</span> {</div>
|
||||
<div class="line"><span class="lineno"> 65</span> <span class="keywordflow">if</span> (low > high || qlow > high || low > qhigh) {</div>
|
||||
<div class="line"><span class="lineno"> 66</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 67</span> }</div>
|
||||
<div class="line"><span class="lineno"> 68</span> </div>
|
||||
<div class="line"><span class="lineno"> 69</span> <span class="keywordflow">if</span> ((*lazy)[pos] != 0) {</div>
|
||||
<div class="line"><span class="lineno"> 70</span> (*segtree)[pos] += (*lazy)[pos] * (high - low + 1);</div>
|
||||
<div class="line"><span class="lineno"> 71</span> </div>
|
||||
<div class="line"><span class="lineno"> 72</span> <span class="keywordflow">if</span> (low != high) {</div>
|
||||
<div class="line"><span class="lineno"> 73</span> (*lazy)[2 * pos + 1] += (*lazy)[pos];</div>
|
||||
<div class="line"><span class="lineno"> 74</span> (*lazy)[2 * pos + 2] += (*lazy)[pos];</div>
|
||||
<div class="line"><span class="lineno"> 75</span> }</div>
|
||||
<div class="line"><span class="lineno"> 76</span> (*lazy)[pos] = 0;</div>
|
||||
<div class="line"><span class="lineno"> 77</span> }</div>
|
||||
<div class="line"><span class="lineno"> 78</span> </div>
|
||||
<div class="line"><span class="lineno"> 79</span> <span class="keywordflow">if</span> (qlow <= low && qhigh >= high) {</div>
|
||||
<div class="line"><span class="lineno"> 80</span> <span class="keywordflow">return</span> (*segtree)[pos];</div>
|
||||
<div class="line"><span class="lineno"> 81</span> }</div>
|
||||
<div class="line"><span class="lineno"> 82</span> </div>
|
||||
<div class="line"><span class="lineno"> 83</span> uint64_t mid = (low + high) / 2;</div>
|
||||
<div class="line"><span class="lineno"> 84</span> </div>
|
||||
<div class="line"><span class="lineno"> 85</span> <span class="keywordflow">return</span> <a class="code hl_function" href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a>(segtree, lazy, qlow, qhigh, low, mid, 2 * pos + 1) +</div>
|
||||
<div class="line"><span class="lineno"> 86</span> <a class="code hl_function" href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a>(segtree, lazy, qlow, qhigh, mid + 1, high, 2 * pos + 2);</div>
|
||||
<div class="line"><span class="lineno"> 87</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 65</span> {</div>
|
||||
<div class="line"><span class="lineno"> 66</span> <span class="keywordflow">if</span> (low > high || qlow > high || low > qhigh) {</div>
|
||||
<div class="line"><span class="lineno"> 67</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 68</span> }</div>
|
||||
<div class="line"><span class="lineno"> 69</span> </div>
|
||||
<div class="line"><span class="lineno"> 70</span> <span class="keywordflow">if</span> ((*lazy)[pos] != 0) {</div>
|
||||
<div class="line"><span class="lineno"> 71</span> (*segtree)[pos] += (*lazy)[pos] * (high - low + 1);</div>
|
||||
<div class="line"><span class="lineno"> 72</span> </div>
|
||||
<div class="line"><span class="lineno"> 73</span> <span class="keywordflow">if</span> (low != high) {</div>
|
||||
<div class="line"><span class="lineno"> 74</span> (*lazy)[2 * pos + 1] += (*lazy)[pos];</div>
|
||||
<div class="line"><span class="lineno"> 75</span> (*lazy)[2 * pos + 2] += (*lazy)[pos];</div>
|
||||
<div class="line"><span class="lineno"> 76</span> }</div>
|
||||
<div class="line"><span class="lineno"> 77</span> (*lazy)[pos] = 0;</div>
|
||||
<div class="line"><span class="lineno"> 78</span> }</div>
|
||||
<div class="line"><span class="lineno"> 79</span> </div>
|
||||
<div class="line"><span class="lineno"> 80</span> <span class="keywordflow">if</span> (qlow <= low && qhigh >= high) {</div>
|
||||
<div class="line"><span class="lineno"> 81</span> <span class="keywordflow">return</span> (*segtree)[pos];</div>
|
||||
<div class="line"><span class="lineno"> 82</span> }</div>
|
||||
<div class="line"><span class="lineno"> 83</span> </div>
|
||||
<div class="line"><span class="lineno"> 84</span> uint64_t mid = (low + high) / 2;</div>
|
||||
<div class="line"><span class="lineno"> 85</span> </div>
|
||||
<div class="line"><span class="lineno"> 86</span> <span class="keywordflow">return</span> <a class="code hl_function" href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a>(segtree, lazy, qlow, qhigh, low, mid, 2 * pos + 1) +</div>
|
||||
<div class="line"><span class="lineno"> 87</span> <a class="code hl_function" href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a>(segtree, lazy, qlow, qhigh, mid + 1, high, 2 * pos + 2);</div>
|
||||
<div class="line"><span class="lineno"> 88</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -424,21 +425,21 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Self-test implementation. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 146</span> {</div>
|
||||
<div class="line"><span class="lineno"> 147</span> <span class="keyword">auto</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">max</a> = <span class="keyword">static_cast<</span>int64_t<span class="keyword">></span>(2 * <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/pow.html">pow</a>(2, <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/ceil.html">ceil</a>(log2(7))) - 1);</div>
|
||||
<div class="line"><span class="lineno"> 148</span> assert(max == 15);</div>
|
||||
<div class="line"><span class="lineno"> 149</span> </div>
|
||||
<div class="line"><span class="lineno"> 150</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int64_t></a> arr{1, 2, 3, 4, 5, 6, 7}, lazy(max), segtree(max);</div>
|
||||
<div class="line"><span class="lineno"> 151</span> <a class="code hl_function" href="#ae752659b7c1719d68fdb2ca538a93696">ConsTree</a>(arr, &segtree, 0, 7 - 1, 0);</div>
|
||||
<div class="line"><span class="lineno"> 152</span> </div>
|
||||
<div class="line"><span class="lineno"> 153</span> assert(<a class="code hl_function" href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a>(&segtree, &lazy, 1, 5, 0, 7 - 1, 0) == 2 + 3 + 4 + 5 + 6);</div>
|
||||
<div class="line"><span class="lineno"> 154</span> </div>
|
||||
<div class="line"><span class="lineno"> 155</span> <a class="code hl_function" href="#abd3e818681fb2e29cf08f4f60f82c8e0">update</a>(&segtree, &lazy, 2, 4, 1, 0, 7 - 1, 0);</div>
|
||||
<div class="line"><span class="lineno"> 156</span> assert(<a class="code hl_function" href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a>(&segtree, &lazy, 1, 5, 0, 7 - 1, 0) == 2 + 4 + 5 + 6 + 6);</div>
|
||||
<div class="line"><span class="lineno"> 157</span> </div>
|
||||
<div class="line"><span class="lineno"> 158</span> <a class="code hl_function" href="#abd3e818681fb2e29cf08f4f60f82c8e0">update</a>(&segtree, &lazy, 0, 6, -2, 0, 7 - 1, 0);</div>
|
||||
<div class="line"><span class="lineno"> 159</span> assert(<a class="code hl_function" href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a>(&segtree, &lazy, 0, 4, 0, 7 - 1, 0) == -1 + 0 + 2 + 3 + 4);</div>
|
||||
<div class="line"><span class="lineno"> 160</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 147</span> {</div>
|
||||
<div class="line"><span class="lineno"> 148</span> <span class="keyword">auto</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">max</a> = <span class="keyword">static_cast<</span>int64_t<span class="keyword">></span>(2 * <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/pow.html">pow</a>(2, <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/ceil.html">ceil</a>(log2(7))) - 1);</div>
|
||||
<div class="line"><span class="lineno"> 149</span> assert(max == 15);</div>
|
||||
<div class="line"><span class="lineno"> 150</span> </div>
|
||||
<div class="line"><span class="lineno"> 151</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int64_t></a> arr{1, 2, 3, 4, 5, 6, 7}, lazy(max), segtree(max);</div>
|
||||
<div class="line"><span class="lineno"> 152</span> <a class="code hl_function" href="#ae752659b7c1719d68fdb2ca538a93696">ConsTree</a>(arr, &segtree, 0, 7 - 1, 0);</div>
|
||||
<div class="line"><span class="lineno"> 153</span> </div>
|
||||
<div class="line"><span class="lineno"> 154</span> assert(<a class="code hl_function" href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a>(&segtree, &lazy, 1, 5, 0, 7 - 1, 0) == 2 + 3 + 4 + 5 + 6);</div>
|
||||
<div class="line"><span class="lineno"> 155</span> </div>
|
||||
<div class="line"><span class="lineno"> 156</span> <a class="code hl_function" href="#abd3e818681fb2e29cf08f4f60f82c8e0">update</a>(&segtree, &lazy, 2, 4, 1, 0, 7 - 1, 0);</div>
|
||||
<div class="line"><span class="lineno"> 157</span> assert(<a class="code hl_function" href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a>(&segtree, &lazy, 1, 5, 0, 7 - 1, 0) == 2 + 4 + 5 + 6 + 6);</div>
|
||||
<div class="line"><span class="lineno"> 158</span> </div>
|
||||
<div class="line"><span class="lineno"> 159</span> <a class="code hl_function" href="#abd3e818681fb2e29cf08f4f60f82c8e0">update</a>(&segtree, &lazy, 0, 6, -2, 0, 7 - 1, 0);</div>
|
||||
<div class="line"><span class="lineno"> 160</span> assert(<a class="code hl_function" href="#a423a97ea0c7ea6e33b5844a6858d902d">query</a>(&segtree, &lazy, 0, 4, 0, 7 - 1, 0) == -1 + 0 + 2 + 3 + 4);</div>
|
||||
<div class="line"><span class="lineno"> 161</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -511,42 +512,42 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 104</span> {</div>
|
||||
<div class="line"><span class="lineno"> 105</span> <span class="keywordflow">if</span> (low > high) {</div>
|
||||
<div class="line"><span class="lineno"> 106</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 107</span> }</div>
|
||||
<div class="line"><span class="lineno"> 108</span> </div>
|
||||
<div class="line"><span class="lineno"> 109</span> <span class="keywordflow">if</span> ((*lazy)[pos] != 0) {</div>
|
||||
<div class="line"><span class="lineno"> 110</span> (*segtree)[pos] += (*lazy)[pos] * (high - low + 1);</div>
|
||||
<div class="line"><span class="lineno"> 111</span> </div>
|
||||
<div class="line"><span class="lineno"> 112</span> <span class="keywordflow">if</span> (low != high) {</div>
|
||||
<div class="line"><span class="lineno"> 113</span> (*lazy)[2 * pos + 1] += (*lazy)[pos];</div>
|
||||
<div class="line"><span class="lineno"> 114</span> (*lazy)[2 * pos + 2] += (*lazy)[pos];</div>
|
||||
<div class="line"><span class="lineno"> 115</span> }</div>
|
||||
<div class="line"><span class="lineno"> 116</span> (*lazy)[pos] = 0;</div>
|
||||
<div class="line"><span class="lineno"> 117</span> }</div>
|
||||
<div class="line"><span class="lineno"> 118</span> </div>
|
||||
<div class="line"><span class="lineno"> 119</span> <span class="keywordflow">if</span> (start > high || end < low) {</div>
|
||||
<div class="line"><span class="lineno"> 120</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 121</span> }</div>
|
||||
<div class="line"><span class="lineno"> 122</span> </div>
|
||||
<div class="line"><span class="lineno"> 123</span> <span class="keywordflow">if</span> (start <= low && end >= high) {</div>
|
||||
<div class="line"><span class="lineno"> 124</span> (*segtree)[pos] += delta * (high - low + 1);</div>
|
||||
<div class="line"><span class="lineno"> 125</span> </div>
|
||||
<div class="line"><span class="lineno"> 126</span> <span class="keywordflow">if</span> (low != high) {</div>
|
||||
<div class="line"><span class="lineno"> 127</span> (*lazy)[2 * pos + 1] += delta;</div>
|
||||
<div class="line"><span class="lineno"> 128</span> (*lazy)[2 * pos + 2] += delta;</div>
|
||||
<div class="line"><span class="lineno"> 129</span> }</div>
|
||||
<div class="line"><span class="lineno"> 130</span> </div>
|
||||
<div class="line"><span class="lineno"> 131</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 132</span> }</div>
|
||||
<div class="line"><span class="lineno"> 133</span> </div>
|
||||
<div class="line"><span class="lineno"> 134</span> uint64_t mid = (low + high) / 2;</div>
|
||||
<div class="line"><span class="lineno"> 135</span> </div>
|
||||
<div class="line"><span class="lineno"> 136</span> <a class="code hl_function" href="#abd3e818681fb2e29cf08f4f60f82c8e0">update</a>(segtree, lazy, start, end, delta, low, mid, 2 * pos + 1);</div>
|
||||
<div class="line"><span class="lineno"> 137</span> <a class="code hl_function" href="#abd3e818681fb2e29cf08f4f60f82c8e0">update</a>(segtree, lazy, start, end, delta, mid + 1, high, 2 * pos + 2);</div>
|
||||
<div class="line"><span class="lineno"> 138</span> (*segtree)[pos] = (*segtree)[2 * pos + 1] + (*segtree)[2 * pos + 2];</div>
|
||||
<div class="line"><span class="lineno"> 139</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 105</span> {</div>
|
||||
<div class="line"><span class="lineno"> 106</span> <span class="keywordflow">if</span> (low > high) {</div>
|
||||
<div class="line"><span class="lineno"> 107</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 108</span> }</div>
|
||||
<div class="line"><span class="lineno"> 109</span> </div>
|
||||
<div class="line"><span class="lineno"> 110</span> <span class="keywordflow">if</span> ((*lazy)[pos] != 0) {</div>
|
||||
<div class="line"><span class="lineno"> 111</span> (*segtree)[pos] += (*lazy)[pos] * (high - low + 1);</div>
|
||||
<div class="line"><span class="lineno"> 112</span> </div>
|
||||
<div class="line"><span class="lineno"> 113</span> <span class="keywordflow">if</span> (low != high) {</div>
|
||||
<div class="line"><span class="lineno"> 114</span> (*lazy)[2 * pos + 1] += (*lazy)[pos];</div>
|
||||
<div class="line"><span class="lineno"> 115</span> (*lazy)[2 * pos + 2] += (*lazy)[pos];</div>
|
||||
<div class="line"><span class="lineno"> 116</span> }</div>
|
||||
<div class="line"><span class="lineno"> 117</span> (*lazy)[pos] = 0;</div>
|
||||
<div class="line"><span class="lineno"> 118</span> }</div>
|
||||
<div class="line"><span class="lineno"> 119</span> </div>
|
||||
<div class="line"><span class="lineno"> 120</span> <span class="keywordflow">if</span> (start > high || end < low) {</div>
|
||||
<div class="line"><span class="lineno"> 121</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 122</span> }</div>
|
||||
<div class="line"><span class="lineno"> 123</span> </div>
|
||||
<div class="line"><span class="lineno"> 124</span> <span class="keywordflow">if</span> (start <= low && end >= high) {</div>
|
||||
<div class="line"><span class="lineno"> 125</span> (*segtree)[pos] += delta * (high - low + 1);</div>
|
||||
<div class="line"><span class="lineno"> 126</span> </div>
|
||||
<div class="line"><span class="lineno"> 127</span> <span class="keywordflow">if</span> (low != high) {</div>
|
||||
<div class="line"><span class="lineno"> 128</span> (*lazy)[2 * pos + 1] += delta;</div>
|
||||
<div class="line"><span class="lineno"> 129</span> (*lazy)[2 * pos + 2] += delta;</div>
|
||||
<div class="line"><span class="lineno"> 130</span> }</div>
|
||||
<div class="line"><span class="lineno"> 131</span> </div>
|
||||
<div class="line"><span class="lineno"> 132</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 133</span> }</div>
|
||||
<div class="line"><span class="lineno"> 134</span> </div>
|
||||
<div class="line"><span class="lineno"> 135</span> uint64_t mid = (low + high) / 2;</div>
|
||||
<div class="line"><span class="lineno"> 136</span> </div>
|
||||
<div class="line"><span class="lineno"> 137</span> <a class="code hl_function" href="#abd3e818681fb2e29cf08f4f60f82c8e0">update</a>(segtree, lazy, start, end, delta, low, mid, 2 * pos + 1);</div>
|
||||
<div class="line"><span class="lineno"> 138</span> <a class="code hl_function" href="#abd3e818681fb2e29cf08f4f60f82c8e0">update</a>(segtree, lazy, start, end, delta, mid + 1, high, 2 * pos + 2);</div>
|
||||
<div class="line"><span class="lineno"> 139</span> (*segtree)[pos] = (*segtree)[2 * pos + 1] + (*segtree)[2 * pos + 2];</div>
|
||||
<div class="line"><span class="lineno"> 140</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<map id="greedy_algorithms/dijkstra.cpp" name="greedy_algorithms/dijkstra.cpp">
|
||||
<area shape="rect" id="Node000001" title="Dijkstra algorithm implementation" alt="" coords="68,5,266,31"/>
|
||||
<area shape="rect" id="Node000002" title=" " alt="" coords="5,79,70,105"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="146,34,74,73,72,69,144,29"/>
|
||||
<area shape="rect" id="Node000003" title=" " alt="" coords="93,79,152,105"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="162,33,141,67,136,64,157,30"/>
|
||||
<area shape="rect" id="Node000004" title=" " alt="" coords="176,79,248,105"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="177,30,199,64,194,67,172,33"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="272,79,329,105"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="191,29,265,69,263,74,188,34"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
02dec7afa6ff871d850c576454a9fbec
|
||||
@@ -78,7 +78,7 @@ $(function() {
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d0/dfe/backtracking_2subset__sum_8cpp.html','../../'); initResizable(true); });
|
||||
$(function(){initNavTree('d2/d5a/subset__sum_8cpp.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
@@ -120,7 +120,7 @@ $(function(){initNavTree('d0/dfe/backtracking_2subset__sum_8cpp.html','../../');
|
||||
</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="../../db/d83/backtracking_2subset__sum_8cpp__incl.svg" width="336" 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="../../db/da8/subset__sum_8cpp__incl.svg" width="336" 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>
|
||||
@@ -169,11 +169,11 @@ Functions</h2></td></tr>
|
||||
<div class="line"><span class="lineno"> 105</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"> 106</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 107</span>}</div>
|
||||
<div class="ttc" id="abacktracking_2subset__sum_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#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 class="ttc" id="asubset__sum_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#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="../../d0/dfe/backtracking_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 class="center"><iframe scrolling="no" frameborder="0" src="../../d2/d5a/subset__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>
|
||||
@@ -228,7 +228,7 @@ Here is the call graph for this function:</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="../../d0/dfe/backtracking_2subset__sum_8cpp_a7cb50d36a59427a33f64a266dac83d99_cgraph.svg" width="350" height="76"><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="../../d2/d5a/subset__sum_8cpp_a7cb50d36a59427a33f64a266dac83d99_cgraph.svg" width="350" height="76"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -305,7 +305,7 @@ Here is the call graph for this function:</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="../../d0/dfe/backtracking_2subset__sum_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="174" height="36"><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="../../d2/d5a/subset__sum_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="174" 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>
|
||||
@@ -315,7 +315,7 @@ Here is the call graph for this function:</div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_c11585dfcef32a26e29098facab6c144.html">backtracking</a></li><li class="navelem"><a class="el" href="../../d0/dfe/backtracking_2subset__sum_8cpp.html">subset_sum.cpp</a></li>
|
||||
<li class="navelem"><a class="el" href="../../dir_c11585dfcef32a26e29098facab6c144.html">backtracking</a></li><li class="navelem"><a class="el" href="../../d2/d5a/subset__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>
|
||||
6
d2/d5a/subset__sum_8cpp.js
Normal file
@@ -0,0 +1,6 @@
|
||||
var subset__sum_8cpp =
|
||||
[
|
||||
[ "main", "d2/d5a/subset__sum_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "number_of_subsets", "d2/d5a/subset__sum_8cpp.html#a7cb50d36a59427a33f64a266dac83d99", null ],
|
||||
[ "test", "d2/d5a/subset__sum_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]
|
||||
];
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -1,6 +1,6 @@
|
||||
<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="rect" id="Node000002" href="$d2/d5a/subset__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"/>
|
||||
@@ -0,0 +1 @@
|
||||
574f4d71b42b28252ea9230e978fabd8
|
||||
@@ -31,7 +31,7 @@
|
||||
<!-- 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.">
|
||||
<g id="a_Node000002"><a xlink:href="../../d2/d5a/subset__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>
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -20,7 +20,7 @@
|
||||
<!-- 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.">
|
||||
<g id="a_Node000002"><a xlink:href="../../d2/d5a/subset__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>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -256,7 +256,7 @@ int </td><td class="memItemRight" valign="bottom"><b>vertexNum</b> = 0</td>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>greedy_algorithms/<a class="el" href="../../df/dcb/greedy__algorithms_2dijkstra_8cpp.html">dijkstra.cpp</a></li>
|
||||
<li>greedy_algorithms/<a class="el" href="../../da/de8/dijkstra__greedy_8cpp.html">dijkstra_greedy.cpp</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<map id="dynamic_programming/armstrong_number.cpp" name="dynamic_programming/armstrong_number.cpp">
|
||||
<area shape="rect" id="Node000001" title="Checks whether a number is an Armstrong Number or not." alt="" coords="44,5,202,46"/>
|
||||
<map id="dynamic_programming/armstrong_number_templated.cpp" name="dynamic_programming/armstrong_number_templated.cpp">
|
||||
<area shape="rect" id="Node000001" title="Checks whether a number is an Armstrong Number or not." alt="" coords="12,5,234,46"/>
|
||||
<area shape="rect" id="Node000002" title=" " alt="" coords="5,94,70,120"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="104,48,64,85,60,81,100,44"/>
|
||||
<area shape="rect" id="Node000003" title=" " alt="" coords="94,94,152,120"/>
|
||||
1
d2/dc5/armstrong__number__templated_8cpp__incl.md5
Normal file
@@ -0,0 +1 @@
|
||||
f9f350893c63652ce6bbc333e7e71e77
|
||||
@@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/armstrong_number.cpp Pages: 1 -->
|
||||
<!-- Title: dynamic_programming/armstrong_number_templated.cpp Pages: 1 -->
|
||||
<svg width="189pt" height="94pt"
|
||||
viewBox="0.00 0.00 188.88 93.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
<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 89.75)">
|
||||
<title>dynamic_programming/armstrong_number.cpp</title>
|
||||
<title>dynamic_programming/armstrong_number_templated.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Checks whether a number is an Armstrong Number or not.">
|
||||
<polygon fill="#999999" stroke="#666666" points="147.12,-85.75 29.12,-85.75 29.12,-55.25 147.12,-55.25 147.12,-85.75"/>
|
||||
<text text-anchor="start" x="37.12" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="88.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/armstrong_number.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="171.5,-85.75 4.75,-85.75 4.75,-55.25 171.5,-55.25 171.5,-85.75"/>
|
||||
<text text-anchor="start" x="12.75" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="88.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/armstrong_number_templated.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -3,18 +3,18 @@
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/armstrong_number.cpp Pages: 1 -->
|
||||
<!-- Title: dynamic_programming/armstrong_number_templated.cpp Pages: 1 -->
|
||||
<svg width="189pt" height="94pt"
|
||||
viewBox="0.00 0.00 188.88 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/armstrong_number.cpp</title>
|
||||
<title>dynamic_programming/armstrong_number_templated.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Checks whether a number is an Armstrong Number or not.">
|
||||
<polygon fill="#999999" stroke="#666666" points="147.12,-85.75 29.12,-85.75 29.12,-55.25 147.12,-55.25 147.12,-85.75"/>
|
||||
<text text-anchor="start" x="37.12" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="88.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/armstrong_number.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="171.5,-85.75 4.75,-85.75 4.75,-55.25 171.5,-55.25 171.5,-85.75"/>
|
||||
<text text-anchor="start" x="12.75" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="88.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/armstrong_number_templated.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -231,7 +231,7 @@ pen apple". Note that you are allowed to reuse a dictionary word.</p>
|
||||
<div class="line"><span class="lineno"> 105</span> <span class="comment">// if the prefix till current position is present in the dictionary</span></div>
|
||||
<div class="line"><span class="lineno"> 106</span> <span class="comment">// and the remaining substring can also be segmented legally, then</span></div>
|
||||
<div class="line"><span class="lineno"> 107</span> <span class="comment">// set solution at position pos in the memo, and return true</span></div>
|
||||
<div class="line"><span class="lineno"> 108</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="#a1cc9dd6e6190d10a010fdcdfe7a21a81">exists</a>(wordTillNow, strSet) and <a class="code hl_function" href="#a272b0f5cdb4e41fd6dee4538b808c06a">check</a>(s, strSet, i + 1, <a class="code hl_namespace" href="../../df/d88/namespacedp.html">dp</a>)) {</div>
|
||||
<div class="line"><span class="lineno"> 108</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="#a1cc9dd6e6190d10a010fdcdfe7a21a81">exists</a>(wordTillNow, strSet) && <a class="code hl_function" href="#a272b0f5cdb4e41fd6dee4538b808c06a">check</a>(s, strSet, i + 1, <a class="code hl_namespace" href="../../df/d88/namespacedp.html">dp</a>)) {</div>
|
||||
<div class="line"><span class="lineno"> 109</span> <a class="code hl_namespace" href="../../df/d88/namespacedp.html">dp</a>->at(pos) = 1;</div>
|
||||
<div class="line"><span class="lineno"> 110</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 111</span> }</div>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
7e6e1ecd83694b3be4c8278f14c4be23
|
||||
@@ -206,7 +206,7 @@ Functions</h2></td></tr>
|
||||
<div class="line"><span class="lineno"> 72</span> </div>
|
||||
<div class="line"><span class="lineno"> 73</span> <span class="comment">// Create the data table</span></div>
|
||||
<div class="line"><span class="lineno"> 74</span> <span class="keywordtype">double</span> temp = NAN;</div>
|
||||
<div class="line"><span class="lineno"> 75</span> <span class="keywordflow">for</span> (<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a> 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"> 75</span> <span class="keywordflow">for</span> (<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a> 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"> 76</span> temp = func(xi);</div>
|
||||
<div class="line"><span class="lineno"> 77</span> data_table.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/map/insert.html">insert</a>(</div>
|
||||
<div class="line"><span class="lineno"> 78</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair<std::int32_t, double></a>(i, temp)); <span class="comment">// add i and f(xi)</span></div>
|
||||
@@ -216,7 +216,7 @@ Functions</h2></td></tr>
|
||||
<div class="line"><span class="lineno"> 82</span> <span class="comment">// Evaluate the integral.</span></div>
|
||||
<div class="line"><span class="lineno"> 83</span> <span class="comment">// Remember: f(x0) + 4*f(x1) + 2*f(x2) + ... + 2*f(xN-2) + 4*f(xN-1) + f(xN)</span></div>
|
||||
<div class="line"><span class="lineno"> 84</span> <span class="keywordtype">double</span> evaluate_integral = 0;</div>
|
||||
<div class="line"><span class="lineno"> 85</span> <span class="keywordflow">for</span> (<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a> 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"> 85</span> <span class="keywordflow">for</span> (<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a> 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"> 86</span> <span class="keywordflow">if</span> (i == 0 || i == N) {</div>
|
||||
<div class="line"><span class="lineno"> 87</span> evaluate_integral += data_table.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/map/at.html">at</a>(i);</div>
|
||||
<div class="line"><span class="lineno"> 88</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (i % 2 == 1) {</div>
|
||||
@@ -238,13 +238,13 @@ Functions</h2></td></tr>
|
||||
<div class="line"><span class="lineno"> 104</span> <span class="keywordflow">return</span> evaluate_integral;</div>
|
||||
<div class="line"><span class="lineno"> 105</span>}</div>
|
||||
<div class="ttc" id="aat_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/map/at.html">std::map::at</a></div><div class="ttdeci">T at(T... args)</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="ahash__search_8cpp_html_a566eaf0ffafd50bc61e644561fd27001"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a566eaf0ffafd50bc61e644561fd27001">h</a></div><div class="ttdeci">int h(int key)</div><div class="ttdef"><b>Definition</b> hash_search.cpp:45</div></div>
|
||||
<div class="ttc" id="ainsert_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/map/insert.html">std::map::insert</a></div><div class="ttdeci">T insert(T... args)</div></div>
|
||||
<div class="ttc" id="ainteger_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a></div></div>
|
||||
<div class="ttc" id="aisnan_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/isnan.html">std::isnan</a></div><div class="ttdeci">T isnan(T... args)</div></div>
|
||||
<div class="ttc" id="amap_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/map.html">std::map</a></div></div>
|
||||
<div class="ttc" id="apair_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair</a></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>
|
||||
</div>
|
||||
@@ -391,7 +391,7 @@ Here is the call graph for this function:</div>
|
||||
<p>Starting and ending point of the integration in the real axis</p>
|
||||
<p>Step, calculated by a, b and N</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 170</span> {</div>
|
||||
<div class="line"><span class="lineno"> 171</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 16; <span class="comment">/// Number of intervals to divide the integration</span><span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 171</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 16; <span class="comment">/// Number of intervals to divide the integration</span><span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 172</span><span class="comment"> /// interval. MUST BE EVEN</span></div>
|
||||
<div class="line"><span class="lineno"> 173</span><span class="comment"></span> <span class="keywordtype">double</span> a = 1, b = 3; <span class="comment">/// Starting and ending point of the integration in</span><span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 174</span><span class="comment"> /// the real axis</span></div>
|
||||
@@ -404,7 +404,7 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 181</span> <span class="comment">// Get user input (by the command line parameters or the console after</span></div>
|
||||
<div class="line"><span class="lineno"> 182</span> <span class="comment">// displaying messages)</span></div>
|
||||
<div class="line"><span class="lineno"> 183</span> <span class="keywordflow">if</span> (argc == 4) {</div>
|
||||
<div class="line"><span class="lineno"> 184</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/atoi.html">std::atoi</a>(argv[1]);</div>
|
||||
<div class="line"><span class="lineno"> 184</span> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/atoi.html">std::atoi</a>(argv[1]);</div>
|
||||
<div class="line"><span class="lineno"> 185</span> a = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/atof.html">std::atof</a>(argv[2]);</div>
|
||||
<div class="line"><span class="lineno"> 186</span> b = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/atof.html">std::atof</a>(argv[3]);</div>
|
||||
<div class="line"><span class="lineno"> 187</span> <span class="comment">// Check if a<b else abort</span></div>
|
||||
@@ -413,10 +413,10 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 190</span> <span class="keywordflow">if</span> (N < 16 || a != 1 || b != 3) {</div>
|
||||
<div class="line"><span class="lineno"> 191</span> used_argv_parameters = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 192</span> }</div>
|
||||
<div class="line"><span class="lineno"> 193</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">"You selected N="</span> << <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> << <span class="stringliteral">", a="</span> << a << <span class="stringliteral">", b="</span> << b</div>
|
||||
<div class="line"><span class="lineno"> 193</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">"You selected N="</span> << <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> << <span class="stringliteral">", a="</span> << a << <span class="stringliteral">", b="</span> << b</div>
|
||||
<div class="line"><span class="lineno"> 194</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"> 195</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 196</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">"Default N="</span> << <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> << <span class="stringliteral">", a="</span> << a << <span class="stringliteral">", b="</span> << b</div>
|
||||
<div class="line"><span class="lineno"> 196</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">"Default N="</span> << <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> << <span class="stringliteral">", a="</span> << a << <span class="stringliteral">", b="</span> << b</div>
|
||||
<div class="line"><span class="lineno"> 197</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"> 198</span> }</div>
|
||||
<div class="line"><span class="lineno"> 199</span> </div>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<map id="range_queries/sparse_table.cpp" name="range_queries/sparse_table.cpp">
|
||||
<area shape="rect" id="Node000001" title="Implementation of Sparse Table data structure." alt="" coords="108,5,254,46"/>
|
||||
<area shape="rect" id="Node000002" title=" " alt="" coords="5,94,80,120"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="148,49,78,88,75,84,145,44"/>
|
||||
<area shape="rect" id="Node000003" title=" " alt="" coords="104,94,168,120"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="172,48,153,82,148,79,168,45"/>
|
||||
<area shape="rect" id="Node000004" title=" " alt="" coords="192,94,264,120"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="195,45,215,79,211,82,190,48"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="287,94,344,120"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="216,44,283,83,281,88,213,49"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
b9a90ade7cac95ede7df6277c6c92ab1
|
||||
@@ -1,120 +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: range_queries/sparse_table.cpp Pages: 1 -->
|
||||
<svg width="262pt" height="94pt"
|
||||
viewBox="0.00 0.00 262.38 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">
|
||||
|
||||
<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 89.75)">
|
||||
<title>range_queries/sparse_table.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Implementation of Sparse Table data structure.">
|
||||
<polygon fill="#999999" stroke="#666666" points="186.38,-85.75 77.38,-85.75 77.38,-55.25 186.38,-55.25 186.38,-85.75"/>
|
||||
<text text-anchor="start" x="85.38" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries/sparse</text>
|
||||
<text text-anchor="middle" x="131.88" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">_table.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="55.75,-19.25 0,-19.25 0,0 55.75,0 55.75,-19.25"/>
|
||||
<text text-anchor="middle" x="27.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">algorithm</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="M105.9,-54.8C89.91,-45.74 69.49,-34.19 53.56,-25.16"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="55.57,-22.28 45.14,-20.4 52.12,-28.37 55.57,-22.28"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="122,-19.25 73.75,-19.25 73.75,0 122,0 122,-19.25"/>
|
||||
<text text-anchor="middle" x="97.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cassert</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="M123.47,-54.95C119.04,-47.28 113.55,-37.77 108.8,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="111.91,-27.92 103.87,-21.01 105.84,-31.42 111.91,-27.92"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="193.62,-19.25 140.12,-19.25 140.12,0 193.62,0 193.62,-19.25"/>
|
||||
<text text-anchor="middle" x="166.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</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="M140.53,-54.95C145.09,-47.28 150.74,-37.77 155.63,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="158.6,-31.39 160.71,-21 152.59,-27.81 158.6,-31.39"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="254.38,-19.25 211.38,-19.25 211.38,0 254.38,0 254.38,-19.25"/>
|
||||
<text text-anchor="middle" x="232.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</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="M157.1,-54.8C172.48,-45.83 192.08,-34.41 207.49,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="209.2,-28.48 216.08,-20.42 205.68,-22.43 209.2,-28.48"/>
|
||||
</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.7 KiB |
@@ -1,94 +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: range_queries/sparse_table.cpp Pages: 1 -->
|
||||
<svg width="262pt" height="94pt"
|
||||
viewBox="0.00 0.00 262.38 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>range_queries/sparse_table.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Implementation of Sparse Table data structure.">
|
||||
<polygon fill="#999999" stroke="#666666" points="186.38,-85.75 77.38,-85.75 77.38,-55.25 186.38,-55.25 186.38,-85.75"/>
|
||||
<text text-anchor="start" x="85.38" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries/sparse</text>
|
||||
<text text-anchor="middle" x="131.88" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">_table.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="55.75,-19.25 0,-19.25 0,0 55.75,0 55.75,-19.25"/>
|
||||
<text text-anchor="middle" x="27.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">algorithm</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="M105.9,-54.8C89.91,-45.74 69.49,-34.19 53.56,-25.16"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="55.57,-22.28 45.14,-20.4 52.12,-28.37 55.57,-22.28"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="122,-19.25 73.75,-19.25 73.75,0 122,0 122,-19.25"/>
|
||||
<text text-anchor="middle" x="97.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cassert</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="M123.47,-54.95C119.04,-47.28 113.55,-37.77 108.8,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="111.91,-27.92 103.87,-21.01 105.84,-31.42 111.91,-27.92"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="193.62,-19.25 140.12,-19.25 140.12,0 193.62,0 193.62,-19.25"/>
|
||||
<text text-anchor="middle" x="166.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</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="M140.53,-54.95C145.09,-47.28 150.74,-37.77 155.63,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="158.6,-31.39 160.71,-21 152.59,-27.81 158.6,-31.39"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="254.38,-19.25 211.38,-19.25 211.38,0 254.38,0 254.38,-19.25"/>
|
||||
<text text-anchor="middle" x="232.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</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="M157.1,-54.8C172.48,-45.83 192.08,-34.41 207.49,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="209.2,-28.48 216.08,-20.42 205.68,-22.43 209.2,-28.48"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.9 KiB |
@@ -250,7 +250,7 @@ Here is the call graph for this function:</div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
|
||||
<div class="ttc" id="afill_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array/fill.html">std::array::fill</a></div><div class="ttdeci">T fill(T... args)</div></div>
|
||||
<div class="ttc" id="asegtree_8cpp_html_abd3e818681fb2e29cf08f4f60f82c8e0"><div class="ttname"><a href="../../d2/d45/segtree_8cpp.html#abd3e818681fb2e29cf08f4f60f82c8e0">update</a></div><div class="ttdeci">void update(std::vector< int64_t > *segtree, std::vector< int64_t > *lazy, int64_t start, int64_t end, int64_t delta, uint64_t low, uint64_t high, uint64_t pos)</div><div class="ttdoc">Updates a range of the segment tree.</div><div class="ttdef"><b>Definition</b> segtree.cpp:102</div></div>
|
||||
<div class="ttc" id="asegtree_8cpp_html_abd3e818681fb2e29cf08f4f60f82c8e0"><div class="ttname"><a href="../../d2/d45/segtree_8cpp.html#abd3e818681fb2e29cf08f4f60f82c8e0">update</a></div><div class="ttdeci">void update(std::vector< int64_t > *segtree, std::vector< int64_t > *lazy, int64_t start, int64_t end, int64_t delta, uint64_t low, uint64_t high, uint64_t pos)</div><div class="ttdoc">Updates a range of the segment tree.</div><div class="ttdef"><b>Definition</b> segtree.cpp:103</div></div>
|
||||
<div class="ttc" id="ashared_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
|
||||
@@ -1,352 +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++: range_queries/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('d4/d96/range__queries_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="#namespaces">Namespaces</a> |
|
||||
<a href="#func-members">Functions</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://en.wikipedia.org/wiki/Range_minimum_query" target="_blank">Sparse Table</a> data structure.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <algorithm></code><br />
|
||||
<code>#include <cassert></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <vector></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="../../d4/d31/range__queries_2sparse__table_8cpp__incl.svg" width="350" 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/d69/namespacerange__queries.html">range_queries</a></td></tr>
|
||||
<tr class="memdesc:dd/d69/namespacerange__queries"><td class="mdescLeft"> </td><td class="mdescRight">for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> <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:a40810d8c0fe3f8cf432ab128b1ae0300" id="r_a40810d8c0fe3f8cf432ab128b1ae0300"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:a40810d8c0fe3f8cf432ab128b1ae0300"><td class="memTemplItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a40810d8c0fe3f8cf432ab128b1ae0300">range_queries::sparse_table::computeLogs</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< T > &A)</td></tr>
|
||||
<tr class="separator:a40810d8c0fe3f8cf432ab128b1ae0300"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a803a2451e87021d14ae06f148383e6bc" id="r_a803a2451e87021d14ae06f148383e6bc"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:a803a2451e87021d14ae06f148383e6bc"><td class="memTemplItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< T > > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a803a2451e87021d14ae06f148383e6bc">range_queries::sparse_table::buildTable</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< T > &A, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< T > &logs)</td></tr>
|
||||
<tr class="separator:a803a2451e87021d14ae06f148383e6bc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a932816c3de9e5ad122b180de60978e8f" id="r_a932816c3de9e5ad122b180de60978e8f"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:a932816c3de9e5ad122b180de60978e8f"><td class="memTemplItemLeft" align="right" valign="top">int </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a932816c3de9e5ad122b180de60978e8f">range_queries::sparse_table::getMinimum</a> (int beg, int end, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< T > &logs, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< T > > &table)</td></tr>
|
||||
<tr class="separator:a932816c3de9e5ad122b180de60978e8f"><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="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Implementation of <a href="https://en.wikipedia.org/wiki/Range_minimum_query" target="_blank">Sparse Table</a> data structure. </p>
|
||||
<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.</p>
|
||||
<ul>
|
||||
<li>Running Time Complexity <br />
|
||||
</li>
|
||||
<li>Build : O(NlogN) <br />
|
||||
</li>
|
||||
<li>Range Query : O(1) <br />
|
||||
</li>
|
||||
</ul>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a803a2451e87021d14ae06f148383e6bc" name="a803a2451e87021d14ae06f148383e6bc"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a803a2451e87021d14ae06f148383e6bc">◆ </a></span>buildTable()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< T > > range_queries::sparse_table::buildTable </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>< T > &</td> <td class="paramname"><span class="paramname"><em>A</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></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>< T > &</td> <td class="paramname"><span class="paramname"><em>logs</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>This functions builds the primary data structure sparse table </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">n</td><td>value of the size of the input array </td></tr>
|
||||
<tr><td class="paramname">A</td><td>array of the input integers </td></tr>
|
||||
<tr><td class="paramname">logs</td><td>array of the log table </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>created sparse table data structure </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 57</span> {</div>
|
||||
<div class="line"><span class="lineno"> 58</span> <span class="keywordtype">int</span> n = 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"> 59</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<T></a> > table(20, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<T></a>(n + 5, 0));</div>
|
||||
<div class="line"><span class="lineno"> 60</span> <span class="keywordtype">int</span> curLen = 0;</div>
|
||||
<div class="line"><span class="lineno"> 61</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i <= logs[n]; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 62</span> curLen = 1 << i;</div>
|
||||
<div class="line"><span class="lineno"> 63</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j + curLen < n; j++) {</div>
|
||||
<div class="line"><span class="lineno"> 64</span> <span class="keywordflow">if</span> (curLen == 1) {</div>
|
||||
<div class="line"><span class="lineno"> 65</span> table[i][j] = A[j];</div>
|
||||
<div class="line"><span class="lineno"> 66</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 67</span> table[i][j] =</div>
|
||||
<div class="line"><span class="lineno"> 68</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(table[i - 1][j], table[i - 1][j + curLen / 2]);</div>
|
||||
<div class="line"><span class="lineno"> 69</span> }</div>
|
||||
<div class="line"><span class="lineno"> 70</span> }</div>
|
||||
<div class="line"><span class="lineno"> 71</span> }</div>
|
||||
<div class="line"><span class="lineno"> 72</span> <span class="keywordflow">return</span> table;</div>
|
||||
<div class="line"><span class="lineno"> 73</span>}</div>
|
||||
<div class="ttc" id="amin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a></div><div class="ttdeci">T min(T... args)</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="../../d4/d96/range__queries_2sparse__table_8cpp_a803a2451e87021d14ae06f148383e6bc_cgraph.svg" width="324" height="92"><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="a40810d8c0fe3f8cf432ab128b1ae0300" name="a40810d8c0fe3f8cf432ab128b1ae0300"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a40810d8c0fe3f8cf432ab128b1ae0300">◆ </a></span>computeLogs()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< T > range_queries::sparse_table::computeLogs </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>< T > &</td> <td class="paramname"><span class="paramname"><em>A</em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>This function precomputes intial log table for further use. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">n</td><td>value of the size of the input array </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>corresponding vector of the log table </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 38</span> {</div>
|
||||
<div class="line"><span class="lineno"> 39</span> <span class="keywordtype">int</span> n = 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"> 40</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<T></a> logs(n);</div>
|
||||
<div class="line"><span class="lineno"> 41</span> logs[1] = 0;</div>
|
||||
<div class="line"><span class="lineno"> 42</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 2; i < n; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 43</span> logs[i] = logs[i / 2] + 1;</div>
|
||||
<div class="line"><span class="lineno"> 44</span> }</div>
|
||||
<div class="line"><span class="lineno"> 45</span> <span class="keywordflow">return</span> logs;</div>
|
||||
<div class="line"><span class="lineno"> 46</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="../../d4/d96/range__queries_2sparse__table_8cpp_a40810d8c0fe3f8cf432ab128b1ae0300_cgraph.svg" width="324" height="76"><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="a932816c3de9e5ad122b180de60978e8f" name="a932816c3de9e5ad122b180de60978e8f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a932816c3de9e5ad122b180de60978e8f">◆ </a></span>getMinimum()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename T > </div>
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int range_queries::sparse_table::getMinimum </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>beg</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>end</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></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>< T > &</td> <td class="paramname"><span class="paramname"><em>logs</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></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>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< T > > &</td> <td class="paramname"><span class="paramname"><em>table</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>This function is the query function to get the range minimum value </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">beg</td><td>beginning index of the query range </td></tr>
|
||||
<tr><td class="paramname">end</td><td>ending index of the query range </td></tr>
|
||||
<tr><td class="paramname">logs</td><td>array of the log table </td></tr>
|
||||
<tr><td class="paramname">table</td><td>sparse table data structure for the input array </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>minimum value for the [beg, end] range for the input array </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 85</span> {</div>
|
||||
<div class="line"><span class="lineno"> 86</span> <span class="keywordtype">int</span> p = logs[<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">end</a> - beg + 1];</div>
|
||||
<div class="line"><span class="lineno"> 87</span> <span class="keywordtype">int</span> pLen = 1 << p;</div>
|
||||
<div class="line"><span class="lineno"> 88</span> <span class="keywordflow">return</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(table[p][beg], table[p][end - pLen + 1]);</div>
|
||||
<div class="line"><span class="lineno"> 89</span>}</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><!-- 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="../../d4/d96/range__queries_2sparse__table_8cpp_a932816c3de9e5ad122b180de60978e8f_cgraph.svg" width="276" height="76"><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="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>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 96</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/vector.html">std::vector<int></a> A{1, 2, 0, 3, 9};</div>
|
||||
<div class="line"><span class="lineno"> 98</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> logs = <a class="code hl_function" href="#a40810d8c0fe3f8cf432ab128b1ae0300">range_queries::sparse_table::computeLogs</a>(A);</div>
|
||||
<div class="line"><span class="lineno"> 99</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<int></a> > table =</div>
|
||||
<div class="line"><span class="lineno"> 100</span> <a class="code hl_function" href="#a803a2451e87021d14ae06f148383e6bc">range_queries::sparse_table::buildTable</a>(A, logs);</div>
|
||||
<div class="line"><span class="lineno"> 101</span> assert(range_queries::sparse_table::getMinimum(0, 0, logs, table) == 1);</div>
|
||||
<div class="line"><span class="lineno"> 102</span> assert(range_queries::sparse_table::getMinimum(0, 4, logs, table) == 0);</div>
|
||||
<div class="line"><span class="lineno"> 103</span> assert(range_queries::sparse_table::getMinimum(2, 4, logs, table) == 0);</div>
|
||||
<div class="line"><span class="lineno"> 104</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 105</span>}</div>
|
||||
<div class="ttc" id="arange__queries_2sparse__table_8cpp_html_a40810d8c0fe3f8cf432ab128b1ae0300"><div class="ttname"><a href="#a40810d8c0fe3f8cf432ab128b1ae0300">range_queries::sparse_table::computeLogs</a></div><div class="ttdeci">std::vector< T > computeLogs(const std::vector< T > &A)</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:38</div></div>
|
||||
<div class="ttc" id="arange__queries_2sparse__table_8cpp_html_a803a2451e87021d14ae06f148383e6bc"><div class="ttname"><a href="#a803a2451e87021d14ae06f148383e6bc">range_queries::sparse_table::buildTable</a></div><div class="ttdeci">std::vector< std::vector< T > > buildTable(const std::vector< T > &A, const std::vector< T > &logs)</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:56</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_074119ce3a874b57120c49a0cc4bb5ad.html">range_queries</a></li><li class="navelem"><a class="el" href="../../d4/d96/range__queries_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,7 +0,0 @@
|
||||
var range__queries_2sparse__table_8cpp =
|
||||
[
|
||||
[ "buildTable", "d4/d96/range__queries_2sparse__table_8cpp.html#a803a2451e87021d14ae06f148383e6bc", null ],
|
||||
[ "computeLogs", "d4/d96/range__queries_2sparse__table_8cpp.html#a40810d8c0fe3f8cf432ab128b1ae0300", null ],
|
||||
[ "getMinimum", "d4/d96/range__queries_2sparse__table_8cpp.html#a932816c3de9e5ad122b180de60978e8f", null ],
|
||||
[ "main", "d4/d96/range__queries_2sparse__table_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ]
|
||||
];
|
||||
@@ -1,6 +0,0 @@
|
||||
<map id="range_queries::sparse_table::computeLogs" name="range_queries::sparse_table::computeLogs">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,29,155,70"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="45,29,44,19,49,10,62,5,80,3,100,5,112,11,109,16,98,10,80,8,63,10,53,14,49,20,51,28"/>
|
||||
<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="203,37,318,62"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000002" title=" " alt="" coords="155,47,187,47,187,52,155,52"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
9dd109d2dbbdfbf9fca953d193387d01
|
||||
@@ -1,75 +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: range_queries::sparse_table::computeLogs Pages: 1 -->
|
||||
<svg width="243pt" height="57pt"
|
||||
viewBox="0.00 0.00 242.50 56.50" 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 52.5)">
|
||||
<title>range_queries::sparse_table::computeLogs</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="112,-30.5 0,-30.5 0,0 112,0 112,-30.5"/>
|
||||
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::sparse</text>
|
||||
<text text-anchor="middle" x="56" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">_table::computeLogs</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node1 -->
|
||||
<g id="edge1_Node000001_Node000001" class="edge">
|
||||
<title>Node1->Node1</title>
|
||||
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.03,-30.99C27.14,-40.06 35.13,-48.5 56,-48.5 67.41,-48.5 74.97,-45.97 78.68,-42.2"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="82.13,-42.82 79.79,-32.49 75.18,-42.03 82.13,-42.82"/>
|
||||
</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="234.5,-24.88 148,-24.88 148,-5.63 234.5,-5.63 234.5,-24.88"/>
|
||||
<text text-anchor="middle" x="191.25" y="-11.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge2_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M112.35,-15.25C120.33,-15.25 128.52,-15.25 136.47,-15.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="136.36,-18.75 146.36,-15.25 136.36,-11.75 136.36,-18.75"/>
|
||||
</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.0 KiB |
@@ -1,49 +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: range_queries::sparse_table::computeLogs Pages: 1 -->
|
||||
<svg width="243pt" height="57pt"
|
||||
viewBox="0.00 0.00 242.50 56.50" 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 52.5)">
|
||||
<title>range_queries::sparse_table::computeLogs</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="112,-30.5 0,-30.5 0,0 112,0 112,-30.5"/>
|
||||
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::sparse</text>
|
||||
<text text-anchor="middle" x="56" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">_table::computeLogs</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node1 -->
|
||||
<g id="edge1_Node000001_Node000001" class="edge">
|
||||
<title>Node1->Node1</title>
|
||||
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.03,-30.99C27.14,-40.06 35.13,-48.5 56,-48.5 67.41,-48.5 74.97,-45.97 78.68,-42.2"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="82.13,-42.82 79.79,-32.49 75.18,-42.03 82.13,-42.82"/>
|
||||
</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="234.5,-24.88 148,-24.88 148,-5.63 234.5,-5.63 234.5,-24.88"/>
|
||||
<text text-anchor="middle" x="191.25" y="-11.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge2_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M112.35,-15.25C120.33,-15.25 128.52,-15.25 136.47,-15.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="136.36,-18.75 146.36,-15.25 136.36,-11.75 136.36,-18.75"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -1,8 +0,0 @@
|
||||
<map id="range_queries::sparse_table::buildTable" name="range_queries::sparse_table::buildTable">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,29,155,70"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="45,29,44,19,49,10,62,5,80,3,100,5,112,11,109,16,98,10,80,8,63,10,53,14,49,20,51,28"/>
|
||||
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min.html#" title=" " alt="" coords="226,12,294,37"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000002" title=" " alt="" coords="155,37,211,29,211,34,156,42"/>
|
||||
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="203,61,318,86"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000003" title=" " alt="" coords="155,57,188,61,187,67,155,62"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
98658f295d1efd86f8f71770745dd0ae
|
||||
@@ -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: range_queries::sparse_table::buildTable Pages: 1 -->
|
||||
<svg width="243pt" height="69pt"
|
||||
viewBox="0.00 0.00 242.50 68.88" 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 64.88)">
|
||||
<title>range_queries::sparse_table::buildTable</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="112,-42.88 0,-42.88 0,-12.37 112,-12.37 112,-42.88"/>
|
||||
<text text-anchor="start" x="8" y="-29.38" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::sparse</text>
|
||||
<text text-anchor="middle" x="56" y="-18.12" font-family="Helvetica,sans-Serif" font-size="10.00">_table::buildTable</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node1 -->
|
||||
<g id="edge1_Node000001_Node000001" class="edge">
|
||||
<title>Node1->Node1</title>
|
||||
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.03,-43.36C27.14,-52.43 35.13,-60.88 56,-60.88 67.41,-60.88 74.97,-58.35 78.68,-54.58"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="82.13,-55.2 79.79,-44.86 75.18,-54.4 82.13,-55.2"/>
|
||||
</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/algorithm/min.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="216.88,-56.25 165.62,-56.25 165.62,-37 216.88,-37 216.88,-56.25"/>
|
||||
<text text-anchor="middle" x="191.25" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge2_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M112.35,-35.52C126.48,-37.53 141.3,-39.64 154.17,-41.48"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="153.49,-44.92 163.88,-42.86 154.47,-37.99 153.49,-44.92"/>
|
||||
</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/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="234.5,-19.25 148,-19.25 148,0 234.5,0 234.5,-19.25"/>
|
||||
<text text-anchor="middle" x="191.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</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="M112.35,-20.15C120.33,-19.07 128.52,-17.96 136.47,-16.89"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="136.93,-20.36 146.37,-15.55 135.99,-13.42 136.93,-20.36"/>
|
||||
</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.8 KiB |
@@ -1,67 +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: range_queries::sparse_table::buildTable Pages: 1 -->
|
||||
<svg width="243pt" height="69pt"
|
||||
viewBox="0.00 0.00 242.50 68.88" 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 64.88)">
|
||||
<title>range_queries::sparse_table::buildTable</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="112,-42.88 0,-42.88 0,-12.37 112,-12.37 112,-42.88"/>
|
||||
<text text-anchor="start" x="8" y="-29.38" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::sparse</text>
|
||||
<text text-anchor="middle" x="56" y="-18.12" font-family="Helvetica,sans-Serif" font-size="10.00">_table::buildTable</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node1 -->
|
||||
<g id="edge1_Node000001_Node000001" class="edge">
|
||||
<title>Node1->Node1</title>
|
||||
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.03,-43.36C27.14,-52.43 35.13,-60.88 56,-60.88 67.41,-60.88 74.97,-58.35 78.68,-54.58"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="82.13,-55.2 79.79,-44.86 75.18,-54.4 82.13,-55.2"/>
|
||||
</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/algorithm/min.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="216.88,-56.25 165.62,-56.25 165.62,-37 216.88,-37 216.88,-56.25"/>
|
||||
<text text-anchor="middle" x="191.25" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge2_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M112.35,-35.52C126.48,-37.53 141.3,-39.64 154.17,-41.48"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="153.49,-44.92 163.88,-42.86 154.47,-37.99 153.49,-44.92"/>
|
||||
</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/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="234.5,-19.25 148,-19.25 148,0 234.5,0 234.5,-19.25"/>
|
||||
<text text-anchor="middle" x="191.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</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="M112.35,-20.15C120.33,-19.07 128.52,-17.96 136.47,-16.89"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="136.93,-20.36 146.37,-15.55 135.99,-13.42 136.93,-20.36"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.1 KiB |
@@ -1,6 +0,0 @@
|
||||
<map id="range_queries::sparse_table::getMinimum" name="range_queries::sparse_table::getMinimum">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,29,155,70"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="50,29,48,19,53,11,64,5,80,3,97,5,108,11,105,16,96,10,80,8,65,10,57,14,53,20,55,28"/>
|
||||
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min.html#" title=" " alt="" coords="203,37,271,62"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000002" title=" " alt="" coords="155,47,187,47,187,52,155,52"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
8d764f1bef624da5e58af0c896f208d5
|
||||
@@ -1,75 +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: range_queries::sparse_table::getMinimum Pages: 1 -->
|
||||
<svg width="207pt" height="57pt"
|
||||
viewBox="0.00 0.00 207.25 56.50" 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 52.5)">
|
||||
<title>range_queries::sparse_table::getMinimum</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="112,-30.5 0,-30.5 0,0 112,0 112,-30.5"/>
|
||||
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::sparse</text>
|
||||
<text text-anchor="middle" x="56" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">_table::getMinimum</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node1 -->
|
||||
<g id="edge1_Node000001_Node000001" class="edge">
|
||||
<title>Node1->Node1</title>
|
||||
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M35.16,-30.99C30.9,-40.06 37.85,-48.5 56,-48.5 65.93,-48.5 72.5,-45.97 75.73,-42.2"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="79.18,-42.79 76.69,-32.49 72.22,-42.1 79.18,-42.79"/>
|
||||
</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/algorithm/min.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="199.25,-24.88 148,-24.88 148,-5.63 199.25,-5.63 199.25,-24.88"/>
|
||||
<text text-anchor="middle" x="173.62" y="-11.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge2_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M112.44,-15.25C120.51,-15.25 128.63,-15.25 136.19,-15.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="135.99,-18.75 145.99,-15.25 135.99,-11.75 135.99,-18.75"/>
|
||||
</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.0 KiB |
@@ -1,49 +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: range_queries::sparse_table::getMinimum Pages: 1 -->
|
||||
<svg width="207pt" height="57pt"
|
||||
viewBox="0.00 0.00 207.25 56.50" 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 52.5)">
|
||||
<title>range_queries::sparse_table::getMinimum</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="112,-30.5 0,-30.5 0,0 112,0 112,-30.5"/>
|
||||
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::sparse</text>
|
||||
<text text-anchor="middle" x="56" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">_table::getMinimum</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node1 -->
|
||||
<g id="edge1_Node000001_Node000001" class="edge">
|
||||
<title>Node1->Node1</title>
|
||||
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M35.16,-30.99C30.9,-40.06 37.85,-48.5 56,-48.5 65.93,-48.5 72.5,-45.97 75.73,-42.2"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="79.18,-42.79 76.69,-32.49 72.22,-42.1 79.18,-42.79"/>
|
||||
</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/algorithm/min.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="199.25,-24.88 148,-24.88 148,-5.63 199.25,-5.63 199.25,-24.88"/>
|
||||
<text text-anchor="middle" x="173.62" y="-11.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge2_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M112.44,-15.25C120.51,-15.25 128.63,-15.25 136.19,-15.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="135.99,-18.75 145.99,-15.25 135.99,-11.75 135.99,-18.75"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -5,7 +5,7 @@
|
||||
<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/kadane2.cpp File Reference</title>
|
||||
<title>Algorithms_in_C++: dynamic_programming/kadane.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>
|
||||
@@ -78,7 +78,7 @@ $(function() {
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('db/dca/kadane2_8cpp.html','../../'); initResizable(true); });
|
||||
$(function(){initNavTree('d4/da0/kadane_8cpp.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
@@ -107,7 +107,7 @@ $(function(){initNavTree('db/dca/kadane2_8cpp.html','../../'); initResizable(tru
|
||||
<div class="summary">
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">kadane2.cpp File Reference</div></div>
|
||||
<div class="headertitle"><div class="title">kadane.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
@@ -117,9 +117,9 @@ $(function(){initNavTree('db/dca/kadane2_8cpp.html','../../'); initResizable(tru
|
||||
<code>#include <climits></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for kadane2.cpp:</div>
|
||||
Include dependency graph for kadane.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d8/d58/kadane2_8cpp__incl.svg" width="240" 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/d53/kadane_8cpp__incl.svg" width="240" 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>
|
||||
@@ -167,7 +167,7 @@ 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"> 60</span> {</div>
|
||||
<div class="line"><span class="lineno"> 61</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 5;</div>
|
||||
<div class="line"><span class="lineno"> 61</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 5;</div>
|
||||
<div class="line"><span class="lineno"> 62</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<int, N></a> n{}; <span class="comment">// declaring array</span></div>
|
||||
<div class="line"><span class="lineno"> 63</span> <span class="comment">// taking values of elements from user</span></div>
|
||||
<div class="line"><span class="lineno"> 64</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n.size(); i++) {</div>
|
||||
@@ -184,7 +184,7 @@ Algorithm</h3>
|
||||
<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_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</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="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><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -234,7 +234,7 @@ template<size_t N> </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="../../db/dca/kadane2_8cpp_af3029007a422a914a85c0b0122f1c7b4_cgraph.svg" width="290" height="76"><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/da0/kadane_8cpp_af3029007a422a914a85c0b0122f1c7b4_cgraph.svg" width="290" height="76"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -244,7 +244,7 @@ Here is the call graph for this function:</div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_8a20dd5bfd5341a725342bf72b6b686f.html">dynamic_programming</a></li><li class="navelem"><a class="el" href="../../db/dca/kadane2_8cpp.html">kadane2.cpp</a></li>
|
||||
<li class="navelem"><a class="el" href="../../dir_8a20dd5bfd5341a725342bf72b6b686f.html">dynamic_programming</a></li><li class="navelem"><a class="el" href="../../d4/da0/kadane_8cpp.html">kadane.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>
|
||||
5
d4/da0/kadane_8cpp.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var kadane_8cpp =
|
||||
[
|
||||
[ "main", "d4/da0/kadane_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "maxSubArray", "d4/da0/kadane_8cpp.html#af3029007a422a914a85c0b0122f1c7b4", null ]
|
||||
];
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -1,11 +1,13 @@
|
||||
<map id="dynamic_programming/house_robber.cpp" name="dynamic_programming/house_robber.cpp">
|
||||
<area shape="rect" id="Node000001" title="Implementation of House Robber Problem algorithm." alt="" coords="91,5,243,46"/>
|
||||
<area shape="rect" id="Node000001" title="Implementation of House Robber Problem algorithm." alt="" coords="131,5,283,46"/>
|
||||
<area shape="rect" id="Node000002" title=" " alt="" coords="5,94,70,120"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="136,49,72,88,69,83,133,44"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="166,49,78,90,76,85,163,44"/>
|
||||
<area shape="rect" id="Node000003" title=" " alt="" coords="93,94,152,120"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="158,48,139,82,135,79,154,45"/>
|
||||
<area shape="rect" id="Node000004" title=" " alt="" coords="176,94,248,120"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="180,45,200,79,195,82,176,48"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="272,94,329,120"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="201,44,268,83,265,88,199,49"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="188,48,149,85,145,81,184,44"/>
|
||||
<area shape="rect" id="Node000004" title=" " alt="" coords="177,94,237,120"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="210,46,210,78,204,78,204,46"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="260,94,332,120"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="231,44,273,82,269,86,227,48"/>
|
||||
<area shape="rect" id="Node000006" title=" " alt="" coords="356,94,413,120"/>
|
||||
<area shape="poly" id="edge5_Node000001_Node000006" title=" " alt="" coords="252,44,344,85,342,90,250,49"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
58370627a53ec42f06fe817c7591cb43
|
||||
179733e96c0e668d3df1b8df8ea8ec06
|
||||
@@ -4,8 +4,8 @@
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/house_robber.cpp Pages: 1 -->
|
||||
<svg width="251pt" height="94pt"
|
||||
viewBox="0.00 0.00 250.62 93.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="314pt" height="94pt"
|
||||
viewBox="0.00 0.00 313.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="Implementation of House Robber Problem algorithm.">
|
||||
<polygon fill="#999999" stroke="#666666" points="178.25,-85.75 64,-85.75 64,-55.25 178.25,-55.25 178.25,-85.75"/>
|
||||
<text text-anchor="start" x="72" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="121.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/house_robber.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="208.25,-85.75 94,-85.75 94,-55.25 208.25,-55.25 208.25,-85.75"/>
|
||||
<text text-anchor="start" x="102" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="151.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/house_robber.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="M97.15,-54.95C82.38,-45.98 63.49,-34.52 48.63,-25.5"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="50.74,-22.68 40.37,-20.49 47.11,-28.67 50.74,-22.68"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M119.41,-54.8C99.32,-45.48 73.52,-33.52 53.83,-24.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="55.52,-21.32 44.97,-20.29 52.58,-27.67 55.52,-21.32"/>
|
||||
</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="M112.97,-54.95C108.67,-47.28 103.34,-37.77 98.73,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="101.89,-28.03 93.95,-21.02 95.79,-31.46 101.89,-28.03"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M135.55,-54.95C126.61,-46.59 115.33,-36.05 106.02,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="108.64,-25.01 98.94,-20.73 103.86,-30.12 108.64,-25.01"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -69,8 +69,8 @@
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="181.88,-19.25 128.38,-19.25 128.38,0 181.88,0 181.88,-19.25"/>
|
||||
<text text-anchor="middle" x="155.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="173.75,-19.25 128.5,-19.25 128.5,0 173.75,0 173.75,-19.25"/>
|
||||
<text text-anchor="middle" x="151.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstdint</text>
|
||||
</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="M129.53,-54.95C133.96,-47.28 139.45,-37.77 144.2,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="147.16,-31.42 149.13,-21.01 141.09,-27.92 147.16,-31.42"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M151.12,-54.95C151.12,-47.71 151.12,-38.84 151.12,-30.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="154.63,-31.21 151.13,-21.21 147.63,-31.21 154.63,-31.21"/>
|
||||
</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="242.62,-19.25 199.62,-19.25 199.62,0 242.62,0 242.62,-19.25"/>
|
||||
<text text-anchor="middle" x="221.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="244.88,-19.25 191.38,-19.25 191.38,0 244.88,0 244.88,-19.25"/>
|
||||
<text text-anchor="middle" x="218.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -96,8 +96,26 @@
|
||||
<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="M146.1,-54.8C161.33,-45.83 180.73,-34.41 195.99,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="197.64,-28.51 204.48,-20.42 194.09,-22.48 197.64,-28.51"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M167.69,-54.95C177.3,-46.5 189.44,-35.83 199.4,-27.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="201.46,-29.93 206.66,-20.7 196.84,-24.67 201.46,-29.93"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="305.62,-19.25 262.62,-19.25 262.62,0 305.62,0 305.62,-19.25"/>
|
||||
<text text-anchor="middle" x="284.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node6 -->
|
||||
<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.34,-54.8C205.47,-45.44 232.65,-33.41 253.3,-24.27"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="254.62,-27.51 262.34,-20.27 251.78,-21.11 254.62,-27.51"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 5.4 KiB |
@@ -4,17 +4,17 @@
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/house_robber.cpp Pages: 1 -->
|
||||
<svg width="251pt" height="94pt"
|
||||
viewBox="0.00 0.00 250.62 93.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="314pt" height="94pt"
|
||||
viewBox="0.00 0.00 313.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/house_robber.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Implementation of House Robber Problem algorithm.">
|
||||
<polygon fill="#999999" stroke="#666666" points="178.25,-85.75 64,-85.75 64,-55.25 178.25,-55.25 178.25,-85.75"/>
|
||||
<text text-anchor="start" x="72" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="121.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/house_robber.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="208.25,-85.75 94,-85.75 94,-55.25 208.25,-55.25 208.25,-85.75"/>
|
||||
<text text-anchor="start" x="102" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="151.12" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/house_robber.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="M97.15,-54.95C82.38,-45.98 63.49,-34.52 48.63,-25.5"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="50.74,-22.68 40.37,-20.49 47.11,-28.67 50.74,-22.68"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M119.41,-54.8C99.32,-45.48 73.52,-33.52 53.83,-24.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="55.52,-21.32 44.97,-20.29 52.58,-27.67 55.52,-21.32"/>
|
||||
</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="M112.97,-54.95C108.67,-47.28 103.34,-37.77 98.73,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="101.89,-28.03 93.95,-21.02 95.79,-31.46 101.89,-28.03"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M135.55,-54.95C126.61,-46.59 115.33,-36.05 106.02,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="108.64,-25.01 98.94,-20.73 103.86,-30.12 108.64,-25.01"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -58,8 +58,8 @@
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="181.88,-19.25 128.38,-19.25 128.38,0 181.88,0 181.88,-19.25"/>
|
||||
<text text-anchor="middle" x="155.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="173.75,-19.25 128.5,-19.25 128.5,0 173.75,0 173.75,-19.25"/>
|
||||
<text text-anchor="middle" x="151.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstdint</text>
|
||||
</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="M129.53,-54.95C133.96,-47.28 139.45,-37.77 144.2,-29.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="147.16,-31.42 149.13,-21.01 141.09,-27.92 147.16,-31.42"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M151.12,-54.95C151.12,-47.71 151.12,-38.84 151.12,-30.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="154.63,-31.21 151.13,-21.21 147.63,-31.21 154.63,-31.21"/>
|
||||
</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="242.62,-19.25 199.62,-19.25 199.62,0 242.62,0 242.62,-19.25"/>
|
||||
<text text-anchor="middle" x="221.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="244.88,-19.25 191.38,-19.25 191.38,0 244.88,0 244.88,-19.25"/>
|
||||
<text text-anchor="middle" x="218.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -85,8 +85,26 @@
|
||||
<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="M146.1,-54.8C161.33,-45.83 180.73,-34.41 195.99,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="197.64,-28.51 204.48,-20.42 194.09,-22.48 197.64,-28.51"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M167.69,-54.95C177.3,-46.5 189.44,-35.83 199.4,-27.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="201.46,-29.93 206.66,-20.7 196.84,-24.67 201.46,-29.93"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="305.62,-19.25 262.62,-19.25 262.62,0 305.62,0 305.62,-19.25"/>
|
||||
<text text-anchor="middle" x="284.12" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node6 -->
|
||||
<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.34,-54.8C205.47,-45.44 232.65,-33.41 253.3,-24.27"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="254.62,-27.51 262.34,-20.27 251.78,-21.11 254.62,-27.51"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.7 KiB |
@@ -303,7 +303,7 @@ Here is the call graph for this function:</div>
|
||||
<li><code>w12.csv</code>: trained SOM map </li>
|
||||
</ul>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 369</span> {</div>
|
||||
<div class="line"><span class="lineno"> 370</span> <span class="keywordtype">int</span> j = 0, <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 300;</div>
|
||||
<div class="line"><span class="lineno"> 370</span> <span class="keywordtype">int</span> j = 0, <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 300;</div>
|
||||
<div class="line"><span class="lineno"> 371</span> <span class="keywordtype">int</span> features = 2;</div>
|
||||
<div class="line"><span class="lineno"> 372</span> <span class="keywordtype">int</span> num_out = 30;</div>
|
||||
<div class="line"><span class="lineno"> 373</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::valarray<double></a>> X(N);</div>
|
||||
@@ -335,11 +335,11 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 399</span> save_u_matrix(<span class="stringliteral">"w12.csv"</span>, W); <span class="comment">// save the resultant weights</span></div>
|
||||
<div class="line"><span class="lineno"> 400</span>}</div>
|
||||
<div class="ttc" id="acomposite__simpson__rule_8cpp_html_a1b74d828b33760094906797042b89442"><div class="ttname"><a href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">numerical_methods::simpson_method::k</a></div><div class="ttdeci">double k(double x)</div><div class="ttdoc">Another test function.</div><div class="ttdef"><b>Definition</b> composite_simpson_rule.cpp:117</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_gabc90175770bf0d5853c466e14993a08c"><div class="ttname"><a href="../../d9/d66/group__machine__learning.html#gabc90175770bf0d5853c466e14993a08c">save_2d_data</a></div><div class="ttdeci">int save_2d_data(const char *fname, const std::vector< std::valarray< double > > &X)</div><div class="ttdef"><b>Definition</b> kohonen_som_topology.cpp:65</div></div>
|
||||
<div class="ttc" id="agroup__machine__learning_html_gaf5ce14f026d6d231bef29161bac2b485"><div class="ttname"><a href="../../d9/d66/group__machine__learning.html#gaf5ce14f026d6d231bef29161bac2b485">_random</a></div><div class="ttdeci">double _random(double a, double b)</div><div class="ttdef"><b>Definition</b> kohonen_som_topology.cpp:53</div></div>
|
||||
<div class="ttc" id="akohonen__som__topology_8cpp_html_a48efb079040c7aaa3a4917a0e486cba9"><div class="ttname"><a href="#a48efb079040c7aaa3a4917a0e486cba9">test_2d_classes</a></div><div class="ttdeci">void test_2d_classes(std::vector< std::valarray< double > > *data)</div><div class="ttdef"><b>Definition</b> kohonen_som_topology.cpp:330</div></div>
|
||||
<div class="ttc" id="amax_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a></div><div class="ttdeci">T max(T... args)</div></div>
|
||||
<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="avalarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a></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">
|
||||
@@ -370,7 +370,7 @@ Here is the call graph for this function:</div>
|
||||
<li><code>w22.csv</code>: trained SOM map </li>
|
||||
</ul>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 451</span> {</div>
|
||||
<div class="line"><span class="lineno"> 452</span> <span class="keywordtype">int</span> j = 0, <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 300;</div>
|
||||
<div class="line"><span class="lineno"> 452</span> <span class="keywordtype">int</span> j = 0, <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 300;</div>
|
||||
<div class="line"><span class="lineno"> 453</span> <span class="keywordtype">int</span> features = 3;</div>
|
||||
<div class="line"><span class="lineno"> 454</span> <span class="keywordtype">int</span> num_out = 30;</div>
|
||||
<div class="line"><span class="lineno"> 455</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::valarray<double></a>> X(N);</div>
|
||||
@@ -430,7 +430,7 @@ Here is the call graph for this function:</div>
|
||||
<li><code>w32.csv</code>: trained SOM map </li>
|
||||
</ul>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 537</span> {</div>
|
||||
<div class="line"><span class="lineno"> 538</span> <span class="keywordtype">int</span> j = 0, <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 500;</div>
|
||||
<div class="line"><span class="lineno"> 538</span> <span class="keywordtype">int</span> j = 0, <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 500;</div>
|
||||
<div class="line"><span class="lineno"> 539</span> <span class="keywordtype">int</span> features = 3;</div>
|
||||
<div class="line"><span class="lineno"> 540</span> <span class="keywordtype">int</span> num_out = 30;</div>
|
||||
<div class="line"><span class="lineno"> 541</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::valarray<double></a>> X(N);</div>
|
||||
@@ -497,7 +497,7 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 330</span> {</div>
|
||||
<div class="line"><span class="lineno"> 331</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = <a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>->size();</div>
|
||||
<div class="line"><span class="lineno"> 331</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = <a class="code hl_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>->size();</div>
|
||||
<div class="line"><span class="lineno"> 332</span> <span class="keyword">const</span> <span class="keywordtype">double</span> R = 0.3; <span class="comment">// radius of cluster</span></div>
|
||||
<div class="line"><span class="lineno"> 333</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 334</span> <span class="keyword">const</span> <span class="keywordtype">int</span> num_classes = 4;</div>
|
||||
@@ -512,7 +512,7 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 343</span><span class="preprocessor">#ifdef _OPENMP</span></div>
|
||||
<div class="line"><span class="lineno"> 344</span><span class="preprocessor">#pragma omp for</span></div>
|
||||
<div class="line"><span class="lineno"> 345</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><span class="lineno"> 346</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"> 346</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"> 347</span> <span class="comment">// select a random class for the point</span></div>
|
||||
<div class="line"><span class="lineno"> 348</span> <span class="keywordtype">int</span> cls = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % num_classes;</div>
|
||||
<div class="line"><span class="lineno"> 349</span> </div>
|
||||
@@ -564,7 +564,7 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 411</span> {</div>
|
||||
<div class="line"><span class="lineno"> 412</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_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>->size();</div>
|
||||
<div class="line"><span class="lineno"> 412</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_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>->size();</div>
|
||||
<div class="line"><span class="lineno"> 413</span> <span class="keyword">const</span> <span class="keywordtype">double</span> R = 0.3; <span class="comment">// radius of cluster</span></div>
|
||||
<div class="line"><span class="lineno"> 414</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 415</span> <span class="keyword">const</span> <span class="keywordtype">int</span> num_classes = 4;</div>
|
||||
@@ -579,7 +579,7 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 424</span><span class="preprocessor">#ifdef _OPENMP</span></div>
|
||||
<div class="line"><span class="lineno"> 425</span><span class="preprocessor">#pragma omp for</span></div>
|
||||
<div class="line"><span class="lineno"> 426</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><span class="lineno"> 427</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"> 427</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"> 428</span> <span class="comment">// select a random class for the point</span></div>
|
||||
<div class="line"><span class="lineno"> 429</span> <span class="keywordtype">int</span> cls = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % num_classes;</div>
|
||||
<div class="line"><span class="lineno"> 430</span> </div>
|
||||
@@ -629,7 +629,7 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 493</span> {</div>
|
||||
<div class="line"><span class="lineno"> 494</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_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>->size();</div>
|
||||
<div class="line"><span class="lineno"> 494</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_variable" href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a>->size();</div>
|
||||
<div class="line"><span class="lineno"> 495</span> <span class="keyword">const</span> <span class="keywordtype">double</span> R = 0.2; <span class="comment">// radius of cluster</span></div>
|
||||
<div class="line"><span class="lineno"> 496</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 497</span> <span class="keyword">const</span> <span class="keywordtype">int</span> num_classes = 8;</div>
|
||||
@@ -648,7 +648,7 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 510</span><span class="preprocessor">#ifdef _OPENMP</span></div>
|
||||
<div class="line"><span class="lineno"> 511</span><span class="preprocessor">#pragma omp for</span></div>
|
||||
<div class="line"><span class="lineno"> 512</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><span class="lineno"> 513</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"> 513</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"> 514</span> <span class="comment">// select a random class for the point</span></div>
|
||||
<div class="line"><span class="lineno"> 515</span> <span class="keywordtype">int</span> cls = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % num_classes;</div>
|
||||
<div class="line"><span class="lineno"> 516</span> </div>
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
<map id="operations_on_datastructures/trie_multiple_search.cpp" name="operations_on_datastructures/trie_multiple_search.cpp">
|
||||
<area shape="rect" id="Node000001" title="Trie datastructure with search variants" alt="" coords="168,5,360,46"/>
|
||||
<area shape="rect" id="Node000001" title="Trie datastructure with search variants" alt="" coords="210,5,403,46"/>
|
||||
<area shape="rect" id="Node000002" title=" " alt="" coords="5,94,80,120"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="209,49,91,91,90,86,208,44"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="241,49,96,92,94,87,240,44"/>
|
||||
<area shape="rect" id="Node000003" title=" " alt="" coords="104,94,168,120"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="234,49,170,88,167,83,231,44"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="265,49,177,90,175,85,263,44"/>
|
||||
<area shape="rect" id="Node000004" title=" " alt="" coords="192,94,253,120"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="256,48,238,81,234,79,251,45"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="288,48,248,85,245,81,284,44"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="276,94,337,120"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="277,45,295,79,290,81,272,48"/>
|
||||
<area shape="rect" id="Node000006" title=" " alt="" coords="360,94,432,120"/>
|
||||
<area shape="poly" id="edge5_Node000001_Node000006" title=" " alt="" coords="298,44,364,83,361,88,295,49"/>
|
||||
<area shape="rect" id="Node000007" title=" " alt="" coords="456,94,512,120"/>
|
||||
<area shape="poly" id="edge6_Node000001_Node000007" title=" " alt="" coords="320,44,442,88,440,93,318,49"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="309,46,309,78,304,78,304,46"/>
|
||||
<area shape="rect" id="Node000006" title=" " alt="" coords="360,94,421,120"/>
|
||||
<area shape="poly" id="edge5_Node000001_Node000006" title=" " alt="" coords="329,44,368,81,365,85,325,48"/>
|
||||
<area shape="rect" id="Node000007" title=" " alt="" coords="444,94,516,120"/>
|
||||
<area shape="poly" id="edge6_Node000001_Node000007" title=" " alt="" coords="351,44,440,85,438,90,349,49"/>
|
||||
<area shape="rect" id="Node000008" title=" " alt="" coords="540,94,596,120"/>
|
||||
<area shape="poly" id="edge7_Node000001_Node000008" title=" " alt="" coords="373,44,526,90,524,95,371,49"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
7faf370a84d664eb2e7390db0276959b
|
||||
bd655c6b8b4d8e7bd95e834de8c7ad00
|
||||
@@ -4,8 +4,8 @@
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: operations_on_datastructures/trie_multiple_search.cpp Pages: 1 -->
|
||||
<svg width="388pt" height="94pt"
|
||||
viewBox="0.00 0.00 388.00 93.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="451pt" height="94pt"
|
||||
viewBox="0.00 0.00 451.00 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="Trie datastructure with search variants">
|
||||
<polygon fill="#999999" stroke="#666666" points="266,-85.75 121.75,-85.75 121.75,-55.25 266,-55.25 266,-85.75"/>
|
||||
<text text-anchor="start" x="129.75" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
|
||||
<text text-anchor="middle" x="193.88" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/trie_multiple_search.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="298,-85.75 153.75,-85.75 153.75,-55.25 298,-55.25 298,-85.75"/>
|
||||
<text text-anchor="start" x="161.75" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
|
||||
<text text-anchor="middle" x="225.88" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/trie_multiple_search.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="M152.41,-54.8C125.19,-45.14 89.93,-32.63 63.88,-23.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="65.35,-20.2 54.76,-20.16 63.01,-26.8 65.35,-20.2"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M176.42,-54.8C142.65,-44.75 98.53,-31.63 67.16,-22.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="68.26,-18.98 57.68,-19.49 66.27,-25.69 68.26,-18.98"/>
|
||||
</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="M170.14,-54.95C155.53,-45.98 136.84,-34.52 122.12,-25.5"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="124.32,-22.74 113.96,-20.49 120.66,-28.7 124.32,-22.74"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M193.91,-54.8C173.66,-45.48 147.66,-33.52 127.82,-24.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="129.43,-21.29 118.88,-20.29 126.5,-27.65 129.43,-21.29"/>
|
||||
</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="M186.21,-54.95C182.22,-47.36 177.28,-37.99 172.98,-29.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="176.12,-28.26 168.36,-21.04 169.92,-31.52 176.12,-28.26"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M210.3,-54.95C201.36,-46.59 190.08,-36.05 180.77,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="183.39,-25.01 173.69,-20.73 178.61,-30.12 183.39,-25.01"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -88,7 +88,7 @@
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="248.5,-19.25 203.25,-19.25 203.25,0 248.5,0 248.5,-19.25"/>
|
||||
<text text-anchor="middle" x="225.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstring</text>
|
||||
<text text-anchor="middle" x="225.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstdint</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="M201.79,-54.95C205.91,-47.36 211,-37.99 215.44,-29.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="218.52,-31.49 220.22,-21.03 212.37,-28.15 218.52,-31.49"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M225.88,-54.95C225.88,-47.71 225.88,-38.84 225.88,-30.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="229.38,-31.21 225.88,-21.21 222.38,-31.21 229.38,-31.21"/>
|
||||
</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="319.62,-19.25 266.12,-19.25 266.12,0 319.62,0 319.62,-19.25"/>
|
||||
<text text-anchor="middle" x="292.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="311.5,-19.25 266.25,-19.25 266.25,0 311.5,0 311.5,-19.25"/>
|
||||
<text text-anchor="middle" x="288.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstring</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -114,8 +114,8 @@
|
||||
<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="M218.6,-54.8C233.68,-45.83 252.89,-34.41 267.99,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="269.59,-28.55 276.39,-20.43 266.01,-22.53 269.59,-28.55"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M241.45,-54.95C250.39,-46.59 261.67,-36.05 270.98,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="273.14,-30.12 278.06,-20.73 268.36,-25.01 273.14,-30.12"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -123,8 +123,8 @@
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="380,-19.25 337.75,-19.25 337.75,0 380,0 380,-19.25"/>
|
||||
<text text-anchor="middle" x="358.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">queue</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="382.62,-19.25 329.12,-19.25 329.12,0 382.62,0 382.62,-19.25"/>
|
||||
<text text-anchor="middle" x="355.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -132,8 +132,26 @@
|
||||
<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="M235.09,-54.8C263.36,-44.71 300.34,-31.51 326.5,-22.18"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="327.67,-25.48 335.91,-18.82 325.32,-18.88 327.67,-25.48"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M258.34,-54.8C278.9,-45.48 305.31,-33.52 325.46,-24.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="326.89,-27.59 334.56,-20.28 324.01,-21.22 326.89,-27.59"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="443,-19.25 400.75,-19.25 400.75,0 443,0 443,-19.25"/>
|
||||
<text text-anchor="middle" x="421.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">queue</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node8 -->
|
||||
<g id="edge7_Node000001_Node000008" class="edge">
|
||||
<title>Node1->Node8</title>
|
||||
<g id="a_edge7_Node000001_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M274.83,-54.8C310.78,-44 358.59,-29.63 389.79,-20.26"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="390.46,-23.72 399.03,-17.49 388.45,-17.01 390.46,-23.72"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.9 KiB |
@@ -4,17 +4,17 @@
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: operations_on_datastructures/trie_multiple_search.cpp Pages: 1 -->
|
||||
<svg width="388pt" height="94pt"
|
||||
viewBox="0.00 0.00 388.00 93.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="451pt" height="94pt"
|
||||
viewBox="0.00 0.00 451.00 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>operations_on_datastructures/trie_multiple_search.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Trie datastructure with search variants">
|
||||
<polygon fill="#999999" stroke="#666666" points="266,-85.75 121.75,-85.75 121.75,-55.25 266,-55.25 266,-85.75"/>
|
||||
<text text-anchor="start" x="129.75" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
|
||||
<text text-anchor="middle" x="193.88" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/trie_multiple_search.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="298,-85.75 153.75,-85.75 153.75,-55.25 298,-55.25 298,-85.75"/>
|
||||
<text text-anchor="start" x="161.75" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">operations_on_datastructures</text>
|
||||
<text text-anchor="middle" x="225.88" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/trie_multiple_search.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="M152.41,-54.8C125.19,-45.14 89.93,-32.63 63.88,-23.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="65.35,-20.2 54.76,-20.16 63.01,-26.8 65.35,-20.2"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M176.42,-54.8C142.65,-44.75 98.53,-31.63 67.16,-22.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="68.26,-18.98 57.68,-19.49 66.27,-25.69 68.26,-18.98"/>
|
||||
</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="M170.14,-54.95C155.53,-45.98 136.84,-34.52 122.12,-25.5"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="124.32,-22.74 113.96,-20.49 120.66,-28.7 124.32,-22.74"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M193.91,-54.8C173.66,-45.48 147.66,-33.52 127.82,-24.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="129.43,-21.29 118.88,-20.29 126.5,-27.65 129.43,-21.29"/>
|
||||
</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="M186.21,-54.95C182.22,-47.36 177.28,-37.99 172.98,-29.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="176.12,-28.26 168.36,-21.04 169.92,-31.52 176.12,-28.26"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M210.3,-54.95C201.36,-46.59 190.08,-36.05 180.77,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="183.39,-25.01 173.69,-20.73 178.61,-30.12 183.39,-25.01"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -77,7 +77,7 @@
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="248.5,-19.25 203.25,-19.25 203.25,0 248.5,0 248.5,-19.25"/>
|
||||
<text text-anchor="middle" x="225.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstring</text>
|
||||
<text text-anchor="middle" x="225.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstdint</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="M201.79,-54.95C205.91,-47.36 211,-37.99 215.44,-29.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="218.52,-31.49 220.22,-21.03 212.37,-28.15 218.52,-31.49"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M225.88,-54.95C225.88,-47.71 225.88,-38.84 225.88,-30.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="229.38,-31.21 225.88,-21.21 222.38,-31.21 229.38,-31.21"/>
|
||||
</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="319.62,-19.25 266.12,-19.25 266.12,0 319.62,0 319.62,-19.25"/>
|
||||
<text text-anchor="middle" x="292.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="311.5,-19.25 266.25,-19.25 266.25,0 311.5,0 311.5,-19.25"/>
|
||||
<text text-anchor="middle" x="288.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstring</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -103,8 +103,8 @@
|
||||
<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="M218.6,-54.8C233.68,-45.83 252.89,-34.41 267.99,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="269.59,-28.55 276.39,-20.43 266.01,-22.53 269.59,-28.55"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M241.45,-54.95C250.39,-46.59 261.67,-36.05 270.98,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="273.14,-30.12 278.06,-20.73 268.36,-25.01 273.14,-30.12"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -112,8 +112,8 @@
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="380,-19.25 337.75,-19.25 337.75,0 380,0 380,-19.25"/>
|
||||
<text text-anchor="middle" x="358.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">queue</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="382.62,-19.25 329.12,-19.25 329.12,0 382.62,0 382.62,-19.25"/>
|
||||
<text text-anchor="middle" x="355.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -121,8 +121,26 @@
|
||||
<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="M235.09,-54.8C263.36,-44.71 300.34,-31.51 326.5,-22.18"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="327.67,-25.48 335.91,-18.82 325.32,-18.88 327.67,-25.48"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M258.34,-54.8C278.9,-45.48 305.31,-33.52 325.46,-24.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="326.89,-27.59 334.56,-20.28 324.01,-21.22 326.89,-27.59"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="443,-19.25 400.75,-19.25 400.75,0 443,0 443,-19.25"/>
|
||||
<text text-anchor="middle" x="421.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">queue</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node8 -->
|
||||
<g id="edge7_Node000001_Node000008" class="edge">
|
||||
<title>Node1->Node8</title>
|
||||
<g id="a_edge7_Node000001_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M274.83,-54.8C310.78,-44 358.59,-29.63 389.79,-20.26"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="390.46,-23.72 399.03,-17.49 388.45,-17.01 390.46,-23.72"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 6.2 KiB |
@@ -249,9 +249,9 @@ Here is the call graph for this function:</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 224</span> {</div>
|
||||
<div class="line"><span class="lineno"> 225</span> <a class="code hl_class" href="../../d6/d30/classmachine__learning_1_1adaline.html">adaline</a> ada(2, eta); <span class="comment">// 2 features</span></div>
|
||||
<div class="line"><span class="lineno"> 226</span> </div>
|
||||
<div class="line"><span class="lineno"> 227</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 10; <span class="comment">// number of sample points</span></div>
|
||||
<div class="line"><span class="lineno"> 227</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 10; <span class="comment">// number of sample points</span></div>
|
||||
<div class="line"><span class="lineno"> 228</span> </div>
|
||||
<div class="line"><span class="lineno"> 229</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<std::vector<double></a>, <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>> X = {</div>
|
||||
<div class="line"><span class="lineno"> 229</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<std::vector<double></a>, <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>> X = {</div>
|
||||
<div class="line"><span class="lineno"> 230</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<double></a>({0, 1}), <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<double></a>({1, -2}),</div>
|
||||
<div class="line"><span class="lineno"> 231</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<double></a>({2, 3}), <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<double></a>({3, -1}),</div>
|
||||
<div class="line"><span class="lineno"> 232</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<double></a>({4, 1}), <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<double></a>({6, -5}),</div>
|
||||
@@ -263,7 +263,7 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 238</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">"------- Test 1 -------"</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"> 239</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">"Model before fit: "</span> << ada << <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"> 240</span> </div>
|
||||
<div class="line"><span class="lineno"> 241</span> ada.fit<<a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>>(X, y);</div>
|
||||
<div class="line"><span class="lineno"> 241</span> ada.fit<<a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>>(X, y);</div>
|
||||
<div class="line"><span class="lineno"> 242</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">"Model after fit: "</span> << ada << <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"> 243</span> </div>
|
||||
<div class="line"><span class="lineno"> 244</span> <span class="keywordtype">int</span> predict = ada.predict({5, -3});</div>
|
||||
@@ -278,7 +278,7 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 253</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="aclassmachine__learning_1_1adaline_html"><div class="ttname"><a href="../../d6/d30/classmachine__learning_1_1adaline.html">machine_learning::adaline</a></div><div class="ttdef"><b>Definition</b> adaline_learning.cpp:46</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="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="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>
|
||||
@@ -311,16 +311,16 @@ Here is the call graph for this function:</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 262</span> {</div>
|
||||
<div class="line"><span class="lineno"> 263</span> <a class="code hl_class" href="../../d6/d30/classmachine__learning_1_1adaline.html">adaline</a> ada(2, eta); <span class="comment">// 2 features</span></div>
|
||||
<div class="line"><span class="lineno"> 264</span> </div>
|
||||
<div class="line"><span class="lineno"> 265</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 50; <span class="comment">// number of sample points</span></div>
|
||||
<div class="line"><span class="lineno"> 265</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 50; <span class="comment">// number of sample points</span></div>
|
||||
<div class="line"><span class="lineno"> 266</span> </div>
|
||||
<div class="line"><span class="lineno"> 267</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<std::vector<double></a>, <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>> X;</div>
|
||||
<div class="line"><span class="lineno"> 267</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<std::vector<double></a>, <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>> X;</div>
|
||||
<div class="line"><span class="lineno"> 268</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<int, N></a> Y{}; <span class="comment">// corresponding y-values</span></div>
|
||||
<div class="line"><span class="lineno"> 269</span> </div>
|
||||
<div class="line"><span class="lineno"> 270</span> <span class="comment">// generate sample points in the interval</span></div>
|
||||
<div class="line"><span class="lineno"> 271</span> <span class="comment">// [-range2/100 , (range2-1)/100]</span></div>
|
||||
<div class="line"><span class="lineno"> 272</span> <span class="keywordtype">int</span> range = 500; <span class="comment">// sample points full-range</span></div>
|
||||
<div class="line"><span class="lineno"> 273</span> <span class="keywordtype">int</span> range2 = range >> 1; <span class="comment">// sample points half-range</span></div>
|
||||
<div class="line"><span class="lineno"> 274</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"> 274</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"> 275</span> <span class="keywordtype">double</span> x0 = (<span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % range) - range2) / 100.f;</div>
|
||||
<div class="line"><span class="lineno"> 276</span> <span class="keywordtype">double</span> x1 = (<span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % range) - range2) / 100.f;</div>
|
||||
<div class="line"><span class="lineno"> 277</span> X[i] = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<double></a>({x0, x1});</div>
|
||||
@@ -380,16 +380,16 @@ Here is the call graph for this function:</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 313</span> {</div>
|
||||
<div class="line"><span class="lineno"> 314</span> <a class="code hl_class" href="../../d6/d30/classmachine__learning_1_1adaline.html">adaline</a> ada(6, eta); <span class="comment">// 2 features</span></div>
|
||||
<div class="line"><span class="lineno"> 315</span> </div>
|
||||
<div class="line"><span class="lineno"> 316</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 100; <span class="comment">// number of sample points</span></div>
|
||||
<div class="line"><span class="lineno"> 316</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> = 100; <span class="comment">// number of sample points</span></div>
|
||||
<div class="line"><span class="lineno"> 317</span> </div>
|
||||
<div class="line"><span class="lineno"> 318</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<std::vector<double></a>, <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>> X;</div>
|
||||
<div class="line"><span class="lineno"> 318</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<std::vector<double></a>, <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>> X;</div>
|
||||
<div class="line"><span class="lineno"> 319</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array<int, N></a> Y{}; <span class="comment">// corresponding y-values</span></div>
|
||||
<div class="line"><span class="lineno"> 320</span> </div>
|
||||
<div class="line"><span class="lineno"> 321</span> <span class="comment">// generate sample points in the interval</span></div>
|
||||
<div class="line"><span class="lineno"> 322</span> <span class="comment">// [-range2/100 , (range2-1)/100]</span></div>
|
||||
<div class="line"><span class="lineno"> 323</span> <span class="keywordtype">int</span> range = 200; <span class="comment">// sample points full-range</span></div>
|
||||
<div class="line"><span class="lineno"> 324</span> <span class="keywordtype">int</span> range2 = range >> 1; <span class="comment">// sample points half-range</span></div>
|
||||
<div class="line"><span class="lineno"> 325</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"> 325</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"> 326</span> <span class="keywordtype">double</span> x0 = (<span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % range) - range2) / 100.f;</div>
|
||||
<div class="line"><span class="lineno"> 327</span> <span class="keywordtype">double</span> x1 = (<span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % range) - range2) / 100.f;</div>
|
||||
<div class="line"><span class="lineno"> 328</span> <span class="keywordtype">double</span> x2 = (<span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % range) - range2) / 100.f;</div>
|
||||
|
||||
@@ -213,11 +213,11 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 48</span> 1 << <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>; <span class="comment">// "pos" variable is used to store 1 at kth postion and</span></div>
|
||||
<div class="line"><span class="lineno"> 49</span> <span class="comment">// rest bits are 0. in binary representation of number 'n'</span></div>
|
||||
<div class="line"><span class="lineno"> 50</span> </div>
|
||||
<div class="line"><span class="lineno"> 51</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> | pos; <span class="comment">// by taking or with the pos and the N we set the bit of N</span></div>
|
||||
<div class="line"><span class="lineno"> 51</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a> | pos; <span class="comment">// by taking or with the pos and the N we set the bit of N</span></div>
|
||||
<div class="line"><span class="lineno"> 52</span> <span class="comment">// at kth position.</span></div>
|
||||
<div class="line"><span class="lineno"> 53</span>}</div>
|
||||
<div class="ttc" id="acomposite__simpson__rule_8cpp_html_a1b74d828b33760094906797042b89442"><div class="ttname"><a href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">numerical_methods::simpson_method::k</a></div><div class="ttdeci">double k(double x)</div><div class="ttdoc">Another test function.</div><div class="ttdef"><b>Definition</b> composite_simpson_rule.cpp:117</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="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>
|
||||
</div>
|
||||
|
||||
@@ -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,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 +0,0 @@
|
||||
a17bd8492d565aaf305db600ec5f9464
|
||||
@@ -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 |