Documentation for 8b1eab204b

This commit is contained in:
realstealthninja
2024-11-04 12:43:05 +00:00
parent 4fb6e622e9
commit a7bccf7d01
6732 changed files with 153919 additions and 365711 deletions

View File

@@ -1,3 +1,4 @@
<!-- HTML header for doxygen 1.12.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>
@@ -5,10 +6,15 @@
<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::heavy_light_decomposition::HLD&lt; X &gt; Class Template Reference</title>
<title>TheAlgorithms/C++: range_queries::heavy_light_decomposition::HLD&lt; X &gt; Class Template Reference</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<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="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</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>
@@ -18,14 +24,24 @@
<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 type="text/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</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>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
@@ -33,10 +49,11 @@ MathJax.Hub.Config({
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
@@ -150,7 +167,7 @@ Public Member Functions</h2></td></tr>
<tr class="memitem:ab916d554afa8ca5230b4310c2c69fae0 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree" id="r_ab916d554afa8ca5230b4310c2c69fae0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">change_root</a> (int new_root)</td></tr>
<tr class="memdesc:ab916d554afa8ca5230b4310c2c69fae0 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the root for the tree. <br /></td></tr>
<tr class="separator:ab916d554afa8ca5230b4310c2c69fae0 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04cd96efaba147b19d3afc769b90ff70 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree" id="r_a04cd96efaba147b19d3afc769b90ff70"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">set_node_val</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; X &gt; &amp;node_val)</td></tr>
<tr class="memitem:a04cd96efaba147b19d3afc769b90ff70 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree" id="r_a04cd96efaba147b19d3afc769b90ff70"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">set_node_val</a> (const std::vector&lt; X &gt; &amp;node_val)</td></tr>
<tr class="memdesc:a04cd96efaba147b19d3afc769b90ff70 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the values for all the nodes. <br /></td></tr>
<tr class="separator:a04cd96efaba147b19d3afc769b90ff70 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad22d760a5a33545a70e7ea5e1786c8dc inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree" id="r_ad22d760a5a33545a70e7ea5e1786c8dc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">init</a> ()</td></tr>
@@ -183,21 +200,17 @@ Private Member Functions</h2></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a722cc7cf2c3e4d15583601a48b09776f" id="r_a722cc7cf2c3e4d15583601a48b09776f"><td class="memItemLeft" align="right" valign="top"><a id="a722cc7cf2c3e4d15583601a48b09776f" name="a722cc7cf2c3e4d15583601a48b09776f"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>label</b></td></tr>
<tr class="memdesc:a722cc7cf2c3e4d15583601a48b09776f"><td class="mdescLeft">&#160;</td><td class="mdescRight">utility member to assign labels in <a class="el" href="#a0579062b384e54b611b80c6337c7f2c8" title="Utility function to lable the nodes so that heavy chains have a contigous lable.">dfs_labels()</a> <br /></td></tr>
<tr class="memitem:a722cc7cf2c3e4d15583601a48b09776f" id="r_a722cc7cf2c3e4d15583601a48b09776f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a722cc7cf2c3e4d15583601a48b09776f">label</a></td></tr>
<tr class="memdesc:a722cc7cf2c3e4d15583601a48b09776f"><td class="mdescLeft">&#160;</td><td class="mdescRight">utility member to assign labels in <a class="el" href="#a0579062b384e54b611b80c6337c7f2c8" title="Utility function to lable the nodes so that heavy chains have a contigous lable.">dfs_labels()</a> <br /></td></tr>
<tr class="separator:a722cc7cf2c3e4d15583601a48b09776f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa86a91ae0cd7898990a8170a2f2c9cda" id="r_aa86a91ae0cd7898990a8170a2f2c9cda"><td class="memItemLeft" align="right" valign="top"><a id="aa86a91ae0cd7898990a8170a2f2c9cda" name="aa86a91ae0cd7898990a8170a2f2c9cda"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>h_label</b></td></tr>
<tr class="memdesc:aa86a91ae0cd7898990a8170a2f2c9cda"><td class="mdescLeft">&#160;</td><td class="mdescRight">stores the label of a node <br /></td></tr>
<tr class="memitem:aa86a91ae0cd7898990a8170a2f2c9cda" id="r_aa86a91ae0cd7898990a8170a2f2c9cda"><td class="memItemLeft" align="right" valign="top">std::vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a></td></tr>
<tr class="memdesc:aa86a91ae0cd7898990a8170a2f2c9cda"><td class="mdescLeft">&#160;</td><td class="mdescRight">stores the label of a node <br /></td></tr>
<tr class="separator:aa86a91ae0cd7898990a8170a2f2c9cda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84424f180f12b514eaab57a6aa20b104" id="r_a84424f180f12b514eaab57a6aa20b104"><td class="memItemLeft" align="right" valign="top"><a id="a84424f180f12b514eaab57a6aa20b104" name="a84424f180f12b514eaab57a6aa20b104"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>h_heavychlid</b></td></tr>
<tr class="memdesc:a84424f180f12b514eaab57a6aa20b104"><td class="mdescLeft">&#160;</td><td class="mdescRight">stores the heavy child of a node <br /></td></tr>
<tr class="memitem:a84424f180f12b514eaab57a6aa20b104" id="r_a84424f180f12b514eaab57a6aa20b104"><td class="memItemLeft" align="right" valign="top">std::vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a></td></tr>
<tr class="memdesc:a84424f180f12b514eaab57a6aa20b104"><td class="mdescLeft">&#160;</td><td class="mdescRight">stores the heavy child of a node <br /></td></tr>
<tr class="separator:a84424f180f12b514eaab57a6aa20b104"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b336474d17eff1aa4be73d4068dc725" id="r_a1b336474d17eff1aa4be73d4068dc725"><td class="memItemLeft" align="right" valign="top"><a id="a1b336474d17eff1aa4be73d4068dc725" name="a1b336474d17eff1aa4be73d4068dc725"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>h_parent</b></td></tr>
<tr class="memdesc:a1b336474d17eff1aa4be73d4068dc725"><td class="mdescLeft">&#160;</td><td class="mdescRight">stores the top of the heavy chain from a node <br /></td></tr>
<tr class="memitem:a1b336474d17eff1aa4be73d4068dc725" id="r_a1b336474d17eff1aa4be73d4068dc725"><td class="memItemLeft" align="right" valign="top">std::vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1b336474d17eff1aa4be73d4068dc725">h_parent</a></td></tr>
<tr class="memdesc:a1b336474d17eff1aa4be73d4068dc725"><td class="mdescLeft">&#160;</td><td class="mdescRight">stores the top of the heavy chain from a node <br /></td></tr>
<tr class="separator:a1b336474d17eff1aa4be73d4068dc725"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
@@ -209,6 +222,8 @@ class range_queries::heavy_light_decomposition::HLD&lt; X &gt;</div><p>The Heavy
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00336">336</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a6e486767434e44076c1ac374a22da726" name="a6e486767434e44076c1ac374a22da726"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e486767434e44076c1ac374a22da726">&#9670;&#160;</a></span>HLD()</h2>
@@ -242,26 +257,23 @@ template&lt;typename X &gt; </div>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00409">409</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 435</span> : <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1">Tree&lt;X&gt;</a>(nodes), <a class="code hl_function" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afba5c1225ba04c0025c7786c09ff28f1">SG&lt;X&gt;</a>(nodes) {</div>
<div class="line"><span class="lineno"> 436</span> <span class="comment">/* Initialization and resize vectors */</span></div>
<div class="line"><span class="lineno"> 437</span> <a class="code hl_variable" href="#a722cc7cf2c3e4d15583601a48b09776f">label</a> = 0;</div>
<div class="line"><span class="lineno"> 438</span> <a class="code hl_variable" href="#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/assign.html">assign</a>(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">Tree&lt;X&gt;::t_nodes</a>, -1);</div>
<div class="line"><span class="lineno"> 439</span> <a class="code hl_variable" href="#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/assign.html">assign</a>(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">Tree&lt;X&gt;::t_nodes</a>, -1);</div>
<div class="line"><span class="lineno"> 440</span> <a class="code hl_variable" href="#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/resize.html">resize</a>(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">Tree&lt;X&gt;::t_nodes</a>);</div>
<div class="line"><span class="lineno"> 441</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/iota.html">iota</a>(<a class="code hl_variable" href="#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), <a class="code hl_variable" href="#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>(), 0);</div>
<div class="line"><span class="lineno"> 438</span> <a class="code hl_variable" href="#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>.assign(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">Tree&lt;X&gt;::t_nodes</a>, -1);</div>
<div class="line"><span class="lineno"> 439</span> <a class="code hl_variable" href="#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>.assign(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">Tree&lt;X&gt;::t_nodes</a>, -1);</div>
<div class="line"><span class="lineno"> 440</span> <a class="code hl_variable" href="#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>.resize(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">Tree&lt;X&gt;::t_nodes</a>);</div>
<div class="line"><span class="lineno"> 441</span> iota(<a class="code hl_variable" href="#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>.begin(), <a class="code hl_variable" href="#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>.end(), 0);</div>
<div class="line"><span class="lineno"> 442</span> }</div>
<div class="ttc" id="aassign_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/assign.html">std::vector::assign</a></div><div class="ttdeci">T assign(T... args)</div></div>
<div class="ttc" id="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/begin.html">std::vector::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a1b336474d17eff1aa4be73d4068dc725"><div class="ttname"><a href="#a1b336474d17eff1aa4be73d4068dc725">range_queries::heavy_light_decomposition::HLD::h_parent</a></div><div class="ttdeci">std::vector&lt; int &gt; h_parent</div><div class="ttdoc">stores the top of the heavy chain from a node</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:341</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a722cc7cf2c3e4d15583601a48b09776f"><div class="ttname"><a href="#a722cc7cf2c3e4d15583601a48b09776f">range_queries::heavy_light_decomposition::HLD::label</a></div><div class="ttdeci">int label</div><div class="ttdoc">utility member to assign labels in dfs_labels()</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:338</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a84424f180f12b514eaab57a6aa20b104"><div class="ttname"><a href="#a84424f180f12b514eaab57a6aa20b104">range_queries::heavy_light_decomposition::HLD::h_heavychlid</a></div><div class="ttdeci">std::vector&lt; int &gt; h_heavychlid</div><div class="ttdoc">stores the heavy child of a node</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:340</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_aa86a91ae0cd7898990a8170a2f2c9cda"><div class="ttname"><a href="#aa86a91ae0cd7898990a8170a2f2c9cda">range_queries::heavy_light_decomposition::HLD::h_label</a></div><div class="ttdeci">std::vector&lt; int &gt; h_label</div><div class="ttdoc">stores the label of a node</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:339</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_afba5c1225ba04c0025c7786c09ff28f1"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afba5c1225ba04c0025c7786c09ff28f1">range_queries::heavy_light_decomposition::SG::SG</a></div><div class="ttdeci">SG(int size)</div><div class="ttdoc">Class parameterized constructor. Resizes the and initilizes the data members.</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:282</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a835fb2bbb27307b8cacad9b287968bc1"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1">range_queries::heavy_light_decomposition::Tree::Tree</a></div><div class="ttdeci">Tree(int nodes)</div><div class="ttdoc">Class parameterized constructor, resizes the and initializes the data members.</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:140</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ae4630fa70a80a1dc65a875488a67178a"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">range_queries::heavy_light_decomposition::Tree::t_nodes</a></div><div class="ttdeci">const int t_nodes</div><div class="ttdoc">number of nodes</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:84</div></div>
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/end.html">std::vector::end</a></div><div class="ttdeci">T end(T... args)</div></div>
<div class="ttc" id="aiota_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/iota.html">std::iota</a></div><div class="ttdeci">T iota(T... args)</div></div>
<div class="ttc" id="aresize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/resize.html">std::vector::resize</a></div><div class="ttdeci">T resize(T... args)</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a1b336474d17eff1aa4be73d4068dc725"><div class="ttname"><a href="#a1b336474d17eff1aa4be73d4068dc725">range_queries::heavy_light_decomposition::HLD::h_parent</a></div><div class="ttdeci">std::vector&lt; int &gt; h_parent</div><div class="ttdoc">stores the top of the heavy chain from a node</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00341">heavy_light_decomposition.cpp:341</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a722cc7cf2c3e4d15583601a48b09776f"><div class="ttname"><a href="#a722cc7cf2c3e4d15583601a48b09776f">range_queries::heavy_light_decomposition::HLD::label</a></div><div class="ttdeci">int label</div><div class="ttdoc">utility member to assign labels in dfs_labels()</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00338">heavy_light_decomposition.cpp:338</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a84424f180f12b514eaab57a6aa20b104"><div class="ttname"><a href="#a84424f180f12b514eaab57a6aa20b104">range_queries::heavy_light_decomposition::HLD::h_heavychlid</a></div><div class="ttdeci">std::vector&lt; int &gt; h_heavychlid</div><div class="ttdoc">stores the heavy child of a node</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00340">heavy_light_decomposition.cpp:340</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_aa86a91ae0cd7898990a8170a2f2c9cda"><div class="ttname"><a href="#aa86a91ae0cd7898990a8170a2f2c9cda">range_queries::heavy_light_decomposition::HLD::h_label</a></div><div class="ttdeci">std::vector&lt; int &gt; h_label</div><div class="ttdoc">stores the label of a node</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00339">heavy_light_decomposition.cpp:339</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_afba5c1225ba04c0025c7786c09ff28f1"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afba5c1225ba04c0025c7786c09ff28f1">range_queries::heavy_light_decomposition::SG::SG</a></div><div class="ttdeci">SG(int size)</div><div class="ttdoc">Class parameterized constructor. Resizes the and initilizes the data members.</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00282">heavy_light_decomposition.cpp:282</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a835fb2bbb27307b8cacad9b287968bc1"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1">range_queries::heavy_light_decomposition::Tree::Tree</a></div><div class="ttdeci">Tree(int nodes)</div><div class="ttdoc">Class parameterized constructor, resizes the and initializes the data members.</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00140">heavy_light_decomposition.cpp:140</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ae4630fa70a80a1dc65a875488a67178a"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">range_queries::heavy_light_decomposition::Tree::t_nodes</a></div><div class="ttdeci">const int t_nodes</div><div class="ttdoc">number of nodes</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00084">heavy_light_decomposition.cpp:84</a></div></div>
</div><!-- fragment -->
</div>
</div>
@@ -304,10 +316,12 @@ template&lt;typename X &gt; </div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the sum of ndoe values in the simple path from a to b </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00409">409</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 409</span> {</div>
<div class="line"><span class="lineno"> 410</span> X ret = <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">SG&lt;X&gt;::sret_init</a>;</div>
<div class="line"><span class="lineno"> 411</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree&lt;X&gt;::t_depth</a>[a] &lt; <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree&lt;X&gt;::t_depth</a>[b]) {</div>
<div class="line"><span class="lineno"> 412</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a>(a, b);</div>
<div class="line"><span class="lineno"> 412</span> std::swap(a, b);</div>
<div class="line"><span class="lineno"> 413</span> }</div>
<div class="line"><span class="lineno"> 414</span> <span class="keywordflow">while</span> (<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree&lt;X&gt;::t_depth</a>[a] &gt;= <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree&lt;X&gt;::t_depth</a>[b]) {</div>
<div class="line"><span class="lineno"> 415</span> <span class="keywordtype">int</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a6d8df83a6f26ce24a75d3b358b7f5b8a">l</a> = <a class="code hl_variable" href="#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>[<a class="code hl_variable" href="#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>[a]];</div>
@@ -323,19 +337,13 @@ template&lt;typename X &gt; </div>
<div class="line"><span class="lineno"> 425</span> }</div>
<div class="line"><span class="lineno"> 426</span> <span class="keywordflow">return</span> ret;</div>
<div class="line"><span class="lineno"> 427</span> }</div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_a1fda852e6e522707fd97f61cdb0a2591"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a1fda852e6e522707fd97f61cdb0a2591">range_queries::heavy_light_decomposition::SG::query</a></div><div class="ttdeci">X query(int l, int r)</div><div class="ttdoc">Make a range query from node label l to node label r.</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:305</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_a41c733f5f5e262b308f7cb95c88c1e74"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">range_queries::heavy_light_decomposition::SG::combine</a></div><div class="ttdeci">X combine(X lhs, X rhs)</div><div class="ttdoc">Function that specifies the type of operation involved when segments are combined.</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:274</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_aa7f93971a9f891e0bbb7023081f379d5"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">range_queries::heavy_light_decomposition::SG::sret_init</a></div><div class="ttdeci">X sret_init</div><div class="ttdoc">inital query return value</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:264</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a0efd0b9c564092f443ca97030d866ef1"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">range_queries::heavy_light_decomposition::Tree::t_depth</a></div><div class="ttdeci">std::vector&lt; int &gt; t_depth</div><div class="ttdoc">a vector to store the depth of a node,</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:88</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a350157a5fb79f76fceae33fc84171203"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">range_queries::heavy_light_decomposition::Tree::t_par</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; int &gt; &gt; t_par</div><div class="ttdoc">a matrix to store every node's 2^kth parent</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:87</div></div>
<div class="ttc" id="acomposite__simpson__rule_8cpp_html_a6d8df83a6f26ce24a75d3b358b7f5b8a"><div class="ttname"><a href="../../d4/d18/composite__simpson__rule_8cpp.html#a6d8df83a6f26ce24a75d3b358b7f5b8a">numerical_methods::simpson_method::l</a></div><div class="ttdeci">double l(double x)</div><div class="ttdoc">Another test function.</div><div class="ttdef"><b>Definition</b> composite_simpson_rule.cpp:119</div></div>
<div class="ttc" id="aswap_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a></div><div class="ttdeci">T swap(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="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_a7d5b40c076347a6aabfb37a0590f2f24_cgraph.svg" width="350" height="118"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_a1fda852e6e522707fd97f61cdb0a2591"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a1fda852e6e522707fd97f61cdb0a2591">range_queries::heavy_light_decomposition::SG::query</a></div><div class="ttdeci">X query(int l, int r)</div><div class="ttdoc">Make a range query from node label l to node label r.</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00305">heavy_light_decomposition.cpp:305</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_a41c733f5f5e262b308f7cb95c88c1e74"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">range_queries::heavy_light_decomposition::SG::combine</a></div><div class="ttdeci">X combine(X lhs, X rhs)</div><div class="ttdoc">Function that specifies the type of operation involved when segments are combined.</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00274">heavy_light_decomposition.cpp:274</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_aa7f93971a9f891e0bbb7023081f379d5"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">range_queries::heavy_light_decomposition::SG::sret_init</a></div><div class="ttdeci">X sret_init</div><div class="ttdoc">inital query return value</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00264">heavy_light_decomposition.cpp:264</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a0efd0b9c564092f443ca97030d866ef1"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">range_queries::heavy_light_decomposition::Tree::t_depth</a></div><div class="ttdeci">std::vector&lt; int &gt; t_depth</div><div class="ttdoc">a vector to store the depth of a node,</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00088">heavy_light_decomposition.cpp:88</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a350157a5fb79f76fceae33fc84171203"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">range_queries::heavy_light_decomposition::Tree::t_par</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; int &gt; &gt; t_par</div><div class="ttdoc">a matrix to store every node's 2^kth parent</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00087">heavy_light_decomposition.cpp:87</a></div></div>
<div class="ttc" id="acomposite__simpson__rule_8cpp_html_a6d8df83a6f26ce24a75d3b358b7f5b8a"><div class="ttname"><a href="../../d4/d18/composite__simpson__rule_8cpp.html#a6d8df83a6f26ce24a75d3b358b7f5b8a">numerical_methods::simpson_method::l</a></div><div class="ttdeci">double l(double x)</div><div class="ttdoc">Another test function.</div><div class="ttdef"><b>Definition</b> <a href="../../d4/d18/composite__simpson__rule_8cpp_source.html#l00119">composite_simpson_rule.cpp:119</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="af64848d6630c39d0f09ce2359cc7c4f8" name="af64848d6630c39d0f09ce2359cc7c4f8"></a>
@@ -376,6 +384,8 @@ template&lt;typename X &gt; </div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00350">350</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 350</span> {</div>
<div class="line"><span class="lineno"> 351</span> <span class="keywordtype">int</span> hc_size = -1, hc_id = -1;</div>
<div class="line"><span class="lineno"> 352</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> &amp;v : <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">Tree&lt;X&gt;::t_adj</a>[u]) {</div>
@@ -389,15 +399,10 @@ template&lt;typename X &gt; </div>
<div class="line"><span class="lineno"> 360</span> }</div>
<div class="line"><span class="lineno"> 361</span> <a class="code hl_variable" href="#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u] = hc_id;</div>
<div class="line"><span class="lineno"> 362</span> }</div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_af64848d6630c39d0f09ce2359cc7c4f8"><div class="ttname"><a href="#af64848d6630c39d0f09ce2359cc7c4f8">range_queries::heavy_light_decomposition::HLD::dfs_hc</a></div><div class="ttdeci">void dfs_hc(int u, int p=-1)</div><div class="ttdoc">Utility function to assign heavy child to each node (-1 for a leaf node)</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:350</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ab1aeaefa1bd97b867c652ba916fbdb43"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">range_queries::heavy_light_decomposition::Tree::t_adj</a></div><div class="ttdeci">std::vector&lt; std::list&lt; int &gt; &gt; t_adj</div><div class="ttdoc">an adjacency list to stores the tree edges</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:83</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ada1494fccbc7f1f07b2f9be9f7e07ad5"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">range_queries::heavy_light_decomposition::Tree::t_size</a></div><div class="ttdeci">std::vector&lt; int &gt; t_size</div><div class="ttdoc">a vector to store the subtree size rooted at node</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:89</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="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_af64848d6630c39d0f09ce2359cc7c4f8_cgraph.svg" width="156" height="91"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_af64848d6630c39d0f09ce2359cc7c4f8"><div class="ttname"><a href="#af64848d6630c39d0f09ce2359cc7c4f8">range_queries::heavy_light_decomposition::HLD::dfs_hc</a></div><div class="ttdeci">void dfs_hc(int u, int p=-1)</div><div class="ttdoc">Utility function to assign heavy child to each node (-1 for a leaf node)</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00350">heavy_light_decomposition.cpp:350</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ab1aeaefa1bd97b867c652ba916fbdb43"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">range_queries::heavy_light_decomposition::Tree::t_adj</a></div><div class="ttdeci">std::vector&lt; std::list&lt; int &gt; &gt; t_adj</div><div class="ttdoc">an adjacency list to stores the tree edges</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00083">heavy_light_decomposition.cpp:83</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ada1494fccbc7f1f07b2f9be9f7e07ad5"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">range_queries::heavy_light_decomposition::Tree::t_size</a></div><div class="ttdeci">std::vector&lt; int &gt; t_size</div><div class="ttdoc">a vector to store the subtree size rooted at node</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00089">heavy_light_decomposition.cpp:89</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a0579062b384e54b611b80c6337c7f2c8" name="a0579062b384e54b611b80c6337c7f2c8"></a>
@@ -438,6 +443,8 @@ template&lt;typename X &gt; </div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00390">390</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 390</span> {</div>
<div class="line"><span class="lineno"> 391</span> <a class="code hl_variable" href="#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>[u] = <a class="code hl_variable" href="#a722cc7cf2c3e4d15583601a48b09776f">label</a>++;</div>
<div class="line"><span class="lineno"> 392</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u] != -1) {</div>
@@ -449,13 +456,8 @@ template&lt;typename X &gt; </div>
<div class="line"><span class="lineno"> 398</span> }</div>
<div class="line"><span class="lineno"> 399</span> }</div>
<div class="line"><span class="lineno"> 400</span> }</div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a0579062b384e54b611b80c6337c7f2c8"><div class="ttname"><a href="#a0579062b384e54b611b80c6337c7f2c8">range_queries::heavy_light_decomposition::HLD::dfs_labels</a></div><div class="ttdeci">void dfs_labels(int u, int p=-1)</div><div class="ttdoc">Utility function to lable the nodes so that heavy chains have a contigous lable.</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:390</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="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_a0579062b384e54b611b80c6337c7f2c8_cgraph.svg" width="156" height="91"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a0579062b384e54b611b80c6337c7f2c8"><div class="ttname"><a href="#a0579062b384e54b611b80c6337c7f2c8">range_queries::heavy_light_decomposition::HLD::dfs_labels</a></div><div class="ttdeci">void dfs_labels(int u, int p=-1)</div><div class="ttdoc">Utility function to lable the nodes so that heavy chains have a contigous lable.</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00390">heavy_light_decomposition.cpp:390</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a2dfbda148aad0bfaba2ebfda9ebc915a" name="a2dfbda148aad0bfaba2ebfda9ebc915a"></a>
@@ -496,6 +498,8 @@ template&lt;typename X &gt; </div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00371">371</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 371</span> {</div>
<div class="line"><span class="lineno"> 372</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u] != -1) {</div>
<div class="line"><span class="lineno"> 373</span> <a class="code hl_variable" href="#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>[<a class="code hl_variable" href="#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u]] = <a class="code hl_variable" href="#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>[u];</div>
@@ -507,13 +511,8 @@ template&lt;typename X &gt; </div>
<div class="line"><span class="lineno"> 379</span> }</div>
<div class="line"><span class="lineno"> 380</span> }</div>
<div class="line"><span class="lineno"> 381</span> }</div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a2dfbda148aad0bfaba2ebfda9ebc915a"><div class="ttname"><a href="#a2dfbda148aad0bfaba2ebfda9ebc915a">range_queries::heavy_light_decomposition::HLD::dfs_par</a></div><div class="ttdeci">void dfs_par(int u, int p=-1)</div><div class="ttdoc">Utility function to assign highest parent that can be reached though heavy chains.</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:371</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="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_a2dfbda148aad0bfaba2ebfda9ebc915a_cgraph.svg" width="156" height="91"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a2dfbda148aad0bfaba2ebfda9ebc915a"><div class="ttname"><a href="#a2dfbda148aad0bfaba2ebfda9ebc915a">range_queries::heavy_light_decomposition::HLD::dfs_par</a></div><div class="ttdeci">void dfs_par(int u, int p=-1)</div><div class="ttdoc">Utility function to assign highest parent that can be reached though heavy chains.</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00371">heavy_light_decomposition.cpp:371</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ae9e979edd69678b85665c01e2ee97828" name="ae9e979edd69678b85665c01e2ee97828"></a>
@@ -543,6 +542,8 @@ template&lt;typename X &gt; </div>
<p>This function must be called after the tree adjacency list and node values are populated The function initializes the required parametes, and populates the segment tree. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00450">450</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 450</span> {</div>
<div class="line"><span class="lineno"> 451</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">Tree&lt;X&gt;::init</a>();</div>
<div class="line"><span class="lineno"> 452</span> </div>
@@ -561,16 +562,11 @@ template&lt;typename X &gt; </div>
<div class="line"><span class="lineno"> 465</span> <a class="code hl_function" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">SG&lt;X&gt;::combine</a>(<a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">SG&lt;X&gt;::s_tree</a>[i &lt;&lt; 1], <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">SG&lt;X&gt;::s_tree</a>[i &lt;&lt; 1 | 1]);</div>
<div class="line"><span class="lineno"> 466</span> }</div>
<div class="line"><span class="lineno"> 467</span> }</div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_afbf8a9cb9449d5ca844f4e141a801e6a"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">range_queries::heavy_light_decomposition::SG::s_tree</a></div><div class="ttdeci">std::vector&lt; X &gt; s_tree</div><div class="ttdoc">Everything here is private, and can only be accessed through the methods, in the derived class (HLD)</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:262</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a135b7952593c9b1aae38fcaf1cc1abf7"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">range_queries::heavy_light_decomposition::Tree::t_val</a></div><div class="ttdeci">std::vector&lt; X &gt; t_val</div><div class="ttdoc">values of nodes</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:92</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_aa6c37e840355b9fb2105181c578694e8"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">range_queries::heavy_light_decomposition::Tree::t_root</a></div><div class="ttdeci">int t_root</div><div class="ttdoc">the root of the tree</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:91</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ad22d760a5a33545a70e7ea5e1786c8dc"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">range_queries::heavy_light_decomposition::Tree::init</a></div><div class="ttdeci">void init()</div><div class="ttdoc">This function must be called after the tree adjacency list and node values are populated The function...</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:186</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="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_ae9e979edd69678b85665c01e2ee97828_cgraph.svg" width="543" height="511"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_afbf8a9cb9449d5ca844f4e141a801e6a"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">range_queries::heavy_light_decomposition::SG::s_tree</a></div><div class="ttdeci">std::vector&lt; X &gt; s_tree</div><div class="ttdoc">Everything here is private, and can only be accessed through the methods, in the derived class (HLD)</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00262">heavy_light_decomposition.cpp:262</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a135b7952593c9b1aae38fcaf1cc1abf7"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">range_queries::heavy_light_decomposition::Tree::t_val</a></div><div class="ttdeci">std::vector&lt; X &gt; t_val</div><div class="ttdoc">values of nodes</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00092">heavy_light_decomposition.cpp:92</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_aa6c37e840355b9fb2105181c578694e8"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">range_queries::heavy_light_decomposition::Tree::t_root</a></div><div class="ttdeci">int t_root</div><div class="ttdoc">the root of the tree</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00091">heavy_light_decomposition.cpp:91</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ad22d760a5a33545a70e7ea5e1786c8dc"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">range_queries::heavy_light_decomposition::Tree::init</a></div><div class="ttdeci">void init()</div><div class="ttdoc">This function must be called after the tree adjacency list and node values are populated The function...</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00186">heavy_light_decomposition.cpp:186</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a4dfbf5d9df825eeb63b294c6849bdcab" name="a4dfbf5d9df825eeb63b294c6849bdcab"></a>
@@ -611,6 +607,8 @@ template&lt;typename X &gt; </div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the sum of node values in the simple path from a to b </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00489">489</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 489</span> {</div>
<div class="line"><span class="lineno"> 490</span> <span class="keywordtype">int</span> lc = <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">Tree&lt;X&gt;::lca</a>(a, b);</div>
<div class="line"><span class="lineno"> 491</span> X ret = <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">SG&lt;X&gt;::sret_init</a>;</div>
@@ -619,14 +617,9 @@ template&lt;typename X &gt; </div>
<div class="line"><span class="lineno"> 494</span> ret += <a class="code hl_function" href="#a7d5b40c076347a6aabfb37a0590f2f24">chain_query</a>(b, lc);</div>
<div class="line"><span class="lineno"> 495</span> <span class="keywordflow">return</span> ret - <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">Tree&lt;X&gt;::t_val</a>[lc];</div>
<div class="line"><span class="lineno"> 496</span> }</div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a7d5b40c076347a6aabfb37a0590f2f24"><div class="ttname"><a href="#a7d5b40c076347a6aabfb37a0590f2f24">range_queries::heavy_light_decomposition::HLD::chain_query</a></div><div class="ttdeci">X chain_query(int a, int b)</div><div class="ttdoc">Utility function to break down a path query into two chain queries.</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:409</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ae2b407e64aaf9878fbee7ee6efe9c7d4"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">range_queries::heavy_light_decomposition::Tree::lca</a></div><div class="ttdeci">int lca(int a, int b)</div><div class="ttdoc">The function returns the least common ancestor of two nodes.</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:229</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="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_a4dfbf5d9df825eeb63b294c6849bdcab_cgraph.svg" width="543" height="204"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a7d5b40c076347a6aabfb37a0590f2f24"><div class="ttname"><a href="#a7d5b40c076347a6aabfb37a0590f2f24">range_queries::heavy_light_decomposition::HLD::chain_query</a></div><div class="ttdeci">X chain_query(int a, int b)</div><div class="ttdoc">Utility function to break down a path query into two chain queries.</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00409">heavy_light_decomposition.cpp:409</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ae2b407e64aaf9878fbee7ee6efe9c7d4"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">range_queries::heavy_light_decomposition::Tree::lca</a></div><div class="ttdeci">int lca(int a, int b)</div><div class="ttdoc">The function returns the least common ancestor of two nodes.</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00229">heavy_light_decomposition.cpp:229</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a9f1cb54ed09fde931bf3220d75ee4c57" name="a9f1cb54ed09fde931bf3220d75ee4c57"></a>
@@ -667,24 +660,134 @@ template&lt;typename X &gt; </div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00475">475</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 475</span> {</div>
<div class="line"><span class="lineno"> 476</span> X diff = val - <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">Tree&lt;X&gt;::t_val</a>[<a class="code hl_typedef" href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a>];</div>
<div class="line"><span class="lineno"> 477</span> <a class="code hl_function" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c">SG&lt;X&gt;::update</a>(<a class="code hl_variable" href="#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>[<a class="code hl_class" href="../../d5/da1/structnode.html">node</a>], diff);</div>
<div class="line"><span class="lineno"> 478</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">Tree&lt;X&gt;::t_val</a>[<a class="code hl_typedef" href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a>] = val;</div>
<div class="line"><span class="lineno"> 479</span> }</div>
<div class="ttc" id="aavltree_8cpp_html_a74f0cf18a0e5b832d9994e2f2d022287"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a></div><div class="ttdeci">struct node { int data; int height; struct node *left; struct node *right;} node</div><div class="ttdoc">for std::queue</div><div class="ttdef"><b>Definition</b> avltree.cpp:13</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_a3c75bf5770790f8eba8cc92227b5400c"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c">range_queries::heavy_light_decomposition::SG::update</a></div><div class="ttdeci">void update(int p, X v)</div><div class="ttdoc">Update the value at a node.</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:293</div></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 class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_a9f1cb54ed09fde931bf3220d75ee4c57_cgraph.svg" width="350" height="67"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<div class="ttc" id="aavltree_8cpp_html_a74f0cf18a0e5b832d9994e2f2d022287"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a></div><div class="ttdeci">struct node { int data; int height; struct node *left; struct node *right;} node</div><div class="ttdoc">for std::queue</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00013">avltree.cpp:13</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_a3c75bf5770790f8eba8cc92227b5400c"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c">range_queries::heavy_light_decomposition::SG::update</a></div><div class="ttdeci">void update(int p, X v)</div><div class="ttdoc">Update the value at a node.</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00293">heavy_light_decomposition.cpp:293</a></div></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> <a href="../../d3/d26/binary__search__tree_8cpp_source.html#l00011">binary_search_tree.cpp:11</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a84424f180f12b514eaab57a6aa20b104" name="a84424f180f12b514eaab57a6aa20b104"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84424f180f12b514eaab57a6aa20b104">&#9670;&#160;</a></span>h_heavychlid</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt;int&gt; <a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>&lt; X &gt;::h_heavychlid</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>stores the heavy child of a node </p>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00340">340</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
</div>
</div>
<a id="aa86a91ae0cd7898990a8170a2f2c9cda" name="aa86a91ae0cd7898990a8170a2f2c9cda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa86a91ae0cd7898990a8170a2f2c9cda">&#9670;&#160;</a></span>h_label</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt;int&gt; <a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>&lt; X &gt;::h_label</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>stores the label of a node </p>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00339">339</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
</div>
</div>
<a id="a1b336474d17eff1aa4be73d4068dc725" name="a1b336474d17eff1aa4be73d4068dc725"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b336474d17eff1aa4be73d4068dc725">&#9670;&#160;</a></span>h_parent</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt;int&gt; <a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>&lt; X &gt;::h_parent</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>stores the top of the heavy chain from a node </p>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00341">341</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
</div>
</div>
<a id="a722cc7cf2c3e4d15583601a48b09776f" name="a722cc7cf2c3e4d15583601a48b09776f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a722cc7cf2c3e4d15583601a48b09776f">&#9670;&#160;</a></span>label</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>&lt; X &gt;::label</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>utility member to assign labels in <a class="el" href="#a0579062b384e54b611b80c6337c7f2c8" title="Utility function to lable the nodes so that heavy chains have a contigous lable.">dfs_labels()</a> </p>
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00338">338</a> of file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>range_queries/<a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp.html">heavy_light_decomposition.cpp</a></li>
<li>range_queries/<a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->

View File

@@ -1,4 +0,0 @@
<map id="range_queries::heavy_light_decomposition::HLD::dfs_labels" name="range_queries::heavy_light_decomposition::HLD::dfs_labels">
<area shape="rect" id="Node000001" title="Utility function to lable the nodes so that heavy chains have a contigous lable." alt="" coords="5,29,151,85"/>
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="49,29,49,19,54,10,64,5,78,3,94,5,103,12,100,16,92,10,78,8,66,10,58,14,54,21,54,29"/>
</map>

View File

@@ -1,58 +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::heavy_light_decomposition::HLD::dfs_labels Pages: 1 -->
<svg width="117pt" height="68pt"
viewBox="0.00 0.00 117.00 67.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 63.75)">
<title>range_queries::heavy_light_decomposition::HLD::dfs_labels</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Utility function to lable the nodes so that heavy chains have a contigous lable.">
<polygon fill="#999999" stroke="#666666" points="109,-41.75 0,-41.75 0,0 109,0 109,-41.75"/>
<text text-anchor="start" x="8" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M34.38,-42.07C32.47,-51.55 39.17,-59.75 54.5,-59.75 63.12,-59.75 69.02,-57.16 72.18,-53.2"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="75.58,-54.06 74.29,-43.55 68.74,-52.57 75.58,-54.06"/>
</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: 2.4 KiB

View File

@@ -1,32 +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::heavy_light_decomposition::HLD::dfs_labels Pages: 1 -->
<svg width="117pt" height="68pt"
viewBox="0.00 0.00 117.00 67.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 63.75)">
<title>range_queries::heavy_light_decomposition::HLD::dfs_labels</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Utility function to lable the nodes so that heavy chains have a contigous lable.">
<polygon fill="#999999" stroke="#666666" points="109,-41.75 0,-41.75 0,0 109,0 109,-41.75"/>
<text text-anchor="start" x="8" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M34.38,-42.07C32.47,-51.55 39.17,-59.75 54.5,-59.75 63.12,-59.75 69.02,-57.16 72.18,-53.2"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="75.58,-54.06 74.29,-43.55 68.74,-52.57 75.58,-54.06"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1,4 +0,0 @@
<map id="range_queries::heavy_light_decomposition::HLD::dfs_par" name="range_queries::heavy_light_decomposition::HLD::dfs_par">
<area shape="rect" id="Node000001" title="Utility function to assign highest parent that can be reached though heavy chains." alt="" coords="5,29,151,85"/>
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="49,29,49,19,54,10,64,5,78,3,94,5,103,12,100,16,92,10,78,8,66,10,58,14,54,21,54,29"/>
</map>

View File

@@ -1,58 +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::heavy_light_decomposition::HLD::dfs_par Pages: 1 -->
<svg width="117pt" height="68pt"
viewBox="0.00 0.00 117.00 67.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 63.75)">
<title>range_queries::heavy_light_decomposition::HLD::dfs_par</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Utility function to assign highest parent that can be reached though heavy chains.">
<polygon fill="#999999" stroke="#666666" points="109,-41.75 0,-41.75 0,0 109,0 109,-41.75"/>
<text text-anchor="start" x="8" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M34.38,-42.07C32.47,-51.55 39.17,-59.75 54.5,-59.75 63.12,-59.75 69.02,-57.16 72.18,-53.2"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="75.58,-54.06 74.29,-43.55 68.74,-52.57 75.58,-54.06"/>
</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: 2.4 KiB

View File

@@ -1,32 +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::heavy_light_decomposition::HLD::dfs_par Pages: 1 -->
<svg width="117pt" height="68pt"
viewBox="0.00 0.00 117.00 67.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 63.75)">
<title>range_queries::heavy_light_decomposition::HLD::dfs_par</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Utility function to assign highest parent that can be reached though heavy chains.">
<polygon fill="#999999" stroke="#666666" points="109,-41.75 0,-41.75 0,0 109,0 109,-41.75"/>
<text text-anchor="start" x="8" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M34.38,-42.07C32.47,-51.55 39.17,-59.75 54.5,-59.75 63.12,-59.75 69.02,-57.16 72.18,-53.2"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="75.58,-54.06 74.29,-43.55 68.74,-52.57 75.58,-54.06"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1,13 +0,0 @@
<map id="range_queries::heavy_light_decomposition::HLD::query" name="range_queries::heavy_light_decomposition::HLD::query">
<area shape="rect" id="Node000001" title="This function returns the sum of node values in the simple path from from node_1 to node_2." alt="" coords="5,103,151,158"/>
<area shape="rect" id="Node000002" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24" title="Utility function to break down a path query into two chain queries." alt="" coords="199,63,344,118"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="150,113,183,106,184,111,151,118"/>
<area shape="rect" id="Node000005" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4" title="The function returns the least common ancestor of two nodes." alt="" coords="199,143,344,198"/>
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="151,143,184,150,183,155,150,148"/>
<area shape="rect" id="Node000003" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74" title="Function that specifies the type of operation involved when segments are combined." alt="" coords="392,5,537,61"/>
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="343,66,376,57,377,62,345,72"/>
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="426,86,504,111"/>
<area shape="poly" id="edge3_Node000002_Node000004" title=" " alt="" coords="344,91,410,94,410,99,344,96"/>
<area shape="rect" id="Node000006" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3" title="The function lifts a node, k units up the tree. The lifting is done in place, and the result is store..." alt="" coords="392,143,537,198"/>
<area shape="poly" id="edge5_Node000005_Node000006" title=" " alt="" coords="344,168,376,168,376,173,344,173"/>
</map>

View File

@@ -1,147 +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::heavy_light_decomposition::HLD::query Pages: 1 -->
<svg width="407pt" height="153pt"
viewBox="0.00 0.00 407.00 152.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 148.75)">
<title>range_queries::heavy_light_decomposition::HLD::query</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="This function returns the sum of node values in the simple path from from node_1 to node_2.">
<polygon fill="#999999" stroke="#666666" points="109,-71.75 0,-71.75 0,-30 109,-30 109,-71.75"/>
<text text-anchor="start" x="8" y="-58.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-47" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-35.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24" target="_top" xlink:title="Utility function to break down a path query into two chain queries.">
<polygon fill="white" stroke="#666666" points="254,-101.75 145,-101.75 145,-60 254,-60 254,-101.75"/>
<text text-anchor="start" x="153" y="-88.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-77" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-65.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M109.15,-62.13C117.11,-63.8 125.38,-65.54 133.53,-67.25"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="132.56,-70.62 143.06,-69.24 133.99,-63.77 132.56,-70.62"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4" target="_top" xlink:title="The function returns the least common ancestor of two nodes.">
<polygon fill="white" stroke="#666666" points="254,-41.75 145,-41.75 145,0 254,0 254,-41.75"/>
<text text-anchor="start" x="153" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4_Node000001_Node000005" class="edge">
<title>Node1&#45;&gt;Node5</title>
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M109.15,-39.62C117.11,-37.95 125.38,-36.21 133.53,-34.5"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.99,-37.98 143.06,-32.51 132.56,-31.13 133.99,-37.98"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74" target="_top" xlink:title="Function that specifies the type of operation involved when segments are combined.">
<polygon fill="white" stroke="#666666" points="399,-144.75 290,-144.75 290,-103 399,-103 399,-144.75"/>
<text text-anchor="start" x="298" y="-131.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="298" y="-120" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="344.5" y="-108.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M254.15,-97.01C262.11,-99.4 270.38,-101.89 278.53,-104.34"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="277.51,-107.69 288.1,-107.21 279.53,-100.98 277.51,-107.69"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="373.88,-84.5 315.12,-84.5 315.12,-65.25 373.88,-65.25 373.88,-84.5"/>
<text text-anchor="middle" x="344.5" y="-71" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge3_Node000002_Node000004" class="edge">
<title>Node2&#45;&gt;Node4</title>
<g id="a_edge3_Node000002_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M254.15,-78.62C270.57,-77.93 288.34,-77.19 303.66,-76.55"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="303.49,-80.06 313.34,-76.14 303.2,-73.06 303.49,-80.06"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3" target="_top" xlink:title="The function lifts a node, k units up the tree. The lifting is done in place, and the result is store...">
<polygon fill="white" stroke="#666666" points="399,-41.75 290,-41.75 290,0 399,0 399,-41.75"/>
<text text-anchor="start" x="298" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="298" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="344.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge5_Node000005_Node000006" class="edge">
<title>Node5&#45;&gt;Node6</title>
<g id="a_edge5_Node000005_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M254.15,-20.88C262.02,-20.88 270.19,-20.88 278.26,-20.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="278.03,-24.38 288.03,-20.88 278.03,-17.38 278.03,-24.38"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 7.5 KiB

View File

@@ -1,121 +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::heavy_light_decomposition::HLD::query Pages: 1 -->
<svg width="407pt" height="153pt"
viewBox="0.00 0.00 407.00 152.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 148.75)">
<title>range_queries::heavy_light_decomposition::HLD::query</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="This function returns the sum of node values in the simple path from from node_1 to node_2.">
<polygon fill="#999999" stroke="#666666" points="109,-71.75 0,-71.75 0,-30 109,-30 109,-71.75"/>
<text text-anchor="start" x="8" y="-58.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-47" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-35.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24" target="_top" xlink:title="Utility function to break down a path query into two chain queries.">
<polygon fill="white" stroke="#666666" points="254,-101.75 145,-101.75 145,-60 254,-60 254,-101.75"/>
<text text-anchor="start" x="153" y="-88.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-77" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-65.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M109.15,-62.13C117.11,-63.8 125.38,-65.54 133.53,-67.25"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="132.56,-70.62 143.06,-69.24 133.99,-63.77 132.56,-70.62"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4" target="_top" xlink:title="The function returns the least common ancestor of two nodes.">
<polygon fill="white" stroke="#666666" points="254,-41.75 145,-41.75 145,0 254,0 254,-41.75"/>
<text text-anchor="start" x="153" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4_Node000001_Node000005" class="edge">
<title>Node1&#45;&gt;Node5</title>
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M109.15,-39.62C117.11,-37.95 125.38,-36.21 133.53,-34.5"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.99,-37.98 143.06,-32.51 132.56,-31.13 133.99,-37.98"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74" target="_top" xlink:title="Function that specifies the type of operation involved when segments are combined.">
<polygon fill="white" stroke="#666666" points="399,-144.75 290,-144.75 290,-103 399,-103 399,-144.75"/>
<text text-anchor="start" x="298" y="-131.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="298" y="-120" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="344.5" y="-108.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M254.15,-97.01C262.11,-99.4 270.38,-101.89 278.53,-104.34"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="277.51,-107.69 288.1,-107.21 279.53,-100.98 277.51,-107.69"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="373.88,-84.5 315.12,-84.5 315.12,-65.25 373.88,-65.25 373.88,-84.5"/>
<text text-anchor="middle" x="344.5" y="-71" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge3_Node000002_Node000004" class="edge">
<title>Node2&#45;&gt;Node4</title>
<g id="a_edge3_Node000002_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M254.15,-78.62C270.57,-77.93 288.34,-77.19 303.66,-76.55"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="303.49,-80.06 313.34,-76.14 303.2,-73.06 303.49,-80.06"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3" target="_top" xlink:title="The function lifts a node, k units up the tree. The lifting is done in place, and the result is store...">
<polygon fill="white" stroke="#666666" points="399,-41.75 290,-41.75 290,0 399,0 399,-41.75"/>
<text text-anchor="start" x="298" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="298" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="344.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge5_Node000005_Node000006" class="edge">
<title>Node5&#45;&gt;Node6</title>
<g id="a_edge5_Node000005_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M254.15,-20.88C262.02,-20.88 270.19,-20.88 278.26,-20.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="278.03,-24.38 288.03,-20.88 278.03,-17.38 278.03,-24.38"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -1,7 +0,0 @@
<map id="range_queries::heavy_light_decomposition::HLD::chain_query" name="range_queries::heavy_light_decomposition::HLD::chain_query">
<area shape="rect" id="Node000001" title="Utility function to break down a path query into two chain queries." alt="" coords="5,39,151,94"/>
<area shape="rect" id="Node000002" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74" title="Function that specifies the type of operation involved when segments are combined." alt="" coords="199,5,344,61"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="150,51,183,46,183,51,151,57"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="232,86,310,111"/>
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="151,76,217,87,216,92,150,81"/>
</map>

View File

@@ -1,87 +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::heavy_light_decomposition::HLD::chain_query Pages: 1 -->
<svg width="262pt" height="88pt"
viewBox="0.00 0.00 262.00 87.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 83.5)">
<title>range_queries::heavy_light_decomposition::HLD::chain_query</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Utility function to break down a path query into two chain queries.">
<polygon fill="#999999" stroke="#666666" points="109,-54.5 0,-54.5 0,-12.75 109,-12.75 109,-54.5"/>
<text text-anchor="start" x="8" y="-41" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-29.75" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74" target="_top" xlink:title="Function that specifies the type of operation involved when segments are combined.">
<polygon fill="white" stroke="#666666" points="254,-79.5 145,-79.5 145,-37.75 254,-37.75 254,-79.5"/>
<text text-anchor="start" x="153" y="-66" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-54.75" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-43.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M109.15,-43.01C117.02,-44.38 125.19,-45.81 133.26,-47.22"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="132.6,-50.66 143.05,-48.93 133.81,-43.76 132.6,-50.66"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="228.88,-19.25 170.12,-19.25 170.12,0 228.88,0 228.88,-19.25"/>
<text text-anchor="middle" x="199.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M109.15,-24.62C125.57,-21.86 143.34,-18.88 158.66,-16.31"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="159.07,-19.79 168.36,-14.68 157.92,-12.89 159.07,-19.79"/>
</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.0 KiB

View File

@@ -1,61 +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::heavy_light_decomposition::HLD::chain_query Pages: 1 -->
<svg width="262pt" height="88pt"
viewBox="0.00 0.00 262.00 87.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 83.5)">
<title>range_queries::heavy_light_decomposition::HLD::chain_query</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Utility function to break down a path query into two chain queries.">
<polygon fill="#999999" stroke="#666666" points="109,-54.5 0,-54.5 0,-12.75 109,-12.75 109,-54.5"/>
<text text-anchor="start" x="8" y="-41" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-29.75" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74" target="_top" xlink:title="Function that specifies the type of operation involved when segments are combined.">
<polygon fill="white" stroke="#666666" points="254,-79.5 145,-79.5 145,-37.75 254,-37.75 254,-79.5"/>
<text text-anchor="start" x="153" y="-66" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-54.75" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-43.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M109.15,-43.01C117.02,-44.38 125.19,-45.81 133.26,-47.22"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="132.6,-50.66 143.05,-48.93 133.81,-43.76 132.6,-50.66"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="228.88,-19.25 170.12,-19.25 170.12,0 228.88,0 228.88,-19.25"/>
<text text-anchor="middle" x="199.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M109.15,-24.62C125.57,-21.86 143.34,-18.88 158.66,-16.31"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="159.07,-19.79 168.36,-14.68 157.92,-12.89 159.07,-19.79"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -1,5 +0,0 @@
<map id="range_queries::heavy_light_decomposition::HLD::update" name="range_queries::heavy_light_decomposition::HLD::update">
<area shape="rect" id="Node000001" title="This function updates the value at node with val." alt="" coords="5,5,151,61"/>
<area shape="rect" id="Node000002" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c" title="Update the value at a node." alt="" coords="199,5,344,61"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="151,30,183,30,183,36,151,36"/>
</map>

View File

@@ -1,69 +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::heavy_light_decomposition::HLD::update Pages: 1 -->
<svg width="262pt" height="50pt"
viewBox="0.00 0.00 262.00 49.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 45.75)">
<title>range_queries::heavy_light_decomposition::HLD::update</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="This function updates the value at node with val.">
<polygon fill="#999999" stroke="#666666" points="109,-41.75 0,-41.75 0,0 109,0 109,-41.75"/>
<text text-anchor="start" x="8" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c" target="_top" xlink:title="Update the value at a node.">
<polygon fill="white" stroke="#666666" points="254,-41.75 145,-41.75 145,0 254,0 254,-41.75"/>
<text text-anchor="start" x="153" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M109.15,-20.88C117.02,-20.88 125.19,-20.88 133.26,-20.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.03,-24.38 143.03,-20.88 133.03,-17.38 133.03,-24.38"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -1,43 +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::heavy_light_decomposition::HLD::update Pages: 1 -->
<svg width="262pt" height="50pt"
viewBox="0.00 0.00 262.00 49.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 45.75)">
<title>range_queries::heavy_light_decomposition::HLD::update</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="This function updates the value at node with val.">
<polygon fill="#999999" stroke="#666666" points="109,-41.75 0,-41.75 0,0 109,0 109,-41.75"/>
<text text-anchor="start" x="8" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c" target="_top" xlink:title="Update the value at a node.">
<polygon fill="white" stroke="#666666" points="254,-41.75 145,-41.75 145,0 254,0 254,-41.75"/>
<text text-anchor="start" x="153" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M109.15,-20.88C117.02,-20.88 125.19,-20.88 133.26,-20.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.03,-24.38 143.03,-20.88 133.03,-17.38 133.03,-24.38"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,22 +0,0 @@
<map id="range_queries::heavy_light_decomposition::HLD::init" name="range_queries::heavy_light_decomposition::HLD::init">
<area shape="rect" id="Node000001" title="This function must be called after the tree adjacency list and node values are populated The function..." alt="" coords="5,213,151,269"/>
<area shape="rect" id="Node000002" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74" title="Function that specifies the type of operation involved when segments are combined." alt="" coords="199,5,344,61"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="92,211,135,143,164,106,197,71,200,68,204,72,201,75,168,109,139,146,97,214"/>
<area shape="rect" id="Node000003" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8" title="Utility function to assign heavy child to each node (&#45;1 for a leaf node)" alt="" coords="199,109,344,165"/>
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="130,210,203,170,206,175,133,215"/>
<area shape="rect" id="Node000004" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8" title="Utility function to lable the nodes so that heavy chains have a contigous lable." alt="" coords="199,213,344,269"/>
<area shape="poly" id="edge4_Node000001_Node000004" title=" " alt="" coords="151,238,183,238,183,244,151,244"/>
<area shape="rect" id="Node000005" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a" title="Utility function to assign highest parent that can be reached though heavy chains." alt="" coords="199,317,344,373"/>
<area shape="poly" id="edge6_Node000001_Node000005" title=" " alt="" coords="133,267,206,307,203,312,130,272"/>
<area shape="rect" id="Node000006" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc" title="This function must be called after the tree adjacency list and node values are populated The function..." alt="" coords="199,397,344,453"/>
<area shape="poly" id="edge8_Node000001_Node000006" title=" " alt="" coords="100,268,143,324,170,355,200,383,204,386,201,390,197,387,167,359,139,328,96,271"/>
<area shape="poly" id="edge3_Node000003_Node000003" title=" " alt="" coords="233,109,233,99,240,90,253,85,271,83,292,85,304,92,302,97,290,90,271,88,254,90,244,95,238,101,238,109"/>
<area shape="poly" id="edge5_Node000004_Node000004" title=" " alt="" coords="233,213,233,203,240,194,253,189,271,187,292,189,304,196,302,201,290,194,271,192,254,194,244,199,238,205,238,213"/>
<area shape="poly" id="edge7_Node000005_Node000005" title=" " alt="" coords="233,317,233,307,240,298,253,293,271,291,292,293,304,300,302,305,290,298,271,296,254,298,244,303,238,309,238,317"/>
<area shape="rect" id="Node000007" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4" title="Utility function to populate the t_par vector." alt="" coords="392,345,537,401"/>
<area shape="poly" id="edge9_Node000006_Node000007" title=" " alt="" coords="344,403,376,394,377,399,345,408"/>
<area shape="rect" id="Node000008" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" title="Utility function to compute sub&#45;tree sizes." alt="" coords="392,449,537,505"/>
<area shape="poly" id="edge11_Node000006_Node000008" title=" " alt="" coords="345,442,377,451,376,456,344,447"/>
<area shape="poly" id="edge10_Node000007_Node000007" title=" " alt="" coords="426,345,427,335,434,326,446,321,465,319,485,321,498,328,495,333,484,326,465,324,448,326,437,331,432,337,432,345"/>
<area shape="poly" id="edge12_Node000008_Node000008" title=" " alt="" coords="426,449,427,439,434,430,446,425,465,423,485,425,498,432,495,437,484,430,465,428,448,430,437,435,432,441,432,449"/>
</map>

View File

@@ -1,234 +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::heavy_light_decomposition::HLD::init Pages: 1 -->
<svg width="407pt" height="383pt"
viewBox="0.00 0.00 407.00 382.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 378.75)">
<title>range_queries::heavy_light_decomposition::HLD::init</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="This function must be called after the tree adjacency list and node values are populated The function...">
<polygon fill="#999999" stroke="#666666" points="109,-218.75 0,-218.75 0,-177 109,-177 109,-218.75"/>
<text text-anchor="start" x="8" y="-205.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-194" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-182.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74" target="_top" xlink:title="Function that specifies the type of operation involved when segments are combined.">
<polygon fill="white" stroke="#666666" points="254,-374.75 145,-374.75 145,-333 254,-333 254,-374.75"/>
<text text-anchor="start" x="153" y="-361.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-350" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-338.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M66.74,-219.24C81.74,-246.21 110.48,-292.85 145,-323.88 145.76,-324.56 146.54,-325.24 147.34,-325.9"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="145.06,-328.57 155.16,-331.76 149.26,-322.97 145.06,-328.57"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8" target="_top" xlink:title="Utility function to assign heavy child to each node (&#45;1 for a leaf node)">
<polygon fill="white" stroke="#666666" points="254,-296.75 145,-296.75 145,-255 254,-255 254,-296.75"/>
<text text-anchor="start" x="153" y="-283.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-272" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-260.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M94.58,-219.19C111.52,-228.43 131.55,-239.36 149.48,-249.14"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="147.69,-252.15 158.14,-253.86 151.04,-246 147.69,-252.15"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8" target="_top" xlink:title="Utility function to lable the nodes so that heavy chains have a contigous lable.">
<polygon fill="white" stroke="#666666" points="254,-218.75 145,-218.75 145,-177 254,-177 254,-218.75"/>
<text text-anchor="start" x="153" y="-205.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-194" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-182.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge4_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;Node4</title>
<g id="a_edge4_Node000001_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M109.15,-197.88C117.02,-197.88 125.19,-197.88 133.26,-197.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.03,-201.38 143.03,-197.88 133.03,-194.38 133.03,-201.38"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a" target="_top" xlink:title="Utility function to assign highest parent that can be reached though heavy chains.">
<polygon fill="white" stroke="#666666" points="254,-140.75 145,-140.75 145,-99 254,-99 254,-140.75"/>
<text text-anchor="start" x="153" y="-127.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-116" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-104.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge6_Node000001_Node000005" class="edge">
<title>Node1&#45;&gt;Node5</title>
<g id="a_edge6_Node000001_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M94.58,-176.56C111.52,-167.32 131.55,-156.39 149.48,-146.61"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="151.04,-149.75 158.14,-141.89 147.69,-143.6 151.04,-149.75"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc" target="_top" xlink:title="This function must be called after the tree adjacency list and node values are populated The function...">
<polygon fill="white" stroke="#666666" points="254,-80.75 145,-80.75 145,-39 254,-39 254,-80.75"/>
<text text-anchor="start" x="153" y="-67.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-56" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-44.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node6 -->
<g id="edge8_Node000001_Node000006" class="edge">
<title>Node1&#45;&gt;Node6</title>
<g id="a_edge8_Node000001_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M69.39,-176.81C85.54,-153.49 113.95,-115.76 145,-89.88 145.92,-89.11 146.86,-88.35 147.82,-87.6"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="149.52,-90.69 155.65,-82.04 145.47,-84.98 149.52,-90.69"/>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node3 -->
<g id="edge3_Node000003_Node000003" class="edge">
<title>Node3&#45;&gt;Node3</title>
<g id="a_edge3_Node000003_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M172.74,-297.07C170.19,-306.55 179.11,-314.75 199.5,-314.75 211.29,-314.75 219.24,-312.01 223.36,-307.86"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="226.66,-309.1 225.87,-298.53 219.9,-307.28 226.66,-309.1"/>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node4 -->
<g id="edge5_Node000004_Node000004" class="edge">
<title>Node4&#45;&gt;Node4</title>
<g id="a_edge5_Node000004_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M172.74,-219.07C170.19,-228.55 179.11,-236.75 199.5,-236.75 211.29,-236.75 219.24,-234.01 223.36,-229.86"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="226.66,-231.1 225.87,-220.53 219.9,-229.28 226.66,-231.1"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node5 -->
<g id="edge7_Node000005_Node000005" class="edge">
<title>Node5&#45;&gt;Node5</title>
<g id="a_edge7_Node000005_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M172.74,-141.07C170.19,-150.55 179.11,-158.75 199.5,-158.75 211.29,-158.75 219.24,-156.01 223.36,-151.86"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="226.66,-153.1 225.87,-142.53 219.9,-151.28 226.66,-153.1"/>
</a>
</g>
</g>
<!-- Node7 -->
<g id="Node000007" class="node">
<title>Node7</title>
<g id="a_Node000007"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4" target="_top" xlink:title="Utility function to populate the t_par vector.">
<polygon fill="white" stroke="#666666" points="399,-119.75 290,-119.75 290,-78 399,-78 399,-119.75"/>
<text text-anchor="start" x="298" y="-106.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="298" y="-95" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="344.5" y="-83.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node7 -->
<g id="edge9_Node000006_Node000007" class="edge">
<title>Node6&#45;&gt;Node7</title>
<g id="a_edge9_Node000006_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M254.15,-74.51C262.11,-76.68 270.38,-78.93 278.53,-81.16"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="277.52,-84.51 288.08,-83.76 279.36,-77.75 277.52,-84.51"/>
</a>
</g>
</g>
<!-- Node8 -->
<g id="Node000008" class="node">
<title>Node8</title>
<g id="a_Node000008"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" target="_top" xlink:title="Utility function to compute sub&#45;tree sizes.">
<polygon fill="white" stroke="#666666" points="399,-41.75 290,-41.75 290,0 399,0 399,-41.75"/>
<text text-anchor="start" x="298" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="298" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="344.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node8 -->
<g id="edge11_Node000006_Node000008" class="edge">
<title>Node6&#45;&gt;Node8</title>
<g id="a_edge11_Node000006_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M254.15,-45.24C262.11,-43.07 270.38,-40.82 278.53,-38.59"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="279.36,-42 288.08,-35.99 277.52,-35.24 279.36,-42"/>
</a>
</g>
</g>
<!-- Node7&#45;&gt;Node7 -->
<g id="edge10_Node000007_Node000007" class="edge">
<title>Node7&#45;&gt;Node7</title>
<g id="a_edge10_Node000007_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M317.74,-120.07C315.19,-129.55 324.11,-137.75 344.5,-137.75 356.29,-137.75 364.24,-135.01 368.36,-130.86"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="371.66,-132.1 370.87,-121.53 364.9,-130.28 371.66,-132.1"/>
</a>
</g>
</g>
<!-- Node8&#45;&gt;Node8 -->
<g id="edge12_Node000008_Node000008" class="edge">
<title>Node8&#45;&gt;Node8</title>
<g id="a_edge12_Node000008_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M317.74,-42.07C315.19,-51.55 324.11,-59.75 344.5,-59.75 356.29,-59.75 364.24,-57.01 368.36,-52.86"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="371.66,-54.1 370.87,-43.53 364.9,-52.28 371.66,-54.1"/>
</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: 12 KiB

View File

@@ -1,208 +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::heavy_light_decomposition::HLD::init Pages: 1 -->
<svg width="407pt" height="383pt"
viewBox="0.00 0.00 407.00 382.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 378.75)">
<title>range_queries::heavy_light_decomposition::HLD::init</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="This function must be called after the tree adjacency list and node values are populated The function...">
<polygon fill="#999999" stroke="#666666" points="109,-218.75 0,-218.75 0,-177 109,-177 109,-218.75"/>
<text text-anchor="start" x="8" y="-205.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-194" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-182.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74" target="_top" xlink:title="Function that specifies the type of operation involved when segments are combined.">
<polygon fill="white" stroke="#666666" points="254,-374.75 145,-374.75 145,-333 254,-333 254,-374.75"/>
<text text-anchor="start" x="153" y="-361.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-350" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-338.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M66.74,-219.24C81.74,-246.21 110.48,-292.85 145,-323.88 145.76,-324.56 146.54,-325.24 147.34,-325.9"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="145.06,-328.57 155.16,-331.76 149.26,-322.97 145.06,-328.57"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8" target="_top" xlink:title="Utility function to assign heavy child to each node (&#45;1 for a leaf node)">
<polygon fill="white" stroke="#666666" points="254,-296.75 145,-296.75 145,-255 254,-255 254,-296.75"/>
<text text-anchor="start" x="153" y="-283.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-272" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-260.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M94.58,-219.19C111.52,-228.43 131.55,-239.36 149.48,-249.14"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="147.69,-252.15 158.14,-253.86 151.04,-246 147.69,-252.15"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8" target="_top" xlink:title="Utility function to lable the nodes so that heavy chains have a contigous lable.">
<polygon fill="white" stroke="#666666" points="254,-218.75 145,-218.75 145,-177 254,-177 254,-218.75"/>
<text text-anchor="start" x="153" y="-205.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-194" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-182.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge4_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;Node4</title>
<g id="a_edge4_Node000001_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M109.15,-197.88C117.02,-197.88 125.19,-197.88 133.26,-197.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.03,-201.38 143.03,-197.88 133.03,-194.38 133.03,-201.38"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a" target="_top" xlink:title="Utility function to assign highest parent that can be reached though heavy chains.">
<polygon fill="white" stroke="#666666" points="254,-140.75 145,-140.75 145,-99 254,-99 254,-140.75"/>
<text text-anchor="start" x="153" y="-127.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-116" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-104.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge6_Node000001_Node000005" class="edge">
<title>Node1&#45;&gt;Node5</title>
<g id="a_edge6_Node000001_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M94.58,-176.56C111.52,-167.32 131.55,-156.39 149.48,-146.61"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="151.04,-149.75 158.14,-141.89 147.69,-143.6 151.04,-149.75"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc" target="_top" xlink:title="This function must be called after the tree adjacency list and node values are populated The function...">
<polygon fill="white" stroke="#666666" points="254,-80.75 145,-80.75 145,-39 254,-39 254,-80.75"/>
<text text-anchor="start" x="153" y="-67.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="153" y="-56" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="199.5" y="-44.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node6 -->
<g id="edge8_Node000001_Node000006" class="edge">
<title>Node1&#45;&gt;Node6</title>
<g id="a_edge8_Node000001_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M69.39,-176.81C85.54,-153.49 113.95,-115.76 145,-89.88 145.92,-89.11 146.86,-88.35 147.82,-87.6"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="149.52,-90.69 155.65,-82.04 145.47,-84.98 149.52,-90.69"/>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node3 -->
<g id="edge3_Node000003_Node000003" class="edge">
<title>Node3&#45;&gt;Node3</title>
<g id="a_edge3_Node000003_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M172.74,-297.07C170.19,-306.55 179.11,-314.75 199.5,-314.75 211.29,-314.75 219.24,-312.01 223.36,-307.86"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="226.66,-309.1 225.87,-298.53 219.9,-307.28 226.66,-309.1"/>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node4 -->
<g id="edge5_Node000004_Node000004" class="edge">
<title>Node4&#45;&gt;Node4</title>
<g id="a_edge5_Node000004_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M172.74,-219.07C170.19,-228.55 179.11,-236.75 199.5,-236.75 211.29,-236.75 219.24,-234.01 223.36,-229.86"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="226.66,-231.1 225.87,-220.53 219.9,-229.28 226.66,-231.1"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node5 -->
<g id="edge7_Node000005_Node000005" class="edge">
<title>Node5&#45;&gt;Node5</title>
<g id="a_edge7_Node000005_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M172.74,-141.07C170.19,-150.55 179.11,-158.75 199.5,-158.75 211.29,-158.75 219.24,-156.01 223.36,-151.86"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="226.66,-153.1 225.87,-142.53 219.9,-151.28 226.66,-153.1"/>
</a>
</g>
</g>
<!-- Node7 -->
<g id="Node000007" class="node">
<title>Node7</title>
<g id="a_Node000007"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4" target="_top" xlink:title="Utility function to populate the t_par vector.">
<polygon fill="white" stroke="#666666" points="399,-119.75 290,-119.75 290,-78 399,-78 399,-119.75"/>
<text text-anchor="start" x="298" y="-106.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="298" y="-95" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="344.5" y="-83.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node7 -->
<g id="edge9_Node000006_Node000007" class="edge">
<title>Node6&#45;&gt;Node7</title>
<g id="a_edge9_Node000006_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M254.15,-74.51C262.11,-76.68 270.38,-78.93 278.53,-81.16"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="277.52,-84.51 288.08,-83.76 279.36,-77.75 277.52,-84.51"/>
</a>
</g>
</g>
<!-- Node8 -->
<g id="Node000008" class="node">
<title>Node8</title>
<g id="a_Node000008"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" target="_top" xlink:title="Utility function to compute sub&#45;tree sizes.">
<polygon fill="white" stroke="#666666" points="399,-41.75 290,-41.75 290,0 399,0 399,-41.75"/>
<text text-anchor="start" x="298" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="298" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="344.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node8 -->
<g id="edge11_Node000006_Node000008" class="edge">
<title>Node6&#45;&gt;Node8</title>
<g id="a_edge11_Node000006_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M254.15,-45.24C262.11,-43.07 270.38,-40.82 278.53,-38.59"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="279.36,-42 288.08,-35.99 277.52,-35.24 279.36,-42"/>
</a>
</g>
</g>
<!-- Node7&#45;&gt;Node7 -->
<g id="edge10_Node000007_Node000007" class="edge">
<title>Node7&#45;&gt;Node7</title>
<g id="a_edge10_Node000007_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M317.74,-120.07C315.19,-129.55 324.11,-137.75 344.5,-137.75 356.29,-137.75 364.24,-135.01 368.36,-130.86"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="371.66,-132.1 370.87,-121.53 364.9,-130.28 371.66,-132.1"/>
</a>
</g>
</g>
<!-- Node8&#45;&gt;Node8 -->
<g id="edge12_Node000008_Node000008" class="edge">
<title>Node8&#45;&gt;Node8</title>
<g id="a_edge12_Node000008_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M317.74,-42.07C315.19,-51.55 324.11,-59.75 344.5,-59.75 356.29,-59.75 364.24,-57.01 368.36,-52.86"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="371.66,-54.1 370.87,-43.53 364.9,-52.28 371.66,-54.1"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,4 +0,0 @@
<map id="range_queries::heavy_light_decomposition::HLD::dfs_hc" name="range_queries::heavy_light_decomposition::HLD::dfs_hc">
<area shape="rect" id="Node000001" title="Utility function to assign heavy child to each node (&#45;1 for a leaf node)" alt="" coords="5,29,151,85"/>
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="49,29,49,19,54,10,64,5,78,3,94,5,103,12,100,16,92,10,78,8,66,10,58,14,54,21,54,29"/>
</map>

View File

@@ -1,58 +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::heavy_light_decomposition::HLD::dfs_hc Pages: 1 -->
<svg width="117pt" height="68pt"
viewBox="0.00 0.00 117.00 67.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 63.75)">
<title>range_queries::heavy_light_decomposition::HLD::dfs_hc</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Utility function to assign heavy child to each node (&#45;1 for a leaf node)">
<polygon fill="#999999" stroke="#666666" points="109,-41.75 0,-41.75 0,0 109,0 109,-41.75"/>
<text text-anchor="start" x="8" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M34.38,-42.07C32.47,-51.55 39.17,-59.75 54.5,-59.75 63.12,-59.75 69.02,-57.16 72.18,-53.2"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="75.58,-54.06 74.29,-43.55 68.74,-52.57 75.58,-54.06"/>
</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: 2.4 KiB

View File

@@ -1,32 +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::heavy_light_decomposition::HLD::dfs_hc Pages: 1 -->
<svg width="117pt" height="68pt"
viewBox="0.00 0.00 117.00 67.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 63.75)">
<title>range_queries::heavy_light_decomposition::HLD::dfs_hc</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Utility function to assign heavy child to each node (&#45;1 for a leaf node)">
<polygon fill="#999999" stroke="#666666" points="109,-41.75 0,-41.75 0,0 109,0 109,-41.75"/>
<text text-anchor="start" x="8" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="54.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M34.38,-42.07C32.47,-51.55 39.17,-59.75 54.5,-59.75 63.12,-59.75 69.02,-57.16 72.18,-53.2"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="75.58,-54.06 74.29,-43.55 68.74,-52.57 75.58,-54.06"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB