Documentation for 8b1eab204b
@@ -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.cpp File Reference</title>
|
||||
<title>TheAlgorithms/C++: range_queries/heavy_light_decomposition.cpp File 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"> 1.0.0</span>
|
||||
<div id="projectname">TheAlgorithms/C++<span id="projectnumber"> 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>
|
||||
@@ -128,7 +145,9 @@ Include dependency graph for heavy_light_decomposition.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d8/dc0/heavy__light__decomposition_8cpp__incl.svg" width="100%" height="394"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
</div>
|
||||
<p><a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree< X ></a></td></tr>
|
||||
@@ -144,7 +163,7 @@ Classes</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
||||
Namespaces</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d69/namespacerange__queries.html">range_queries</a></td></tr>
|
||||
<tr class="memdesc:dd/d69/namespacerange__queries"><td class="mdescLeft"> </td><td class="mdescRight">for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> <br /></td></tr>
|
||||
<tr class="memdesc:dd/d69/namespacerange__queries"><td class="mdescLeft"> </td><td class="mdescRight">for std::vector <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d6f/namespaceheavy__light__decomposition.html">heavy_light_decomposition</a></td></tr>
|
||||
<tr class="memdesc:db/d6f/namespaceheavy__light__decomposition"><td class="mdescLeft"> </td><td class="mdescRight">Heavy light decomposition algorithm. <br /></td></tr>
|
||||
@@ -180,6 +199,8 @@ Functions</h2></td></tr>
|
||||
<li>Call obj.query(a, b) to get the (sum) of node values in the simple path from a to b. Note: a and b, must be 0 indexed.</li>
|
||||
</ol>
|
||||
<p>Sample I/O at the bottom. </p><dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000011">Todo</a></b></dt><dd>Support edge weight queries, by storing the edge weight value in it's child algorithm verified by testing in CSES path queries: <a href="https://cses.fi/problemset/task/1138">https://cses.fi/problemset/task/1138</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html">heavy_light_decomposition.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
@@ -196,21 +217,18 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Main function </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00634">634</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"> 634</span> {</div>
|
||||
<div class="line"><span class="lineno"> 635</span> <a class="code hl_function" href="#a34b8683a2b429de5cce57e6d733ec817">test_1</a>();</div>
|
||||
<div class="line"><span class="lineno"> 636</span> <a class="code hl_function" href="#a458410412185a5f09199deaff7157a8d">test_2</a>();</div>
|
||||
<div class="line"><span class="lineno"> 637</span> <a class="code hl_function" href="#af31ec5409537703d9c8a47350386b32a">test_3</a>();</div>
|
||||
<div class="line"><span class="lineno"> 638</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 639</span>}</div>
|
||||
<div class="ttc" id="aheavy__light__decomposition_8cpp_html_a34b8683a2b429de5cce57e6d733ec817"><div class="ttname"><a href="#a34b8683a2b429de5cce57e6d733ec817">test_1</a></div><div class="ttdeci">static void test_1()</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:505</div></div>
|
||||
<div class="ttc" id="aheavy__light__decomposition_8cpp_html_a458410412185a5f09199deaff7157a8d"><div class="ttname"><a href="#a458410412185a5f09199deaff7157a8d">test_2</a></div><div class="ttdeci">static void test_2()</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:549</div></div>
|
||||
<div class="ttc" id="aheavy__light__decomposition_8cpp_html_af31ec5409537703d9c8a47350386b32a"><div class="ttname"><a href="#af31ec5409537703d9c8a47350386b32a">test_3</a></div><div class="ttdeci">static void test_3()</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:592</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d2/de9/heavy__light__decomposition_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
|
||||
</div>
|
||||
|
||||
<div class="ttc" id="aheavy__light__decomposition_8cpp_html_a34b8683a2b429de5cce57e6d733ec817"><div class="ttname"><a href="#a34b8683a2b429de5cce57e6d733ec817">test_1</a></div><div class="ttdeci">static void test_1()</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00505">heavy_light_decomposition.cpp:505</a></div></div>
|
||||
<div class="ttc" id="aheavy__light__decomposition_8cpp_html_a458410412185a5f09199deaff7157a8d"><div class="ttname"><a href="#a458410412185a5f09199deaff7157a8d">test_2</a></div><div class="ttdeci">static void test_2()</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00549">heavy_light_decomposition.cpp:549</a></div></div>
|
||||
<div class="ttc" id="aheavy__light__decomposition_8cpp_html_af31ec5409537703d9c8a47350386b32a"><div class="ttname"><a href="#af31ec5409537703d9c8a47350386b32a">test_3</a></div><div class="ttdeci">static void test_3()</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00592">heavy_light_decomposition.cpp:592</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a34b8683a2b429de5cce57e6d733ec817" name="a34b8683a2b429de5cce57e6d733ec817"></a>
|
||||
@@ -236,20 +254,22 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Test implementations </p><dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00505">505</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"> 505</span> {</div>
|
||||
<div class="line"><span class="lineno"> 506</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 1:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 506</span> std::cout << <span class="stringliteral">"Test 1:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 507</span> </div>
|
||||
<div class="line"><span class="lineno"> 508</span> <span class="comment">// Test details</span></div>
|
||||
<div class="line"><span class="lineno"> 509</span> <span class="keywordtype">int</span> n = 5;</div>
|
||||
<div class="line"><span class="lineno"> 510</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int64_t></a> node_values = {4, 2, 5, 2, 1};</div>
|
||||
<div class="line"><span class="lineno"> 511</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<int></a>> edges = {{1, 2}, {1, 3}, {3, 4}, {3, 5}};</div>
|
||||
<div class="line"><span class="lineno"> 512</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<int></a>> queries = {</div>
|
||||
<div class="line"><span class="lineno"> 510</span> std::vector<int64_t> node_values = {4, 2, 5, 2, 1};</div>
|
||||
<div class="line"><span class="lineno"> 511</span> std::vector<std::vector<int>> edges = {{1, 2}, {1, 3}, {3, 4}, {3, 5}};</div>
|
||||
<div class="line"><span class="lineno"> 512</span> std::vector<std::vector<int>> queries = {</div>
|
||||
<div class="line"><span class="lineno"> 513</span> {2, 1, 4},</div>
|
||||
<div class="line"><span class="lineno"> 514</span> {1, 3, 2},</div>
|
||||
<div class="line"><span class="lineno"> 515</span> {2, 1, 4},</div>
|
||||
<div class="line"><span class="lineno"> 516</span> };</div>
|
||||
<div class="line"><span class="lineno"> 517</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> expected_result = {11, 8};</div>
|
||||
<div class="line"><span class="lineno"> 518</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> code_result;</div>
|
||||
<div class="line"><span class="lineno"> 517</span> std::vector<int> expected_result = {11, 8};</div>
|
||||
<div class="line"><span class="lineno"> 518</span> std::vector<int> code_result;</div>
|
||||
<div class="line"><span class="lineno"> 519</span> </div>
|
||||
<div class="line"><span class="lineno"> 520</span> <a class="code hl_class" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD<int64_t></a> hld(n);</div>
|
||||
<div class="line"><span class="lineno"> 521</span> hld.set_node_val(node_values);</div>
|
||||
@@ -265,27 +285,18 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 531</span> hld.update(p - 1, x);</div>
|
||||
<div class="line"><span class="lineno"> 532</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (type == 2) {</div>
|
||||
<div class="line"><span class="lineno"> 533</span> <span class="keywordtype">int</span> a = q[1], b = q[2];</div>
|
||||
<div class="line"><span class="lineno"> 534</span> code_result.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(hld.query(a - 1, b - 1));</div>
|
||||
<div class="line"><span class="lineno"> 534</span> code_result.push_back(hld.query(a - 1, b - 1));</div>
|
||||
<div class="line"><span class="lineno"> 535</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 536</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><span class="lineno"> 537</span> }</div>
|
||||
<div class="line"><span class="lineno"> 538</span> }</div>
|
||||
<div class="line"><span class="lineno"> 539</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < static_cast<int>(expected_result.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>()); i++) {</div>
|
||||
<div class="line"><span class="lineno"> 539</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < static_cast<int>(expected_result.size()); i++) {</div>
|
||||
<div class="line"><span class="lineno"> 540</span> assert(expected_result[i] == code_result[i]);</div>
|
||||
<div class="line"><span class="lineno"> 541</span> }</div>
|
||||
<div class="line"><span class="lineno"> 542</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\nTest 1 passed!\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 542</span> std::cout << <span class="stringliteral">"\nTest 1 passed!\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 543</span>}</div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a></div><div class="ttdoc">The Heavy-Light Decomposition class.</div><div class="ttdef"><b>Definition</b> heavy_light_decomposition.cpp:336</div></div>
|
||||
<div class="ttc" id="apush_back_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">std::vector::push_back</a></div><div class="ttdeci">T push_back(T... args)</div></div>
|
||||
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(T... args)</div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d2/de9/heavy__light__decomposition_8cpp_a34b8683a2b429de5cce57e6d733ec817_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
|
||||
</div>
|
||||
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a></div><div class="ttdoc">The Heavy-Light Decomposition class.</div><div class="ttdef"><b>Definition</b> <a href="../../d2/de9/heavy__light__decomposition_8cpp_source.html#l00336">heavy_light_decomposition.cpp:336</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a458410412185a5f09199deaff7157a8d" name="a458410412185a5f09199deaff7157a8d"></a>
|
||||
@@ -311,19 +322,21 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Second test implementations </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#l00549">549</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"> 549</span> {</div>
|
||||
<div class="line"><span class="lineno"> 550</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 2:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 550</span> std::cout << <span class="stringliteral">"Test 2:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 551</span> </div>
|
||||
<div class="line"><span class="lineno"> 552</span> <span class="comment">// Test details (Bamboo)</span></div>
|
||||
<div class="line"><span class="lineno"> 553</span> <span class="keywordtype">int</span> n = 10;</div>
|
||||
<div class="line"><span class="lineno"> 554</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int64_t></a> node_values = {1, 8, 6, 8, 6, 2, 9, 2, 3, 2};</div>
|
||||
<div class="line"><span class="lineno"> 555</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<int></a>> edges = {</div>
|
||||
<div class="line"><span class="lineno"> 554</span> std::vector<int64_t> node_values = {1, 8, 6, 8, 6, 2, 9, 2, 3, 2};</div>
|
||||
<div class="line"><span class="lineno"> 555</span> std::vector<std::vector<int>> edges = {</div>
|
||||
<div class="line"><span class="lineno"> 556</span> {10, 5}, {6, 2}, {10, 7}, {5, 2}, {3, 9}, {8, 3}, {1, 4}, {6, 4}, {8, 7}};</div>
|
||||
<div class="line"><span class="lineno"> 557</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<int></a>> queries = {</div>
|
||||
<div class="line"><span class="lineno"> 557</span> std::vector<std::vector<int>> queries = {</div>
|
||||
<div class="line"><span class="lineno"> 558</span> {2, 1, 10}, {2, 1, 6}, {1, 3, 4}, {2, 1, 9}, {1, 5, 3},</div>
|
||||
<div class="line"><span class="lineno"> 559</span> {1, 7, 8}, {2, 1, 4}, {2, 1, 8}, {1, 1, 4}, {1, 2, 7}};</div>
|
||||
<div class="line"><span class="lineno"> 560</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> expected_result = {27, 11, 45, 9, 34};</div>
|
||||
<div class="line"><span class="lineno"> 561</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> code_result;</div>
|
||||
<div class="line"><span class="lineno"> 560</span> std::vector<int> expected_result = {27, 11, 45, 9, 34};</div>
|
||||
<div class="line"><span class="lineno"> 561</span> std::vector<int> code_result;</div>
|
||||
<div class="line"><span class="lineno"> 562</span> </div>
|
||||
<div class="line"><span class="lineno"> 563</span> <a class="code hl_class" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD<int64_t></a> hld(n);</div>
|
||||
<div class="line"><span class="lineno"> 564</span> hld.set_node_val(node_values);</div>
|
||||
@@ -339,22 +352,17 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 574</span> hld.update(p - 1, x);</div>
|
||||
<div class="line"><span class="lineno"> 575</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (type == 2) {</div>
|
||||
<div class="line"><span class="lineno"> 576</span> <span class="keywordtype">int</span> a = q[1], b = q[2];</div>
|
||||
<div class="line"><span class="lineno"> 577</span> code_result.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(hld.query(a - 1, b - 1));</div>
|
||||
<div class="line"><span class="lineno"> 577</span> code_result.push_back(hld.query(a - 1, b - 1));</div>
|
||||
<div class="line"><span class="lineno"> 578</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 579</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><span class="lineno"> 580</span> }</div>
|
||||
<div class="line"><span class="lineno"> 581</span> }</div>
|
||||
<div class="line"><span class="lineno"> 582</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < static_cast<int>(expected_result.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>()); i++) {</div>
|
||||
<div class="line"><span class="lineno"> 582</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < static_cast<int>(expected_result.size()); i++) {</div>
|
||||
<div class="line"><span class="lineno"> 583</span> assert(expected_result[i] == code_result[i]);</div>
|
||||
<div class="line"><span class="lineno"> 584</span> }</div>
|
||||
<div class="line"><span class="lineno"> 585</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\nTest2 passed!\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 585</span> std::cout << <span class="stringliteral">"\nTest2 passed!\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 586</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d2/de9/heavy__light__decomposition_8cpp_a458410412185a5f09199deaff7157a8d_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
|
||||
</div>
|
||||
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="af31ec5409537703d9c8a47350386b32a" name="af31ec5409537703d9c8a47350386b32a"></a>
|
||||
@@ -380,19 +388,21 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Third test implementations </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#l00592">592</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"> 592</span> {</div>
|
||||
<div class="line"><span class="lineno"> 593</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 3:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 593</span> std::cout << <span class="stringliteral">"Test 3:\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 594</span> </div>
|
||||
<div class="line"><span class="lineno"> 595</span> <span class="comment">// Test details</span></div>
|
||||
<div class="line"><span class="lineno"> 596</span> <span class="keywordtype">int</span> n = 8;</div>
|
||||
<div class="line"><span class="lineno"> 597</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int64_t></a> node_values = {1, 8, 6, 8, 6, 2, 9, 2};</div>
|
||||
<div class="line"><span class="lineno"> 598</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<int></a>> edges = {{1, 2}, {2, 3}, {3, 4}, {1, 5},</div>
|
||||
<div class="line"><span class="lineno"> 597</span> std::vector<int64_t> node_values = {1, 8, 6, 8, 6, 2, 9, 2};</div>
|
||||
<div class="line"><span class="lineno"> 598</span> std::vector<std::vector<int>> edges = {{1, 2}, {2, 3}, {3, 4}, {1, 5},</div>
|
||||
<div class="line"><span class="lineno"> 599</span> {6, 3}, {7, 5}, {8, 7}};</div>
|
||||
<div class="line"><span class="lineno"> 600</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<int></a>> queries = {</div>
|
||||
<div class="line"><span class="lineno"> 600</span> std::vector<std::vector<int>> queries = {</div>
|
||||
<div class="line"><span class="lineno"> 601</span> {2, 6, 8}, {2, 3, 6}, {1, 3, 4}, {2, 7, 1}, {1, 5, 3},</div>
|
||||
<div class="line"><span class="lineno"> 602</span> {1, 7, 8}, {2, 6, 4}, {2, 7, 8}, {1, 1, 4}, {1, 2, 7}};</div>
|
||||
<div class="line"><span class="lineno"> 603</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> expected_result = {34, 8, 16, 14, 10};</div>
|
||||
<div class="line"><span class="lineno"> 604</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> code_result;</div>
|
||||
<div class="line"><span class="lineno"> 603</span> std::vector<int> expected_result = {34, 8, 16, 14, 10};</div>
|
||||
<div class="line"><span class="lineno"> 604</span> std::vector<int> code_result;</div>
|
||||
<div class="line"><span class="lineno"> 605</span> </div>
|
||||
<div class="line"><span class="lineno"> 606</span> <a class="code hl_class" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD<int64_t></a> hld(n);</div>
|
||||
<div class="line"><span class="lineno"> 607</span> hld.set_node_val(node_values);</div>
|
||||
@@ -408,22 +418,17 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 617</span> hld.update(p - 1, x);</div>
|
||||
<div class="line"><span class="lineno"> 618</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (type == 2) {</div>
|
||||
<div class="line"><span class="lineno"> 619</span> <span class="keywordtype">int</span> a = q[1], b = q[2];</div>
|
||||
<div class="line"><span class="lineno"> 620</span> code_result.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(hld.query(a - 1, b - 1));</div>
|
||||
<div class="line"><span class="lineno"> 620</span> code_result.push_back(hld.query(a - 1, b - 1));</div>
|
||||
<div class="line"><span class="lineno"> 621</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 622</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><span class="lineno"> 623</span> }</div>
|
||||
<div class="line"><span class="lineno"> 624</span> }</div>
|
||||
<div class="line"><span class="lineno"> 625</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < static_cast<int>(expected_result.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>()); i++) {</div>
|
||||
<div class="line"><span class="lineno"> 625</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < static_cast<int>(expected_result.size()); i++) {</div>
|
||||
<div class="line"><span class="lineno"> 626</span> assert(expected_result[i] == code_result[i]);</div>
|
||||
<div class="line"><span class="lineno"> 627</span> }</div>
|
||||
<div class="line"><span class="lineno"> 628</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\nTest3 passed!\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 628</span> std::cout << <span class="stringliteral">"\nTest3 passed!\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 629</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d2/de9/heavy__light__decomposition_8cpp_af31ec5409537703d9c8a47350386b32a_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
|
||||
</div>
|
||||
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
<map id="test_1" name="test_1">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,420,63,446"/>
|
||||
<area shape="rect" id="Node000002" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d" title="Adds an undirected edge from node u to node v in the tree." alt="" coords="111,5,256,61"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="32,420,33,362,42,275,51,226,65,176,84,128,108,82,118,70,123,73,113,85,88,130,70,178,56,227,47,276,39,363,38,420"/>
|
||||
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="304,16,458,42"/>
|
||||
<area shape="poly" id="edge16_Node000001_Node000003" title=" " alt="" coords="32,420,33,368,41,292,51,251,64,209,83,169,109,132,303,52,323,45,324,50,305,57,112,137,88,171,69,211,56,252,47,293,38,369,37,420"/>
|
||||
<area shape="rect" id="Node000004" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828" title="This function must be called after the tree adjacency list and node values are populated The function..." alt="" coords="111,405,256,461"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="63,430,95,430,95,436,63,436"/>
|
||||
<area shape="rect" id="Node000012" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab" title="This function returns the sum of node values in the simple path from from node_1 to node_2." alt="" coords="111,147,256,202"/>
|
||||
<area shape="poly" id="edge17_Node000001_Node000012" title=" " alt="" coords="40,419,156,215,161,217,45,421"/>
|
||||
<area shape="rect" id="Node000017" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" title="Set the values for all the nodes." alt="" coords="111,499,256,554"/>
|
||||
<area shape="poly" id="edge23_Node000001_Node000017" title=" " alt="" coords="58,444,127,488,124,493,55,449"/>
|
||||
<area shape="rect" id="Node000018" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="324,670,439,695"/>
|
||||
<area shape="poly" id="edge25_Node000001_Node000018" title=" " alt="" coords="42,445,67,502,87,535,112,565,158,599,210,627,262,648,310,664,308,669,260,653,207,632,156,604,109,568,83,538,62,504,37,447"/>
|
||||
<area shape="rect" id="Node000019" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57" title="This function updates the value at node with val." alt="" coords="111,707,256,762"/>
|
||||
<area shape="poly" id="edge26_Node000001_Node000019" title=" " alt="" coords="41,446,67,527,88,581,113,635,151,693,147,696,108,637,83,583,62,529,36,447"/>
|
||||
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="256,29,288,28,289,34,256,34"/>
|
||||
<area shape="rect" id="Node000005" 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="506,212,652,268"/>
|
||||
<area shape="poly" id="edge4_Node000004_Node000005" title=" " alt="" coords="193,404,210,370,233,331,264,293,303,263,348,243,397,232,445,227,491,227,491,233,446,233,398,237,350,248,305,267,268,297,238,334,214,372,198,406"/>
|
||||
<area shape="rect" id="Node000006" 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 (-1 for a leaf node)" alt="" coords="308,301,454,357"/>
|
||||
<area shape="poly" id="edge5_Node000004_Node000006" title=" " alt="" coords="236,402,303,367,311,362,314,367,305,372,239,407"/>
|
||||
<area shape="rect" id="Node000007" 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="308,405,454,461"/>
|
||||
<area shape="poly" id="edge7_Node000004_Node000007" title=" " alt="" coords="256,430,293,430,293,436,256,436"/>
|
||||
<area shape="rect" id="Node000008" 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="308,589,454,645"/>
|
||||
<area shape="poly" id="edge9_Node000004_Node000008" title=" " alt="" coords="229,460,258,485,282,518,306,551,333,577,329,581,302,555,278,521,254,488,225,464"/>
|
||||
<area shape="rect" id="Node000009" 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="308,485,454,541"/>
|
||||
<area shape="poly" id="edge11_Node000004_Node000009" title=" " alt="" coords="255,459,298,477,296,482,253,464"/>
|
||||
<area shape="poly" id="edge6_Node000006_Node000006" title=" " alt="" coords="342,301,342,291,350,282,363,277,381,275,402,277,415,284,412,289,401,282,381,280,364,282,353,287,347,293,347,301"/>
|
||||
<area shape="poly" id="edge8_Node000007_Node000007" title=" " alt="" coords="342,405,342,395,350,386,363,381,381,379,402,381,415,388,412,393,401,386,381,384,364,386,353,391,347,397,347,405"/>
|
||||
<area shape="poly" id="edge10_Node000008_Node000008" title=" " alt="" coords="342,589,342,579,350,570,363,565,381,563,402,565,415,572,412,577,401,570,381,568,364,570,353,575,347,581,347,589"/>
|
||||
<area shape="rect" id="Node000010" 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="506,537,652,593"/>
|
||||
<area shape="poly" id="edge12_Node000009_Node000010" title=" " alt="" coords="455,530,492,540,491,545,453,535"/>
|
||||
<area shape="rect" id="Node000011" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" title="Utility function to compute sub-tree sizes." alt="" coords="506,433,652,489"/>
|
||||
<area shape="poly" id="edge14_Node000009_Node000011" title=" " alt="" coords="453,492,491,482,492,487,455,497"/>
|
||||
<area shape="poly" id="edge13_Node000010_Node000010" title=" " alt="" coords="540,537,540,527,547,518,560,513,579,511,600,513,613,520,610,525,598,518,579,516,562,518,551,523,545,529,545,537"/>
|
||||
<area shape="poly" id="edge15_Node000011_Node000011" title=" " alt="" coords="540,433,540,423,547,414,560,409,579,407,600,409,613,416,610,421,598,414,579,412,562,414,551,419,545,425,545,433"/>
|
||||
<area shape="rect" id="Node000013" 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="308,147,454,202"/>
|
||||
<area shape="poly" id="edge18_Node000012_Node000013" title=" " alt="" coords="256,172,293,172,293,177,256,177"/>
|
||||
<area shape="rect" id="Node000015" 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="308,67,454,122"/>
|
||||
<area shape="poly" id="edge21_Node000012_Node000015" title=" " alt="" coords="253,144,296,126,298,131,255,149"/>
|
||||
<area shape="poly" id="edge19_Node000013_Node000005" title=" " alt="" coords="455,196,492,208,491,214,453,201"/>
|
||||
<area shape="rect" id="Node000014" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="540,162,618,187"/>
|
||||
<area shape="poly" id="edge20_Node000013_Node000014" title=" " alt="" coords="454,172,524,172,524,177,454,177"/>
|
||||
<area shape="rect" id="Node000016" 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="506,67,652,122"/>
|
||||
<area shape="poly" id="edge22_Node000015_Node000016" title=" " alt="" coords="454,92,491,92,491,97,454,97"/>
|
||||
<area shape="poly" id="edge24_Node000017_Node000018" title=" " alt="" coords="216,553,258,597,280,628,290,642,306,655,314,660,311,665,302,659,286,645,276,632,254,600,212,557"/>
|
||||
<area shape="rect" id="Node000020" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c" title="Update the value at a node." alt="" coords="308,720,454,776"/>
|
||||
<area shape="poly" id="edge27_Node000019_Node000020" title=" " alt="" coords="256,737,294,739,293,745,256,742"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
edb2016c067a1e815a7f88ec910cc9a6
|
||||
@@ -1,550 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: test_1 Pages: 1 -->
|
||||
<!--zoomable 586 -->
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" onload="init(evt)">
|
||||
|
||||
<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>
|
||||
|
||||
<defs>
|
||||
<circle id="rim" cx="0" cy="0" r="7"/>
|
||||
<circle id="rim2" cx="0" cy="0" r="3.5"/>
|
||||
<g id="zoomPlus">
|
||||
<use xlink:href="#rim" fill="#404040"><set attributeName="fill" to="#808080" begin="zoomplus.mouseover" end="zoomplus.mouseout"/></use>
|
||||
<path d="M-4,0h8M0,-4v8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
|
||||
</g>
|
||||
<g id="zoomMin">
|
||||
<use xlink:href="#rim" fill="#404040"><set attributeName="fill" to="#808080" begin="zoomminus.mouseover" end="zoomminus.mouseout"/></use>
|
||||
<path d="M-4,0h8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
|
||||
</g>
|
||||
<g id="arrowUp" transform="translate(30 24)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowRight" transform="rotate(90) translate(36 -43)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowDown" transform="rotate(180) translate(-30 -48)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowLeft" transform="rotate(270) translate(-36 17)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="resetDef">
|
||||
<use xlink:href="#rim2" fill="#404040"><set attributeName="fill" to="#808080" begin="reset.mouseover" end="reset.mouseout"/></use>
|
||||
</g>
|
||||
</defs>
|
||||
<script type="application/ecmascript">
|
||||
var viewWidth = 493;
|
||||
var viewHeight = 586;
|
||||
var sectionId = 'dynsection-2';
|
||||
</script>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="viewport">
|
||||
<title>test_1</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="43,-266.5 0,-266.5 0,-247.25 43,-247.25 43,-266.5"/>
|
||||
<text text-anchor="middle" x="21.5" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">test_1</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d" target="_top" xlink:title="Adds an undirected edge from node u to node v in the tree.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-577.75 79,-577.75 79,-536 188,-536 188,-577.75"/>
|
||||
<text text-anchor="start" x="87" y="-564.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-553" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-541.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M22.17,-266.88C21.45,-303.74 23.17,-434.18 79,-518.88 81.13,-522.11 83.65,-525.16 86.4,-528.01"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="83.8,-530.38 93.55,-534.51 88.5,-525.19 83.8,-530.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="339.75,-569.5 224,-569.5 224,-550.25 339.75,-550.25 339.75,-569.5"/>
|
||||
<text text-anchor="middle" x="281.88" y="-556" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge16_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge16_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M22.06,-266.77C21.07,-300.92 22.35,-415.33 79,-480.88 81.85,-484.17 219.92,-539.35 224,-540.88 228.74,-542.64 233.72,-544.42 238.69,-546.15"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="237.42,-549.41 248.01,-549.32 239.68,-542.79 237.42,-549.41"/>
|
||||
</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#ae9e979edd69678b85665c01e2ee97828" 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="188,-277.75 79,-277.75 79,-236 188,-236 188,-277.75"/>
|
||||
<text text-anchor="start" x="87" y="-264.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-241.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M43.45,-256.88C50.47,-256.88 58.71,-256.88 67.3,-256.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="67.2,-260.38 77.2,-256.88 67.2,-253.38 67.2,-260.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab" target="_top" xlink:title="This function returns the sum of node values in the simple path from from node_1 to node_2.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-471.75 79,-471.75 79,-430 188,-430 188,-471.75"/>
|
||||
<text text-anchor="start" x="87" y="-458.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-435.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge17_Node000001_Node000012" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<g id="a_edge17_Node000001_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M28.11,-266.76C43.95,-294.7 89.53,-375.1 114.91,-419.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="111.73,-421.34 119.7,-428.31 117.82,-417.88 111.73,-421.34"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="Node000017" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_Node000017"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" target="_top" xlink:title="Set the values for all the nodes.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-207.75 79,-207.75 79,-166 188,-166 188,-207.75"/>
|
||||
<text text-anchor="start" x="87" y="-194.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-171.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node17 -->
|
||||
<g id="edge23_Node000001_Node000017" class="edge">
|
||||
<title>Node1->Node17</title>
|
||||
<g id="a_edge23_Node000001_Node000017"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M38.26,-246.85C51.72,-238.28 71.71,-225.56 89.83,-214.03"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="91.25,-217.27 97.81,-208.95 87.49,-211.37 91.25,-217.27"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="Node000018" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_Node000018"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="325.12,-79.5 238.62,-79.5 238.62,-60.25 325.12,-60.25 325.12,-79.5"/>
|
||||
<text text-anchor="middle" x="281.88" y="-66" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node18 -->
|
||||
<g id="edge25_Node000001_Node000018" class="edge">
|
||||
<title>Node1->Node18</title>
|
||||
<g id="a_edge25_Node000001_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M25.74,-247.05C32.63,-227.49 50.48,-183.31 79,-156.88 121.06,-117.89 183.3,-94.7 227.53,-82.19"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="228.18,-85.64 236.91,-79.63 226.34,-78.89 228.18,-85.64"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="Node000019" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_Node000019"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57" target="_top" xlink:title="This function updates the value at node with val.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-51.75 79,-51.75 79,-10 188,-10 188,-51.75"/>
|
||||
<text text-anchor="start" x="87" y="-38.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-27" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-15.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node19 -->
|
||||
<g id="edge26_Node000001_Node000019" class="edge">
|
||||
<title>Node1->Node19</title>
|
||||
<g id="a_edge26_Node000001_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M25.2,-246.88C32.12,-221.97 51.92,-155.52 79,-104.88 87.12,-89.69 97.98,-74.06 107.8,-61.11"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="110.42,-63.44 113.78,-53.39 104.89,-59.15 110.42,-63.44"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-557.98C196.05,-558.14 204.25,-558.3 212.37,-558.47"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="212.18,-561.97 222.25,-558.67 212.32,-554.97 212.18,-561.97"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><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="484.75,-422.75 375.75,-422.75 375.75,-381 484.75,-381 484.75,-422.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-409.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-398" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-386.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4_Node000004_Node000005" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<g id="a_edge4_Node000004_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M142.84,-278.2C155.51,-307.43 182.62,-359.03 224,-382.88 266.18,-407.18 321.48,-411.02 364.06,-409.28"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="364.12,-412.78 373.91,-408.75 363.74,-405.79 364.12,-412.78"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><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 (-1 for a leaf node)">
|
||||
<polygon fill="white" stroke="#666666" points="336.38,-355.75 227.38,-355.75 227.38,-314 336.38,-314 336.38,-355.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-342.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-331" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-319.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5_Node000004_Node000006" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<g id="a_edge5_Node000004_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M174.12,-278.2C189.66,-286.54 207.65,-296.18 224,-304.88 226.08,-305.98 228.2,-307.11 230.35,-308.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="228.65,-311.31 239.13,-312.9 231.93,-305.12 228.65,-311.31"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><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="336.38,-277.75 227.38,-277.75 227.38,-236 336.38,-236 336.38,-277.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-264.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-241.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge7_Node000004_Node000007" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<g id="a_edge7_Node000004_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-256.88C197.22,-256.88 206.7,-256.88 216,-256.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.69,-260.38 225.69,-256.88 215.69,-253.38 215.69,-260.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><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="336.38,-139.75 227.38,-139.75 227.38,-98 336.38,-98 336.38,-139.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-126.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-115" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge9_Node000004_Node000008" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<g id="a_edge9_Node000004_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M166.37,-235.54C173.84,-229.88 181.5,-223.49 188,-216.88 207.19,-197.34 205.4,-186.97 224,-166.88 230.17,-160.21 237.24,-153.58 244.26,-147.48"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="246.5,-150.17 251.88,-141.04 241.98,-144.82 246.5,-150.17"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><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="336.38,-217.75 227.38,-217.75 227.38,-176 336.38,-176 336.38,-217.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-204.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-193" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-181.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node9 -->
|
||||
<g id="edge11_Node000004_Node000009" class="edge">
|
||||
<title>Node4->Node9</title>
|
||||
<g id="a_edge11_Node000004_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M186.52,-235.55C196.87,-231.31 207.84,-226.81 218.5,-222.44"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="219.7,-225.73 227.62,-218.7 217.04,-219.26 219.7,-225.73"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6->Node6 -->
|
||||
<g id="edge6_Node000006_Node000006" class="edge">
|
||||
<title>Node6->Node6</title>
|
||||
<g id="a_edge6_Node000006_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-356.07C251.88,-365.55 261.01,-373.75 281.88,-373.75 293.94,-373.75 302.08,-371.01 306.29,-366.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-368.1 308.86,-357.53 302.84,-366.24 309.59,-368.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7->Node7 -->
|
||||
<g id="edge8_Node000007_Node000007" class="edge">
|
||||
<title>Node7->Node7</title>
|
||||
<g id="a_edge8_Node000007_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-278.07C251.88,-287.55 261.01,-295.75 281.88,-295.75 293.94,-295.75 302.08,-293.01 306.29,-288.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-290.1 308.86,-279.53 302.84,-288.24 309.59,-290.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node8 -->
|
||||
<g id="edge10_Node000008_Node000008" class="edge">
|
||||
<title>Node8->Node8</title>
|
||||
<g id="a_edge10_Node000008_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-140.07C251.88,-149.55 261.01,-157.75 281.88,-157.75 293.94,-157.75 302.08,-155.01 306.29,-150.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-152.1 308.86,-141.53 302.84,-150.24 309.59,-152.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><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="484.75,-178.75 375.75,-178.75 375.75,-137 484.75,-137 484.75,-178.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-165.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-154" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-142.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge12_Node000009_Node000010" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<g id="a_edge12_Node000009_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-182.57C345.7,-180.14 355.28,-177.58 364.68,-175.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="365.36,-178.52 374.12,-172.56 363.56,-171.76 365.36,-178.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><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-tree sizes.">
|
||||
<polygon fill="white" stroke="#666666" points="484.75,-256.75 375.75,-256.75 375.75,-215 484.75,-215 484.75,-256.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-243.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-232" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-220.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge14_Node000009_Node000011" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<g id="a_edge14_Node000009_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-211.18C345.7,-213.61 355.28,-216.17 364.68,-218.67"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="363.56,-221.99 374.12,-221.19 365.36,-215.23 363.56,-221.99"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node10 -->
|
||||
<g id="edge13_Node000010_Node000010" class="edge">
|
||||
<title>Node10->Node10</title>
|
||||
<g id="a_edge13_Node000010_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M402.86,-179.07C400.26,-188.55 409.38,-196.75 430.25,-196.75 442.31,-196.75 450.45,-194.01 454.67,-189.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="457.96,-191.1 457.23,-180.53 451.21,-189.24 457.96,-191.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node11 -->
|
||||
<g id="edge15_Node000011_Node000011" class="edge">
|
||||
<title>Node11->Node11</title>
|
||||
<g id="a_edge15_Node000011_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M402.86,-257.07C400.26,-266.55 409.38,-274.75 430.25,-274.75 442.31,-274.75 450.45,-272.01 454.67,-267.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="457.96,-269.1 457.23,-258.53 451.21,-267.24 457.96,-269.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><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="336.38,-471.75 227.38,-471.75 227.38,-430 336.38,-430 336.38,-471.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-458.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-435.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge18_Node000012_Node000013" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<g id="a_edge18_Node000012_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-450.88C197.22,-450.88 206.7,-450.88 216,-450.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.69,-454.38 225.69,-450.88 215.69,-447.38 215.69,-454.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="Node000015" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_Node000015"><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="336.38,-531.75 227.38,-531.75 227.38,-490 336.38,-490 336.38,-531.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-518.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-495.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node15 -->
|
||||
<g id="edge21_Node000012_Node000015" class="edge">
|
||||
<title>Node12->Node15</title>
|
||||
<g id="a_edge21_Node000012_Node000015"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M186.52,-472.2C196.87,-476.44 207.84,-480.94 218.5,-485.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="217.04,-488.49 227.62,-489.05 219.7,-482.02 217.04,-488.49"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node5 -->
|
||||
<g id="edge19_Node000013_Node000005" class="edge">
|
||||
<title>Node13->Node5</title>
|
||||
<g id="a_edge19_Node000013_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-432.91C345.7,-429.84 355.28,-426.64 364.68,-423.49"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="365.78,-426.81 374.15,-420.32 363.55,-420.18 365.78,-426.81"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="459.62,-460.5 400.88,-460.5 400.88,-441.25 459.62,-441.25 459.62,-460.5"/>
|
||||
<text text-anchor="middle" x="430.25" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node14 -->
|
||||
<g id="edge20_Node000013_Node000014" class="edge">
|
||||
<title>Node13->Node14</title>
|
||||
<g id="a_edge20_Node000013_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-450.88C354.01,-450.88 373.08,-450.88 389.35,-450.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="389.13,-454.38 399.13,-450.88 389.13,-447.38 389.13,-454.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="Node000016" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_Node000016"><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="484.75,-531.75 375.75,-531.75 375.75,-490 484.75,-490 484.75,-531.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-518.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-495.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15->Node16 -->
|
||||
<g id="edge22_Node000015_Node000016" class="edge">
|
||||
<title>Node15->Node16</title>
|
||||
<g id="a_edge22_Node000015_Node000016"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-510.88C345.6,-510.88 355.08,-510.88 364.37,-510.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="364.07,-514.38 374.07,-510.88 364.07,-507.38 364.07,-514.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17->Node18 -->
|
||||
<g id="edge24_Node000017_Node000018" class="edge">
|
||||
<title>Node17->Node18</title>
|
||||
<g id="a_edge24_Node000017_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M156.59,-165.52C166.43,-155.78 178.02,-143.96 188,-132.88 204.91,-114.1 203.2,-103.22 224,-88.88 226.09,-87.43 228.3,-86.1 230.58,-84.85"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="232.01,-88.05 239.58,-80.64 229.04,-81.71 232.01,-88.05"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node20 -->
|
||||
<g id="Node000020" class="node">
|
||||
<title>Node20</title>
|
||||
<g id="a_Node000020"><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="336.38,-41.75 227.38,-41.75 227.38,0 336.38,0 336.38,-41.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19->Node20 -->
|
||||
<g id="edge27_Node000019_Node000020" class="edge">
|
||||
<title>Node19->Node20</title>
|
||||
<g id="a_edge27_Node000019_Node000020"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-27.21C197.22,-26.59 206.7,-25.94 216,-25.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.96,-28.82 225.7,-24.64 215.48,-21.83 215.96,-28.82"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<g id="navigator" transform="translate(0 0)" fill="#404254">
|
||||
<rect fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width=".5" x="0" y="0" width="60" height="60"/>
|
||||
<use id="zoomplus" xlink:href="#zoomPlus" x="17" y="9" onmousedown="handleZoom(evt,'in')"/>
|
||||
<use id="zoomminus" xlink:href="#zoomMin" x="42" y="9" onmousedown="handleZoom(evt,'out')"/>
|
||||
<use id="reset" xlink:href="#resetDef" x="30" y="36" onmousedown="handleReset()"/>
|
||||
<use id="arrowup" xlink:href="#arrowUp" x="0" y="0" onmousedown="handlePan(0,-1)"/>
|
||||
<use id="arrowright" xlink:href="#arrowRight" x="0" y="0" onmousedown="handlePan(1,0)"/>
|
||||
<use id="arrowdown" xlink:href="#arrowDown" x="0" y="0" onmousedown="handlePan(0,1)"/>
|
||||
<use id="arrowleft" xlink:href="#arrowLeft" x="0" y="0" onmousedown="handlePan(-1,0)"/>
|
||||
</g>
|
||||
<svg viewBox="0 0 15 15" width="100%" height="30px" preserveAspectRatio="xMaxYMin meet">
|
||||
<g id="arrow_out" transform="scale(0.3 0.3)">
|
||||
<a xlink:href="heavy__light__decomposition_8cpp_a34b8683a2b429de5cce57e6d733ec817_cgraph_org.svg" target="_base">
|
||||
<rect id="button" ry="5" rx="5" y="6" x="6" height="38" width="38"
|
||||
fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width="1.0"/>
|
||||
<path id="arrow"
|
||||
d="M 11.500037,31.436501 C 11.940474,20.09759 22.043105,11.32322 32.158766,21.979434 L 37.068811,17.246167 C 37.068811,17.246167 37.088388,32 37.088388,32 L 22.160133,31.978069 C 22.160133,31.978069 26.997745,27.140456 26.997745,27.140456 C 18.528582,18.264221 13.291696,25.230495 11.500037,31.436501 z"
|
||||
style="fill:#404040;"/>
|
||||
</a>
|
||||
</g>
|
||||
</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: 30 KiB |
@@ -1,467 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: test_1 Pages: 1 -->
|
||||
<svg width="493pt" height="586pt"
|
||||
viewBox="0.00 0.00 492.75 585.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 581.75)">
|
||||
<title>test_1</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="43,-266.5 0,-266.5 0,-247.25 43,-247.25 43,-266.5"/>
|
||||
<text text-anchor="middle" x="21.5" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">test_1</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d" target="_top" xlink:title="Adds an undirected edge from node u to node v in the tree.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-577.75 79,-577.75 79,-536 188,-536 188,-577.75"/>
|
||||
<text text-anchor="start" x="87" y="-564.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-553" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-541.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M22.17,-266.88C21.45,-303.74 23.17,-434.18 79,-518.88 81.13,-522.11 83.65,-525.16 86.4,-528.01"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="83.8,-530.38 93.55,-534.51 88.5,-525.19 83.8,-530.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="339.75,-569.5 224,-569.5 224,-550.25 339.75,-550.25 339.75,-569.5"/>
|
||||
<text text-anchor="middle" x="281.88" y="-556" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge16_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge16_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M22.06,-266.77C21.07,-300.92 22.35,-415.33 79,-480.88 81.85,-484.17 219.92,-539.35 224,-540.88 228.74,-542.64 233.72,-544.42 238.69,-546.15"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="237.42,-549.41 248.01,-549.32 239.68,-542.79 237.42,-549.41"/>
|
||||
</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#ae9e979edd69678b85665c01e2ee97828" 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="188,-277.75 79,-277.75 79,-236 188,-236 188,-277.75"/>
|
||||
<text text-anchor="start" x="87" y="-264.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-241.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M43.45,-256.88C50.47,-256.88 58.71,-256.88 67.3,-256.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="67.2,-260.38 77.2,-256.88 67.2,-253.38 67.2,-260.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab" target="_top" xlink:title="This function returns the sum of node values in the simple path from from node_1 to node_2.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-471.75 79,-471.75 79,-430 188,-430 188,-471.75"/>
|
||||
<text text-anchor="start" x="87" y="-458.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-435.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge17_Node000001_Node000012" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<g id="a_edge17_Node000001_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M28.11,-266.76C43.95,-294.7 89.53,-375.1 114.91,-419.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="111.73,-421.34 119.7,-428.31 117.82,-417.88 111.73,-421.34"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="Node000017" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_Node000017"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" target="_top" xlink:title="Set the values for all the nodes.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-207.75 79,-207.75 79,-166 188,-166 188,-207.75"/>
|
||||
<text text-anchor="start" x="87" y="-194.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-171.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node17 -->
|
||||
<g id="edge23_Node000001_Node000017" class="edge">
|
||||
<title>Node1->Node17</title>
|
||||
<g id="a_edge23_Node000001_Node000017"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M38.26,-246.85C51.72,-238.28 71.71,-225.56 89.83,-214.03"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="91.25,-217.27 97.81,-208.95 87.49,-211.37 91.25,-217.27"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="Node000018" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_Node000018"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="325.12,-79.5 238.62,-79.5 238.62,-60.25 325.12,-60.25 325.12,-79.5"/>
|
||||
<text text-anchor="middle" x="281.88" y="-66" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node18 -->
|
||||
<g id="edge25_Node000001_Node000018" class="edge">
|
||||
<title>Node1->Node18</title>
|
||||
<g id="a_edge25_Node000001_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M25.74,-247.05C32.63,-227.49 50.48,-183.31 79,-156.88 121.06,-117.89 183.3,-94.7 227.53,-82.19"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="228.18,-85.64 236.91,-79.63 226.34,-78.89 228.18,-85.64"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="Node000019" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_Node000019"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57" target="_top" xlink:title="This function updates the value at node with val.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-51.75 79,-51.75 79,-10 188,-10 188,-51.75"/>
|
||||
<text text-anchor="start" x="87" y="-38.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-27" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-15.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node19 -->
|
||||
<g id="edge26_Node000001_Node000019" class="edge">
|
||||
<title>Node1->Node19</title>
|
||||
<g id="a_edge26_Node000001_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M25.2,-246.88C32.12,-221.97 51.92,-155.52 79,-104.88 87.12,-89.69 97.98,-74.06 107.8,-61.11"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="110.42,-63.44 113.78,-53.39 104.89,-59.15 110.42,-63.44"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-557.98C196.05,-558.14 204.25,-558.3 212.37,-558.47"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="212.18,-561.97 222.25,-558.67 212.32,-554.97 212.18,-561.97"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><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="484.75,-422.75 375.75,-422.75 375.75,-381 484.75,-381 484.75,-422.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-409.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-398" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-386.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4_Node000004_Node000005" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<g id="a_edge4_Node000004_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M142.84,-278.2C155.51,-307.43 182.62,-359.03 224,-382.88 266.18,-407.18 321.48,-411.02 364.06,-409.28"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="364.12,-412.78 373.91,-408.75 363.74,-405.79 364.12,-412.78"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><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 (-1 for a leaf node)">
|
||||
<polygon fill="white" stroke="#666666" points="336.38,-355.75 227.38,-355.75 227.38,-314 336.38,-314 336.38,-355.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-342.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-331" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-319.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5_Node000004_Node000006" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<g id="a_edge5_Node000004_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M174.12,-278.2C189.66,-286.54 207.65,-296.18 224,-304.88 226.08,-305.98 228.2,-307.11 230.35,-308.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="228.65,-311.31 239.13,-312.9 231.93,-305.12 228.65,-311.31"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><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="336.38,-277.75 227.38,-277.75 227.38,-236 336.38,-236 336.38,-277.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-264.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-241.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge7_Node000004_Node000007" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<g id="a_edge7_Node000004_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-256.88C197.22,-256.88 206.7,-256.88 216,-256.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.69,-260.38 225.69,-256.88 215.69,-253.38 215.69,-260.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><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="336.38,-139.75 227.38,-139.75 227.38,-98 336.38,-98 336.38,-139.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-126.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-115" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge9_Node000004_Node000008" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<g id="a_edge9_Node000004_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M166.37,-235.54C173.84,-229.88 181.5,-223.49 188,-216.88 207.19,-197.34 205.4,-186.97 224,-166.88 230.17,-160.21 237.24,-153.58 244.26,-147.48"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="246.5,-150.17 251.88,-141.04 241.98,-144.82 246.5,-150.17"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><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="336.38,-217.75 227.38,-217.75 227.38,-176 336.38,-176 336.38,-217.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-204.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-193" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-181.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node9 -->
|
||||
<g id="edge11_Node000004_Node000009" class="edge">
|
||||
<title>Node4->Node9</title>
|
||||
<g id="a_edge11_Node000004_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M186.52,-235.55C196.87,-231.31 207.84,-226.81 218.5,-222.44"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="219.7,-225.73 227.62,-218.7 217.04,-219.26 219.7,-225.73"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6->Node6 -->
|
||||
<g id="edge6_Node000006_Node000006" class="edge">
|
||||
<title>Node6->Node6</title>
|
||||
<g id="a_edge6_Node000006_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-356.07C251.88,-365.55 261.01,-373.75 281.88,-373.75 293.94,-373.75 302.08,-371.01 306.29,-366.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-368.1 308.86,-357.53 302.84,-366.24 309.59,-368.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7->Node7 -->
|
||||
<g id="edge8_Node000007_Node000007" class="edge">
|
||||
<title>Node7->Node7</title>
|
||||
<g id="a_edge8_Node000007_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-278.07C251.88,-287.55 261.01,-295.75 281.88,-295.75 293.94,-295.75 302.08,-293.01 306.29,-288.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-290.1 308.86,-279.53 302.84,-288.24 309.59,-290.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node8 -->
|
||||
<g id="edge10_Node000008_Node000008" class="edge">
|
||||
<title>Node8->Node8</title>
|
||||
<g id="a_edge10_Node000008_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-140.07C251.88,-149.55 261.01,-157.75 281.88,-157.75 293.94,-157.75 302.08,-155.01 306.29,-150.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-152.1 308.86,-141.53 302.84,-150.24 309.59,-152.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><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="484.75,-178.75 375.75,-178.75 375.75,-137 484.75,-137 484.75,-178.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-165.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-154" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-142.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge12_Node000009_Node000010" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<g id="a_edge12_Node000009_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-182.57C345.7,-180.14 355.28,-177.58 364.68,-175.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="365.36,-178.52 374.12,-172.56 363.56,-171.76 365.36,-178.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><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-tree sizes.">
|
||||
<polygon fill="white" stroke="#666666" points="484.75,-256.75 375.75,-256.75 375.75,-215 484.75,-215 484.75,-256.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-243.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-232" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-220.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge14_Node000009_Node000011" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<g id="a_edge14_Node000009_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-211.18C345.7,-213.61 355.28,-216.17 364.68,-218.67"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="363.56,-221.99 374.12,-221.19 365.36,-215.23 363.56,-221.99"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node10 -->
|
||||
<g id="edge13_Node000010_Node000010" class="edge">
|
||||
<title>Node10->Node10</title>
|
||||
<g id="a_edge13_Node000010_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M402.86,-179.07C400.26,-188.55 409.38,-196.75 430.25,-196.75 442.31,-196.75 450.45,-194.01 454.67,-189.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="457.96,-191.1 457.23,-180.53 451.21,-189.24 457.96,-191.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node11 -->
|
||||
<g id="edge15_Node000011_Node000011" class="edge">
|
||||
<title>Node11->Node11</title>
|
||||
<g id="a_edge15_Node000011_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M402.86,-257.07C400.26,-266.55 409.38,-274.75 430.25,-274.75 442.31,-274.75 450.45,-272.01 454.67,-267.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="457.96,-269.1 457.23,-258.53 451.21,-267.24 457.96,-269.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><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="336.38,-471.75 227.38,-471.75 227.38,-430 336.38,-430 336.38,-471.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-458.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-435.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge18_Node000012_Node000013" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<g id="a_edge18_Node000012_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-450.88C197.22,-450.88 206.7,-450.88 216,-450.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.69,-454.38 225.69,-450.88 215.69,-447.38 215.69,-454.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="Node000015" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_Node000015"><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="336.38,-531.75 227.38,-531.75 227.38,-490 336.38,-490 336.38,-531.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-518.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-495.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node15 -->
|
||||
<g id="edge21_Node000012_Node000015" class="edge">
|
||||
<title>Node12->Node15</title>
|
||||
<g id="a_edge21_Node000012_Node000015"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M186.52,-472.2C196.87,-476.44 207.84,-480.94 218.5,-485.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="217.04,-488.49 227.62,-489.05 219.7,-482.02 217.04,-488.49"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node5 -->
|
||||
<g id="edge19_Node000013_Node000005" class="edge">
|
||||
<title>Node13->Node5</title>
|
||||
<g id="a_edge19_Node000013_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-432.91C345.7,-429.84 355.28,-426.64 364.68,-423.49"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="365.78,-426.81 374.15,-420.32 363.55,-420.18 365.78,-426.81"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="459.62,-460.5 400.88,-460.5 400.88,-441.25 459.62,-441.25 459.62,-460.5"/>
|
||||
<text text-anchor="middle" x="430.25" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node14 -->
|
||||
<g id="edge20_Node000013_Node000014" class="edge">
|
||||
<title>Node13->Node14</title>
|
||||
<g id="a_edge20_Node000013_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-450.88C354.01,-450.88 373.08,-450.88 389.35,-450.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="389.13,-454.38 399.13,-450.88 389.13,-447.38 389.13,-454.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="Node000016" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_Node000016"><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="484.75,-531.75 375.75,-531.75 375.75,-490 484.75,-490 484.75,-531.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-518.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-495.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15->Node16 -->
|
||||
<g id="edge22_Node000015_Node000016" class="edge">
|
||||
<title>Node15->Node16</title>
|
||||
<g id="a_edge22_Node000015_Node000016"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-510.88C345.6,-510.88 355.08,-510.88 364.37,-510.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="364.07,-514.38 374.07,-510.88 364.07,-507.38 364.07,-514.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17->Node18 -->
|
||||
<g id="edge24_Node000017_Node000018" class="edge">
|
||||
<title>Node17->Node18</title>
|
||||
<g id="a_edge24_Node000017_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M156.59,-165.52C166.43,-155.78 178.02,-143.96 188,-132.88 204.91,-114.1 203.2,-103.22 224,-88.88 226.09,-87.43 228.3,-86.1 230.58,-84.85"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="232.01,-88.05 239.58,-80.64 229.04,-81.71 232.01,-88.05"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node20 -->
|
||||
<g id="Node000020" class="node">
|
||||
<title>Node20</title>
|
||||
<g id="a_Node000020"><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="336.38,-41.75 227.38,-41.75 227.38,0 336.38,0 336.38,-41.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19->Node20 -->
|
||||
<g id="edge27_Node000019_Node000020" class="edge">
|
||||
<title>Node19->Node20</title>
|
||||
<g id="a_edge27_Node000019_Node000020"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-27.21C197.22,-26.59 206.7,-25.94 216,-25.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.96,-28.82 225.7,-24.64 215.48,-21.83 215.96,-28.82"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 26 KiB |
@@ -1,49 +0,0 @@
|
||||
<map id="test_2" name="test_2">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,420,63,446"/>
|
||||
<area shape="rect" id="Node000002" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d" title="Adds an undirected edge from node u to node v in the tree." alt="" coords="111,5,256,61"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="32,420,33,362,42,275,51,226,65,176,84,128,108,82,118,70,123,73,113,85,88,130,70,178,56,227,47,276,39,363,38,420"/>
|
||||
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="304,16,458,42"/>
|
||||
<area shape="poly" id="edge16_Node000001_Node000003" title=" " alt="" coords="32,420,33,368,41,292,51,251,64,209,83,169,109,132,303,52,323,45,324,50,305,57,112,137,88,171,69,211,56,252,47,293,38,369,37,420"/>
|
||||
<area shape="rect" id="Node000004" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828" title="This function must be called after the tree adjacency list and node values are populated The function..." alt="" coords="111,405,256,461"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="63,430,95,430,95,436,63,436"/>
|
||||
<area shape="rect" id="Node000012" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab" title="This function returns the sum of node values in the simple path from from node_1 to node_2." alt="" coords="111,147,256,202"/>
|
||||
<area shape="poly" id="edge17_Node000001_Node000012" title=" " alt="" coords="40,419,156,215,161,217,45,421"/>
|
||||
<area shape="rect" id="Node000017" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" title="Set the values for all the nodes." alt="" coords="111,499,256,554"/>
|
||||
<area shape="poly" id="edge23_Node000001_Node000017" title=" " alt="" coords="58,444,127,488,124,493,55,449"/>
|
||||
<area shape="rect" id="Node000018" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="324,670,439,695"/>
|
||||
<area shape="poly" id="edge25_Node000001_Node000018" title=" " alt="" coords="42,445,67,502,87,535,112,565,158,599,210,627,262,648,310,664,308,669,260,653,207,632,156,604,109,568,83,538,62,504,37,447"/>
|
||||
<area shape="rect" id="Node000019" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57" title="This function updates the value at node with val." alt="" coords="111,707,256,762"/>
|
||||
<area shape="poly" id="edge26_Node000001_Node000019" title=" " alt="" coords="41,446,67,527,88,581,113,635,151,693,147,696,108,637,83,583,62,529,36,447"/>
|
||||
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="256,29,288,28,289,34,256,34"/>
|
||||
<area shape="rect" id="Node000005" 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="506,212,652,268"/>
|
||||
<area shape="poly" id="edge4_Node000004_Node000005" title=" " alt="" coords="193,404,210,370,233,331,264,293,303,263,348,243,397,232,445,227,491,227,491,233,446,233,398,237,350,248,305,267,268,297,238,334,214,372,198,406"/>
|
||||
<area shape="rect" id="Node000006" 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 (-1 for a leaf node)" alt="" coords="308,301,454,357"/>
|
||||
<area shape="poly" id="edge5_Node000004_Node000006" title=" " alt="" coords="236,402,303,367,311,362,314,367,305,372,239,407"/>
|
||||
<area shape="rect" id="Node000007" 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="308,405,454,461"/>
|
||||
<area shape="poly" id="edge7_Node000004_Node000007" title=" " alt="" coords="256,430,293,430,293,436,256,436"/>
|
||||
<area shape="rect" id="Node000008" 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="308,589,454,645"/>
|
||||
<area shape="poly" id="edge9_Node000004_Node000008" title=" " alt="" coords="229,460,258,485,282,518,306,551,333,577,329,581,302,555,278,521,254,488,225,464"/>
|
||||
<area shape="rect" id="Node000009" 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="308,485,454,541"/>
|
||||
<area shape="poly" id="edge11_Node000004_Node000009" title=" " alt="" coords="255,459,298,477,296,482,253,464"/>
|
||||
<area shape="poly" id="edge6_Node000006_Node000006" title=" " alt="" coords="342,301,342,291,350,282,363,277,381,275,402,277,415,284,412,289,401,282,381,280,364,282,353,287,347,293,347,301"/>
|
||||
<area shape="poly" id="edge8_Node000007_Node000007" title=" " alt="" coords="342,405,342,395,350,386,363,381,381,379,402,381,415,388,412,393,401,386,381,384,364,386,353,391,347,397,347,405"/>
|
||||
<area shape="poly" id="edge10_Node000008_Node000008" title=" " alt="" coords="342,589,342,579,350,570,363,565,381,563,402,565,415,572,412,577,401,570,381,568,364,570,353,575,347,581,347,589"/>
|
||||
<area shape="rect" id="Node000010" 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="506,537,652,593"/>
|
||||
<area shape="poly" id="edge12_Node000009_Node000010" title=" " alt="" coords="455,530,492,540,491,545,453,535"/>
|
||||
<area shape="rect" id="Node000011" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" title="Utility function to compute sub-tree sizes." alt="" coords="506,433,652,489"/>
|
||||
<area shape="poly" id="edge14_Node000009_Node000011" title=" " alt="" coords="453,492,491,482,492,487,455,497"/>
|
||||
<area shape="poly" id="edge13_Node000010_Node000010" title=" " alt="" coords="540,537,540,527,547,518,560,513,579,511,600,513,613,520,610,525,598,518,579,516,562,518,551,523,545,529,545,537"/>
|
||||
<area shape="poly" id="edge15_Node000011_Node000011" title=" " alt="" coords="540,433,540,423,547,414,560,409,579,407,600,409,613,416,610,421,598,414,579,412,562,414,551,419,545,425,545,433"/>
|
||||
<area shape="rect" id="Node000013" 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="308,147,454,202"/>
|
||||
<area shape="poly" id="edge18_Node000012_Node000013" title=" " alt="" coords="256,172,293,172,293,177,256,177"/>
|
||||
<area shape="rect" id="Node000015" 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="308,67,454,122"/>
|
||||
<area shape="poly" id="edge21_Node000012_Node000015" title=" " alt="" coords="253,144,296,126,298,131,255,149"/>
|
||||
<area shape="poly" id="edge19_Node000013_Node000005" title=" " alt="" coords="455,196,492,208,491,214,453,201"/>
|
||||
<area shape="rect" id="Node000014" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="540,162,618,187"/>
|
||||
<area shape="poly" id="edge20_Node000013_Node000014" title=" " alt="" coords="454,172,524,172,524,177,454,177"/>
|
||||
<area shape="rect" id="Node000016" 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="506,67,652,122"/>
|
||||
<area shape="poly" id="edge22_Node000015_Node000016" title=" " alt="" coords="454,92,491,92,491,97,454,97"/>
|
||||
<area shape="poly" id="edge24_Node000017_Node000018" title=" " alt="" coords="216,553,258,597,280,628,290,642,306,655,314,660,311,665,302,659,286,645,276,632,254,600,212,557"/>
|
||||
<area shape="rect" id="Node000020" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c" title="Update the value at a node." alt="" coords="308,720,454,776"/>
|
||||
<area shape="poly" id="edge27_Node000019_Node000020" title=" " alt="" coords="256,737,294,739,293,745,256,742"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
8ecad942a5bceec4383a81337820d2ec
|
||||
@@ -1,550 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: test_2 Pages: 1 -->
|
||||
<!--zoomable 586 -->
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" onload="init(evt)">
|
||||
|
||||
<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>
|
||||
|
||||
<defs>
|
||||
<circle id="rim" cx="0" cy="0" r="7"/>
|
||||
<circle id="rim2" cx="0" cy="0" r="3.5"/>
|
||||
<g id="zoomPlus">
|
||||
<use xlink:href="#rim" fill="#404040"><set attributeName="fill" to="#808080" begin="zoomplus.mouseover" end="zoomplus.mouseout"/></use>
|
||||
<path d="M-4,0h8M0,-4v8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
|
||||
</g>
|
||||
<g id="zoomMin">
|
||||
<use xlink:href="#rim" fill="#404040"><set attributeName="fill" to="#808080" begin="zoomminus.mouseover" end="zoomminus.mouseout"/></use>
|
||||
<path d="M-4,0h8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
|
||||
</g>
|
||||
<g id="arrowUp" transform="translate(30 24)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowRight" transform="rotate(90) translate(36 -43)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowDown" transform="rotate(180) translate(-30 -48)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowLeft" transform="rotate(270) translate(-36 17)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="resetDef">
|
||||
<use xlink:href="#rim2" fill="#404040"><set attributeName="fill" to="#808080" begin="reset.mouseover" end="reset.mouseout"/></use>
|
||||
</g>
|
||||
</defs>
|
||||
<script type="application/ecmascript">
|
||||
var viewWidth = 493;
|
||||
var viewHeight = 586;
|
||||
var sectionId = 'dynsection-3';
|
||||
</script>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="viewport">
|
||||
<title>test_2</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="43,-266.5 0,-266.5 0,-247.25 43,-247.25 43,-266.5"/>
|
||||
<text text-anchor="middle" x="21.5" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">test_2</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d" target="_top" xlink:title="Adds an undirected edge from node u to node v in the tree.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-577.75 79,-577.75 79,-536 188,-536 188,-577.75"/>
|
||||
<text text-anchor="start" x="87" y="-564.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-553" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-541.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M22.17,-266.88C21.45,-303.74 23.17,-434.18 79,-518.88 81.13,-522.11 83.65,-525.16 86.4,-528.01"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="83.8,-530.38 93.55,-534.51 88.5,-525.19 83.8,-530.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="339.75,-569.5 224,-569.5 224,-550.25 339.75,-550.25 339.75,-569.5"/>
|
||||
<text text-anchor="middle" x="281.88" y="-556" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge16_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge16_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M22.06,-266.77C21.07,-300.92 22.35,-415.33 79,-480.88 81.85,-484.17 219.92,-539.35 224,-540.88 228.74,-542.64 233.72,-544.42 238.69,-546.15"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="237.42,-549.41 248.01,-549.32 239.68,-542.79 237.42,-549.41"/>
|
||||
</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#ae9e979edd69678b85665c01e2ee97828" 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="188,-277.75 79,-277.75 79,-236 188,-236 188,-277.75"/>
|
||||
<text text-anchor="start" x="87" y="-264.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-241.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M43.45,-256.88C50.47,-256.88 58.71,-256.88 67.3,-256.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="67.2,-260.38 77.2,-256.88 67.2,-253.38 67.2,-260.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab" target="_top" xlink:title="This function returns the sum of node values in the simple path from from node_1 to node_2.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-471.75 79,-471.75 79,-430 188,-430 188,-471.75"/>
|
||||
<text text-anchor="start" x="87" y="-458.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-435.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge17_Node000001_Node000012" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<g id="a_edge17_Node000001_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M28.11,-266.76C43.95,-294.7 89.53,-375.1 114.91,-419.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="111.73,-421.34 119.7,-428.31 117.82,-417.88 111.73,-421.34"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="Node000017" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_Node000017"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" target="_top" xlink:title="Set the values for all the nodes.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-207.75 79,-207.75 79,-166 188,-166 188,-207.75"/>
|
||||
<text text-anchor="start" x="87" y="-194.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-171.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node17 -->
|
||||
<g id="edge23_Node000001_Node000017" class="edge">
|
||||
<title>Node1->Node17</title>
|
||||
<g id="a_edge23_Node000001_Node000017"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M38.26,-246.85C51.72,-238.28 71.71,-225.56 89.83,-214.03"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="91.25,-217.27 97.81,-208.95 87.49,-211.37 91.25,-217.27"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="Node000018" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_Node000018"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="325.12,-79.5 238.62,-79.5 238.62,-60.25 325.12,-60.25 325.12,-79.5"/>
|
||||
<text text-anchor="middle" x="281.88" y="-66" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node18 -->
|
||||
<g id="edge25_Node000001_Node000018" class="edge">
|
||||
<title>Node1->Node18</title>
|
||||
<g id="a_edge25_Node000001_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M25.74,-247.05C32.63,-227.49 50.48,-183.31 79,-156.88 121.06,-117.89 183.3,-94.7 227.53,-82.19"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="228.18,-85.64 236.91,-79.63 226.34,-78.89 228.18,-85.64"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="Node000019" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_Node000019"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57" target="_top" xlink:title="This function updates the value at node with val.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-51.75 79,-51.75 79,-10 188,-10 188,-51.75"/>
|
||||
<text text-anchor="start" x="87" y="-38.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-27" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-15.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node19 -->
|
||||
<g id="edge26_Node000001_Node000019" class="edge">
|
||||
<title>Node1->Node19</title>
|
||||
<g id="a_edge26_Node000001_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M25.2,-246.88C32.12,-221.97 51.92,-155.52 79,-104.88 87.12,-89.69 97.98,-74.06 107.8,-61.11"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="110.42,-63.44 113.78,-53.39 104.89,-59.15 110.42,-63.44"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-557.98C196.05,-558.14 204.25,-558.3 212.37,-558.47"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="212.18,-561.97 222.25,-558.67 212.32,-554.97 212.18,-561.97"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><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="484.75,-422.75 375.75,-422.75 375.75,-381 484.75,-381 484.75,-422.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-409.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-398" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-386.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4_Node000004_Node000005" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<g id="a_edge4_Node000004_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M142.84,-278.2C155.51,-307.43 182.62,-359.03 224,-382.88 266.18,-407.18 321.48,-411.02 364.06,-409.28"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="364.12,-412.78 373.91,-408.75 363.74,-405.79 364.12,-412.78"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><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 (-1 for a leaf node)">
|
||||
<polygon fill="white" stroke="#666666" points="336.38,-355.75 227.38,-355.75 227.38,-314 336.38,-314 336.38,-355.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-342.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-331" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-319.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5_Node000004_Node000006" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<g id="a_edge5_Node000004_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M174.12,-278.2C189.66,-286.54 207.65,-296.18 224,-304.88 226.08,-305.98 228.2,-307.11 230.35,-308.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="228.65,-311.31 239.13,-312.9 231.93,-305.12 228.65,-311.31"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><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="336.38,-277.75 227.38,-277.75 227.38,-236 336.38,-236 336.38,-277.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-264.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-241.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge7_Node000004_Node000007" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<g id="a_edge7_Node000004_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-256.88C197.22,-256.88 206.7,-256.88 216,-256.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.69,-260.38 225.69,-256.88 215.69,-253.38 215.69,-260.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><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="336.38,-139.75 227.38,-139.75 227.38,-98 336.38,-98 336.38,-139.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-126.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-115" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge9_Node000004_Node000008" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<g id="a_edge9_Node000004_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M166.37,-235.54C173.84,-229.88 181.5,-223.49 188,-216.88 207.19,-197.34 205.4,-186.97 224,-166.88 230.17,-160.21 237.24,-153.58 244.26,-147.48"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="246.5,-150.17 251.88,-141.04 241.98,-144.82 246.5,-150.17"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><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="336.38,-217.75 227.38,-217.75 227.38,-176 336.38,-176 336.38,-217.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-204.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-193" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-181.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node9 -->
|
||||
<g id="edge11_Node000004_Node000009" class="edge">
|
||||
<title>Node4->Node9</title>
|
||||
<g id="a_edge11_Node000004_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M186.52,-235.55C196.87,-231.31 207.84,-226.81 218.5,-222.44"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="219.7,-225.73 227.62,-218.7 217.04,-219.26 219.7,-225.73"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6->Node6 -->
|
||||
<g id="edge6_Node000006_Node000006" class="edge">
|
||||
<title>Node6->Node6</title>
|
||||
<g id="a_edge6_Node000006_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-356.07C251.88,-365.55 261.01,-373.75 281.88,-373.75 293.94,-373.75 302.08,-371.01 306.29,-366.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-368.1 308.86,-357.53 302.84,-366.24 309.59,-368.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7->Node7 -->
|
||||
<g id="edge8_Node000007_Node000007" class="edge">
|
||||
<title>Node7->Node7</title>
|
||||
<g id="a_edge8_Node000007_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-278.07C251.88,-287.55 261.01,-295.75 281.88,-295.75 293.94,-295.75 302.08,-293.01 306.29,-288.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-290.1 308.86,-279.53 302.84,-288.24 309.59,-290.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node8 -->
|
||||
<g id="edge10_Node000008_Node000008" class="edge">
|
||||
<title>Node8->Node8</title>
|
||||
<g id="a_edge10_Node000008_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-140.07C251.88,-149.55 261.01,-157.75 281.88,-157.75 293.94,-157.75 302.08,-155.01 306.29,-150.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-152.1 308.86,-141.53 302.84,-150.24 309.59,-152.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><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="484.75,-178.75 375.75,-178.75 375.75,-137 484.75,-137 484.75,-178.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-165.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-154" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-142.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge12_Node000009_Node000010" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<g id="a_edge12_Node000009_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-182.57C345.7,-180.14 355.28,-177.58 364.68,-175.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="365.36,-178.52 374.12,-172.56 363.56,-171.76 365.36,-178.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><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-tree sizes.">
|
||||
<polygon fill="white" stroke="#666666" points="484.75,-256.75 375.75,-256.75 375.75,-215 484.75,-215 484.75,-256.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-243.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-232" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-220.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge14_Node000009_Node000011" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<g id="a_edge14_Node000009_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-211.18C345.7,-213.61 355.28,-216.17 364.68,-218.67"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="363.56,-221.99 374.12,-221.19 365.36,-215.23 363.56,-221.99"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node10 -->
|
||||
<g id="edge13_Node000010_Node000010" class="edge">
|
||||
<title>Node10->Node10</title>
|
||||
<g id="a_edge13_Node000010_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M402.86,-179.07C400.26,-188.55 409.38,-196.75 430.25,-196.75 442.31,-196.75 450.45,-194.01 454.67,-189.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="457.96,-191.1 457.23,-180.53 451.21,-189.24 457.96,-191.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node11 -->
|
||||
<g id="edge15_Node000011_Node000011" class="edge">
|
||||
<title>Node11->Node11</title>
|
||||
<g id="a_edge15_Node000011_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M402.86,-257.07C400.26,-266.55 409.38,-274.75 430.25,-274.75 442.31,-274.75 450.45,-272.01 454.67,-267.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="457.96,-269.1 457.23,-258.53 451.21,-267.24 457.96,-269.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><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="336.38,-471.75 227.38,-471.75 227.38,-430 336.38,-430 336.38,-471.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-458.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-435.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge18_Node000012_Node000013" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<g id="a_edge18_Node000012_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-450.88C197.22,-450.88 206.7,-450.88 216,-450.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.69,-454.38 225.69,-450.88 215.69,-447.38 215.69,-454.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="Node000015" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_Node000015"><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="336.38,-531.75 227.38,-531.75 227.38,-490 336.38,-490 336.38,-531.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-518.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-495.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node15 -->
|
||||
<g id="edge21_Node000012_Node000015" class="edge">
|
||||
<title>Node12->Node15</title>
|
||||
<g id="a_edge21_Node000012_Node000015"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M186.52,-472.2C196.87,-476.44 207.84,-480.94 218.5,-485.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="217.04,-488.49 227.62,-489.05 219.7,-482.02 217.04,-488.49"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node5 -->
|
||||
<g id="edge19_Node000013_Node000005" class="edge">
|
||||
<title>Node13->Node5</title>
|
||||
<g id="a_edge19_Node000013_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-432.91C345.7,-429.84 355.28,-426.64 364.68,-423.49"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="365.78,-426.81 374.15,-420.32 363.55,-420.18 365.78,-426.81"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="459.62,-460.5 400.88,-460.5 400.88,-441.25 459.62,-441.25 459.62,-460.5"/>
|
||||
<text text-anchor="middle" x="430.25" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node14 -->
|
||||
<g id="edge20_Node000013_Node000014" class="edge">
|
||||
<title>Node13->Node14</title>
|
||||
<g id="a_edge20_Node000013_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-450.88C354.01,-450.88 373.08,-450.88 389.35,-450.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="389.13,-454.38 399.13,-450.88 389.13,-447.38 389.13,-454.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="Node000016" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_Node000016"><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="484.75,-531.75 375.75,-531.75 375.75,-490 484.75,-490 484.75,-531.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-518.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-495.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15->Node16 -->
|
||||
<g id="edge22_Node000015_Node000016" class="edge">
|
||||
<title>Node15->Node16</title>
|
||||
<g id="a_edge22_Node000015_Node000016"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-510.88C345.6,-510.88 355.08,-510.88 364.37,-510.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="364.07,-514.38 374.07,-510.88 364.07,-507.38 364.07,-514.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17->Node18 -->
|
||||
<g id="edge24_Node000017_Node000018" class="edge">
|
||||
<title>Node17->Node18</title>
|
||||
<g id="a_edge24_Node000017_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M156.59,-165.52C166.43,-155.78 178.02,-143.96 188,-132.88 204.91,-114.1 203.2,-103.22 224,-88.88 226.09,-87.43 228.3,-86.1 230.58,-84.85"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="232.01,-88.05 239.58,-80.64 229.04,-81.71 232.01,-88.05"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node20 -->
|
||||
<g id="Node000020" class="node">
|
||||
<title>Node20</title>
|
||||
<g id="a_Node000020"><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="336.38,-41.75 227.38,-41.75 227.38,0 336.38,0 336.38,-41.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19->Node20 -->
|
||||
<g id="edge27_Node000019_Node000020" class="edge">
|
||||
<title>Node19->Node20</title>
|
||||
<g id="a_edge27_Node000019_Node000020"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-27.21C197.22,-26.59 206.7,-25.94 216,-25.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.96,-28.82 225.7,-24.64 215.48,-21.83 215.96,-28.82"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<g id="navigator" transform="translate(0 0)" fill="#404254">
|
||||
<rect fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width=".5" x="0" y="0" width="60" height="60"/>
|
||||
<use id="zoomplus" xlink:href="#zoomPlus" x="17" y="9" onmousedown="handleZoom(evt,'in')"/>
|
||||
<use id="zoomminus" xlink:href="#zoomMin" x="42" y="9" onmousedown="handleZoom(evt,'out')"/>
|
||||
<use id="reset" xlink:href="#resetDef" x="30" y="36" onmousedown="handleReset()"/>
|
||||
<use id="arrowup" xlink:href="#arrowUp" x="0" y="0" onmousedown="handlePan(0,-1)"/>
|
||||
<use id="arrowright" xlink:href="#arrowRight" x="0" y="0" onmousedown="handlePan(1,0)"/>
|
||||
<use id="arrowdown" xlink:href="#arrowDown" x="0" y="0" onmousedown="handlePan(0,1)"/>
|
||||
<use id="arrowleft" xlink:href="#arrowLeft" x="0" y="0" onmousedown="handlePan(-1,0)"/>
|
||||
</g>
|
||||
<svg viewBox="0 0 15 15" width="100%" height="30px" preserveAspectRatio="xMaxYMin meet">
|
||||
<g id="arrow_out" transform="scale(0.3 0.3)">
|
||||
<a xlink:href="heavy__light__decomposition_8cpp_a458410412185a5f09199deaff7157a8d_cgraph_org.svg" target="_base">
|
||||
<rect id="button" ry="5" rx="5" y="6" x="6" height="38" width="38"
|
||||
fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width="1.0"/>
|
||||
<path id="arrow"
|
||||
d="M 11.500037,31.436501 C 11.940474,20.09759 22.043105,11.32322 32.158766,21.979434 L 37.068811,17.246167 C 37.068811,17.246167 37.088388,32 37.088388,32 L 22.160133,31.978069 C 22.160133,31.978069 26.997745,27.140456 26.997745,27.140456 C 18.528582,18.264221 13.291696,25.230495 11.500037,31.436501 z"
|
||||
style="fill:#404040;"/>
|
||||
</a>
|
||||
</g>
|
||||
</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: 30 KiB |
@@ -1,467 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: test_2 Pages: 1 -->
|
||||
<svg width="493pt" height="586pt"
|
||||
viewBox="0.00 0.00 492.75 585.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 581.75)">
|
||||
<title>test_2</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="43,-266.5 0,-266.5 0,-247.25 43,-247.25 43,-266.5"/>
|
||||
<text text-anchor="middle" x="21.5" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">test_2</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d" target="_top" xlink:title="Adds an undirected edge from node u to node v in the tree.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-577.75 79,-577.75 79,-536 188,-536 188,-577.75"/>
|
||||
<text text-anchor="start" x="87" y="-564.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-553" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-541.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M22.17,-266.88C21.45,-303.74 23.17,-434.18 79,-518.88 81.13,-522.11 83.65,-525.16 86.4,-528.01"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="83.8,-530.38 93.55,-534.51 88.5,-525.19 83.8,-530.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="339.75,-569.5 224,-569.5 224,-550.25 339.75,-550.25 339.75,-569.5"/>
|
||||
<text text-anchor="middle" x="281.88" y="-556" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge16_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge16_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M22.06,-266.77C21.07,-300.92 22.35,-415.33 79,-480.88 81.85,-484.17 219.92,-539.35 224,-540.88 228.74,-542.64 233.72,-544.42 238.69,-546.15"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="237.42,-549.41 248.01,-549.32 239.68,-542.79 237.42,-549.41"/>
|
||||
</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#ae9e979edd69678b85665c01e2ee97828" 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="188,-277.75 79,-277.75 79,-236 188,-236 188,-277.75"/>
|
||||
<text text-anchor="start" x="87" y="-264.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-241.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M43.45,-256.88C50.47,-256.88 58.71,-256.88 67.3,-256.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="67.2,-260.38 77.2,-256.88 67.2,-253.38 67.2,-260.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab" target="_top" xlink:title="This function returns the sum of node values in the simple path from from node_1 to node_2.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-471.75 79,-471.75 79,-430 188,-430 188,-471.75"/>
|
||||
<text text-anchor="start" x="87" y="-458.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-435.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge17_Node000001_Node000012" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<g id="a_edge17_Node000001_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M28.11,-266.76C43.95,-294.7 89.53,-375.1 114.91,-419.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="111.73,-421.34 119.7,-428.31 117.82,-417.88 111.73,-421.34"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="Node000017" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_Node000017"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" target="_top" xlink:title="Set the values for all the nodes.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-207.75 79,-207.75 79,-166 188,-166 188,-207.75"/>
|
||||
<text text-anchor="start" x="87" y="-194.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-171.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node17 -->
|
||||
<g id="edge23_Node000001_Node000017" class="edge">
|
||||
<title>Node1->Node17</title>
|
||||
<g id="a_edge23_Node000001_Node000017"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M38.26,-246.85C51.72,-238.28 71.71,-225.56 89.83,-214.03"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="91.25,-217.27 97.81,-208.95 87.49,-211.37 91.25,-217.27"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="Node000018" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_Node000018"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="325.12,-79.5 238.62,-79.5 238.62,-60.25 325.12,-60.25 325.12,-79.5"/>
|
||||
<text text-anchor="middle" x="281.88" y="-66" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node18 -->
|
||||
<g id="edge25_Node000001_Node000018" class="edge">
|
||||
<title>Node1->Node18</title>
|
||||
<g id="a_edge25_Node000001_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M25.74,-247.05C32.63,-227.49 50.48,-183.31 79,-156.88 121.06,-117.89 183.3,-94.7 227.53,-82.19"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="228.18,-85.64 236.91,-79.63 226.34,-78.89 228.18,-85.64"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="Node000019" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_Node000019"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57" target="_top" xlink:title="This function updates the value at node with val.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-51.75 79,-51.75 79,-10 188,-10 188,-51.75"/>
|
||||
<text text-anchor="start" x="87" y="-38.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-27" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-15.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node19 -->
|
||||
<g id="edge26_Node000001_Node000019" class="edge">
|
||||
<title>Node1->Node19</title>
|
||||
<g id="a_edge26_Node000001_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M25.2,-246.88C32.12,-221.97 51.92,-155.52 79,-104.88 87.12,-89.69 97.98,-74.06 107.8,-61.11"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="110.42,-63.44 113.78,-53.39 104.89,-59.15 110.42,-63.44"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-557.98C196.05,-558.14 204.25,-558.3 212.37,-558.47"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="212.18,-561.97 222.25,-558.67 212.32,-554.97 212.18,-561.97"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><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="484.75,-422.75 375.75,-422.75 375.75,-381 484.75,-381 484.75,-422.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-409.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-398" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-386.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4_Node000004_Node000005" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<g id="a_edge4_Node000004_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M142.84,-278.2C155.51,-307.43 182.62,-359.03 224,-382.88 266.18,-407.18 321.48,-411.02 364.06,-409.28"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="364.12,-412.78 373.91,-408.75 363.74,-405.79 364.12,-412.78"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><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 (-1 for a leaf node)">
|
||||
<polygon fill="white" stroke="#666666" points="336.38,-355.75 227.38,-355.75 227.38,-314 336.38,-314 336.38,-355.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-342.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-331" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-319.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5_Node000004_Node000006" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<g id="a_edge5_Node000004_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M174.12,-278.2C189.66,-286.54 207.65,-296.18 224,-304.88 226.08,-305.98 228.2,-307.11 230.35,-308.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="228.65,-311.31 239.13,-312.9 231.93,-305.12 228.65,-311.31"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><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="336.38,-277.75 227.38,-277.75 227.38,-236 336.38,-236 336.38,-277.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-264.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-241.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge7_Node000004_Node000007" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<g id="a_edge7_Node000004_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-256.88C197.22,-256.88 206.7,-256.88 216,-256.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.69,-260.38 225.69,-256.88 215.69,-253.38 215.69,-260.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><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="336.38,-139.75 227.38,-139.75 227.38,-98 336.38,-98 336.38,-139.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-126.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-115" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge9_Node000004_Node000008" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<g id="a_edge9_Node000004_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M166.37,-235.54C173.84,-229.88 181.5,-223.49 188,-216.88 207.19,-197.34 205.4,-186.97 224,-166.88 230.17,-160.21 237.24,-153.58 244.26,-147.48"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="246.5,-150.17 251.88,-141.04 241.98,-144.82 246.5,-150.17"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><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="336.38,-217.75 227.38,-217.75 227.38,-176 336.38,-176 336.38,-217.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-204.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-193" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-181.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node9 -->
|
||||
<g id="edge11_Node000004_Node000009" class="edge">
|
||||
<title>Node4->Node9</title>
|
||||
<g id="a_edge11_Node000004_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M186.52,-235.55C196.87,-231.31 207.84,-226.81 218.5,-222.44"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="219.7,-225.73 227.62,-218.7 217.04,-219.26 219.7,-225.73"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6->Node6 -->
|
||||
<g id="edge6_Node000006_Node000006" class="edge">
|
||||
<title>Node6->Node6</title>
|
||||
<g id="a_edge6_Node000006_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-356.07C251.88,-365.55 261.01,-373.75 281.88,-373.75 293.94,-373.75 302.08,-371.01 306.29,-366.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-368.1 308.86,-357.53 302.84,-366.24 309.59,-368.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7->Node7 -->
|
||||
<g id="edge8_Node000007_Node000007" class="edge">
|
||||
<title>Node7->Node7</title>
|
||||
<g id="a_edge8_Node000007_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-278.07C251.88,-287.55 261.01,-295.75 281.88,-295.75 293.94,-295.75 302.08,-293.01 306.29,-288.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-290.1 308.86,-279.53 302.84,-288.24 309.59,-290.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node8 -->
|
||||
<g id="edge10_Node000008_Node000008" class="edge">
|
||||
<title>Node8->Node8</title>
|
||||
<g id="a_edge10_Node000008_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-140.07C251.88,-149.55 261.01,-157.75 281.88,-157.75 293.94,-157.75 302.08,-155.01 306.29,-150.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-152.1 308.86,-141.53 302.84,-150.24 309.59,-152.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><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="484.75,-178.75 375.75,-178.75 375.75,-137 484.75,-137 484.75,-178.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-165.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-154" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-142.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge12_Node000009_Node000010" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<g id="a_edge12_Node000009_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-182.57C345.7,-180.14 355.28,-177.58 364.68,-175.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="365.36,-178.52 374.12,-172.56 363.56,-171.76 365.36,-178.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><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-tree sizes.">
|
||||
<polygon fill="white" stroke="#666666" points="484.75,-256.75 375.75,-256.75 375.75,-215 484.75,-215 484.75,-256.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-243.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-232" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-220.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge14_Node000009_Node000011" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<g id="a_edge14_Node000009_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-211.18C345.7,-213.61 355.28,-216.17 364.68,-218.67"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="363.56,-221.99 374.12,-221.19 365.36,-215.23 363.56,-221.99"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node10 -->
|
||||
<g id="edge13_Node000010_Node000010" class="edge">
|
||||
<title>Node10->Node10</title>
|
||||
<g id="a_edge13_Node000010_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M402.86,-179.07C400.26,-188.55 409.38,-196.75 430.25,-196.75 442.31,-196.75 450.45,-194.01 454.67,-189.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="457.96,-191.1 457.23,-180.53 451.21,-189.24 457.96,-191.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node11 -->
|
||||
<g id="edge15_Node000011_Node000011" class="edge">
|
||||
<title>Node11->Node11</title>
|
||||
<g id="a_edge15_Node000011_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M402.86,-257.07C400.26,-266.55 409.38,-274.75 430.25,-274.75 442.31,-274.75 450.45,-272.01 454.67,-267.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="457.96,-269.1 457.23,-258.53 451.21,-267.24 457.96,-269.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><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="336.38,-471.75 227.38,-471.75 227.38,-430 336.38,-430 336.38,-471.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-458.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-435.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge18_Node000012_Node000013" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<g id="a_edge18_Node000012_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-450.88C197.22,-450.88 206.7,-450.88 216,-450.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.69,-454.38 225.69,-450.88 215.69,-447.38 215.69,-454.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="Node000015" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_Node000015"><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="336.38,-531.75 227.38,-531.75 227.38,-490 336.38,-490 336.38,-531.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-518.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-495.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node15 -->
|
||||
<g id="edge21_Node000012_Node000015" class="edge">
|
||||
<title>Node12->Node15</title>
|
||||
<g id="a_edge21_Node000012_Node000015"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M186.52,-472.2C196.87,-476.44 207.84,-480.94 218.5,-485.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="217.04,-488.49 227.62,-489.05 219.7,-482.02 217.04,-488.49"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node5 -->
|
||||
<g id="edge19_Node000013_Node000005" class="edge">
|
||||
<title>Node13->Node5</title>
|
||||
<g id="a_edge19_Node000013_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-432.91C345.7,-429.84 355.28,-426.64 364.68,-423.49"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="365.78,-426.81 374.15,-420.32 363.55,-420.18 365.78,-426.81"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="459.62,-460.5 400.88,-460.5 400.88,-441.25 459.62,-441.25 459.62,-460.5"/>
|
||||
<text text-anchor="middle" x="430.25" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node14 -->
|
||||
<g id="edge20_Node000013_Node000014" class="edge">
|
||||
<title>Node13->Node14</title>
|
||||
<g id="a_edge20_Node000013_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-450.88C354.01,-450.88 373.08,-450.88 389.35,-450.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="389.13,-454.38 399.13,-450.88 389.13,-447.38 389.13,-454.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="Node000016" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_Node000016"><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="484.75,-531.75 375.75,-531.75 375.75,-490 484.75,-490 484.75,-531.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-518.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-495.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15->Node16 -->
|
||||
<g id="edge22_Node000015_Node000016" class="edge">
|
||||
<title>Node15->Node16</title>
|
||||
<g id="a_edge22_Node000015_Node000016"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-510.88C345.6,-510.88 355.08,-510.88 364.37,-510.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="364.07,-514.38 374.07,-510.88 364.07,-507.38 364.07,-514.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17->Node18 -->
|
||||
<g id="edge24_Node000017_Node000018" class="edge">
|
||||
<title>Node17->Node18</title>
|
||||
<g id="a_edge24_Node000017_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M156.59,-165.52C166.43,-155.78 178.02,-143.96 188,-132.88 204.91,-114.1 203.2,-103.22 224,-88.88 226.09,-87.43 228.3,-86.1 230.58,-84.85"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="232.01,-88.05 239.58,-80.64 229.04,-81.71 232.01,-88.05"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node20 -->
|
||||
<g id="Node000020" class="node">
|
||||
<title>Node20</title>
|
||||
<g id="a_Node000020"><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="336.38,-41.75 227.38,-41.75 227.38,0 336.38,0 336.38,-41.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19->Node20 -->
|
||||
<g id="edge27_Node000019_Node000020" class="edge">
|
||||
<title>Node19->Node20</title>
|
||||
<g id="a_edge27_Node000019_Node000020"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-27.21C197.22,-26.59 206.7,-25.94 216,-25.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.96,-28.82 225.7,-24.64 215.48,-21.83 215.96,-28.82"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 26 KiB |
@@ -1,69 +0,0 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,300,55,326"/>
|
||||
<area shape="rect" id="Node000002" href="$d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817" title=" " alt="" coords="103,300,160,326"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,311,87,311,87,316,55,316"/>
|
||||
<area shape="rect" id="Node000022" href="$d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d" title=" " alt="" coords="103,243,160,269"/>
|
||||
<area shape="poly" id="edge29_Node000001_Node000022" title=" " alt="" coords="53,298,92,275,95,279,56,302"/>
|
||||
<area shape="rect" id="Node000023" href="$d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a" title=" " alt="" coords="103,398,160,423"/>
|
||||
<area shape="poly" id="edge37_Node000001_Node000023" title=" " alt="" coords="47,324,108,385,105,389,43,328"/>
|
||||
<area shape="rect" id="Node000003" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d" title="Adds an undirected edge from node u to node v in the tree." alt="" coords="208,351,353,406"/>
|
||||
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="162,323,203,342,201,347,160,328"/>
|
||||
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="401,306,556,331"/>
|
||||
<area shape="poly" id="edge17_Node000002_Node000004" title=" " alt="" coords="160,311,386,314,386,320,160,316"/>
|
||||
<area shape="rect" id="Node000005" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828" title="This function must be called after the tree adjacency list and node values are populated The function..." alt="" coords="208,612,353,668"/>
|
||||
<area shape="poly" id="edge4_Node000002_Node000005" title=" " alt="" coords="141,325,163,384,175,431,183,468,192,504,210,548,245,599,241,602,206,550,187,506,177,469,170,432,157,386,136,327"/>
|
||||
<area shape="rect" id="Node000013" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab" title="This function returns the sum of node values in the simple path from from node_1 to node_2." alt="" coords="208,481,353,537"/>
|
||||
<area shape="poly" id="edge18_Node000002_Node000013" title=" " alt="" coords="144,325,210,417,249,467,245,471,206,420,140,328"/>
|
||||
<area shape="rect" id="Node000018" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" title="Set the values for all the nodes." alt="" coords="208,220,353,276"/>
|
||||
<area shape="poly" id="edge24_Node000002_Node000018" title=" " alt="" coords="160,298,201,280,203,285,162,303"/>
|
||||
<area shape="rect" id="Node000019" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="421,202,536,227"/>
|
||||
<area shape="poly" id="edge26_Node000002_Node000019" title=" " alt="" coords="143,298,158,280,170,258,177,239,187,221,207,206,233,194,260,187,317,182,372,186,420,195,419,200,372,191,317,187,261,192,235,199,209,210,191,224,182,241,175,260,162,283,147,302"/>
|
||||
<area shape="rect" id="Node000020" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57" title="This function updates the value at node with val." alt="" coords="208,89,353,145"/>
|
||||
<area shape="poly" id="edge27_Node000002_Node000020" title=" " alt="" coords="143,299,158,280,172,248,179,220,187,193,206,162,214,154,218,157,210,166,192,195,184,221,177,250,162,283,148,302"/>
|
||||
<area shape="poly" id="edge3_Node000003_Node000004" title=" " alt="" coords="353,354,418,334,420,339,354,359"/>
|
||||
<area shape="rect" id="Node000006" 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="604,560,749,616"/>
|
||||
<area shape="poly" id="edge5_Node000005_Node000006" title=" " alt="" coords="354,633,450,625,555,612,588,606,589,611,556,617,450,630,354,638"/>
|
||||
<area shape="rect" id="Node000007" 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 (-1 for a leaf node)" alt="" coords="406,885,551,941"/>
|
||||
<area shape="poly" id="edge6_Node000005_Node000007" title=" " alt="" coords="297,667,339,751,369,801,403,847,429,873,425,877,399,851,365,804,334,754,292,669"/>
|
||||
<area shape="rect" id="Node000008" 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="406,547,551,602"/>
|
||||
<area shape="poly" id="edge8_Node000005_Node000008" title=" " alt="" coords="353,613,390,601,392,606,354,618"/>
|
||||
<area shape="rect" id="Node000009" 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="406,701,551,757"/>
|
||||
<area shape="poly" id="edge10_Node000005_Node000009" title=" " alt="" coords="345,666,403,692,400,697,343,671"/>
|
||||
<area shape="rect" id="Node000010" 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="406,781,551,837"/>
|
||||
<area shape="poly" id="edge12_Node000005_Node000010" title=" " alt="" coords="305,666,348,716,403,767,408,770,404,775,400,771,344,720,301,670"/>
|
||||
<area shape="poly" id="edge7_Node000007_Node000007" title=" " alt="" coords="439,885,440,875,447,866,460,861,479,859,500,861,512,868,510,873,498,866,478,864,461,866,450,871,445,877,445,885"/>
|
||||
<area shape="poly" id="edge9_Node000008_Node000008" title=" " alt="" coords="439,546,440,536,447,528,460,522,479,520,500,523,512,530,510,534,498,528,478,525,461,527,450,532,445,538,445,546"/>
|
||||
<area shape="poly" id="edge11_Node000009_Node000009" title=" " alt="" coords="439,701,440,691,447,682,460,677,479,675,500,677,512,684,510,689,498,682,478,680,461,682,450,687,445,693,445,701"/>
|
||||
<area shape="rect" id="Node000011" 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="604,833,749,889"/>
|
||||
<area shape="poly" id="edge13_Node000010_Node000011" title=" " alt="" coords="552,826,590,836,588,841,551,831"/>
|
||||
<area shape="rect" id="Node000012" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" title="Utility function to compute sub-tree sizes." alt="" coords="604,729,749,785"/>
|
||||
<area shape="poly" id="edge15_Node000010_Node000012" title=" " alt="" coords="551,788,588,778,590,783,552,793"/>
|
||||
<area shape="poly" id="edge14_Node000011_Node000011" title=" " alt="" coords="637,833,638,823,645,814,658,809,676,807,697,809,710,816,708,821,696,814,676,812,659,814,648,819,643,825,642,833"/>
|
||||
<area shape="poly" id="edge16_Node000012_Node000012" title=" " alt="" coords="637,729,638,719,645,710,658,705,676,703,697,705,710,712,708,717,696,710,676,708,659,710,648,715,643,721,642,729"/>
|
||||
<area shape="rect" id="Node000014" 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="406,443,551,498"/>
|
||||
<area shape="poly" id="edge19_Node000013_Node000014" title=" " alt="" coords="353,492,390,485,391,490,354,498"/>
|
||||
<area shape="rect" id="Node000016" 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="406,363,551,418"/>
|
||||
<area shape="poly" id="edge22_Node000013_Node000016" title=" " alt="" coords="324,479,352,460,400,428,407,424,410,428,403,433,355,465,327,483"/>
|
||||
<area shape="poly" id="edge20_Node000014_Node000006" title=" " alt="" coords="537,497,557,508,622,549,619,553,554,513,534,501"/>
|
||||
<area shape="rect" id="Node000015" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="637,458,716,483"/>
|
||||
<area shape="poly" id="edge21_Node000014_Node000015" title=" " alt="" coords="551,468,622,468,622,473,551,473"/>
|
||||
<area shape="rect" id="Node000017" 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="604,363,749,418"/>
|
||||
<area shape="poly" id="edge23_Node000016_Node000017" title=" " alt="" coords="551,388,588,388,588,393,551,393"/>
|
||||
<area shape="poly" id="edge25_Node000018_Node000019" title=" " alt="" coords="353,233,405,224,406,229,354,238"/>
|
||||
<area shape="rect" id="Node000021" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c" title="Update the value at a node." alt="" coords="406,89,551,145"/>
|
||||
<area shape="poly" id="edge28_Node000020_Node000021" title=" " alt="" coords="354,115,391,115,391,120,354,120"/>
|
||||
<area shape="poly" id="edge30_Node000022_Node000003" title=" " alt="" coords="150,267,236,339,232,343,147,271"/>
|
||||
<area shape="poly" id="edge32_Node000022_Node000004" title=" " alt="" coords="131,242,136,207,148,160,170,113,186,92,206,75,245,54,281,47,317,53,355,75,373,93,383,112,388,131,388,151,389,193,393,215,404,239,426,268,451,293,447,297,422,272,399,241,388,217,384,194,383,151,382,132,378,113,369,96,352,79,315,58,281,52,247,59,210,79,190,96,175,116,153,162,141,208,136,243"/>
|
||||
<area shape="poly" id="edge31_Node000022_Node000005" title=" " alt="" coords="149,268,162,287,177,325,185,358,187,418,190,478,197,511,210,548,225,575,244,599,239,602,221,577,206,550,192,512,184,478,182,418,179,359,172,326,158,289,145,271"/>
|
||||
<area shape="poly" id="edge33_Node000022_Node000013" title=" " alt="" coords="148,267,162,287,179,322,187,352,195,382,210,417,246,468,242,471,206,420,190,384,182,354,174,324,158,289,143,270"/>
|
||||
<area shape="poly" id="edge34_Node000022_Node000018" title=" " alt="" coords="160,252,192,250,193,255,161,257"/>
|
||||
<area shape="poly" id="edge35_Node000022_Node000019" title=" " alt="" coords="130,243,132,200,141,141,151,110,164,80,183,53,206,31,244,10,280,3,316,10,355,31,370,44,379,59,385,90,388,122,393,139,403,156,421,175,442,191,439,195,418,179,399,159,389,141,383,123,380,90,374,61,366,48,352,35,315,15,280,8,246,15,210,35,187,57,169,83,156,112,146,143,137,201,135,243"/>
|
||||
<area shape="poly" id="edge36_Node000022_Node000020" title=" " alt="" coords="139,241,167,204,206,162,218,152,221,157,210,166,171,207,143,245"/>
|
||||
<area shape="poly" id="edge38_Node000023_Node000003" title=" " alt="" coords="160,402,192,395,193,400,161,407"/>
|
||||
<area shape="poly" id="edge40_Node000023_Node000004" title=" " alt="" coords="138,423,145,451,159,486,180,520,210,547,248,566,283,574,316,568,352,547,371,526,380,504,382,480,379,455,376,429,376,403,383,376,399,349,412,337,416,341,403,352,388,378,382,403,382,429,385,454,387,480,385,505,376,529,355,551,318,573,282,579,246,571,206,551,176,524,154,488,140,453,133,425"/>
|
||||
<area shape="poly" id="edge39_Node000023_Node000005" title=" " alt="" coords="138,423,160,500,181,547,210,592,218,600,214,604,206,595,177,550,155,501,133,425"/>
|
||||
<area shape="poly" id="edge41_Node000023_Node000013" title=" " alt="" coords="153,422,209,460,224,470,221,475,207,465,150,426"/>
|
||||
<area shape="poly" id="edge42_Node000023_Node000018" title=" " alt="" coords="143,395,242,285,246,289,147,399"/>
|
||||
<area shape="poly" id="edge43_Node000023_Node000019" title=" " alt="" coords="161,419,202,430,252,438,304,435,329,428,352,416,366,404,375,391,381,362,385,329,390,311,399,292,423,261,448,236,452,239,427,265,404,295,395,313,390,330,386,363,380,393,370,407,355,421,331,433,305,441,252,443,201,436,160,424"/>
|
||||
<area shape="poly" id="edge44_Node000023_Node000020" title=" " alt="" coords="135,396,157,338,178,271,188,242,206,207,242,155,246,158,210,209,193,244,183,273,163,339,140,398"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
1300f7307fde54a8eb10429e332996d5
|
||||
@@ -1,730 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<!--zoomable 710 -->
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" onload="init(evt)">
|
||||
|
||||
<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>
|
||||
|
||||
<defs>
|
||||
<circle id="rim" cx="0" cy="0" r="7"/>
|
||||
<circle id="rim2" cx="0" cy="0" r="3.5"/>
|
||||
<g id="zoomPlus">
|
||||
<use xlink:href="#rim" fill="#404040"><set attributeName="fill" to="#808080" begin="zoomplus.mouseover" end="zoomplus.mouseout"/></use>
|
||||
<path d="M-4,0h8M0,-4v8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
|
||||
</g>
|
||||
<g id="zoomMin">
|
||||
<use xlink:href="#rim" fill="#404040"><set attributeName="fill" to="#808080" begin="zoomminus.mouseover" end="zoomminus.mouseout"/></use>
|
||||
<path d="M-4,0h8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
|
||||
</g>
|
||||
<g id="arrowUp" transform="translate(30 24)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowRight" transform="rotate(90) translate(36 -43)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowDown" transform="rotate(180) translate(-30 -48)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowLeft" transform="rotate(270) translate(-36 17)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="resetDef">
|
||||
<use xlink:href="#rim2" fill="#404040"><set attributeName="fill" to="#808080" begin="reset.mouseover" end="reset.mouseout"/></use>
|
||||
</g>
|
||||
</defs>
|
||||
<script type="application/ecmascript">
|
||||
var viewWidth = 566;
|
||||
var viewHeight = 710;
|
||||
var sectionId = 'dynsection-1';
|
||||
</script>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="viewport">
|
||||
<title>main</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="37,-480.5 0,-480.5 0,-461.25 37,-461.25 37,-480.5"/>
|
||||
<text text-anchor="middle" x="18.5" y="-467" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="116,-480.5 73,-480.5 73,-461.25 116,-461.25 116,-480.5"/>
|
||||
<text text-anchor="middle" x="94.5" y="-467" font-family="Helvetica,sans-Serif" font-size="10.00">test_1</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.41,-470.88C44.54,-470.88 52.97,-470.88 61.1,-470.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.09,-474.38 71.09,-470.88 61.09,-467.38 61.09,-474.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22 -->
|
||||
<g id="Node000022" class="node">
|
||||
<title>Node22</title>
|
||||
<g id="a_Node000022"><a xlink:href="../../d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="116,-523.5 73,-523.5 73,-504.25 116,-504.25 116,-523.5"/>
|
||||
<text text-anchor="middle" x="94.5" y="-510" font-family="Helvetica,sans-Serif" font-size="10.00">test_2</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node22 -->
|
||||
<g id="edge29_Node000001_Node000022" class="edge">
|
||||
<title>Node1->Node22</title>
|
||||
<g id="a_edge29_Node000001_Node000022"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M36.66,-480.85C45.47,-485.97 56.41,-492.32 66.33,-498.09"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="64.46,-501.05 74.87,-503.05 67.98,-495 64.46,-501.05"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23 -->
|
||||
<g id="Node000023" class="node">
|
||||
<title>Node23</title>
|
||||
<g id="a_Node000023"><a xlink:href="../../d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="116,-407.5 73,-407.5 73,-388.25 116,-388.25 116,-407.5"/>
|
||||
<text text-anchor="middle" x="94.5" y="-394" font-family="Helvetica,sans-Serif" font-size="10.00">test_3</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node23 -->
|
||||
<g id="edge37_Node000001_Node000023" class="edge">
|
||||
<title>Node1->Node23</title>
|
||||
<g id="a_edge37_Node000001_Node000023"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M29.48,-461.03C41.35,-449.32 61.39,-429.56 75.88,-415.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="77.94,-418.14 82.6,-408.63 73.02,-413.16 77.94,-418.14"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d" target="_top" xlink:title="Adds an undirected edge from node u to node v in the tree.">
|
||||
<polygon fill="white" stroke="#666666" points="261,-442.75 152,-442.75 152,-401 261,-401 261,-442.75"/>
|
||||
<text text-anchor="start" x="160" y="-429.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="160" y="-418" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="206.5" y="-406.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M116.45,-461.54C125.42,-457.55 136.39,-452.66 147.52,-447.7"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="148.64,-451.04 156.35,-443.77 145.79,-444.64 148.64,-451.04"/>
|
||||
</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/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="412.75,-476.5 297,-476.5 297,-457.25 412.75,-457.25 412.75,-476.5"/>
|
||||
<text text-anchor="middle" x="354.88" y="-463" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node4 -->
|
||||
<g id="edge17_Node000002_Node000004" class="edge">
|
||||
<title>Node2->Node4</title>
|
||||
<g id="a_edge17_Node000002_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M116.21,-470.55C152.45,-469.99 228.89,-468.81 285.34,-467.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="285.25,-471.44 295.19,-467.78 285.14,-464.44 285.25,-471.44"/>
|
||||
</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#ae9e979edd69678b85665c01e2ee97828" 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="261,-246.75 152,-246.75 152,-205 261,-205 261,-246.75"/>
|
||||
<text text-anchor="start" x="160" y="-233.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="160" y="-222" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="206.5" y="-210.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node5 -->
|
||||
<g id="edge4_Node000002_Node000005" class="edge">
|
||||
<title>Node2->Node5</title>
|
||||
<g id="a_edge4_Node000002_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M99.51,-461.01C103.83,-450.24 110.77,-432.47 116,-416.88 134.12,-362.87 125.92,-344.51 152,-293.88 158.95,-280.39 168.74,-266.96 178.05,-255.64"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="180.56,-258.09 184.37,-248.21 175.23,-253.56 180.56,-258.09"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab" target="_top" xlink:title="This function returns the sum of node values in the simple path from from node_1 to node_2.">
|
||||
<polygon fill="white" stroke="#666666" points="261,-344.75 152,-344.75 152,-303 261,-303 261,-344.75"/>
|
||||
<text text-anchor="start" x="160" y="-331.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="160" y="-320" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="206.5" y="-308.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node13 -->
|
||||
<g id="edge18_Node000002_Node000013" class="edge">
|
||||
<title>Node2->Node13</title>
|
||||
<g id="a_edge18_Node000002_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M102.49,-460.79C113.02,-445.67 133.68,-416.29 152,-391.88 161.39,-379.36 172,-365.77 181.27,-354.06"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="183.95,-356.31 187.44,-346.3 178.47,-351.95 183.95,-356.31"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="Node000018" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_Node000018"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" target="_top" xlink:title="Set the values for all the nodes.">
|
||||
<polygon fill="white" stroke="#666666" points="261,-540.75 152,-540.75 152,-499 261,-499 261,-540.75"/>
|
||||
<text text-anchor="start" x="160" y="-527.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="160" y="-516" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="206.5" y="-504.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node18 -->
|
||||
<g id="edge24_Node000002_Node000018" class="edge">
|
||||
<title>Node2->Node18</title>
|
||||
<g id="a_edge24_Node000002_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M116.45,-480.21C125.42,-484.2 136.39,-489.09 147.52,-494.05"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="145.79,-497.11 156.35,-497.98 148.64,-490.71 145.79,-497.11"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="Node000019" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_Node000019"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="398.12,-554.5 311.62,-554.5 311.62,-535.25 398.12,-535.25 398.12,-554.5"/>
|
||||
<text text-anchor="middle" x="354.88" y="-541" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node19 -->
|
||||
<g id="edge26_Node000002_Node000019" class="edge">
|
||||
<title>Node2->Node19</title>
|
||||
<g id="a_edge26_Node000002_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M104.57,-480.92C108.25,-485.13 112.45,-490.14 116,-494.88 133.52,-518.25 126.3,-535.98 152,-549.88 201.4,-576.58 268.02,-567.91 310.97,-557.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="311.58,-561.13 320.42,-555.29 309.86,-554.34 311.58,-561.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node20 -->
|
||||
<g id="Node000020" class="node">
|
||||
<title>Node20</title>
|
||||
<g id="a_Node000020"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57" target="_top" xlink:title="This function updates the value at node with val.">
|
||||
<polygon fill="white" stroke="#666666" points="261,-638.75 152,-638.75 152,-597 261,-597 261,-638.75"/>
|
||||
<text text-anchor="start" x="160" y="-625.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="160" y="-614" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="206.5" y="-602.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node20 -->
|
||||
<g id="edge27_Node000002_Node000020" class="edge">
|
||||
<title>Node2->Node20</title>
|
||||
<g id="a_edge27_Node000002_Node000020"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.04,-480.6C108.79,-484.76 112.92,-489.82 116,-494.88 138,-530.95 125.11,-550.28 152,-582.88 153.82,-585.08 155.82,-587.2 157.94,-589.23"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="155.57,-591.8 165.46,-595.59 160.09,-586.46 155.57,-591.8"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3_Node000003_Node000004" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M261.17,-438.38C277.32,-443.34 294.84,-448.73 310.26,-453.47"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.03,-456.75 319.62,-456.34 311.09,-450.06 309.03,-456.75"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><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="557.75,-285.75 448.75,-285.75 448.75,-244 557.75,-244 557.75,-285.75"/>
|
||||
<text text-anchor="start" x="456.75" y="-272.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="456.75" y="-261" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="503.25" y="-249.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node6 -->
|
||||
<g id="edge5_Node000005_Node000006" class="edge">
|
||||
<title>Node5->Node6</title>
|
||||
<g id="a_edge5_Node000005_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M261.32,-228.97C302.86,-231.82 361.67,-236.84 412.75,-244.88 420.75,-246.13 429.11,-247.68 437.36,-249.36"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="436.52,-252.76 447.03,-251.39 437.96,-245.91 436.52,-252.76"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><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 (-1 for a leaf node)">
|
||||
<polygon fill="white" stroke="#666666" points="409.38,-41.75 300.38,-41.75 300.38,0 409.38,0 409.38,-41.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node7 -->
|
||||
<g id="edge6_Node000005_Node000007" class="edge">
|
||||
<title>Node5->Node7</title>
|
||||
<g id="a_edge6_Node000005_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M216.69,-204.59C230.98,-172.94 260.68,-112.53 297,-68.88 302.69,-62.03 309.44,-55.39 316.27,-49.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="318.37,-52.16 323.72,-43.01 313.84,-46.82 318.37,-52.16"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><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="409.38,-295.75 300.38,-295.75 300.38,-254 409.38,-254 409.38,-295.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-282.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-271" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-259.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node8 -->
|
||||
<g id="edge8_Node000005_Node000008" class="edge">
|
||||
<title>Node5->Node8</title>
|
||||
<g id="a_edge8_Node000005_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M261.17,-243.84C270.32,-246.91 279.91,-250.11 289.3,-253.26"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="288.18,-256.57 298.77,-256.43 290.4,-249.94 288.18,-256.57"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><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="409.38,-179.75 300.38,-179.75 300.38,-138 409.38,-138 409.38,-179.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-166.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-155" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-143.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node9 -->
|
||||
<g id="edge10_Node000005_Node000009" class="edge">
|
||||
<title>Node5->Node9</title>
|
||||
<g id="a_edge10_Node000005_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M253.81,-204.68C267.56,-198.38 282.78,-191.42 297.11,-184.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="298.35,-188.14 305.98,-180.8 295.43,-181.78 298.35,-188.14"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><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="409.38,-119.75 300.38,-119.75 300.38,-78 409.38,-78 409.38,-119.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-106.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-95" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-83.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node10 -->
|
||||
<g id="edge12_Node000005_Node000010" class="edge">
|
||||
<title>Node5->Node10</title>
|
||||
<g id="a_edge12_Node000005_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M223.56,-204.61C240.24,-183.53 267.94,-151.22 297,-128.88 298.12,-128.01 299.27,-127.16 300.44,-126.33"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="302.08,-129.44 308.51,-121.01 298.23,-123.59 302.08,-129.44"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7->Node7 -->
|
||||
<g id="edge7_Node000007_Node000007" class="edge">
|
||||
<title>Node7->Node7</title>
|
||||
<g id="a_edge7_Node000007_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M327.49,-42.07C324.88,-51.55 334.01,-59.75 354.88,-59.75 366.94,-59.75 375.08,-57.01 379.29,-52.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="382.59,-54.1 381.86,-43.53 375.84,-52.24 382.59,-54.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node8 -->
|
||||
<g id="edge9_Node000008_Node000008" class="edge">
|
||||
<title>Node8->Node8</title>
|
||||
<g id="a_edge9_Node000008_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M327.49,-296.07C324.88,-305.55 334.01,-313.75 354.88,-313.75 366.94,-313.75 375.08,-311.01 379.29,-306.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="382.59,-308.1 381.86,-297.53 375.84,-306.24 382.59,-308.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node9 -->
|
||||
<g id="edge11_Node000009_Node000009" class="edge">
|
||||
<title>Node9->Node9</title>
|
||||
<g id="a_edge11_Node000009_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M327.49,-180.07C324.88,-189.55 334.01,-197.75 354.88,-197.75 366.94,-197.75 375.08,-195.01 379.29,-190.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="382.59,-192.1 381.86,-181.53 375.84,-190.24 382.59,-192.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><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="557.75,-80.75 448.75,-80.75 448.75,-39 557.75,-39 557.75,-80.75"/>
|
||||
<text text-anchor="start" x="456.75" y="-67.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="456.75" y="-56" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="503.25" y="-44.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node11 -->
|
||||
<g id="edge13_Node000010_Node000011" class="edge">
|
||||
<title>Node10->Node11</title>
|
||||
<g id="a_edge13_Node000010_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M409.55,-84.57C418.7,-82.14 428.28,-79.58 437.68,-77.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="438.36,-80.52 447.12,-74.56 436.56,-73.76 438.36,-80.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><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-tree sizes.">
|
||||
<polygon fill="white" stroke="#666666" points="557.75,-158.75 448.75,-158.75 448.75,-117 557.75,-117 557.75,-158.75"/>
|
||||
<text text-anchor="start" x="456.75" y="-145.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="456.75" y="-134" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="503.25" y="-122.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node12 -->
|
||||
<g id="edge15_Node000010_Node000012" class="edge">
|
||||
<title>Node10->Node12</title>
|
||||
<g id="a_edge15_Node000010_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M409.55,-113.18C418.7,-115.61 428.28,-118.17 437.68,-120.67"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="436.56,-123.99 447.12,-123.19 438.36,-117.23 436.56,-123.99"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node11 -->
|
||||
<g id="edge14_Node000011_Node000011" class="edge">
|
||||
<title>Node11->Node11</title>
|
||||
<g id="a_edge14_Node000011_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M475.86,-81.07C473.26,-90.55 482.38,-98.75 503.25,-98.75 515.31,-98.75 523.45,-96.01 527.67,-91.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="530.96,-93.1 530.23,-82.53 524.21,-91.24 530.96,-93.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node12 -->
|
||||
<g id="edge16_Node000012_Node000012" class="edge">
|
||||
<title>Node12->Node12</title>
|
||||
<g id="a_edge16_Node000012_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M475.86,-159.07C473.26,-168.55 482.38,-176.75 503.25,-176.75 515.31,-176.75 523.45,-174.01 527.67,-169.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="530.96,-171.1 530.23,-160.53 524.21,-169.24 530.96,-171.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><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="409.38,-373.75 300.38,-373.75 300.38,-332 409.38,-332 409.38,-373.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-360.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-349" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-337.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node14 -->
|
||||
<g id="edge19_Node000013_Node000014" class="edge">
|
||||
<title>Node13->Node14</title>
|
||||
<g id="a_edge19_Node000013_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M261.17,-334.51C270.22,-336.3 279.7,-338.18 289,-340.02"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="288.23,-343.44 298.72,-341.95 289.59,-336.57 288.23,-343.44"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="Node000016" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_Node000016"><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="409.38,-433.75 300.38,-433.75 300.38,-392 409.38,-392 409.38,-433.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-420.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-409" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-397.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node16 -->
|
||||
<g id="edge22_Node000013_Node000016" class="edge">
|
||||
<title>Node13->Node16</title>
|
||||
<g id="a_edge22_Node000013_Node000016"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M240.07,-345.12C246.98,-349.65 254.24,-354.41 261,-358.88 277.05,-369.47 280.47,-373.04 297,-382.88 298.83,-383.97 300.71,-385.06 302.62,-386.16"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="300.53,-389 310.96,-390.83 303.95,-382.89 300.53,-389"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14->Node6 -->
|
||||
<g id="edge20_Node000014_Node000006" class="edge">
|
||||
<title>Node14->Node6</title>
|
||||
<g id="a_edge20_Node000014_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M397.43,-331.51C402.63,-328.68 407.84,-325.75 412.75,-322.88 428.87,-313.43 446.18,-302.42 461.25,-292.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="463.11,-295.51 469.53,-287.08 459.25,-289.67 463.11,-295.51"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="Node000015" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_Node000015"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="532.62,-362.5 473.88,-362.5 473.88,-343.25 532.62,-343.25 532.62,-362.5"/>
|
||||
<text text-anchor="middle" x="503.25" y="-349" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14->Node15 -->
|
||||
<g id="edge21_Node000014_Node000015" class="edge">
|
||||
<title>Node14->Node15</title>
|
||||
<g id="a_edge21_Node000014_Node000015"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M409.55,-352.88C427.01,-352.88 446.08,-352.88 462.35,-352.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="462.13,-356.38 472.13,-352.88 462.13,-349.38 462.13,-356.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="Node000017" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_Node000017"><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="557.75,-433.75 448.75,-433.75 448.75,-392 557.75,-392 557.75,-433.75"/>
|
||||
<text text-anchor="start" x="456.75" y="-420.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="456.75" y="-409" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="503.25" y="-397.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16->Node17 -->
|
||||
<g id="edge23_Node000016_Node000017" class="edge">
|
||||
<title>Node16->Node17</title>
|
||||
<g id="a_edge23_Node000016_Node000017"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M409.55,-412.88C418.6,-412.88 428.08,-412.88 437.37,-412.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="437.07,-416.38 447.07,-412.88 437.07,-409.38 437.07,-416.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18->Node19 -->
|
||||
<g id="edge25_Node000018_Node000019" class="edge">
|
||||
<title>Node18->Node19</title>
|
||||
<g id="a_edge25_Node000018_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M261.17,-529.04C273.79,-531.2 287.25,-533.5 299.88,-535.65"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="299.26,-539.1 309.71,-537.33 300.44,-532.2 299.26,-539.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node21 -->
|
||||
<g id="Node000021" class="node">
|
||||
<title>Node21</title>
|
||||
<g id="a_Node000021"><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="409.38,-638.75 300.38,-638.75 300.38,-597 409.38,-597 409.38,-638.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-625.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-614" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-602.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node20->Node21 -->
|
||||
<g id="edge28_Node000020_Node000021" class="edge">
|
||||
<title>Node20->Node21</title>
|
||||
<g id="a_edge28_Node000020_Node000021"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M261.17,-617.88C270.22,-617.88 279.7,-617.88 289,-617.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="288.69,-621.38 298.69,-617.88 288.69,-614.38 288.69,-621.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node3 -->
|
||||
<g id="edge30_Node000022_Node000003" class="edge">
|
||||
<title>Node22->Node3</title>
|
||||
<g id="a_edge30_Node000022_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M107.27,-504.03C122.47,-491.32 149.57,-468.66 171.45,-450.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="173.57,-453.14 179,-444.04 169.08,-447.77 173.57,-453.14"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node4 -->
|
||||
<g id="edge32_Node000022_Node000004" class="edge">
|
||||
<title>Node22->Node4</title>
|
||||
<g id="a_edge32_Node000022_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M96.16,-523.92C98.49,-549.87 108.66,-619.12 152,-647.88 192.36,-674.66 222.2,-676.88 261,-647.88 306.28,-614.03 268.57,-574.74 297,-525.88 306.24,-510 320.62,-495.13 332.61,-484.29"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="334.79,-487.03 340.05,-477.83 330.2,-481.75 334.79,-487.03"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node5 -->
|
||||
<g id="edge31_Node000022_Node000005" class="edge">
|
||||
<title>Node22->Node5</title>
|
||||
<g id="a_edge31_Node000022_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M106.01,-503.98C109.71,-499.95 113.55,-495.02 116,-489.88 154.07,-409.9 115.55,-374.6 152,-293.88 158.19,-280.16 167.74,-266.76 177.06,-255.53"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="179.53,-258.02 183.43,-248.17 174.24,-253.44 179.53,-258.02"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node13 -->
|
||||
<g id="edge33_Node000022_Node000013" class="edge">
|
||||
<title>Node22->Node13</title>
|
||||
<g id="a_edge33_Node000022_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.14,-504.21C108.9,-500.05 113.01,-494.98 116,-489.88 139.44,-449.83 129.37,-432.39 152,-391.88 159.46,-378.53 169.44,-365.04 178.76,-353.64"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="181.31,-356.05 185.07,-346.14 175.95,-351.55 181.31,-356.05"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node18 -->
|
||||
<g id="edge34_Node000022_Node000018" class="edge">
|
||||
<title>Node22->Node18</title>
|
||||
<g id="a_edge34_Node000022_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M116.45,-515.02C123.47,-515.4 131.71,-515.85 140.3,-516.32"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="140.02,-519.81 150.2,-516.86 140.4,-512.82 140.02,-519.81"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node19 -->
|
||||
<g id="edge35_Node000022_Node000019" class="edge">
|
||||
<title>Node22->Node19</title>
|
||||
<g id="a_edge35_Node000022_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M95.26,-523.63C95.13,-553.35 99.28,-643.05 152,-680.88 191.36,-709.11 221.04,-708.26 261,-680.88 297.56,-655.82 270.3,-623.26 297,-587.88 304.91,-577.39 316.03,-568.21 326.35,-561.06"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="328.13,-564.07 334.59,-555.67 324.3,-558.21 328.13,-564.07"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node20 -->
|
||||
<g id="edge36_Node000022_Node000020" class="edge">
|
||||
<title>Node22->Node20</title>
|
||||
<g id="a_edge36_Node000022_Node000020"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M102,-523.58C111.76,-537.7 131.27,-564.25 152,-582.88 154.68,-585.29 157.55,-587.65 160.5,-589.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="158.2,-592.59 168.34,-595.66 162.32,-586.93 158.2,-592.59"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node3 -->
|
||||
<g id="edge38_Node000023_Node000003" class="edge">
|
||||
<title>Node23->Node3</title>
|
||||
<g id="a_edge38_Node000023_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M116.45,-402.45C123.55,-403.99 131.9,-405.82 140.59,-407.71"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="139.71,-411.1 150.23,-409.82 141.21,-404.26 139.71,-411.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node4 -->
|
||||
<g id="edge40_Node000023_Node000004" class="edge">
|
||||
<title>Node23->Node4</title>
|
||||
<g id="a_edge40_Node000023_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M97.43,-387.81C102.21,-366.03 116.86,-314.78 152,-293.88 193.64,-269.11 222.93,-263.91 261,-293.88 314.53,-336.01 252.89,-390.96 297,-442.88 299.69,-446.04 302.87,-448.8 306.33,-451.2"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="304.28,-454.06 314.69,-456 307.76,-447.99 304.28,-454.06"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node5 -->
|
||||
<g id="edge39_Node000023_Node000005" class="edge">
|
||||
<title>Node23->Node5</title>
|
||||
<g id="a_edge39_Node000023_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M97.48,-387.86C102.69,-363.68 118.7,-301.11 152,-260.88 153.83,-258.67 155.83,-256.55 157.95,-254.53"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="160.1,-257.3 165.48,-248.17 155.58,-251.95 160.1,-257.3"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node13 -->
|
||||
<g id="edge41_Node000023_Node000013" class="edge">
|
||||
<title>Node23->Node13</title>
|
||||
<g id="a_edge41_Node000023_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M109.83,-387.84C121.21,-379.9 137.56,-368.58 152,-358.88 155.63,-356.44 159.4,-353.92 163.2,-351.41"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="164.91,-354.48 171.33,-346.05 161.05,-348.63 164.91,-354.48"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node18 -->
|
||||
<g id="edge42_Node000023_Node000018" class="edge">
|
||||
<title>Node23->Node18</title>
|
||||
<g id="a_edge42_Node000023_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M104.5,-407.86C120.61,-425.73 154.95,-463.81 179.1,-490.6"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="176.24,-492.65 185.53,-497.73 181.44,-487.96 176.24,-492.65"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node19 -->
|
||||
<g id="edge43_Node000023_Node000019" class="edge">
|
||||
<title>Node23->Node19</title>
|
||||
<g id="a_edge43_Node000023_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M116.24,-389.88C149.9,-378.38 217.06,-361.65 261,-391.88 297.86,-417.23 272.99,-448.12 297,-485.88 306.98,-501.56 321.59,-516.61 333.5,-527.58"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="331.04,-530.08 340.84,-534.11 335.7,-524.85 331.04,-530.08"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node20 -->
|
||||
<g id="edge44_Node000023_Node000020" class="edge">
|
||||
<title>Node23->Node20</title>
|
||||
<g id="a_edge44_Node000023_Node000020"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M99.31,-407.82C103.45,-418.64 110.25,-436.47 116,-451.88 132.23,-495.34 129.37,-509.36 152,-549.88 159.46,-563.22 169.44,-576.71 178.76,-588.11"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="175.95,-590.2 185.07,-595.61 181.31,-585.7 175.95,-590.2"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<g id="navigator" transform="translate(0 0)" fill="#404254">
|
||||
<rect fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width=".5" x="0" y="0" width="60" height="60"/>
|
||||
<use id="zoomplus" xlink:href="#zoomPlus" x="17" y="9" onmousedown="handleZoom(evt,'in')"/>
|
||||
<use id="zoomminus" xlink:href="#zoomMin" x="42" y="9" onmousedown="handleZoom(evt,'out')"/>
|
||||
<use id="reset" xlink:href="#resetDef" x="30" y="36" onmousedown="handleReset()"/>
|
||||
<use id="arrowup" xlink:href="#arrowUp" x="0" y="0" onmousedown="handlePan(0,-1)"/>
|
||||
<use id="arrowright" xlink:href="#arrowRight" x="0" y="0" onmousedown="handlePan(1,0)"/>
|
||||
<use id="arrowdown" xlink:href="#arrowDown" x="0" y="0" onmousedown="handlePan(0,1)"/>
|
||||
<use id="arrowleft" xlink:href="#arrowLeft" x="0" y="0" onmousedown="handlePan(-1,0)"/>
|
||||
</g>
|
||||
<svg viewBox="0 0 15 15" width="100%" height="30px" preserveAspectRatio="xMaxYMin meet">
|
||||
<g id="arrow_out" transform="scale(0.3 0.3)">
|
||||
<a xlink:href="heavy__light__decomposition_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg" target="_base">
|
||||
<rect id="button" ry="5" rx="5" y="6" x="6" height="38" width="38"
|
||||
fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width="1.0"/>
|
||||
<path id="arrow"
|
||||
d="M 11.500037,31.436501 C 11.940474,20.09759 22.043105,11.32322 32.158766,21.979434 L 37.068811,17.246167 C 37.068811,17.246167 37.088388,32 37.088388,32 L 22.160133,31.978069 C 22.160133,31.978069 26.997745,27.140456 26.997745,27.140456 C 18.528582,18.264221 13.291696,25.230495 11.500037,31.436501 z"
|
||||
style="fill:#404040;"/>
|
||||
</a>
|
||||
</g>
|
||||
</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: 39 KiB |
@@ -1,647 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="566pt" height="710pt"
|
||||
viewBox="0.00 0.00 565.75 709.79" 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 705.79)">
|
||||
<title>main</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="37,-480.5 0,-480.5 0,-461.25 37,-461.25 37,-480.5"/>
|
||||
<text text-anchor="middle" x="18.5" y="-467" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="116,-480.5 73,-480.5 73,-461.25 116,-461.25 116,-480.5"/>
|
||||
<text text-anchor="middle" x="94.5" y="-467" font-family="Helvetica,sans-Serif" font-size="10.00">test_1</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.41,-470.88C44.54,-470.88 52.97,-470.88 61.1,-470.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.09,-474.38 71.09,-470.88 61.09,-467.38 61.09,-474.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22 -->
|
||||
<g id="Node000022" class="node">
|
||||
<title>Node22</title>
|
||||
<g id="a_Node000022"><a xlink:href="../../d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="116,-523.5 73,-523.5 73,-504.25 116,-504.25 116,-523.5"/>
|
||||
<text text-anchor="middle" x="94.5" y="-510" font-family="Helvetica,sans-Serif" font-size="10.00">test_2</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node22 -->
|
||||
<g id="edge29_Node000001_Node000022" class="edge">
|
||||
<title>Node1->Node22</title>
|
||||
<g id="a_edge29_Node000001_Node000022"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M36.66,-480.85C45.47,-485.97 56.41,-492.32 66.33,-498.09"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="64.46,-501.05 74.87,-503.05 67.98,-495 64.46,-501.05"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23 -->
|
||||
<g id="Node000023" class="node">
|
||||
<title>Node23</title>
|
||||
<g id="a_Node000023"><a xlink:href="../../d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="116,-407.5 73,-407.5 73,-388.25 116,-388.25 116,-407.5"/>
|
||||
<text text-anchor="middle" x="94.5" y="-394" font-family="Helvetica,sans-Serif" font-size="10.00">test_3</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node23 -->
|
||||
<g id="edge37_Node000001_Node000023" class="edge">
|
||||
<title>Node1->Node23</title>
|
||||
<g id="a_edge37_Node000001_Node000023"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M29.48,-461.03C41.35,-449.32 61.39,-429.56 75.88,-415.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="77.94,-418.14 82.6,-408.63 73.02,-413.16 77.94,-418.14"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d" target="_top" xlink:title="Adds an undirected edge from node u to node v in the tree.">
|
||||
<polygon fill="white" stroke="#666666" points="261,-442.75 152,-442.75 152,-401 261,-401 261,-442.75"/>
|
||||
<text text-anchor="start" x="160" y="-429.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="160" y="-418" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="206.5" y="-406.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M116.45,-461.54C125.42,-457.55 136.39,-452.66 147.52,-447.7"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="148.64,-451.04 156.35,-443.77 145.79,-444.64 148.64,-451.04"/>
|
||||
</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/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="412.75,-476.5 297,-476.5 297,-457.25 412.75,-457.25 412.75,-476.5"/>
|
||||
<text text-anchor="middle" x="354.88" y="-463" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node4 -->
|
||||
<g id="edge17_Node000002_Node000004" class="edge">
|
||||
<title>Node2->Node4</title>
|
||||
<g id="a_edge17_Node000002_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M116.21,-470.55C152.45,-469.99 228.89,-468.81 285.34,-467.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="285.25,-471.44 295.19,-467.78 285.14,-464.44 285.25,-471.44"/>
|
||||
</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#ae9e979edd69678b85665c01e2ee97828" 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="261,-246.75 152,-246.75 152,-205 261,-205 261,-246.75"/>
|
||||
<text text-anchor="start" x="160" y="-233.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="160" y="-222" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="206.5" y="-210.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node5 -->
|
||||
<g id="edge4_Node000002_Node000005" class="edge">
|
||||
<title>Node2->Node5</title>
|
||||
<g id="a_edge4_Node000002_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M99.51,-461.01C103.83,-450.24 110.77,-432.47 116,-416.88 134.12,-362.87 125.92,-344.51 152,-293.88 158.95,-280.39 168.74,-266.96 178.05,-255.64"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="180.56,-258.09 184.37,-248.21 175.23,-253.56 180.56,-258.09"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab" target="_top" xlink:title="This function returns the sum of node values in the simple path from from node_1 to node_2.">
|
||||
<polygon fill="white" stroke="#666666" points="261,-344.75 152,-344.75 152,-303 261,-303 261,-344.75"/>
|
||||
<text text-anchor="start" x="160" y="-331.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="160" y="-320" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="206.5" y="-308.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node13 -->
|
||||
<g id="edge18_Node000002_Node000013" class="edge">
|
||||
<title>Node2->Node13</title>
|
||||
<g id="a_edge18_Node000002_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M102.49,-460.79C113.02,-445.67 133.68,-416.29 152,-391.88 161.39,-379.36 172,-365.77 181.27,-354.06"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="183.95,-356.31 187.44,-346.3 178.47,-351.95 183.95,-356.31"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="Node000018" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_Node000018"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" target="_top" xlink:title="Set the values for all the nodes.">
|
||||
<polygon fill="white" stroke="#666666" points="261,-540.75 152,-540.75 152,-499 261,-499 261,-540.75"/>
|
||||
<text text-anchor="start" x="160" y="-527.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="160" y="-516" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="206.5" y="-504.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node18 -->
|
||||
<g id="edge24_Node000002_Node000018" class="edge">
|
||||
<title>Node2->Node18</title>
|
||||
<g id="a_edge24_Node000002_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M116.45,-480.21C125.42,-484.2 136.39,-489.09 147.52,-494.05"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="145.79,-497.11 156.35,-497.98 148.64,-490.71 145.79,-497.11"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="Node000019" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_Node000019"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="398.12,-554.5 311.62,-554.5 311.62,-535.25 398.12,-535.25 398.12,-554.5"/>
|
||||
<text text-anchor="middle" x="354.88" y="-541" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node19 -->
|
||||
<g id="edge26_Node000002_Node000019" class="edge">
|
||||
<title>Node2->Node19</title>
|
||||
<g id="a_edge26_Node000002_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M104.57,-480.92C108.25,-485.13 112.45,-490.14 116,-494.88 133.52,-518.25 126.3,-535.98 152,-549.88 201.4,-576.58 268.02,-567.91 310.97,-557.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="311.58,-561.13 320.42,-555.29 309.86,-554.34 311.58,-561.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node20 -->
|
||||
<g id="Node000020" class="node">
|
||||
<title>Node20</title>
|
||||
<g id="a_Node000020"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57" target="_top" xlink:title="This function updates the value at node with val.">
|
||||
<polygon fill="white" stroke="#666666" points="261,-638.75 152,-638.75 152,-597 261,-597 261,-638.75"/>
|
||||
<text text-anchor="start" x="160" y="-625.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="160" y="-614" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="206.5" y="-602.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node20 -->
|
||||
<g id="edge27_Node000002_Node000020" class="edge">
|
||||
<title>Node2->Node20</title>
|
||||
<g id="a_edge27_Node000002_Node000020"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.04,-480.6C108.79,-484.76 112.92,-489.82 116,-494.88 138,-530.95 125.11,-550.28 152,-582.88 153.82,-585.08 155.82,-587.2 157.94,-589.23"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="155.57,-591.8 165.46,-595.59 160.09,-586.46 155.57,-591.8"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3_Node000003_Node000004" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M261.17,-438.38C277.32,-443.34 294.84,-448.73 310.26,-453.47"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.03,-456.75 319.62,-456.34 311.09,-450.06 309.03,-456.75"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><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="557.75,-285.75 448.75,-285.75 448.75,-244 557.75,-244 557.75,-285.75"/>
|
||||
<text text-anchor="start" x="456.75" y="-272.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="456.75" y="-261" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="503.25" y="-249.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node6 -->
|
||||
<g id="edge5_Node000005_Node000006" class="edge">
|
||||
<title>Node5->Node6</title>
|
||||
<g id="a_edge5_Node000005_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M261.32,-228.97C302.86,-231.82 361.67,-236.84 412.75,-244.88 420.75,-246.13 429.11,-247.68 437.36,-249.36"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="436.52,-252.76 447.03,-251.39 437.96,-245.91 436.52,-252.76"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><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 (-1 for a leaf node)">
|
||||
<polygon fill="white" stroke="#666666" points="409.38,-41.75 300.38,-41.75 300.38,0 409.38,0 409.38,-41.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node7 -->
|
||||
<g id="edge6_Node000005_Node000007" class="edge">
|
||||
<title>Node5->Node7</title>
|
||||
<g id="a_edge6_Node000005_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M216.69,-204.59C230.98,-172.94 260.68,-112.53 297,-68.88 302.69,-62.03 309.44,-55.39 316.27,-49.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="318.37,-52.16 323.72,-43.01 313.84,-46.82 318.37,-52.16"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><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="409.38,-295.75 300.38,-295.75 300.38,-254 409.38,-254 409.38,-295.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-282.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-271" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-259.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node8 -->
|
||||
<g id="edge8_Node000005_Node000008" class="edge">
|
||||
<title>Node5->Node8</title>
|
||||
<g id="a_edge8_Node000005_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M261.17,-243.84C270.32,-246.91 279.91,-250.11 289.3,-253.26"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="288.18,-256.57 298.77,-256.43 290.4,-249.94 288.18,-256.57"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><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="409.38,-179.75 300.38,-179.75 300.38,-138 409.38,-138 409.38,-179.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-166.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-155" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-143.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node9 -->
|
||||
<g id="edge10_Node000005_Node000009" class="edge">
|
||||
<title>Node5->Node9</title>
|
||||
<g id="a_edge10_Node000005_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M253.81,-204.68C267.56,-198.38 282.78,-191.42 297.11,-184.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="298.35,-188.14 305.98,-180.8 295.43,-181.78 298.35,-188.14"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><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="409.38,-119.75 300.38,-119.75 300.38,-78 409.38,-78 409.38,-119.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-106.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-95" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-83.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node10 -->
|
||||
<g id="edge12_Node000005_Node000010" class="edge">
|
||||
<title>Node5->Node10</title>
|
||||
<g id="a_edge12_Node000005_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M223.56,-204.61C240.24,-183.53 267.94,-151.22 297,-128.88 298.12,-128.01 299.27,-127.16 300.44,-126.33"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="302.08,-129.44 308.51,-121.01 298.23,-123.59 302.08,-129.44"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7->Node7 -->
|
||||
<g id="edge7_Node000007_Node000007" class="edge">
|
||||
<title>Node7->Node7</title>
|
||||
<g id="a_edge7_Node000007_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M327.49,-42.07C324.88,-51.55 334.01,-59.75 354.88,-59.75 366.94,-59.75 375.08,-57.01 379.29,-52.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="382.59,-54.1 381.86,-43.53 375.84,-52.24 382.59,-54.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node8 -->
|
||||
<g id="edge9_Node000008_Node000008" class="edge">
|
||||
<title>Node8->Node8</title>
|
||||
<g id="a_edge9_Node000008_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M327.49,-296.07C324.88,-305.55 334.01,-313.75 354.88,-313.75 366.94,-313.75 375.08,-311.01 379.29,-306.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="382.59,-308.1 381.86,-297.53 375.84,-306.24 382.59,-308.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node9 -->
|
||||
<g id="edge11_Node000009_Node000009" class="edge">
|
||||
<title>Node9->Node9</title>
|
||||
<g id="a_edge11_Node000009_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M327.49,-180.07C324.88,-189.55 334.01,-197.75 354.88,-197.75 366.94,-197.75 375.08,-195.01 379.29,-190.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="382.59,-192.1 381.86,-181.53 375.84,-190.24 382.59,-192.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><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="557.75,-80.75 448.75,-80.75 448.75,-39 557.75,-39 557.75,-80.75"/>
|
||||
<text text-anchor="start" x="456.75" y="-67.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="456.75" y="-56" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="503.25" y="-44.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node11 -->
|
||||
<g id="edge13_Node000010_Node000011" class="edge">
|
||||
<title>Node10->Node11</title>
|
||||
<g id="a_edge13_Node000010_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M409.55,-84.57C418.7,-82.14 428.28,-79.58 437.68,-77.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="438.36,-80.52 447.12,-74.56 436.56,-73.76 438.36,-80.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><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-tree sizes.">
|
||||
<polygon fill="white" stroke="#666666" points="557.75,-158.75 448.75,-158.75 448.75,-117 557.75,-117 557.75,-158.75"/>
|
||||
<text text-anchor="start" x="456.75" y="-145.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="456.75" y="-134" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="503.25" y="-122.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node12 -->
|
||||
<g id="edge15_Node000010_Node000012" class="edge">
|
||||
<title>Node10->Node12</title>
|
||||
<g id="a_edge15_Node000010_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M409.55,-113.18C418.7,-115.61 428.28,-118.17 437.68,-120.67"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="436.56,-123.99 447.12,-123.19 438.36,-117.23 436.56,-123.99"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node11 -->
|
||||
<g id="edge14_Node000011_Node000011" class="edge">
|
||||
<title>Node11->Node11</title>
|
||||
<g id="a_edge14_Node000011_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M475.86,-81.07C473.26,-90.55 482.38,-98.75 503.25,-98.75 515.31,-98.75 523.45,-96.01 527.67,-91.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="530.96,-93.1 530.23,-82.53 524.21,-91.24 530.96,-93.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node12 -->
|
||||
<g id="edge16_Node000012_Node000012" class="edge">
|
||||
<title>Node12->Node12</title>
|
||||
<g id="a_edge16_Node000012_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M475.86,-159.07C473.26,-168.55 482.38,-176.75 503.25,-176.75 515.31,-176.75 523.45,-174.01 527.67,-169.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="530.96,-171.1 530.23,-160.53 524.21,-169.24 530.96,-171.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><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="409.38,-373.75 300.38,-373.75 300.38,-332 409.38,-332 409.38,-373.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-360.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-349" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-337.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node14 -->
|
||||
<g id="edge19_Node000013_Node000014" class="edge">
|
||||
<title>Node13->Node14</title>
|
||||
<g id="a_edge19_Node000013_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M261.17,-334.51C270.22,-336.3 279.7,-338.18 289,-340.02"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="288.23,-343.44 298.72,-341.95 289.59,-336.57 288.23,-343.44"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="Node000016" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_Node000016"><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="409.38,-433.75 300.38,-433.75 300.38,-392 409.38,-392 409.38,-433.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-420.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-409" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-397.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node16 -->
|
||||
<g id="edge22_Node000013_Node000016" class="edge">
|
||||
<title>Node13->Node16</title>
|
||||
<g id="a_edge22_Node000013_Node000016"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M240.07,-345.12C246.98,-349.65 254.24,-354.41 261,-358.88 277.05,-369.47 280.47,-373.04 297,-382.88 298.83,-383.97 300.71,-385.06 302.62,-386.16"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="300.53,-389 310.96,-390.83 303.95,-382.89 300.53,-389"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14->Node6 -->
|
||||
<g id="edge20_Node000014_Node000006" class="edge">
|
||||
<title>Node14->Node6</title>
|
||||
<g id="a_edge20_Node000014_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M397.43,-331.51C402.63,-328.68 407.84,-325.75 412.75,-322.88 428.87,-313.43 446.18,-302.42 461.25,-292.54"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="463.11,-295.51 469.53,-287.08 459.25,-289.67 463.11,-295.51"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="Node000015" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_Node000015"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="532.62,-362.5 473.88,-362.5 473.88,-343.25 532.62,-343.25 532.62,-362.5"/>
|
||||
<text text-anchor="middle" x="503.25" y="-349" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14->Node15 -->
|
||||
<g id="edge21_Node000014_Node000015" class="edge">
|
||||
<title>Node14->Node15</title>
|
||||
<g id="a_edge21_Node000014_Node000015"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M409.55,-352.88C427.01,-352.88 446.08,-352.88 462.35,-352.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="462.13,-356.38 472.13,-352.88 462.13,-349.38 462.13,-356.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="Node000017" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_Node000017"><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="557.75,-433.75 448.75,-433.75 448.75,-392 557.75,-392 557.75,-433.75"/>
|
||||
<text text-anchor="start" x="456.75" y="-420.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="456.75" y="-409" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="503.25" y="-397.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16->Node17 -->
|
||||
<g id="edge23_Node000016_Node000017" class="edge">
|
||||
<title>Node16->Node17</title>
|
||||
<g id="a_edge23_Node000016_Node000017"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M409.55,-412.88C418.6,-412.88 428.08,-412.88 437.37,-412.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="437.07,-416.38 447.07,-412.88 437.07,-409.38 437.07,-416.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18->Node19 -->
|
||||
<g id="edge25_Node000018_Node000019" class="edge">
|
||||
<title>Node18->Node19</title>
|
||||
<g id="a_edge25_Node000018_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M261.17,-529.04C273.79,-531.2 287.25,-533.5 299.88,-535.65"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="299.26,-539.1 309.71,-537.33 300.44,-532.2 299.26,-539.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node21 -->
|
||||
<g id="Node000021" class="node">
|
||||
<title>Node21</title>
|
||||
<g id="a_Node000021"><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="409.38,-638.75 300.38,-638.75 300.38,-597 409.38,-597 409.38,-638.75"/>
|
||||
<text text-anchor="start" x="308.38" y="-625.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="308.38" y="-614" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="354.88" y="-602.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node20->Node21 -->
|
||||
<g id="edge28_Node000020_Node000021" class="edge">
|
||||
<title>Node20->Node21</title>
|
||||
<g id="a_edge28_Node000020_Node000021"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M261.17,-617.88C270.22,-617.88 279.7,-617.88 289,-617.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="288.69,-621.38 298.69,-617.88 288.69,-614.38 288.69,-621.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node3 -->
|
||||
<g id="edge30_Node000022_Node000003" class="edge">
|
||||
<title>Node22->Node3</title>
|
||||
<g id="a_edge30_Node000022_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M107.27,-504.03C122.47,-491.32 149.57,-468.66 171.45,-450.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="173.57,-453.14 179,-444.04 169.08,-447.77 173.57,-453.14"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node4 -->
|
||||
<g id="edge32_Node000022_Node000004" class="edge">
|
||||
<title>Node22->Node4</title>
|
||||
<g id="a_edge32_Node000022_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M96.16,-523.92C98.49,-549.87 108.66,-619.12 152,-647.88 192.36,-674.66 222.2,-676.88 261,-647.88 306.28,-614.03 268.57,-574.74 297,-525.88 306.24,-510 320.62,-495.13 332.61,-484.29"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="334.79,-487.03 340.05,-477.83 330.2,-481.75 334.79,-487.03"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node5 -->
|
||||
<g id="edge31_Node000022_Node000005" class="edge">
|
||||
<title>Node22->Node5</title>
|
||||
<g id="a_edge31_Node000022_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M106.01,-503.98C109.71,-499.95 113.55,-495.02 116,-489.88 154.07,-409.9 115.55,-374.6 152,-293.88 158.19,-280.16 167.74,-266.76 177.06,-255.53"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="179.53,-258.02 183.43,-248.17 174.24,-253.44 179.53,-258.02"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node13 -->
|
||||
<g id="edge33_Node000022_Node000013" class="edge">
|
||||
<title>Node22->Node13</title>
|
||||
<g id="a_edge33_Node000022_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.14,-504.21C108.9,-500.05 113.01,-494.98 116,-489.88 139.44,-449.83 129.37,-432.39 152,-391.88 159.46,-378.53 169.44,-365.04 178.76,-353.64"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="181.31,-356.05 185.07,-346.14 175.95,-351.55 181.31,-356.05"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node18 -->
|
||||
<g id="edge34_Node000022_Node000018" class="edge">
|
||||
<title>Node22->Node18</title>
|
||||
<g id="a_edge34_Node000022_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M116.45,-515.02C123.47,-515.4 131.71,-515.85 140.3,-516.32"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="140.02,-519.81 150.2,-516.86 140.4,-512.82 140.02,-519.81"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node19 -->
|
||||
<g id="edge35_Node000022_Node000019" class="edge">
|
||||
<title>Node22->Node19</title>
|
||||
<g id="a_edge35_Node000022_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M95.26,-523.63C95.13,-553.35 99.28,-643.05 152,-680.88 191.36,-709.11 221.04,-708.26 261,-680.88 297.56,-655.82 270.3,-623.26 297,-587.88 304.91,-577.39 316.03,-568.21 326.35,-561.06"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="328.13,-564.07 334.59,-555.67 324.3,-558.21 328.13,-564.07"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node22->Node20 -->
|
||||
<g id="edge36_Node000022_Node000020" class="edge">
|
||||
<title>Node22->Node20</title>
|
||||
<g id="a_edge36_Node000022_Node000020"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M102,-523.58C111.76,-537.7 131.27,-564.25 152,-582.88 154.68,-585.29 157.55,-587.65 160.5,-589.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="158.2,-592.59 168.34,-595.66 162.32,-586.93 158.2,-592.59"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node3 -->
|
||||
<g id="edge38_Node000023_Node000003" class="edge">
|
||||
<title>Node23->Node3</title>
|
||||
<g id="a_edge38_Node000023_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M116.45,-402.45C123.55,-403.99 131.9,-405.82 140.59,-407.71"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="139.71,-411.1 150.23,-409.82 141.21,-404.26 139.71,-411.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node4 -->
|
||||
<g id="edge40_Node000023_Node000004" class="edge">
|
||||
<title>Node23->Node4</title>
|
||||
<g id="a_edge40_Node000023_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M97.43,-387.81C102.21,-366.03 116.86,-314.78 152,-293.88 193.64,-269.11 222.93,-263.91 261,-293.88 314.53,-336.01 252.89,-390.96 297,-442.88 299.69,-446.04 302.87,-448.8 306.33,-451.2"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="304.28,-454.06 314.69,-456 307.76,-447.99 304.28,-454.06"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node5 -->
|
||||
<g id="edge39_Node000023_Node000005" class="edge">
|
||||
<title>Node23->Node5</title>
|
||||
<g id="a_edge39_Node000023_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M97.48,-387.86C102.69,-363.68 118.7,-301.11 152,-260.88 153.83,-258.67 155.83,-256.55 157.95,-254.53"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="160.1,-257.3 165.48,-248.17 155.58,-251.95 160.1,-257.3"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node13 -->
|
||||
<g id="edge41_Node000023_Node000013" class="edge">
|
||||
<title>Node23->Node13</title>
|
||||
<g id="a_edge41_Node000023_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M109.83,-387.84C121.21,-379.9 137.56,-368.58 152,-358.88 155.63,-356.44 159.4,-353.92 163.2,-351.41"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="164.91,-354.48 171.33,-346.05 161.05,-348.63 164.91,-354.48"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node18 -->
|
||||
<g id="edge42_Node000023_Node000018" class="edge">
|
||||
<title>Node23->Node18</title>
|
||||
<g id="a_edge42_Node000023_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M104.5,-407.86C120.61,-425.73 154.95,-463.81 179.1,-490.6"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="176.24,-492.65 185.53,-497.73 181.44,-487.96 176.24,-492.65"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node19 -->
|
||||
<g id="edge43_Node000023_Node000019" class="edge">
|
||||
<title>Node23->Node19</title>
|
||||
<g id="a_edge43_Node000023_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M116.24,-389.88C149.9,-378.38 217.06,-361.65 261,-391.88 297.86,-417.23 272.99,-448.12 297,-485.88 306.98,-501.56 321.59,-516.61 333.5,-527.58"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="331.04,-530.08 340.84,-534.11 335.7,-524.85 331.04,-530.08"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node23->Node20 -->
|
||||
<g id="edge44_Node000023_Node000020" class="edge">
|
||||
<title>Node23->Node20</title>
|
||||
<g id="a_edge44_Node000023_Node000020"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M99.31,-407.82C103.45,-418.64 110.25,-436.47 116,-451.88 132.23,-495.34 129.37,-509.36 152,-549.88 159.46,-563.22 169.44,-576.71 178.76,-588.11"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="175.95,-590.2 185.07,-595.61 181.31,-585.7 175.95,-590.2"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 35 KiB |
@@ -1,49 +0,0 @@
|
||||
<map id="test_3" name="test_3">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,420,63,446"/>
|
||||
<area shape="rect" id="Node000002" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d" title="Adds an undirected edge from node u to node v in the tree." alt="" coords="111,5,256,61"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="32,420,33,362,42,275,51,226,65,176,84,128,108,82,118,70,123,73,113,85,88,130,70,178,56,227,47,276,39,363,38,420"/>
|
||||
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="304,16,458,42"/>
|
||||
<area shape="poly" id="edge16_Node000001_Node000003" title=" " alt="" coords="32,420,33,368,41,292,51,251,64,209,83,169,109,132,303,52,323,45,324,50,305,57,112,137,88,171,69,211,56,252,47,293,38,369,37,420"/>
|
||||
<area shape="rect" id="Node000004" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828" title="This function must be called after the tree adjacency list and node values are populated The function..." alt="" coords="111,405,256,461"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="63,430,95,430,95,436,63,436"/>
|
||||
<area shape="rect" id="Node000012" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab" title="This function returns the sum of node values in the simple path from from node_1 to node_2." alt="" coords="111,147,256,202"/>
|
||||
<area shape="poly" id="edge17_Node000001_Node000012" title=" " alt="" coords="40,419,156,215,161,217,45,421"/>
|
||||
<area shape="rect" id="Node000017" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" title="Set the values for all the nodes." alt="" coords="111,499,256,554"/>
|
||||
<area shape="poly" id="edge23_Node000001_Node000017" title=" " alt="" coords="58,444,127,488,124,493,55,449"/>
|
||||
<area shape="rect" id="Node000018" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="324,670,439,695"/>
|
||||
<area shape="poly" id="edge25_Node000001_Node000018" title=" " alt="" coords="42,445,67,502,87,535,112,565,158,599,210,627,262,648,310,664,308,669,260,653,207,632,156,604,109,568,83,538,62,504,37,447"/>
|
||||
<area shape="rect" id="Node000019" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57" title="This function updates the value at node with val." alt="" coords="111,707,256,762"/>
|
||||
<area shape="poly" id="edge26_Node000001_Node000019" title=" " alt="" coords="41,446,67,527,88,581,113,635,151,693,147,696,108,637,83,583,62,529,36,447"/>
|
||||
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="256,29,288,28,289,34,256,34"/>
|
||||
<area shape="rect" id="Node000005" 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="506,212,652,268"/>
|
||||
<area shape="poly" id="edge4_Node000004_Node000005" title=" " alt="" coords="193,404,210,370,233,331,264,293,303,263,348,243,397,232,445,227,491,227,491,233,446,233,398,237,350,248,305,267,268,297,238,334,214,372,198,406"/>
|
||||
<area shape="rect" id="Node000006" 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 (-1 for a leaf node)" alt="" coords="308,301,454,357"/>
|
||||
<area shape="poly" id="edge5_Node000004_Node000006" title=" " alt="" coords="236,402,303,367,311,362,314,367,305,372,239,407"/>
|
||||
<area shape="rect" id="Node000007" 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="308,405,454,461"/>
|
||||
<area shape="poly" id="edge7_Node000004_Node000007" title=" " alt="" coords="256,430,293,430,293,436,256,436"/>
|
||||
<area shape="rect" id="Node000008" 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="308,589,454,645"/>
|
||||
<area shape="poly" id="edge9_Node000004_Node000008" title=" " alt="" coords="229,460,258,485,282,518,306,551,333,577,329,581,302,555,278,521,254,488,225,464"/>
|
||||
<area shape="rect" id="Node000009" 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="308,485,454,541"/>
|
||||
<area shape="poly" id="edge11_Node000004_Node000009" title=" " alt="" coords="255,459,298,477,296,482,253,464"/>
|
||||
<area shape="poly" id="edge6_Node000006_Node000006" title=" " alt="" coords="342,301,342,291,350,282,363,277,381,275,402,277,415,284,412,289,401,282,381,280,364,282,353,287,347,293,347,301"/>
|
||||
<area shape="poly" id="edge8_Node000007_Node000007" title=" " alt="" coords="342,405,342,395,350,386,363,381,381,379,402,381,415,388,412,393,401,386,381,384,364,386,353,391,347,397,347,405"/>
|
||||
<area shape="poly" id="edge10_Node000008_Node000008" title=" " alt="" coords="342,589,342,579,350,570,363,565,381,563,402,565,415,572,412,577,401,570,381,568,364,570,353,575,347,581,347,589"/>
|
||||
<area shape="rect" id="Node000010" 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="506,537,652,593"/>
|
||||
<area shape="poly" id="edge12_Node000009_Node000010" title=" " alt="" coords="455,530,492,540,491,545,453,535"/>
|
||||
<area shape="rect" id="Node000011" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" title="Utility function to compute sub-tree sizes." alt="" coords="506,433,652,489"/>
|
||||
<area shape="poly" id="edge14_Node000009_Node000011" title=" " alt="" coords="453,492,491,482,492,487,455,497"/>
|
||||
<area shape="poly" id="edge13_Node000010_Node000010" title=" " alt="" coords="540,537,540,527,547,518,560,513,579,511,600,513,613,520,610,525,598,518,579,516,562,518,551,523,545,529,545,537"/>
|
||||
<area shape="poly" id="edge15_Node000011_Node000011" title=" " alt="" coords="540,433,540,423,547,414,560,409,579,407,600,409,613,416,610,421,598,414,579,412,562,414,551,419,545,425,545,433"/>
|
||||
<area shape="rect" id="Node000013" 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="308,147,454,202"/>
|
||||
<area shape="poly" id="edge18_Node000012_Node000013" title=" " alt="" coords="256,172,293,172,293,177,256,177"/>
|
||||
<area shape="rect" id="Node000015" 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="308,67,454,122"/>
|
||||
<area shape="poly" id="edge21_Node000012_Node000015" title=" " alt="" coords="253,144,296,126,298,131,255,149"/>
|
||||
<area shape="poly" id="edge19_Node000013_Node000005" title=" " alt="" coords="455,196,492,208,491,214,453,201"/>
|
||||
<area shape="rect" id="Node000014" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="540,162,618,187"/>
|
||||
<area shape="poly" id="edge20_Node000013_Node000014" title=" " alt="" coords="454,172,524,172,524,177,454,177"/>
|
||||
<area shape="rect" id="Node000016" 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="506,67,652,122"/>
|
||||
<area shape="poly" id="edge22_Node000015_Node000016" title=" " alt="" coords="454,92,491,92,491,97,454,97"/>
|
||||
<area shape="poly" id="edge24_Node000017_Node000018" title=" " alt="" coords="216,553,258,597,280,628,290,642,306,655,314,660,311,665,302,659,286,645,276,632,254,600,212,557"/>
|
||||
<area shape="rect" id="Node000020" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c" title="Update the value at a node." alt="" coords="308,720,454,776"/>
|
||||
<area shape="poly" id="edge27_Node000019_Node000020" title=" " alt="" coords="256,737,294,739,293,745,256,742"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
f87e25e26305ef0fab62e38a09d1b449
|
||||
@@ -1,550 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: test_3 Pages: 1 -->
|
||||
<!--zoomable 586 -->
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" onload="init(evt)">
|
||||
|
||||
<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>
|
||||
|
||||
<defs>
|
||||
<circle id="rim" cx="0" cy="0" r="7"/>
|
||||
<circle id="rim2" cx="0" cy="0" r="3.5"/>
|
||||
<g id="zoomPlus">
|
||||
<use xlink:href="#rim" fill="#404040"><set attributeName="fill" to="#808080" begin="zoomplus.mouseover" end="zoomplus.mouseout"/></use>
|
||||
<path d="M-4,0h8M0,-4v8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
|
||||
</g>
|
||||
<g id="zoomMin">
|
||||
<use xlink:href="#rim" fill="#404040"><set attributeName="fill" to="#808080" begin="zoomminus.mouseover" end="zoomminus.mouseout"/></use>
|
||||
<path d="M-4,0h8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
|
||||
</g>
|
||||
<g id="arrowUp" transform="translate(30 24)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowRight" transform="rotate(90) translate(36 -43)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowDown" transform="rotate(180) translate(-30 -48)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowLeft" transform="rotate(270) translate(-36 17)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="resetDef">
|
||||
<use xlink:href="#rim2" fill="#404040"><set attributeName="fill" to="#808080" begin="reset.mouseover" end="reset.mouseout"/></use>
|
||||
</g>
|
||||
</defs>
|
||||
<script type="application/ecmascript">
|
||||
var viewWidth = 493;
|
||||
var viewHeight = 586;
|
||||
var sectionId = 'dynsection-4';
|
||||
</script>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="viewport">
|
||||
<title>test_3</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="43,-266.5 0,-266.5 0,-247.25 43,-247.25 43,-266.5"/>
|
||||
<text text-anchor="middle" x="21.5" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">test_3</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d" target="_top" xlink:title="Adds an undirected edge from node u to node v in the tree.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-577.75 79,-577.75 79,-536 188,-536 188,-577.75"/>
|
||||
<text text-anchor="start" x="87" y="-564.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-553" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-541.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M22.17,-266.88C21.45,-303.74 23.17,-434.18 79,-518.88 81.13,-522.11 83.65,-525.16 86.4,-528.01"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="83.8,-530.38 93.55,-534.51 88.5,-525.19 83.8,-530.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="339.75,-569.5 224,-569.5 224,-550.25 339.75,-550.25 339.75,-569.5"/>
|
||||
<text text-anchor="middle" x="281.88" y="-556" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge16_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge16_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M22.06,-266.77C21.07,-300.92 22.35,-415.33 79,-480.88 81.85,-484.17 219.92,-539.35 224,-540.88 228.74,-542.64 233.72,-544.42 238.69,-546.15"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="237.42,-549.41 248.01,-549.32 239.68,-542.79 237.42,-549.41"/>
|
||||
</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#ae9e979edd69678b85665c01e2ee97828" 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="188,-277.75 79,-277.75 79,-236 188,-236 188,-277.75"/>
|
||||
<text text-anchor="start" x="87" y="-264.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-241.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M43.45,-256.88C50.47,-256.88 58.71,-256.88 67.3,-256.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="67.2,-260.38 77.2,-256.88 67.2,-253.38 67.2,-260.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab" target="_top" xlink:title="This function returns the sum of node values in the simple path from from node_1 to node_2.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-471.75 79,-471.75 79,-430 188,-430 188,-471.75"/>
|
||||
<text text-anchor="start" x="87" y="-458.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-435.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge17_Node000001_Node000012" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<g id="a_edge17_Node000001_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M28.11,-266.76C43.95,-294.7 89.53,-375.1 114.91,-419.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="111.73,-421.34 119.7,-428.31 117.82,-417.88 111.73,-421.34"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="Node000017" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_Node000017"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" target="_top" xlink:title="Set the values for all the nodes.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-207.75 79,-207.75 79,-166 188,-166 188,-207.75"/>
|
||||
<text text-anchor="start" x="87" y="-194.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-171.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node17 -->
|
||||
<g id="edge23_Node000001_Node000017" class="edge">
|
||||
<title>Node1->Node17</title>
|
||||
<g id="a_edge23_Node000001_Node000017"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M38.26,-246.85C51.72,-238.28 71.71,-225.56 89.83,-214.03"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="91.25,-217.27 97.81,-208.95 87.49,-211.37 91.25,-217.27"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="Node000018" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_Node000018"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="325.12,-79.5 238.62,-79.5 238.62,-60.25 325.12,-60.25 325.12,-79.5"/>
|
||||
<text text-anchor="middle" x="281.88" y="-66" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node18 -->
|
||||
<g id="edge25_Node000001_Node000018" class="edge">
|
||||
<title>Node1->Node18</title>
|
||||
<g id="a_edge25_Node000001_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M25.74,-247.05C32.63,-227.49 50.48,-183.31 79,-156.88 121.06,-117.89 183.3,-94.7 227.53,-82.19"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="228.18,-85.64 236.91,-79.63 226.34,-78.89 228.18,-85.64"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="Node000019" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_Node000019"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57" target="_top" xlink:title="This function updates the value at node with val.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-51.75 79,-51.75 79,-10 188,-10 188,-51.75"/>
|
||||
<text text-anchor="start" x="87" y="-38.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-27" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-15.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node19 -->
|
||||
<g id="edge26_Node000001_Node000019" class="edge">
|
||||
<title>Node1->Node19</title>
|
||||
<g id="a_edge26_Node000001_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M25.2,-246.88C32.12,-221.97 51.92,-155.52 79,-104.88 87.12,-89.69 97.98,-74.06 107.8,-61.11"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="110.42,-63.44 113.78,-53.39 104.89,-59.15 110.42,-63.44"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-557.98C196.05,-558.14 204.25,-558.3 212.37,-558.47"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="212.18,-561.97 222.25,-558.67 212.32,-554.97 212.18,-561.97"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><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="484.75,-422.75 375.75,-422.75 375.75,-381 484.75,-381 484.75,-422.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-409.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-398" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-386.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4_Node000004_Node000005" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<g id="a_edge4_Node000004_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M142.84,-278.2C155.51,-307.43 182.62,-359.03 224,-382.88 266.18,-407.18 321.48,-411.02 364.06,-409.28"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="364.12,-412.78 373.91,-408.75 363.74,-405.79 364.12,-412.78"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><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 (-1 for a leaf node)">
|
||||
<polygon fill="white" stroke="#666666" points="336.38,-355.75 227.38,-355.75 227.38,-314 336.38,-314 336.38,-355.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-342.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-331" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-319.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5_Node000004_Node000006" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<g id="a_edge5_Node000004_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M174.12,-278.2C189.66,-286.54 207.65,-296.18 224,-304.88 226.08,-305.98 228.2,-307.11 230.35,-308.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="228.65,-311.31 239.13,-312.9 231.93,-305.12 228.65,-311.31"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><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="336.38,-277.75 227.38,-277.75 227.38,-236 336.38,-236 336.38,-277.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-264.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-241.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge7_Node000004_Node000007" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<g id="a_edge7_Node000004_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-256.88C197.22,-256.88 206.7,-256.88 216,-256.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.69,-260.38 225.69,-256.88 215.69,-253.38 215.69,-260.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><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="336.38,-139.75 227.38,-139.75 227.38,-98 336.38,-98 336.38,-139.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-126.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-115" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge9_Node000004_Node000008" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<g id="a_edge9_Node000004_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M166.37,-235.54C173.84,-229.88 181.5,-223.49 188,-216.88 207.19,-197.34 205.4,-186.97 224,-166.88 230.17,-160.21 237.24,-153.58 244.26,-147.48"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="246.5,-150.17 251.88,-141.04 241.98,-144.82 246.5,-150.17"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><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="336.38,-217.75 227.38,-217.75 227.38,-176 336.38,-176 336.38,-217.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-204.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-193" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-181.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node9 -->
|
||||
<g id="edge11_Node000004_Node000009" class="edge">
|
||||
<title>Node4->Node9</title>
|
||||
<g id="a_edge11_Node000004_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M186.52,-235.55C196.87,-231.31 207.84,-226.81 218.5,-222.44"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="219.7,-225.73 227.62,-218.7 217.04,-219.26 219.7,-225.73"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6->Node6 -->
|
||||
<g id="edge6_Node000006_Node000006" class="edge">
|
||||
<title>Node6->Node6</title>
|
||||
<g id="a_edge6_Node000006_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-356.07C251.88,-365.55 261.01,-373.75 281.88,-373.75 293.94,-373.75 302.08,-371.01 306.29,-366.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-368.1 308.86,-357.53 302.84,-366.24 309.59,-368.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7->Node7 -->
|
||||
<g id="edge8_Node000007_Node000007" class="edge">
|
||||
<title>Node7->Node7</title>
|
||||
<g id="a_edge8_Node000007_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-278.07C251.88,-287.55 261.01,-295.75 281.88,-295.75 293.94,-295.75 302.08,-293.01 306.29,-288.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-290.1 308.86,-279.53 302.84,-288.24 309.59,-290.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node8 -->
|
||||
<g id="edge10_Node000008_Node000008" class="edge">
|
||||
<title>Node8->Node8</title>
|
||||
<g id="a_edge10_Node000008_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-140.07C251.88,-149.55 261.01,-157.75 281.88,-157.75 293.94,-157.75 302.08,-155.01 306.29,-150.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-152.1 308.86,-141.53 302.84,-150.24 309.59,-152.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><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="484.75,-178.75 375.75,-178.75 375.75,-137 484.75,-137 484.75,-178.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-165.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-154" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-142.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge12_Node000009_Node000010" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<g id="a_edge12_Node000009_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-182.57C345.7,-180.14 355.28,-177.58 364.68,-175.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="365.36,-178.52 374.12,-172.56 363.56,-171.76 365.36,-178.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><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-tree sizes.">
|
||||
<polygon fill="white" stroke="#666666" points="484.75,-256.75 375.75,-256.75 375.75,-215 484.75,-215 484.75,-256.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-243.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-232" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-220.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge14_Node000009_Node000011" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<g id="a_edge14_Node000009_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-211.18C345.7,-213.61 355.28,-216.17 364.68,-218.67"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="363.56,-221.99 374.12,-221.19 365.36,-215.23 363.56,-221.99"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node10 -->
|
||||
<g id="edge13_Node000010_Node000010" class="edge">
|
||||
<title>Node10->Node10</title>
|
||||
<g id="a_edge13_Node000010_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M402.86,-179.07C400.26,-188.55 409.38,-196.75 430.25,-196.75 442.31,-196.75 450.45,-194.01 454.67,-189.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="457.96,-191.1 457.23,-180.53 451.21,-189.24 457.96,-191.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node11 -->
|
||||
<g id="edge15_Node000011_Node000011" class="edge">
|
||||
<title>Node11->Node11</title>
|
||||
<g id="a_edge15_Node000011_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M402.86,-257.07C400.26,-266.55 409.38,-274.75 430.25,-274.75 442.31,-274.75 450.45,-272.01 454.67,-267.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="457.96,-269.1 457.23,-258.53 451.21,-267.24 457.96,-269.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><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="336.38,-471.75 227.38,-471.75 227.38,-430 336.38,-430 336.38,-471.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-458.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-435.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge18_Node000012_Node000013" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<g id="a_edge18_Node000012_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-450.88C197.22,-450.88 206.7,-450.88 216,-450.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.69,-454.38 225.69,-450.88 215.69,-447.38 215.69,-454.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="Node000015" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_Node000015"><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="336.38,-531.75 227.38,-531.75 227.38,-490 336.38,-490 336.38,-531.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-518.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-495.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node15 -->
|
||||
<g id="edge21_Node000012_Node000015" class="edge">
|
||||
<title>Node12->Node15</title>
|
||||
<g id="a_edge21_Node000012_Node000015"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M186.52,-472.2C196.87,-476.44 207.84,-480.94 218.5,-485.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="217.04,-488.49 227.62,-489.05 219.7,-482.02 217.04,-488.49"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node5 -->
|
||||
<g id="edge19_Node000013_Node000005" class="edge">
|
||||
<title>Node13->Node5</title>
|
||||
<g id="a_edge19_Node000013_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-432.91C345.7,-429.84 355.28,-426.64 364.68,-423.49"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="365.78,-426.81 374.15,-420.32 363.55,-420.18 365.78,-426.81"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="459.62,-460.5 400.88,-460.5 400.88,-441.25 459.62,-441.25 459.62,-460.5"/>
|
||||
<text text-anchor="middle" x="430.25" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node14 -->
|
||||
<g id="edge20_Node000013_Node000014" class="edge">
|
||||
<title>Node13->Node14</title>
|
||||
<g id="a_edge20_Node000013_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-450.88C354.01,-450.88 373.08,-450.88 389.35,-450.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="389.13,-454.38 399.13,-450.88 389.13,-447.38 389.13,-454.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="Node000016" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_Node000016"><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="484.75,-531.75 375.75,-531.75 375.75,-490 484.75,-490 484.75,-531.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-518.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-495.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15->Node16 -->
|
||||
<g id="edge22_Node000015_Node000016" class="edge">
|
||||
<title>Node15->Node16</title>
|
||||
<g id="a_edge22_Node000015_Node000016"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-510.88C345.6,-510.88 355.08,-510.88 364.37,-510.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="364.07,-514.38 374.07,-510.88 364.07,-507.38 364.07,-514.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17->Node18 -->
|
||||
<g id="edge24_Node000017_Node000018" class="edge">
|
||||
<title>Node17->Node18</title>
|
||||
<g id="a_edge24_Node000017_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M156.59,-165.52C166.43,-155.78 178.02,-143.96 188,-132.88 204.91,-114.1 203.2,-103.22 224,-88.88 226.09,-87.43 228.3,-86.1 230.58,-84.85"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="232.01,-88.05 239.58,-80.64 229.04,-81.71 232.01,-88.05"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node20 -->
|
||||
<g id="Node000020" class="node">
|
||||
<title>Node20</title>
|
||||
<g id="a_Node000020"><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="336.38,-41.75 227.38,-41.75 227.38,0 336.38,0 336.38,-41.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19->Node20 -->
|
||||
<g id="edge27_Node000019_Node000020" class="edge">
|
||||
<title>Node19->Node20</title>
|
||||
<g id="a_edge27_Node000019_Node000020"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-27.21C197.22,-26.59 206.7,-25.94 216,-25.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.96,-28.82 225.7,-24.64 215.48,-21.83 215.96,-28.82"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<g id="navigator" transform="translate(0 0)" fill="#404254">
|
||||
<rect fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width=".5" x="0" y="0" width="60" height="60"/>
|
||||
<use id="zoomplus" xlink:href="#zoomPlus" x="17" y="9" onmousedown="handleZoom(evt,'in')"/>
|
||||
<use id="zoomminus" xlink:href="#zoomMin" x="42" y="9" onmousedown="handleZoom(evt,'out')"/>
|
||||
<use id="reset" xlink:href="#resetDef" x="30" y="36" onmousedown="handleReset()"/>
|
||||
<use id="arrowup" xlink:href="#arrowUp" x="0" y="0" onmousedown="handlePan(0,-1)"/>
|
||||
<use id="arrowright" xlink:href="#arrowRight" x="0" y="0" onmousedown="handlePan(1,0)"/>
|
||||
<use id="arrowdown" xlink:href="#arrowDown" x="0" y="0" onmousedown="handlePan(0,1)"/>
|
||||
<use id="arrowleft" xlink:href="#arrowLeft" x="0" y="0" onmousedown="handlePan(-1,0)"/>
|
||||
</g>
|
||||
<svg viewBox="0 0 15 15" width="100%" height="30px" preserveAspectRatio="xMaxYMin meet">
|
||||
<g id="arrow_out" transform="scale(0.3 0.3)">
|
||||
<a xlink:href="heavy__light__decomposition_8cpp_af31ec5409537703d9c8a47350386b32a_cgraph_org.svg" target="_base">
|
||||
<rect id="button" ry="5" rx="5" y="6" x="6" height="38" width="38"
|
||||
fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width="1.0"/>
|
||||
<path id="arrow"
|
||||
d="M 11.500037,31.436501 C 11.940474,20.09759 22.043105,11.32322 32.158766,21.979434 L 37.068811,17.246167 C 37.068811,17.246167 37.088388,32 37.088388,32 L 22.160133,31.978069 C 22.160133,31.978069 26.997745,27.140456 26.997745,27.140456 C 18.528582,18.264221 13.291696,25.230495 11.500037,31.436501 z"
|
||||
style="fill:#404040;"/>
|
||||
</a>
|
||||
</g>
|
||||
</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: 30 KiB |
@@ -1,467 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: test_3 Pages: 1 -->
|
||||
<svg width="493pt" height="586pt"
|
||||
viewBox="0.00 0.00 492.75 585.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 581.75)">
|
||||
<title>test_3</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="43,-266.5 0,-266.5 0,-247.25 43,-247.25 43,-266.5"/>
|
||||
<text text-anchor="middle" x="21.5" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">test_3</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d" target="_top" xlink:title="Adds an undirected edge from node u to node v in the tree.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-577.75 79,-577.75 79,-536 188,-536 188,-577.75"/>
|
||||
<text text-anchor="start" x="87" y="-564.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-553" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-541.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M22.17,-266.88C21.45,-303.74 23.17,-434.18 79,-518.88 81.13,-522.11 83.65,-525.16 86.4,-528.01"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="83.8,-530.38 93.55,-534.51 88.5,-525.19 83.8,-530.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="339.75,-569.5 224,-569.5 224,-550.25 339.75,-550.25 339.75,-569.5"/>
|
||||
<text text-anchor="middle" x="281.88" y="-556" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge16_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge16_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M22.06,-266.77C21.07,-300.92 22.35,-415.33 79,-480.88 81.85,-484.17 219.92,-539.35 224,-540.88 228.74,-542.64 233.72,-544.42 238.69,-546.15"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="237.42,-549.41 248.01,-549.32 239.68,-542.79 237.42,-549.41"/>
|
||||
</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#ae9e979edd69678b85665c01e2ee97828" 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="188,-277.75 79,-277.75 79,-236 188,-236 188,-277.75"/>
|
||||
<text text-anchor="start" x="87" y="-264.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-241.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M43.45,-256.88C50.47,-256.88 58.71,-256.88 67.3,-256.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="67.2,-260.38 77.2,-256.88 67.2,-253.38 67.2,-260.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab" target="_top" xlink:title="This function returns the sum of node values in the simple path from from node_1 to node_2.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-471.75 79,-471.75 79,-430 188,-430 188,-471.75"/>
|
||||
<text text-anchor="start" x="87" y="-458.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-435.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge17_Node000001_Node000012" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<g id="a_edge17_Node000001_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M28.11,-266.76C43.95,-294.7 89.53,-375.1 114.91,-419.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="111.73,-421.34 119.7,-428.31 117.82,-417.88 111.73,-421.34"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="Node000017" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_Node000017"><a xlink:href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" target="_top" xlink:title="Set the values for all the nodes.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-207.75 79,-207.75 79,-166 188,-166 188,-207.75"/>
|
||||
<text text-anchor="start" x="87" y="-194.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-171.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node17 -->
|
||||
<g id="edge23_Node000001_Node000017" class="edge">
|
||||
<title>Node1->Node17</title>
|
||||
<g id="a_edge23_Node000001_Node000017"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M38.26,-246.85C51.72,-238.28 71.71,-225.56 89.83,-214.03"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="91.25,-217.27 97.81,-208.95 87.49,-211.37 91.25,-217.27"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="Node000018" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_Node000018"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="325.12,-79.5 238.62,-79.5 238.62,-60.25 325.12,-60.25 325.12,-79.5"/>
|
||||
<text text-anchor="middle" x="281.88" y="-66" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node18 -->
|
||||
<g id="edge25_Node000001_Node000018" class="edge">
|
||||
<title>Node1->Node18</title>
|
||||
<g id="a_edge25_Node000001_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M25.74,-247.05C32.63,-227.49 50.48,-183.31 79,-156.88 121.06,-117.89 183.3,-94.7 227.53,-82.19"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="228.18,-85.64 236.91,-79.63 226.34,-78.89 228.18,-85.64"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="Node000019" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_Node000019"><a xlink:href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57" target="_top" xlink:title="This function updates the value at node with val.">
|
||||
<polygon fill="white" stroke="#666666" points="188,-51.75 79,-51.75 79,-10 188,-10 188,-51.75"/>
|
||||
<text text-anchor="start" x="87" y="-38.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="87" y="-27" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="133.5" y="-15.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node19 -->
|
||||
<g id="edge26_Node000001_Node000019" class="edge">
|
||||
<title>Node1->Node19</title>
|
||||
<g id="a_edge26_Node000001_Node000019"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M25.2,-246.88C32.12,-221.97 51.92,-155.52 79,-104.88 87.12,-89.69 97.98,-74.06 107.8,-61.11"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="110.42,-63.44 113.78,-53.39 104.89,-59.15 110.42,-63.44"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-557.98C196.05,-558.14 204.25,-558.3 212.37,-558.47"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="212.18,-561.97 222.25,-558.67 212.32,-554.97 212.18,-561.97"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><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="484.75,-422.75 375.75,-422.75 375.75,-381 484.75,-381 484.75,-422.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-409.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-398" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-386.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4_Node000004_Node000005" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<g id="a_edge4_Node000004_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M142.84,-278.2C155.51,-307.43 182.62,-359.03 224,-382.88 266.18,-407.18 321.48,-411.02 364.06,-409.28"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="364.12,-412.78 373.91,-408.75 363.74,-405.79 364.12,-412.78"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><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 (-1 for a leaf node)">
|
||||
<polygon fill="white" stroke="#666666" points="336.38,-355.75 227.38,-355.75 227.38,-314 336.38,-314 336.38,-355.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-342.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-331" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-319.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5_Node000004_Node000006" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<g id="a_edge5_Node000004_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M174.12,-278.2C189.66,-286.54 207.65,-296.18 224,-304.88 226.08,-305.98 228.2,-307.11 230.35,-308.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="228.65,-311.31 239.13,-312.9 231.93,-305.12 228.65,-311.31"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><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="336.38,-277.75 227.38,-277.75 227.38,-236 336.38,-236 336.38,-277.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-264.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-253" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-241.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge7_Node000004_Node000007" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<g id="a_edge7_Node000004_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-256.88C197.22,-256.88 206.7,-256.88 216,-256.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.69,-260.38 225.69,-256.88 215.69,-253.38 215.69,-260.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><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="336.38,-139.75 227.38,-139.75 227.38,-98 336.38,-98 336.38,-139.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-126.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-115" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge9_Node000004_Node000008" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<g id="a_edge9_Node000004_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M166.37,-235.54C173.84,-229.88 181.5,-223.49 188,-216.88 207.19,-197.34 205.4,-186.97 224,-166.88 230.17,-160.21 237.24,-153.58 244.26,-147.48"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="246.5,-150.17 251.88,-141.04 241.98,-144.82 246.5,-150.17"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><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="336.38,-217.75 227.38,-217.75 227.38,-176 336.38,-176 336.38,-217.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-204.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-193" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-181.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node9 -->
|
||||
<g id="edge11_Node000004_Node000009" class="edge">
|
||||
<title>Node4->Node9</title>
|
||||
<g id="a_edge11_Node000004_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M186.52,-235.55C196.87,-231.31 207.84,-226.81 218.5,-222.44"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="219.7,-225.73 227.62,-218.7 217.04,-219.26 219.7,-225.73"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6->Node6 -->
|
||||
<g id="edge6_Node000006_Node000006" class="edge">
|
||||
<title>Node6->Node6</title>
|
||||
<g id="a_edge6_Node000006_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-356.07C251.88,-365.55 261.01,-373.75 281.88,-373.75 293.94,-373.75 302.08,-371.01 306.29,-366.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-368.1 308.86,-357.53 302.84,-366.24 309.59,-368.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7->Node7 -->
|
||||
<g id="edge8_Node000007_Node000007" class="edge">
|
||||
<title>Node7->Node7</title>
|
||||
<g id="a_edge8_Node000007_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-278.07C251.88,-287.55 261.01,-295.75 281.88,-295.75 293.94,-295.75 302.08,-293.01 306.29,-288.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-290.1 308.86,-279.53 302.84,-288.24 309.59,-290.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node8 -->
|
||||
<g id="edge10_Node000008_Node000008" class="edge">
|
||||
<title>Node8->Node8</title>
|
||||
<g id="a_edge10_Node000008_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M254.49,-140.07C251.88,-149.55 261.01,-157.75 281.88,-157.75 293.94,-157.75 302.08,-155.01 306.29,-150.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="309.59,-152.1 308.86,-141.53 302.84,-150.24 309.59,-152.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><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="484.75,-178.75 375.75,-178.75 375.75,-137 484.75,-137 484.75,-178.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-165.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-154" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-142.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge12_Node000009_Node000010" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<g id="a_edge12_Node000009_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-182.57C345.7,-180.14 355.28,-177.58 364.68,-175.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="365.36,-178.52 374.12,-172.56 363.56,-171.76 365.36,-178.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><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-tree sizes.">
|
||||
<polygon fill="white" stroke="#666666" points="484.75,-256.75 375.75,-256.75 375.75,-215 484.75,-215 484.75,-256.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-243.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-232" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-220.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge14_Node000009_Node000011" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<g id="a_edge14_Node000009_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-211.18C345.7,-213.61 355.28,-216.17 364.68,-218.67"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="363.56,-221.99 374.12,-221.19 365.36,-215.23 363.56,-221.99"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node10 -->
|
||||
<g id="edge13_Node000010_Node000010" class="edge">
|
||||
<title>Node10->Node10</title>
|
||||
<g id="a_edge13_Node000010_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M402.86,-179.07C400.26,-188.55 409.38,-196.75 430.25,-196.75 442.31,-196.75 450.45,-194.01 454.67,-189.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="457.96,-191.1 457.23,-180.53 451.21,-189.24 457.96,-191.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node11 -->
|
||||
<g id="edge15_Node000011_Node000011" class="edge">
|
||||
<title>Node11->Node11</title>
|
||||
<g id="a_edge15_Node000011_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M402.86,-257.07C400.26,-266.55 409.38,-274.75 430.25,-274.75 442.31,-274.75 450.45,-272.01 454.67,-267.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="457.96,-269.1 457.23,-258.53 451.21,-267.24 457.96,-269.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><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="336.38,-471.75 227.38,-471.75 227.38,-430 336.38,-430 336.38,-471.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-458.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-435.75" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge18_Node000012_Node000013" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<g id="a_edge18_Node000012_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-450.88C197.22,-450.88 206.7,-450.88 216,-450.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.69,-454.38 225.69,-450.88 215.69,-447.38 215.69,-454.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="Node000015" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_Node000015"><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="336.38,-531.75 227.38,-531.75 227.38,-490 336.38,-490 336.38,-531.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-518.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-495.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node15 -->
|
||||
<g id="edge21_Node000012_Node000015" class="edge">
|
||||
<title>Node12->Node15</title>
|
||||
<g id="a_edge21_Node000012_Node000015"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M186.52,-472.2C196.87,-476.44 207.84,-480.94 218.5,-485.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="217.04,-488.49 227.62,-489.05 219.7,-482.02 217.04,-488.49"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node5 -->
|
||||
<g id="edge19_Node000013_Node000005" class="edge">
|
||||
<title>Node13->Node5</title>
|
||||
<g id="a_edge19_Node000013_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-432.91C345.7,-429.84 355.28,-426.64 364.68,-423.49"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="365.78,-426.81 374.15,-420.32 363.55,-420.18 365.78,-426.81"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="459.62,-460.5 400.88,-460.5 400.88,-441.25 459.62,-441.25 459.62,-460.5"/>
|
||||
<text text-anchor="middle" x="430.25" y="-447" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node14 -->
|
||||
<g id="edge20_Node000013_Node000014" class="edge">
|
||||
<title>Node13->Node14</title>
|
||||
<g id="a_edge20_Node000013_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-450.88C354.01,-450.88 373.08,-450.88 389.35,-450.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="389.13,-454.38 399.13,-450.88 389.13,-447.38 389.13,-454.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="Node000016" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_Node000016"><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="484.75,-531.75 375.75,-531.75 375.75,-490 484.75,-490 484.75,-531.75"/>
|
||||
<text text-anchor="start" x="383.75" y="-518.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="383.75" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="430.25" y="-495.75" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15->Node16 -->
|
||||
<g id="edge22_Node000015_Node000016" class="edge">
|
||||
<title>Node15->Node16</title>
|
||||
<g id="a_edge22_Node000015_Node000016"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M336.55,-510.88C345.6,-510.88 355.08,-510.88 364.37,-510.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="364.07,-514.38 374.07,-510.88 364.07,-507.38 364.07,-514.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17->Node18 -->
|
||||
<g id="edge24_Node000017_Node000018" class="edge">
|
||||
<title>Node17->Node18</title>
|
||||
<g id="a_edge24_Node000017_Node000018"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M156.59,-165.52C166.43,-155.78 178.02,-143.96 188,-132.88 204.91,-114.1 203.2,-103.22 224,-88.88 226.09,-87.43 228.3,-86.1 230.58,-84.85"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="232.01,-88.05 239.58,-80.64 229.04,-81.71 232.01,-88.05"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node20 -->
|
||||
<g id="Node000020" class="node">
|
||||
<title>Node20</title>
|
||||
<g id="a_Node000020"><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="336.38,-41.75 227.38,-41.75 227.38,0 336.38,0 336.38,-41.75"/>
|
||||
<text text-anchor="start" x="235.38" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="235.38" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="281.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19->Node20 -->
|
||||
<g id="edge27_Node000019_Node000020" class="edge">
|
||||
<title>Node19->Node20</title>
|
||||
<g id="a_edge27_Node000019_Node000020"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M188.17,-27.21C197.22,-26.59 206.7,-25.94 216,-25.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="215.96,-28.82 225.7,-24.64 215.48,-21.83 215.96,-28.82"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 26 KiB |
634
d2/de9/heavy__light__decomposition_8cpp_source.html
Normal file
@@ -0,0 +1,634 @@
|
||||
<!-- 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>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.12.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: range_queries/heavy_light_decomposition.cpp Source File</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>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../cookie.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/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" 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! -->
|
||||
<div id="titlearea">
|
||||
<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">TheAlgorithms/C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">All the algorithms implemented in C++</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(1); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search',true);
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d2/de9/heavy__light__decomposition_8cpp_source.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">heavy_light_decomposition.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../d2/de9/heavy__light__decomposition_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="preprocessor">#include <algorithm></span></div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="preprocessor">#include <cassert></span></div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="preprocessor">#include <cmath></span></div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="preprocessor">#include <cstring></span></div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="preprocessor">#include <iostream></span></div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="preprocessor">#include <list></span></div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="preprocessor">#include <numeric></span></div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="preprocessor">#include <string></span></div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="preprocessor">#include <vector></span></div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../dd/d69/namespacerange__queries.html">range_queries</a> {</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../db/d6f/namespaceheavy__light__decomposition.html">heavy_light_decomposition</a> {</div>
|
||||
<div class="foldopen" id="foldopen00078" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html"> 78</a></span><span class="keyword">template</span> <<span class="keyword">typename</span> X> <span class="keyword">class </span><a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree</a> {</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="comment">//</span></div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span><span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> std::vector<std::list<int>></div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43"> 83</a></span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a>; </div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a"> 84</a></span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a>, </div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1"> 85</a></span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a>; </div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> std::vector<std::vector<int>></div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203"> 87</a></span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>; </div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1"> 88</a></span> std::vector<int> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>, </div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5"> 89</a></span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">t_size</a>; </div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8"> 91</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">t_root</a>; </div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7"> 92</a></span> std::vector<X> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">t_val</a>; </div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">HLD</a>;</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
|
||||
<div class="foldopen" id="foldopen00101" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460"> 101</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460">dfs_size</a>(<span class="keywordtype">int</span> u, <span class="keywordtype">int</span> p = -1) {</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> &v : <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a>[u]) {</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">if</span> (v ^ p) {</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460">dfs_size</a>(v, u);</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">t_size</a>[u] += <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">t_size</a>[v];</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> }</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
|
||||
<div class="foldopen" id="foldopen00116" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4"> 116</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4">dfs_lca</a>(<span class="keywordtype">int</span> u, <span class="keywordtype">int</span> p = -1) {</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[u][0] = p;</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">if</span> (p != -1) {</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[u] = 1 + <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[p];</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> }</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = 1; k < <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a>; k++) {</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[u][k - 1] != -1) {</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[u][k] = <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[u][k - 1]][k - 1];</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> }</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> }</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> &v : <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a>[u]) {</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordflow">if</span> (v ^ p) {</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4">dfs_lca</a>(v, u);</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> }</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> }</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> </div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span><span class="keyword">public</span>:</div>
|
||||
<div class="foldopen" id="foldopen00140" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1"> 140</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1">Tree</a>(<span class="keywordtype">int</span> nodes)</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> : <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a>(nodes), <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a>(static_cast<int>(floor(log2(nodes))) + 1) {</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="comment">/* Initialize and resize all the vectors */</span></div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">t_root</a> = 0; <span class="comment">/* Default */</span></div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a>.resize(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a>);</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>.assign(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a>, std::vector<int>(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a>, -1));</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>.assign(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a>, 0);</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">t_size</a>.assign(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a>, 1);</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">t_val</a>.resize(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a>);</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
|
||||
<div class="foldopen" id="foldopen00157" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d"> 157</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d">add_edge</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> u, <span class="keyword">const</span> <span class="keywordtype">int</span> v) {</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a>[u].push_back(v);</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a>[v].push_back(u);</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> </div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0"> 167</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">change_root</a>(<span class="keywordtype">int</span> new_root) { <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">t_root</a> = new_root; }</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
|
||||
<div class="foldopen" id="foldopen00175" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70"> 175</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">set_node_val</a>(<span class="keyword">const</span> std::vector<X> &node_val) {</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> assert(<span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(node_val.size()) == <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a>);</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">t_val</a> = node_val;</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> </div>
|
||||
<div class="foldopen" id="foldopen00186" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc"> 186</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">init</a>() {</div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> assert(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a> > 0);</div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460">dfs_size</a>(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">t_root</a>);</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4">dfs_lca</a>(<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">t_root</a>);</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
|
||||
<div class="foldopen" id="foldopen00200" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3"> 200</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">lift</a>(<span class="keywordtype">int</span> *<span class="keyword">const</span> p, <span class="keywordtype">int</span> dist) {</div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = 0; k < <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a>; k++) {</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="keywordflow">if</span> (*p == -1) {</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> }</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordflow">if</span> (dist & 1) {</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> *p = <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[*p][k];</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> }</div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> dist >>= 1;</div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> }</div>
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> </div>
|
||||
<div class="foldopen" id="foldopen00218" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a8f7bca1746d40f21ad832fcea59aa6c6"> 218</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a8f7bca1746d40f21ad832fcea59aa6c6">kth_ancestor</a>(<span class="keywordtype">int</span> p, <span class="keyword">const</span> <span class="keywordtype">int</span> &dist) {</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">lift</a>(&p, dist);</div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <span class="keywordflow">return</span> p;</div>
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> </div>
|
||||
<div class="foldopen" id="foldopen00229" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"><a class="line" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4"> 229</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">lca</a>(<span class="keywordtype">int</span> a, <span class="keywordtype">int</span> b) {</div>
|
||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> assert(a >= 0 and b >= 0 and a < <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a> and b < <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a>);</div>
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</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">t_depth</a>[a] > <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[b]) {</div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">lift</a>(&a, <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[a] - <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[b]);</div>
|
||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> }</div>
|
||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</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">t_depth</a>[b] > <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[a]) {</div>
|
||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">lift</a>(&b, <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[b] - <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[a]);</div>
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> }</div>
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="keywordflow">if</span> (a == b) {</div>
|
||||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <span class="keywordflow">return</span> a;</div>
|
||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> }</div>
|
||||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a> - 1; k >= 0; k--) {</div>
|
||||
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[a][k] != <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[b][k]) {</div>
|
||||
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> a = <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[a][k];</div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> b = <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[b][k];</div>
|
||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> }</div>
|
||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> }</div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[a][0];</div>
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> </div>
|
||||
<div class="foldopen" id="foldopen00254" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"><a class="line" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html"> 254</a></span><span class="keyword">template</span> <<span class="keyword">typename</span> X> <span class="keyword">class </span><a class="code hl_class" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG</a> {</div>
|
||||
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span><span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"><a class="line" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a"> 262</a></span> std::vector<X> <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">s_tree</a>; </div>
|
||||
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"><a class="line" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25"> 263</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a>; </div>
|
||||
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"><a class="line" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5"> 264</a></span> X <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">sret_init</a> = 0; </div>
|
||||
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">HLD</a>;</div>
|
||||
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> </div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"><a class="line" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74"> 274</a></span> X <a class="code hl_function" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">combine</a>(X lhs, X rhs) { <span class="keywordflow">return</span> lhs + rhs; }</div>
|
||||
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> </div>
|
||||
<div class="foldopen" id="foldopen00282" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"><a class="line" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afba5c1225ba04c0025c7786c09ff28f1"> 282</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afba5c1225ba04c0025c7786c09ff28f1">SG</a>(<span class="keywordtype">int</span> size) {</div>
|
||||
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a> = size;</div>
|
||||
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">s_tree</a>.assign(2 * <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a>, 0ll);</div>
|
||||
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> </div>
|
||||
<div class="foldopen" id="foldopen00293" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"><a class="line" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c"> 293</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c">update</a>(<span class="keywordtype">int</span> p, X v) {</div>
|
||||
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> <span class="keywordflow">for</span> (p += <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a>; p > 0; p >>= 1) {</div>
|
||||
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">s_tree</a>[p] += v;</div>
|
||||
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> }</div>
|
||||
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> </div>
|
||||
<div class="foldopen" id="foldopen00305" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"><a class="line" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a1fda852e6e522707fd97f61cdb0a2591"> 305</a></span> X <a class="code hl_function" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a1fda852e6e522707fd97f61cdb0a2591">query</a>(<span class="keywordtype">int</span> l, <span class="keywordtype">int</span> r) {</div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> X lhs = <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">sret_init</a>, rhs = <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">sret_init</a>;</div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> <span class="keywordflow">for</span> (l += <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a>, r += <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a> + 1; l < r; l >>= 1, r >>= 1) {</div>
|
||||
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> <span class="keywordflow">if</span> (l & 1) {</div>
|
||||
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> lhs = <a class="code hl_function" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">combine</a>(lhs, <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">s_tree</a>[l++]);</div>
|
||||
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> }</div>
|
||||
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> <span class="keywordflow">if</span> (r & 1) {</div>
|
||||
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> rhs = <a class="code hl_function" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">combine</a>(<a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">s_tree</a>[--r], rhs);</div>
|
||||
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> }</div>
|
||||
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> }</div>
|
||||
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">combine</a>(lhs, rhs);</div>
|
||||
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> </div>
|
||||
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"><a class="line" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ad3b942be27a1b0fe3cff6cb6edf01294"> 329</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ad3b942be27a1b0fe3cff6cb6edf01294">set_sret_init</a>(X new_sret_init) { <a class="code hl_variable" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">sret_init</a> = new_sret_init; }</div>
|
||||
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> </div>
|
||||
<div class="foldopen" id="foldopen00336" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"><a class="line" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html"> 336</a></span><span class="keyword">template</span> <<span class="keyword">typename</span> X> <span class="keyword">class </span><a class="code hl_class" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">HLD</a> : <span class="keyword">public</span> <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree</a><X>, <span class="keyword">public</span> <a class="code hl_class" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG</a><X> {</div>
|
||||
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span><span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"><a class="line" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f"> 338</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f">label</a>; </div>
|
||||
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"><a class="line" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda"> 339</a></span> std::vector<int> <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>, </div>
|
||||
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"><a class="line" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104"> 340</a></span> <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>, </div>
|
||||
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"><a class="line" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725"> 341</a></span> <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>; </div>
|
||||
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> </div>
|
||||
<div class="foldopen" id="foldopen00350" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"><a class="line" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8"> 350</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8">dfs_hc</a>(<span class="keywordtype">int</span> u, <span class="keywordtype">int</span> p = -1) {</div>
|
||||
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> <span class="keywordtype">int</span> hc_size = -1, hc_id = -1;</div>
|
||||
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> &v : <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_adj</a>[u]) {</div>
|
||||
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> <span class="keywordflow">if</span> (v ^ p) {</div>
|
||||
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8">dfs_hc</a>(v, u);</div>
|
||||
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_size</a>[v] > hc_size) {</div>
|
||||
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> hc_size = <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_size</a>[v];</div>
|
||||
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> hc_id = v;</div>
|
||||
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> }</div>
|
||||
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> }</div>
|
||||
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> }</div>
|
||||
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u] = hc_id;</div>
|
||||
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"> 362</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> </div>
|
||||
<div class="foldopen" id="foldopen00371" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"><a class="line" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a"> 371</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a">dfs_par</a>(<span class="keywordtype">int</span> u, <span class="keywordtype">int</span> p = -1) {</div>
|
||||
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u] != -1) {</div>
|
||||
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span> <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>[<a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u]] = <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>[u];</div>
|
||||
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a">dfs_par</a>(<a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u], u);</div>
|
||||
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> }</div>
|
||||
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> &v : <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_adj</a>[u]) {</div>
|
||||
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"> 377</span> <span class="keywordflow">if</span> (v ^ p and v ^ <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u]) {</div>
|
||||
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a">dfs_par</a>(v, u);</div>
|
||||
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span> }</div>
|
||||
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"> 380</span> }</div>
|
||||
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"> 381</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno"> 382</span> </div>
|
||||
<div class="foldopen" id="foldopen00390" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"><a class="line" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8"> 390</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8">dfs_labels</a>(<span class="keywordtype">int</span> u, <span class="keywordtype">int</span> p = -1) {</div>
|
||||
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"> 391</span> <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>[u] = <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f">label</a>++;</div>
|
||||
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u] != -1) {</div>
|
||||
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8">dfs_labels</a>(<a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u], u);</div>
|
||||
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> }</div>
|
||||
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> &v : <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_adj</a>[u]) {</div>
|
||||
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"> 396</span> <span class="keywordflow">if</span> (v ^ p and v ^ <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u]) {</div>
|
||||
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8">dfs_labels</a>(v, u);</div>
|
||||
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"> 398</span> }</div>
|
||||
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"> 399</span> }</div>
|
||||
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno"> 400</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno"> 401</span> </div>
|
||||
<div class="foldopen" id="foldopen00409" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno"><a class="line" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24"> 409</a></span> X <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24">chain_query</a>(<span class="keywordtype">int</span> a, <span class="keywordtype">int</span> b) {</div>
|
||||
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"> 410</span> X ret = <a class="code hl_class" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG<X>::sret_init</a>;</div>
|
||||
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_depth</a>[a] < <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_depth</a>[b]) {</div>
|
||||
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span> std::swap(a, b);</div>
|
||||
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> }</div>
|
||||
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> <span class="keywordflow">while</span> (<a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_depth</a>[a] >= <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_depth</a>[b]) {</div>
|
||||
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span> <span class="keywordtype">int</span> l = <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>[<a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>[a]];</div>
|
||||
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span> <span class="keywordtype">int</span> r = <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>[a];</div>
|
||||
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_depth</a>[<a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>[a]] < <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_depth</a>[b]) {</div>
|
||||
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"> 418</span> l += <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_depth</a>[b] - <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_depth</a>[<a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>[a]];</div>
|
||||
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno"> 419</span> }</div>
|
||||
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno"> 420</span> ret = <a class="code hl_function" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">SG<X>::combine</a>(ret, <a class="code hl_class" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG<X>::query</a>(l, r));</div>
|
||||
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"> 421</span> a = <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_par</a>[<a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>[a]][0];</div>
|
||||
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"> 422</span> <span class="keywordflow">if</span> (a == -1) {</div>
|
||||
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"> 423</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"> 424</span> }</div>
|
||||
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"> 425</span> }</div>
|
||||
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"> 426</span> <span class="keywordflow">return</span> ret;</div>
|
||||
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"> 427</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno"> 428</span> </div>
|
||||
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno"> 429</span><span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno"> 435</span> <span class="keyword">explicit</span> <a class="code hl_class" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">HLD<X></a>(<span class="keywordtype">int</span> nodes) : <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree</a><X>(nodes), <a class="code hl_class" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG</a><X>(nodes) {</div>
|
||||
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span> <span class="comment">/* Initialization and resize vectors */</span></div>
|
||||
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"> 437</span> <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f">label</a> = 0;</div>
|
||||
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"> 438</span> <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>.assign(<a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_nodes</a>, -1);</div>
|
||||
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span> <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>.assign(<a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_nodes</a>, -1);</div>
|
||||
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span> <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>.resize(<a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_nodes</a>);</div>
|
||||
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span> iota(<a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>.begin(), <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>.end(), 0);</div>
|
||||
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> }</div>
|
||||
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span> </div>
|
||||
<div class="foldopen" id="foldopen00450" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno"><a class="line" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828"> 450</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">init</a>() {</div>
|
||||
<div class="line"><a id="l00451" name="l00451"></a><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<X>::init</a>();</div>
|
||||
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno"> 452</span> </div>
|
||||
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"> 453</span> <span class="comment">// Fill the heavy child, greatest parent, and labels</span></div>
|
||||
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> <a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f">label</a> = 0;</div>
|
||||
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8">dfs_hc</a>(<a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_root</a>);</div>
|
||||
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a">dfs_par</a>(<a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_root</a>);</div>
|
||||
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8">dfs_labels</a>(<a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_root</a>);</div>
|
||||
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"> 458</span> </div>
|
||||
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> <span class="comment">// Segment Tree Initialization</span></div>
|
||||
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < Tree<X>::t_nodes; i++) {</div>
|
||||
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> <a class="code hl_class" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG<X>::s_tree</a>[<a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>[i] + <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_nodes</a>] = <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_val</a>[i];</div>
|
||||
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> }</div>
|
||||
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"> 463</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_nodes</a> - 1; i > 0; i--) {</div>
|
||||
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"> 464</span> <a class="code hl_class" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG<X>::s_tree</a>[i] =</div>
|
||||
<div class="line"><a id="l00465" name="l00465"></a><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<X>::combine</a>(<a class="code hl_class" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG<X>::s_tree</a>[i << 1], <a class="code hl_class" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG<X>::s_tree</a>[i << 1 | 1]);</div>
|
||||
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno"> 466</span> }</div>
|
||||
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"> 467</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</span> </div>
|
||||
<div class="foldopen" id="foldopen00475" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"><a class="line" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57"> 475</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57">update</a>(<span class="keywordtype">int</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>, X val) {</div>
|
||||
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"> 476</span> X diff = val - <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_val</a>[<a class="code hl_typedef" href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a>];</div>
|
||||
<div class="line"><a id="l00477" name="l00477"></a><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<X>::update</a>(<a class="code hl_variable" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>[<a class="code hl_class" href="../../d5/da1/structnode.html">node</a>], diff);</div>
|
||||
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_val</a>[<a class="code hl_typedef" href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a>] = val;</div>
|
||||
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"> 479</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"> 480</span> </div>
|
||||
<div class="foldopen" id="foldopen00489" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"><a class="line" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab"> 489</a></span> X <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab">query</a>(<span class="keywordtype">int</span> a, <span class="keywordtype">int</span> b) {</div>
|
||||
<div class="line"><a id="l00490" name="l00490"></a><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<X>::lca</a>(a, b);</div>
|
||||
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno"> 491</span> X ret = <a class="code hl_class" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG<X>::sret_init</a>;</div>
|
||||
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"> 492</span> assert(lc != -1);</div>
|
||||
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno"> 493</span> ret += <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24">chain_query</a>(a, lc);</div>
|
||||
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno"> 494</span> ret += <a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24">chain_query</a>(b, lc);</div>
|
||||
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> <span class="keywordflow">return</span> ret - <a class="code hl_class" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree<X>::t_val</a>[lc];</div>
|
||||
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span>} <span class="comment">// namespace heavy_light_decomposition</span></div>
|
||||
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span>} <span class="comment">// namespace range_queries</span></div>
|
||||
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> </div>
|
||||
<div class="foldopen" id="foldopen00505" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"><a class="line" href="../../d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817"> 505</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817">test_1</a>() {</div>
|
||||
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span> std::cout << <span class="stringliteral">"Test 1:\n"</span>;</div>
|
||||
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno"> 507</span> </div>
|
||||
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"> 508</span> <span class="comment">// Test details</span></div>
|
||||
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno"> 509</span> <span class="keywordtype">int</span> n = 5;</div>
|
||||
<div class="line"><a id="l00510" name="l00510"></a><span class="lineno"> 510</span> std::vector<int64_t> node_values = {4, 2, 5, 2, 1};</div>
|
||||
<div class="line"><a id="l00511" name="l00511"></a><span class="lineno"> 511</span> std::vector<std::vector<int>> edges = {{1, 2}, {1, 3}, {3, 4}, {3, 5}};</div>
|
||||
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno"> 512</span> std::vector<std::vector<int>> queries = {</div>
|
||||
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno"> 513</span> {2, 1, 4},</div>
|
||||
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"> 514</span> {1, 3, 2},</div>
|
||||
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> {2, 1, 4},</div>
|
||||
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno"> 516</span> };</div>
|
||||
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"> 517</span> std::vector<int> expected_result = {11, 8};</div>
|
||||
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"> 518</span> std::vector<int> code_result;</div>
|
||||
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno"> 519</span> </div>
|
||||
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"> 520</span> <a class="code hl_class" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD<int64_t></a> hld(n);</div>
|
||||
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"> 521</span> hld.<a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">set_node_val</a>(node_values);</div>
|
||||
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno"> 522</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n - 1; i++) {</div>
|
||||
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno"> 523</span> <span class="keywordtype">int</span> u = edges[i][0], v = edges[i][1];</div>
|
||||
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span> hld.<a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d">add_edge</a>(u - 1, v - 1);</div>
|
||||
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno"> 525</span> }</div>
|
||||
<div class="line"><a id="l00526" name="l00526"></a><span class="lineno"> 526</span> hld.<a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">init</a>();</div>
|
||||
<div class="line"><a id="l00527" name="l00527"></a><span class="lineno"> 527</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> &q : queries) {</div>
|
||||
<div class="line"><a id="l00528" name="l00528"></a><span class="lineno"> 528</span> <span class="keywordtype">int</span> type = q[0];</div>
|
||||
<div class="line"><a id="l00529" name="l00529"></a><span class="lineno"> 529</span> <span class="keywordflow">if</span> (type == 1) {</div>
|
||||
<div class="line"><a id="l00530" name="l00530"></a><span class="lineno"> 530</span> <span class="keywordtype">int</span> p = q[1], x = q[2];</div>
|
||||
<div class="line"><a id="l00531" name="l00531"></a><span class="lineno"> 531</span> hld.<a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57">update</a>(p - 1, x);</div>
|
||||
<div class="line"><a id="l00532" name="l00532"></a><span class="lineno"> 532</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (type == 2) {</div>
|
||||
<div class="line"><a id="l00533" name="l00533"></a><span class="lineno"> 533</span> <span class="keywordtype">int</span> a = q[1], b = q[2];</div>
|
||||
<div class="line"><a id="l00534" name="l00534"></a><span class="lineno"> 534</span> code_result.push_back(hld.<a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab">query</a>(a - 1, b - 1));</div>
|
||||
<div class="line"><a id="l00535" name="l00535"></a><span class="lineno"> 535</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"> 537</span> }</div>
|
||||
<div class="line"><a id="l00538" name="l00538"></a><span class="lineno"> 538</span> }</div>
|
||||
<div class="line"><a id="l00539" name="l00539"></a><span class="lineno"> 539</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < static_cast<int>(expected_result.size()); i++) {</div>
|
||||
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno"> 540</span> assert(expected_result[i] == code_result[i]);</div>
|
||||
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno"> 541</span> }</div>
|
||||
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno"> 542</span> std::cout << <span class="stringliteral">"\nTest 1 passed!\n"</span>;</div>
|
||||
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno"> 543</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno"> 544</span> </div>
|
||||
<div class="foldopen" id="foldopen00549" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno"><a class="line" href="../../d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d"> 549</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d">test_2</a>() {</div>
|
||||
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno"> 550</span> std::cout << <span class="stringliteral">"Test 2:\n"</span>;</div>
|
||||
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno"> 551</span> </div>
|
||||
<div class="line"><a id="l00552" name="l00552"></a><span class="lineno"> 552</span> <span class="comment">// Test details (Bamboo)</span></div>
|
||||
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno"> 553</span> <span class="keywordtype">int</span> n = 10;</div>
|
||||
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno"> 554</span> std::vector<int64_t> node_values = {1, 8, 6, 8, 6, 2, 9, 2, 3, 2};</div>
|
||||
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno"> 555</span> std::vector<std::vector<int>> edges = {</div>
|
||||
<div class="line"><a id="l00556" name="l00556"></a><span class="lineno"> 556</span> {10, 5}, {6, 2}, {10, 7}, {5, 2}, {3, 9}, {8, 3}, {1, 4}, {6, 4}, {8, 7}};</div>
|
||||
<div class="line"><a id="l00557" name="l00557"></a><span class="lineno"> 557</span> std::vector<std::vector<int>> queries = {</div>
|
||||
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno"> 558</span> {2, 1, 10}, {2, 1, 6}, {1, 3, 4}, {2, 1, 9}, {1, 5, 3},</div>
|
||||
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno"> 559</span> {1, 7, 8}, {2, 1, 4}, {2, 1, 8}, {1, 1, 4}, {1, 2, 7}};</div>
|
||||
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno"> 560</span> std::vector<int> expected_result = {27, 11, 45, 9, 34};</div>
|
||||
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno"> 561</span> std::vector<int> code_result;</div>
|
||||
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno"> 562</span> </div>
|
||||
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno"> 563</span> <a class="code hl_class" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD<int64_t></a> hld(n);</div>
|
||||
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"> 564</span> hld.<a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">set_node_val</a>(node_values);</div>
|
||||
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno"> 565</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n - 1; i++) {</div>
|
||||
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno"> 566</span> <span class="keywordtype">int</span> u = edges[i][0], v = edges[i][1];</div>
|
||||
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno"> 567</span> hld.<a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d">add_edge</a>(u - 1, v - 1);</div>
|
||||
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno"> 568</span> }</div>
|
||||
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno"> 569</span> hld.<a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">init</a>();</div>
|
||||
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno"> 570</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> &q : queries) {</div>
|
||||
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno"> 571</span> <span class="keywordtype">int</span> type = q[0];</div>
|
||||
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno"> 572</span> <span class="keywordflow">if</span> (type == 1) {</div>
|
||||
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno"> 573</span> <span class="keywordtype">int</span> p = q[1], x = q[2];</div>
|
||||
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno"> 574</span> hld.<a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57">update</a>(p - 1, x);</div>
|
||||
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno"> 575</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (type == 2) {</div>
|
||||
<div class="line"><a id="l00576" name="l00576"></a><span class="lineno"> 576</span> <span class="keywordtype">int</span> a = q[1], b = q[2];</div>
|
||||
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno"> 577</span> code_result.push_back(hld.<a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab">query</a>(a - 1, b - 1));</div>
|
||||
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno"> 578</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"> 579</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno"> 580</span> }</div>
|
||||
<div class="line"><a id="l00581" name="l00581"></a><span class="lineno"> 581</span> }</div>
|
||||
<div class="line"><a id="l00582" name="l00582"></a><span class="lineno"> 582</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < static_cast<int>(expected_result.size()); i++) {</div>
|
||||
<div class="line"><a id="l00583" name="l00583"></a><span class="lineno"> 583</span> assert(expected_result[i] == code_result[i]);</div>
|
||||
<div class="line"><a id="l00584" name="l00584"></a><span class="lineno"> 584</span> }</div>
|
||||
<div class="line"><a id="l00585" name="l00585"></a><span class="lineno"> 585</span> std::cout << <span class="stringliteral">"\nTest2 passed!\n"</span>;</div>
|
||||
<div class="line"><a id="l00586" name="l00586"></a><span class="lineno"> 586</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno"> 587</span> </div>
|
||||
<div class="foldopen" id="foldopen00592" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno"><a class="line" href="../../d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a"> 592</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a">test_3</a>() {</div>
|
||||
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno"> 593</span> std::cout << <span class="stringliteral">"Test 3:\n"</span>;</div>
|
||||
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno"> 594</span> </div>
|
||||
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno"> 595</span> <span class="comment">// Test details</span></div>
|
||||
<div class="line"><a id="l00596" name="l00596"></a><span class="lineno"> 596</span> <span class="keywordtype">int</span> n = 8;</div>
|
||||
<div class="line"><a id="l00597" name="l00597"></a><span class="lineno"> 597</span> std::vector<int64_t> node_values = {1, 8, 6, 8, 6, 2, 9, 2};</div>
|
||||
<div class="line"><a id="l00598" name="l00598"></a><span class="lineno"> 598</span> std::vector<std::vector<int>> edges = {{1, 2}, {2, 3}, {3, 4}, {1, 5},</div>
|
||||
<div class="line"><a id="l00599" name="l00599"></a><span class="lineno"> 599</span> {6, 3}, {7, 5}, {8, 7}};</div>
|
||||
<div class="line"><a id="l00600" name="l00600"></a><span class="lineno"> 600</span> std::vector<std::vector<int>> queries = {</div>
|
||||
<div class="line"><a id="l00601" name="l00601"></a><span class="lineno"> 601</span> {2, 6, 8}, {2, 3, 6}, {1, 3, 4}, {2, 7, 1}, {1, 5, 3},</div>
|
||||
<div class="line"><a id="l00602" name="l00602"></a><span class="lineno"> 602</span> {1, 7, 8}, {2, 6, 4}, {2, 7, 8}, {1, 1, 4}, {1, 2, 7}};</div>
|
||||
<div class="line"><a id="l00603" name="l00603"></a><span class="lineno"> 603</span> std::vector<int> expected_result = {34, 8, 16, 14, 10};</div>
|
||||
<div class="line"><a id="l00604" name="l00604"></a><span class="lineno"> 604</span> std::vector<int> code_result;</div>
|
||||
<div class="line"><a id="l00605" name="l00605"></a><span class="lineno"> 605</span> </div>
|
||||
<div class="line"><a id="l00606" name="l00606"></a><span class="lineno"> 606</span> <a class="code hl_class" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD<int64_t></a> hld(n);</div>
|
||||
<div class="line"><a id="l00607" name="l00607"></a><span class="lineno"> 607</span> hld.<a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">set_node_val</a>(node_values);</div>
|
||||
<div class="line"><a id="l00608" name="l00608"></a><span class="lineno"> 608</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n - 1; i++) {</div>
|
||||
<div class="line"><a id="l00609" name="l00609"></a><span class="lineno"> 609</span> <span class="keywordtype">int</span> u = edges[i][0], v = edges[i][1];</div>
|
||||
<div class="line"><a id="l00610" name="l00610"></a><span class="lineno"> 610</span> hld.<a class="code hl_function" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d">add_edge</a>(u - 1, v - 1);</div>
|
||||
<div class="line"><a id="l00611" name="l00611"></a><span class="lineno"> 611</span> }</div>
|
||||
<div class="line"><a id="l00612" name="l00612"></a><span class="lineno"> 612</span> hld.<a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">init</a>();</div>
|
||||
<div class="line"><a id="l00613" name="l00613"></a><span class="lineno"> 613</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> &q : queries) {</div>
|
||||
<div class="line"><a id="l00614" name="l00614"></a><span class="lineno"> 614</span> <span class="keywordtype">int</span> type = q[0];</div>
|
||||
<div class="line"><a id="l00615" name="l00615"></a><span class="lineno"> 615</span> <span class="keywordflow">if</span> (type == 1) {</div>
|
||||
<div class="line"><a id="l00616" name="l00616"></a><span class="lineno"> 616</span> <span class="keywordtype">int</span> p = q[1], x = q[2];</div>
|
||||
<div class="line"><a id="l00617" name="l00617"></a><span class="lineno"> 617</span> hld.<a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57">update</a>(p - 1, x);</div>
|
||||
<div class="line"><a id="l00618" name="l00618"></a><span class="lineno"> 618</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (type == 2) {</div>
|
||||
<div class="line"><a id="l00619" name="l00619"></a><span class="lineno"> 619</span> <span class="keywordtype">int</span> a = q[1], b = q[2];</div>
|
||||
<div class="line"><a id="l00620" name="l00620"></a><span class="lineno"> 620</span> code_result.push_back(hld.<a class="code hl_function" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab">query</a>(a - 1, b - 1));</div>
|
||||
<div class="line"><a id="l00621" name="l00621"></a><span class="lineno"> 621</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00622" name="l00622"></a><span class="lineno"> 622</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a id="l00623" name="l00623"></a><span class="lineno"> 623</span> }</div>
|
||||
<div class="line"><a id="l00624" name="l00624"></a><span class="lineno"> 624</span> }</div>
|
||||
<div class="line"><a id="l00625" name="l00625"></a><span class="lineno"> 625</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < static_cast<int>(expected_result.size()); i++) {</div>
|
||||
<div class="line"><a id="l00626" name="l00626"></a><span class="lineno"> 626</span> assert(expected_result[i] == code_result[i]);</div>
|
||||
<div class="line"><a id="l00627" name="l00627"></a><span class="lineno"> 627</span> }</div>
|
||||
<div class="line"><a id="l00628" name="l00628"></a><span class="lineno"> 628</span> std::cout << <span class="stringliteral">"\nTest3 passed!\n"</span>;</div>
|
||||
<div class="line"><a id="l00629" name="l00629"></a><span class="lineno"> 629</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00630" name="l00630"></a><span class="lineno"> 630</span> </div>
|
||||
<div class="foldopen" id="foldopen00634" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00634" name="l00634"></a><span class="lineno"><a class="line" href="../../d2/de9/heavy__light__decomposition_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 634</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../d2/de9/heavy__light__decomposition_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00635" name="l00635"></a><span class="lineno"> 635</span> <a class="code hl_function" href="../../d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817">test_1</a>();</div>
|
||||
<div class="line"><a id="l00636" name="l00636"></a><span class="lineno"> 636</span> <a class="code hl_function" href="../../d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d">test_2</a>();</div>
|
||||
<div class="line"><a id="l00637" name="l00637"></a><span class="lineno"> 637</span> <a class="code hl_function" href="../../d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a">test_3</a>();</div>
|
||||
<div class="line"><a id="l00638" name="l00638"></a><span class="lineno"> 638</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00639" name="l00639"></a><span class="lineno"> 639</span>}</div>
|
||||
</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_h_l_d_html"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a></div><div class="ttdoc">The Heavy-Light Decomposition class.</div><div class="ttdef"><b>Definition</b> <a href="#l00336">heavy_light_decomposition.cpp:336</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a0579062b384e54b611b80c6337c7f2c8"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#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="#l00390">heavy_light_decomposition.cpp:390</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a1b336474d17eff1aa4be73d4068dc725"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">range_queries::heavy_light_decomposition::HLD::h_parent</a></div><div class="ttdeci">std::vector< int > 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="#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_a2dfbda148aad0bfaba2ebfda9ebc915a"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#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="#l00371">heavy_light_decomposition.cpp:371</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a4dfbf5d9df825eeb63b294c6849bdcab"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab">range_queries::heavy_light_decomposition::HLD::query</a></div><div class="ttdeci">X query(int a, int b)</div><div class="ttdoc">This function returns the sum of node values in the simple path from from node_1 to node_2.</div><div class="ttdef"><b>Definition</b> <a href="#l00489">heavy_light_decomposition.cpp:489</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="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#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="#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_a7d5b40c076347a6aabfb37a0590f2f24"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#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="#l00409">heavy_light_decomposition.cpp:409</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="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">range_queries::heavy_light_decomposition::HLD::h_heavychlid</a></div><div class="ttdeci">std::vector< int > h_heavychlid</div><div class="ttdoc">stores the heavy child of a node</div><div class="ttdef"><b>Definition</b> <a href="#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_a9f1cb54ed09fde931bf3220d75ee4c57"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57">range_queries::heavy_light_decomposition::HLD::update</a></div><div class="ttdeci">void update(int node, X val)</div><div class="ttdoc">This function updates the value at node with val.</div><div class="ttdef"><b>Definition</b> <a href="#l00475">heavy_light_decomposition.cpp:475</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="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">range_queries::heavy_light_decomposition::HLD::h_label</a></div><div class="ttdeci">std::vector< int > h_label</div><div class="ttdoc">stores the label of a node</div><div class="ttdef"><b>Definition</b> <a href="#l00339">heavy_light_decomposition.cpp:339</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_ae9e979edd69678b85665c01e2ee97828"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">range_queries::heavy_light_decomposition::HLD::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="#l00450">heavy_light_decomposition.cpp:450</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_af64848d6630c39d0f09ce2359cc7c4f8"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#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="#l00350">heavy_light_decomposition.cpp:350</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG</a></div><div class="ttdoc">Segment Tree, to store heavy chains.</div><div class="ttdef"><b>Definition</b> <a href="#l00254">heavy_light_decomposition.cpp:254</a></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="#l00305">heavy_light_decomposition.cpp:305</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="#l00293">heavy_light_decomposition.cpp:293</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="#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="#l00264">heavy_light_decomposition.cpp:264</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_ac6d912bbfafa3a7509f66bbc1729ca25"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">range_queries::heavy_light_decomposition::SG::s_size</a></div><div class="ttdeci">int s_size</div><div class="ttdoc">number of leaves in the segment tree</div><div class="ttdef"><b>Definition</b> <a href="#l00263">heavy_light_decomposition.cpp:263</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_ad3b942be27a1b0fe3cff6cb6edf01294"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ad3b942be27a1b0fe3cff6cb6edf01294">range_queries::heavy_light_decomposition::SG::set_sret_init</a></div><div class="ttdeci">void set_sret_init(X new_sret_init)</div><div class="ttdoc">Set the initialization for the query data type, based on requirement.</div><div class="ttdef"><b>Definition</b> <a href="#l00329">heavy_light_decomposition.cpp:329</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="#l00282">heavy_light_decomposition.cpp:282</a></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< X > 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="#l00262">heavy_light_decomposition.cpp:262</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree</a></div><div class="ttdoc">A Basic Tree, which supports binary lifting.</div><div class="ttdef"><b>Definition</b> <a href="#l00078">heavy_light_decomposition.cpp:78</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a04cd96efaba147b19d3afc769b90ff70"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">range_queries::heavy_light_decomposition::Tree::set_node_val</a></div><div class="ttdeci">void set_node_val(const std::vector< X > &node_val)</div><div class="ttdoc">Set the values for all the nodes.</div><div class="ttdef"><b>Definition</b> <a href="#l00175">heavy_light_decomposition.cpp:175</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< int > t_depth</div><div class="ttdoc">a vector to store the depth of a node,</div><div class="ttdef"><b>Definition</b> <a href="#l00088">heavy_light_decomposition.cpp:88</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< X > t_val</div><div class="ttdoc">values of nodes</div><div class="ttdef"><b>Definition</b> <a href="#l00092">heavy_light_decomposition.cpp:92</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< std::vector< int > > 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="#l00087">heavy_light_decomposition.cpp:87</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a79ab4601c4a95c0902ac04e779e5f54d"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d">range_queries::heavy_light_decomposition::Tree::add_edge</a></div><div class="ttdeci">void add_edge(const int u, const int v)</div><div class="ttdoc">Adds an undirected edge from node u to node v in the tree.</div><div class="ttdef"><b>Definition</b> <a href="#l00157">heavy_light_decomposition.cpp:157</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="#l00140">heavy_light_decomposition.cpp:140</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a8f7bca1746d40f21ad832fcea59aa6c6"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a8f7bca1746d40f21ad832fcea59aa6c6">range_queries::heavy_light_decomposition::Tree::kth_ancestor</a></div><div class="ttdeci">int kth_ancestor(int p, const int &dist)</div><div class="ttdoc">The function returns the kth ancestor of a node.</div><div class="ttdef"><b>Definition</b> <a href="#l00218">heavy_light_decomposition.cpp:218</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_aa339c31ec74cd86a4842a8b09653d460"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460">range_queries::heavy_light_decomposition::Tree::dfs_size</a></div><div class="ttdeci">void dfs_size(int u, int p=-1)</div><div class="ttdoc">Utility function to compute sub-tree sizes.</div><div class="ttdef"><b>Definition</b> <a href="#l00101">heavy_light_decomposition.cpp:101</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="#l00091">heavy_light_decomposition.cpp:91</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< std::list< int > > t_adj</div><div class="ttdoc">an adjacency list to stores the tree edges</div><div class="ttdef"><b>Definition</b> <a href="#l00083">heavy_light_decomposition.cpp:83</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ab2ab020f798d00be2613ecf63074b7c1"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">range_queries::heavy_light_decomposition::Tree::t_maxlift</a></div><div class="ttdeci">const int t_maxlift</div><div class="ttdoc">maximum possible height of the tree</div><div class="ttdef"><b>Definition</b> <a href="#l00085">heavy_light_decomposition.cpp:85</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ab916d554afa8ca5230b4310c2c69fae0"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">range_queries::heavy_light_decomposition::Tree::change_root</a></div><div class="ttdeci">void change_root(int new_root)</div><div class="ttdoc">Set the root for the tree.</div><div class="ttdef"><b>Definition</b> <a href="#l00167">heavy_light_decomposition.cpp:167</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ac7761255f2ba06b398b9aae5e4dce5f3"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">range_queries::heavy_light_decomposition::Tree::lift</a></div><div class="ttdeci">void lift(int *const p, int dist)</div><div class="ttdoc">The function lifts a node, k units up the tree. The lifting is done in place, and the result is store...</div><div class="ttdef"><b>Definition</b> <a href="#l00200">heavy_light_decomposition.cpp:200</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="#l00186">heavy_light_decomposition.cpp:186</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< int > 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="#l00089">heavy_light_decomposition.cpp:89</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="#l00229">heavy_light_decomposition.cpp:229</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="#l00084">heavy_light_decomposition.cpp:84</a></div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ae8de7aefcb6635d3dacdd174cd4890c4"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4">range_queries::heavy_light_decomposition::Tree::dfs_lca</a></div><div class="ttdeci">void dfs_lca(int u, int p=-1)</div><div class="ttdoc">Utility function to populate the t_par vector.</div><div class="ttdef"><b>Definition</b> <a href="#l00116">heavy_light_decomposition.cpp:116</a></div></div>
|
||||
<div class="ttc" id="aheavy__light__decomposition_8cpp_html_a34b8683a2b429de5cce57e6d733ec817"><div class="ttname"><a href="../../d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817">test_1</a></div><div class="ttdeci">static void test_1()</div><div class="ttdef"><b>Definition</b> <a href="#l00505">heavy_light_decomposition.cpp:505</a></div></div>
|
||||
<div class="ttc" id="aheavy__light__decomposition_8cpp_html_a458410412185a5f09199deaff7157a8d"><div class="ttname"><a href="../../d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d">test_2</a></div><div class="ttdeci">static void test_2()</div><div class="ttdef"><b>Definition</b> <a href="#l00549">heavy_light_decomposition.cpp:549</a></div></div>
|
||||
<div class="ttc" id="aheavy__light__decomposition_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d2/de9/heavy__light__decomposition_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition</b> <a href="#l00634">heavy_light_decomposition.cpp:634</a></div></div>
|
||||
<div class="ttc" id="aheavy__light__decomposition_8cpp_html_af31ec5409537703d9c8a47350386b32a"><div class="ttname"><a href="../../d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a">test_3</a></div><div class="ttdeci">static void test_3()</div><div class="ttdef"><b>Definition</b> <a href="#l00592">heavy_light_decomposition.cpp:592</a></div></div>
|
||||
<div class="ttc" id="anamespaceheavy__light__decomposition_html"><div class="ttname"><a href="../../db/d6f/namespaceheavy__light__decomposition.html">heavy_light_decomposition</a></div><div class="ttdoc">Heavy light decomposition algorithm.</div></div>
|
||||
<div class="ttc" id="anamespacerange__queries_html"><div class="ttname"><a href="../../dd/d69/namespacerange__queries.html">range_queries</a></div><div class="ttdoc">for std::vector</div><div class="ttdef"><b>Definition</b> <a href="../../d6/d2e/fenwick__tree_8cpp_source.html#l00028">fenwick_tree.cpp:28</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><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_074119ce3a874b57120c49a0cc4bb5ad.html">range_queries</a></li><li class="navelem"><a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp.html">heavy_light_decomposition.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||