Documentation for 416a3bc169
@@ -0,0 +1,721 @@
|
||||
<!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">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: range_queries::heavy_light_decomposition::HLD< X > Class Template Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Algorithms_in_C++
|
||||
 <span id="projectnumber">1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
/* @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:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(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:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html','../../'); initResizable(); });
|
||||
/* @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">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> |
|
||||
<a href="#pri-methods">Private Member Functions</a> |
|
||||
<a href="#pri-attribs">Private Attributes</a> |
|
||||
<a href="../../dd/dfc/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d-members.html">List of all members</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">range_queries::heavy_light_decomposition::HLD< X > Class Template Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>The Heavy-Light Decomposition class.
|
||||
<a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#details">More...</a></p>
|
||||
<div class="dynheader">
|
||||
Inheritance diagram for range_queries::heavy_light_decomposition::HLD< X >:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d0/d2c/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d__inherit__graph.svg" width="352" height="147"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
|
||||
<div class="dynheader">
|
||||
Collaboration diagram for range_queries::heavy_light_decomposition::HLD< X >:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../dc/dd9/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d__coll__graph.svg" width="100%" height="511"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a6e486767434e44076c1ac374a22da726"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a6e486767434e44076c1ac374a22da726">HLD</a> (int nodes)</td></tr>
|
||||
<tr class="memdesc:a6e486767434e44076c1ac374a22da726"><td class="mdescLeft"> </td><td class="mdescRight">Class parameterized constructor. Resizes the and initilizes the data members. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a6e486767434e44076c1ac374a22da726">More...</a><br /></td></tr>
|
||||
<tr class="separator:a6e486767434e44076c1ac374a22da726"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae9e979edd69678b85665c01e2ee97828"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">init</a> ()</td></tr>
|
||||
<tr class="memdesc:ae9e979edd69678b85665c01e2ee97828"><td class="mdescLeft"> </td><td class="mdescRight">This function must be called after the tree adjacency list and node values are populated The function initializes the required parametes, and populates the segment tree. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">More...</a><br /></td></tr>
|
||||
<tr class="separator:ae9e979edd69678b85665c01e2ee97828"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9f1cb54ed09fde931bf3220d75ee4c57"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57">update</a> (int <a class="el" href="../../d5/da1/structnode.html">node</a>, X val)</td></tr>
|
||||
<tr class="memdesc:a9f1cb54ed09fde931bf3220d75ee4c57"><td class="mdescLeft"> </td><td class="mdescRight">This function updates the value at node with val. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57">More...</a><br /></td></tr>
|
||||
<tr class="separator:a9f1cb54ed09fde931bf3220d75ee4c57"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a4dfbf5d9df825eeb63b294c6849bdcab"><td class="memItemLeft" align="right" valign="top">X </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab">query</a> (int a, int b)</td></tr>
|
||||
<tr class="memdesc:a4dfbf5d9df825eeb63b294c6849bdcab"><td class="mdescLeft"> </td><td class="mdescRight">This function returns the sum of node values in the simple path from from node_1 to node_2. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab">More...</a><br /></td></tr>
|
||||
<tr class="separator:a4dfbf5d9df825eeb63b294c6849bdcab"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="inherit_header pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree')"><img src="../../closed.png" alt="-"/> Public Member Functions inherited from <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>
|
||||
<tr class="memitem:a835fb2bbb27307b8cacad9b287968bc1 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1">Tree</a> (int nodes)</td></tr>
|
||||
<tr class="memdesc:a835fb2bbb27307b8cacad9b287968bc1 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">Class parameterized constructor, resizes the and initializes the data members. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1">More...</a><br /></td></tr>
|
||||
<tr class="separator:a835fb2bbb27307b8cacad9b287968bc1 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a79ab4601c4a95c0902ac04e779e5f54d inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d">add_edge</a> (const int u, const int v)</td></tr>
|
||||
<tr class="memdesc:a79ab4601c4a95c0902ac04e779e5f54d inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">Adds an undirected edge from node u to node v in the tree. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d">More...</a><br /></td></tr>
|
||||
<tr class="separator:a79ab4601c4a95c0902ac04e779e5f54d inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab916d554afa8ca5230b4310c2c69fae0 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">change_root</a> (int new_root)</td></tr>
|
||||
<tr class="memdesc:ab916d554afa8ca5230b4310c2c69fae0 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">Set the root for the tree. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">More...</a><br /></td></tr>
|
||||
<tr class="separator:ab916d554afa8ca5230b4310c2c69fae0 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a04cd96efaba147b19d3afc769b90ff70 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">set_node_val</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< X > &node_val)</td></tr>
|
||||
<tr class="memdesc:a04cd96efaba147b19d3afc769b90ff70 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">Set the values for all the nodes. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">More...</a><br /></td></tr>
|
||||
<tr class="separator:a04cd96efaba147b19d3afc769b90ff70 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad22d760a5a33545a70e7ea5e1786c8dc inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">init</a> ()</td></tr>
|
||||
<tr class="memdesc:ad22d760a5a33545a70e7ea5e1786c8dc inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">This function must be called after the tree adjacency list and node values are populated The function initializes the required parameters, and populates the segment tree. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">More...</a><br /></td></tr>
|
||||
<tr class="separator:ad22d760a5a33545a70e7ea5e1786c8dc inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac7761255f2ba06b398b9aae5e4dce5f3 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">lift</a> (int *const p, int dist)</td></tr>
|
||||
<tr class="memdesc:ac7761255f2ba06b398b9aae5e4dce5f3 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">The function lifts a node, k units up the tree. The lifting is done in place, and the result is stored in the address pointed by p. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">More...</a><br /></td></tr>
|
||||
<tr class="separator:ac7761255f2ba06b398b9aae5e4dce5f3 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8f7bca1746d40f21ad832fcea59aa6c6 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a8f7bca1746d40f21ad832fcea59aa6c6">kth_ancestor</a> (int p, const int &dist)</td></tr>
|
||||
<tr class="memdesc:a8f7bca1746d40f21ad832fcea59aa6c6 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">The function returns the kth ancestor of a node. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a8f7bca1746d40f21ad832fcea59aa6c6">More...</a><br /></td></tr>
|
||||
<tr class="separator:a8f7bca1746d40f21ad832fcea59aa6c6 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae2b407e64aaf9878fbee7ee6efe9c7d4 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">lca</a> (int a, int b)</td></tr>
|
||||
<tr class="memdesc:ae2b407e64aaf9878fbee7ee6efe9c7d4 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft"> </td><td class="mdescRight">The function returns the least common ancestor of two nodes. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">More...</a><br /></td></tr>
|
||||
<tr class="separator:ae2b407e64aaf9878fbee7ee6efe9c7d4 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
|
||||
Private Member Functions</h2></td></tr>
|
||||
<tr class="memitem:af64848d6630c39d0f09ce2359cc7c4f8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8">dfs_hc</a> (int u, int p=-1)</td></tr>
|
||||
<tr class="memdesc:af64848d6630c39d0f09ce2359cc7c4f8"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to assign heavy child to each node (-1 for a leaf node) <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8">More...</a><br /></td></tr>
|
||||
<tr class="separator:af64848d6630c39d0f09ce2359cc7c4f8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a2dfbda148aad0bfaba2ebfda9ebc915a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a">dfs_par</a> (int u, int p=-1)</td></tr>
|
||||
<tr class="memdesc:a2dfbda148aad0bfaba2ebfda9ebc915a"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to assign highest parent that can be reached though heavy chains. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a">More...</a><br /></td></tr>
|
||||
<tr class="separator:a2dfbda148aad0bfaba2ebfda9ebc915a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0579062b384e54b611b80c6337c7f2c8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8">dfs_labels</a> (int u, int p=-1)</td></tr>
|
||||
<tr class="memdesc:a0579062b384e54b611b80c6337c7f2c8"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to lable the nodes so that heavy chains have a contigous lable. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8">More...</a><br /></td></tr>
|
||||
<tr class="separator:a0579062b384e54b611b80c6337c7f2c8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7d5b40c076347a6aabfb37a0590f2f24"><td class="memItemLeft" align="right" valign="top">X </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24">chain_query</a> (int a, int b)</td></tr>
|
||||
<tr class="memdesc:a7d5b40c076347a6aabfb37a0590f2f24"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to break down a path query into two chain queries. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24">More...</a><br /></td></tr>
|
||||
<tr class="separator:a7d5b40c076347a6aabfb37a0590f2f24"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
|
||||
Private Attributes</h2></td></tr>
|
||||
<tr class="memitem:a722cc7cf2c3e4d15583601a48b09776f"><td class="memItemLeft" align="right" valign="top"><a id="a722cc7cf2c3e4d15583601a48b09776f"></a>
|
||||
int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f">label</a></td></tr>
|
||||
<tr class="memdesc:a722cc7cf2c3e4d15583601a48b09776f"><td class="mdescLeft"> </td><td class="mdescRight">utility member to assign labels in <a class="el" 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.">dfs_labels()</a> <br /></td></tr>
|
||||
<tr class="separator:a722cc7cf2c3e4d15583601a48b09776f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa86a91ae0cd7898990a8170a2f2c9cda"><td class="memItemLeft" align="right" valign="top"><a id="aa86a91ae0cd7898990a8170a2f2c9cda"></a>
|
||||
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a></td></tr>
|
||||
<tr class="memdesc:aa86a91ae0cd7898990a8170a2f2c9cda"><td class="mdescLeft"> </td><td class="mdescRight">stores the label of a node <br /></td></tr>
|
||||
<tr class="separator:aa86a91ae0cd7898990a8170a2f2c9cda"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a84424f180f12b514eaab57a6aa20b104"><td class="memItemLeft" align="right" valign="top"><a id="a84424f180f12b514eaab57a6aa20b104"></a>
|
||||
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a></td></tr>
|
||||
<tr class="memdesc:a84424f180f12b514eaab57a6aa20b104"><td class="mdescLeft"> </td><td class="mdescRight">stores the heavy child of a node <br /></td></tr>
|
||||
<tr class="separator:a84424f180f12b514eaab57a6aa20b104"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1b336474d17eff1aa4be73d4068dc725"><td class="memItemLeft" align="right" valign="top"><a id="a1b336474d17eff1aa4be73d4068dc725"></a>
|
||||
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a></td></tr>
|
||||
<tr class="memdesc:a1b336474d17eff1aa4be73d4068dc725"><td class="mdescLeft"> </td><td class="mdescRight">stores the top of the heavy chain from a node <br /></td></tr>
|
||||
<tr class="separator:a1b336474d17eff1aa4be73d4068dc725"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><h3>template<typename X><br />
|
||||
class range_queries::heavy_light_decomposition::HLD< X ></h3>
|
||||
|
||||
<p>The Heavy-Light Decomposition class. </p>
|
||||
<dl class="tparams"><dt>Template Parameters</dt><dd>
|
||||
<table class="tparams">
|
||||
<tr><td class="paramname">the</td><td>data type of the values stored in the tree nodes </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="a6e486767434e44076c1ac374a22da726"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a6e486767434e44076c1ac374a22da726">◆ </a></span>HLD()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename X > </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>< X >::<a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">HLD</a> </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>nodes</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Class parameterized constructor. Resizes the and initilizes the data members. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">nodes</td><td>the total number of nodes in the tree </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  : Tree<X>(nodes), SG<X>(nodes) {</div>
|
||||
<div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <span class="comment">/* Initialization and resize vectors */</span></div>
|
||||
<div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f">label</a> = 0;</div>
|
||||
<div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/assign.html">assign</a>(<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">Tree<X>::t_nodes</a>, -1);</div>
|
||||
<div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/assign.html">assign</a>(<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">Tree<X>::t_nodes</a>, -1);</div>
|
||||
<div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/resize.html">resize</a>(<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">Tree<X>::t_nodes</a>);</div>
|
||||
<div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/iota.html">iota</a>(<a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>(), 0);</div>
|
||||
<div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  }</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_a6e486767434e44076c1ac374a22da726_cgraph.svg" width="352" height="118"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="a7d5b40c076347a6aabfb37a0590f2f24"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a7d5b40c076347a6aabfb37a0590f2f24">◆ </a></span>chain_query()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename X > </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">X <a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>< X >::chain_query </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>a</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>b</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Utility function to break down a path query into two chain queries. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">a</td><td>node where the path starts </td></tr>
|
||||
<tr><td class="paramname">b</td><td>node where the path ends a and b must belong to a single root to leaf chain </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>the sum of ndoe values in the simple path from a to b </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  {</div>
|
||||
<div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  X ret = <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">SG<X>::sret_init</a>;</div>
|
||||
<div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  <span class="keywordflow">if</span> (<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree<X>::t_depth</a>[a] < <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree<X>::t_depth</a>[b]) {</div>
|
||||
<div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a>(a, b);</div>
|
||||
<div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  }</div>
|
||||
<div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="keywordflow">while</span> (<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree<X>::t_depth</a>[a] >= <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree<X>::t_depth</a>[b]) {</div>
|
||||
<div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <span class="keywordtype">int</span> l = <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>[<a class="code" 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 name="l00416"></a><span class="lineno"> 416</span>  <span class="keywordtype">int</span> r = <a class="code" 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 name="l00417"></a><span class="lineno"> 417</span>  <span class="keywordflow">if</span> (<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree<X>::t_depth</a>[<a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>[a]] < <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree<X>::t_depth</a>[b]) {</div>
|
||||
<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  l += <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree<X>::t_depth</a>[b] - <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree<X>::t_depth</a>[<a class="code" 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 name="l00419"></a><span class="lineno"> 419</span>  }</div>
|
||||
<div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  ret = <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">SG<X>::combine</a>(ret, <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a1fda852e6e522707fd97f61cdb0a2591">SG<X>::query</a>(l, r));</div>
|
||||
<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  a = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">Tree<X>::t_par</a>[<a class="code" 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 name="l00422"></a><span class="lineno"> 422</span>  <span class="keywordflow">if</span> (a == -1) {</div>
|
||||
<div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  }</div>
|
||||
<div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  }</div>
|
||||
<div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  <span class="keywordflow">return</span> ret;</div>
|
||||
<div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="af64848d6630c39d0f09ce2359cc7c4f8"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af64848d6630c39d0f09ce2359cc7c4f8">◆ </a></span>dfs_hc()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename X > </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void <a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>< X >::dfs_hc </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>u</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>p</em> = <code>-1</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Utility function to assign heavy child to each node (-1 for a leaf node) </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">u</td><td>current dfs node </td></tr>
|
||||
<tr><td class="paramname">p</td><td>the parent of node u </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  {</div>
|
||||
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="keywordtype">int</span> hc_size = -1, hc_id = -1;</div>
|
||||
<div class="line"><a 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" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">Tree<X>::t_adj</a>[u]) {</div>
|
||||
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <span class="keywordflow">if</span> (v ^ p) {</div>
|
||||
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <a class="code" 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 name="l00355"></a><span class="lineno"> 355</span>  <span class="keywordflow">if</span> (<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">Tree<X>::t_size</a>[v] > hc_size) {</div>
|
||||
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  hc_size = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">Tree<X>::t_size</a>[v];</div>
|
||||
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  hc_id = v;</div>
|
||||
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  }</div>
|
||||
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  }</div>
|
||||
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  }</div>
|
||||
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  <a class="code" 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 name="l00362"></a><span class="lineno"> 362</span>  }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a0579062b384e54b611b80c6337c7f2c8"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a0579062b384e54b611b80c6337c7f2c8">◆ </a></span>dfs_labels()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename X > </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void <a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>< X >::dfs_labels </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>u</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>p</em> = <code>-1</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Utility function to lable the nodes so that heavy chains have a contigous lable. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">u</td><td>current dfs node </td></tr>
|
||||
<tr><td class="paramname">p</td><td>the parent of node u </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  {</div>
|
||||
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>[u] = <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f">label</a>++;</div>
|
||||
<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  <span class="keywordflow">if</span> (<a class="code" 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 name="l00393"></a><span class="lineno"> 393</span>  <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8">dfs_labels</a>(<a class="code" 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 name="l00394"></a><span class="lineno"> 394</span>  }</div>
|
||||
<div class="line"><a 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" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">Tree<X>::t_adj</a>[u]) {</div>
|
||||
<div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <span class="keywordflow">if</span> (v ^ p and v ^ <a class="code" 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 name="l00397"></a><span class="lineno"> 397</span>  <a class="code" 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 name="l00398"></a><span class="lineno"> 398</span>  }</div>
|
||||
<div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  }</div>
|
||||
<div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a2dfbda148aad0bfaba2ebfda9ebc915a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a2dfbda148aad0bfaba2ebfda9ebc915a">◆ </a></span>dfs_par()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename X > </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void <a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>< X >::dfs_par </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>u</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>p</em> = <code>-1</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Utility function to assign highest parent that can be reached though heavy chains. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">u</td><td>current dfs node </td></tr>
|
||||
<tr><td class="paramname">p</td><td>the parent of node u </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  {</div>
|
||||
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  <span class="keywordflow">if</span> (<a class="code" 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 name="l00373"></a><span class="lineno"> 373</span>  <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a>[<a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a>[u]] = <a class="code" 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 name="l00374"></a><span class="lineno"> 374</span>  <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a">dfs_par</a>(<a class="code" 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 name="l00375"></a><span class="lineno"> 375</span>  }</div>
|
||||
<div class="line"><a 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" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">Tree<X>::t_adj</a>[u]) {</div>
|
||||
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="keywordflow">if</span> (v ^ p and v ^ <a class="code" 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 name="l00378"></a><span class="lineno"> 378</span>  <a class="code" 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 name="l00379"></a><span class="lineno"> 379</span>  }</div>
|
||||
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  }</div>
|
||||
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae9e979edd69678b85665c01e2ee97828"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae9e979edd69678b85665c01e2ee97828">◆ </a></span>init()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename X > </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void <a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>< X >::init </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>This function must be called after the tree adjacency list and node values are populated The function initializes the required parametes, and populates the segment tree. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  {</div>
|
||||
<div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">Tree<X>::init</a>();</div>
|
||||
<div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  </div>
|
||||
<div class="line"><a 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 name="l00454"></a><span class="lineno"> 454</span>  <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f">label</a> = 0;</div>
|
||||
<div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8">dfs_hc</a>(<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">Tree<X>::t_root</a>);</div>
|
||||
<div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a">dfs_par</a>(<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">Tree<X>::t_root</a>);</div>
|
||||
<div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8">dfs_labels</a>(<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">Tree<X>::t_root</a>);</div>
|
||||
<div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  </div>
|
||||
<div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <span class="comment">// Segment Tree Initialization</span></div>
|
||||
<div class="line"><a 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 name="l00461"></a><span class="lineno"> 461</span>  <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">SG<X>::s_tree</a>[<a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>[i] + <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">Tree<X>::t_nodes</a>] = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">Tree<X>::t_val</a>[i];</div>
|
||||
<div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  }</div>
|
||||
<div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">Tree<X>::t_nodes</a> - 1; i > 0; i--) {</div>
|
||||
<div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">SG<X>::s_tree</a>[i] =</div>
|
||||
<div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">SG<X>::combine</a>(<a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">SG<X>::s_tree</a>[i << 1], <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">SG<X>::s_tree</a>[i << 1 | 1]);</div>
|
||||
<div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  }</div>
|
||||
<div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  }</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_ae9e979edd69678b85665c01e2ee97828_cgraph.svg" width="547" height="427"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a4dfbf5d9df825eeb63b294c6849bdcab"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a4dfbf5d9df825eeb63b294c6849bdcab">◆ </a></span>query()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename X > </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">X <a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>< X >::<a class="el" href="../../dd/d1b/structquery.html">query</a> </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>a</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>b</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>This function returns the sum of node values in the simple path from from node_1 to node_2. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">a</td><td>the node where the simple path starts </td></tr>
|
||||
<tr><td class="paramname">b</td><td>the node where the simple path ends (parameters are interchangeable, i.e., the function is commutative) </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>the sum of node values in the simple path from a to b </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  {</div>
|
||||
<div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  <span class="keywordtype">int</span> lc = <a class="code" 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 name="l00491"></a><span class="lineno"> 491</span>  X ret = <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">SG<X>::sret_init</a>;</div>
|
||||
<div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  assert(lc != -1);</div>
|
||||
<div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  ret += <a class="code" 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 name="l00494"></a><span class="lineno"> 494</span>  ret += <a class="code" 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 name="l00495"></a><span class="lineno"> 495</span>  <span class="keywordflow">return</span> ret - <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">Tree<X>::t_val</a>[lc];</div>
|
||||
<div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  }</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_a4dfbf5d9df825eeb63b294c6849bdcab_cgraph.svg" width="547" height="147"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a9f1cb54ed09fde931bf3220d75ee4c57"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a9f1cb54ed09fde931bf3220d75ee4c57">◆ </a></span>update()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<typename X > </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void <a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>< X >::update </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>node</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">X </td>
|
||||
<td class="paramname"><em>val</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>This function updates the value at node with val. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">node</td><td>the node where the update is done </td></tr>
|
||||
<tr><td class="paramname">val</td><td>the value that is being updated </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  {</div>
|
||||
<div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  X diff = val - <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">Tree<X>::t_val</a>[<a class="code" href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a>];</div>
|
||||
<div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c">SG<X>::update</a>(<a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a>[<a class="code" href="../../d5/da1/structnode.html">node</a>], diff);</div>
|
||||
<div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">Tree<X>::t_val</a>[<a class="code" href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a>] = val;</div>
|
||||
<div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  }</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_a9f1cb54ed09fde931bf3220d75ee4c57_cgraph.svg" width="352" height="67"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>range_queries/<a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp.html">heavy_light_decomposition.cpp</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aresize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/resize.html">std::vector::resize</a></div><div class="ttdeci">T resize(T... args)</div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_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> heavy_light_decomposition.cpp:409</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> heavy_light_decomposition.cpp:89</div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_aa6c37e840355b9fb2105181c578694e8"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">range_queries::heavy_light_decomposition::Tree::t_root</a></div><div class="ttdeci">int t_root</div><div class="ttdoc">the root of the tree</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:91</div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ae2b407e64aaf9878fbee7ee6efe9c7d4"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">range_queries::heavy_light_decomposition::Tree::lca</a></div><div class="ttdeci">int lca(int a, int b)</div><div class="ttdoc">The function returns the least common ancestor of two nodes.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:229</div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ad22d760a5a33545a70e7ea5e1786c8dc"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">range_queries::heavy_light_decomposition::Tree::init</a></div><div class="ttdeci">void init()</div><div class="ttdoc">This function must be called after the tree adjacency list and node values are populated The function...</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:186</div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_a3c75bf5770790f8eba8cc92227b5400c"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c">range_queries::heavy_light_decomposition::SG::update</a></div><div class="ttdeci">void update(int p, X v)</div><div class="ttdoc">Update the value at a node.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:293</div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_aa7f93971a9f891e0bbb7023081f379d5"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">range_queries::heavy_light_decomposition::SG::sret_init</a></div><div class="ttdeci">X sret_init</div><div class="ttdoc">inital query return value</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:264</div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_a41c733f5f5e262b308f7cb95c88c1e74"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">range_queries::heavy_light_decomposition::SG::combine</a></div><div class="ttdeci">X combine(X lhs, X rhs)</div><div class="ttdoc">Function that specifies the type of operation involved when segments are combined.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:274</div></div>
|
||||
<div class="ttc" id="astructnode_html"><div class="ttname"><a href="../../d5/da1/structnode.html">node</a></div><div class="ttdef"><b>Definition:</b> avltree.cpp:13</div></div>
|
||||
<div class="ttc" id="ahash__search_8cpp_html_a8ca8dcb494104d273679e219e53d0555"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a></div><div class="ttdeci">struct list node</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> heavy_light_decomposition.cpp:371</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> heavy_light_decomposition.cpp:340</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> heavy_light_decomposition.cpp:83</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> heavy_light_decomposition.cpp:262</div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ae4630fa70a80a1dc65a875488a67178a"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">range_queries::heavy_light_decomposition::Tree::t_nodes</a></div><div class="ttdeci">const int t_nodes</div><div class="ttdoc">number of nodes</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:84</div></div>
|
||||
<div class="ttc" id="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> heavy_light_decomposition.cpp:350</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> heavy_light_decomposition.cpp:338</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> heavy_light_decomposition.cpp:87</div></div>
|
||||
<div class="ttc" id="aswap_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/swap.html">std::swap</a></div><div class="ttdeci">T swap(T... args)</div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_a1fda852e6e522707fd97f61cdb0a2591"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a1fda852e6e522707fd97f61cdb0a2591">range_queries::heavy_light_decomposition::SG::query</a></div><div class="ttdeci">X query(int l, int r)</div><div class="ttdoc">Make a range query from node label l to node label r.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:305</div></div>
|
||||
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_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> heavy_light_decomposition.cpp:390</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> heavy_light_decomposition.cpp:92</div></div>
|
||||
<div class="ttc" id="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/begin.html">std::vector::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
|
||||
<div class="ttc" id="aiota_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/iota.html">std::iota</a></div><div class="ttdeci">T iota(T... args)</div></div>
|
||||
<div class="ttc" id="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> heavy_light_decomposition.cpp:341</div></div>
|
||||
<div class="ttc" id="aassign_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/assign.html">std::vector::assign</a></div><div class="ttdeci">T assign(T... args)</div></div>
|
||||
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/end.html">std::vector::end</a></div><div class="ttdeci">T end(T... args)</div></div>
|
||||
<div class="ttc" id="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> heavy_light_decomposition.cpp:339</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> heavy_light_decomposition.cpp:88</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dd/d69/namespacerange__queries.html">range_queries</a></li><li class="navelem"><b>heavy_light_decomposition</b></li><li class="navelem"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">HLD</a></li>
|
||||
<li class="footer">Generated by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,15 @@
|
||||
var classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d =
|
||||
[
|
||||
[ "HLD", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a6e486767434e44076c1ac374a22da726", null ],
|
||||
[ "chain_query", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24", null ],
|
||||
[ "dfs_hc", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#af64848d6630c39d0f09ce2359cc7c4f8", null ],
|
||||
[ "dfs_labels", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a0579062b384e54b611b80c6337c7f2c8", null ],
|
||||
[ "dfs_par", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a2dfbda148aad0bfaba2ebfda9ebc915a", null ],
|
||||
[ "init", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828", null ],
|
||||
[ "query", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab", null ],
|
||||
[ "update", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57", null ],
|
||||
[ "h_heavychlid", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104", null ],
|
||||
[ "h_label", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda", null ],
|
||||
[ "h_parent", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725", null ],
|
||||
[ "label", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f", null ]
|
||||
];
|
||||
@@ -0,0 +1,6 @@
|
||||
<map id="range_queries::heavy_light_decomposition::HLD::query" name="range_queries::heavy_light_decomposition::HLD::query">
|
||||
<area shape="rect" id="node1" title="This function returns the sum of node values in the simple path from from node_1 to node_2." alt="" coords="5,45,152,101"/>
|
||||
<area shape="rect" id="node2" 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="200,5,347,61"/>
|
||||
<area shape="rect" id="node3" 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="200,85,347,141"/>
|
||||
<area shape="rect" id="node4" 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="395,85,541,141"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
613b4ed02f561c3092a9d717650d147e
|
||||
@@ -0,0 +1,75 @@
|
||||
<?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 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::HLD::query Pages: 1 -->
|
||||
<svg width="410pt" height="110pt"
|
||||
viewBox="0.00 0.00 410.00 110.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 106)">
|
||||
<title>range_queries::heavy_light_decomposition::HLD::query</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-106 406,-106 406,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="This function returns the sum of node values in the simple path from from node_1 to node_2.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-30.5 0,-71.5 110,-71.5 110,-30.5 0,-30.5"/>
|
||||
<text text-anchor="start" x="8" y="-59.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="8" y="-48.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="55" y="-37.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><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="black" points="146,-60.5 146,-101.5 256,-101.5 256,-60.5 146,-60.5"/>
|
||||
<text text-anchor="start" x="154" y="-89.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="154" y="-78.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="201" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M110.03,-62.26C118.4,-64 127.13,-65.82 135.7,-67.6"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="135.16,-71.07 145.67,-69.68 136.59,-64.21 135.16,-71.07"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><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="black" points="146,-0.5 146,-41.5 256,-41.5 256,-0.5 146,-0.5"/>
|
||||
<text text-anchor="start" x="154" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="154" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="201" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M110.03,-39.74C118.4,-38 127.13,-36.18 135.7,-34.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="136.59,-37.79 145.67,-32.32 135.16,-30.93 136.59,-37.79"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><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="black" points="292,-0.5 292,-41.5 402,-41.5 402,-0.5 292,-0.5"/>
|
||||
<text text-anchor="start" x="300" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="300" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="347" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M256.03,-21C264.31,-21 272.94,-21 281.42,-21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="281.67,-24.5 291.67,-21 281.67,-17.5 281.67,-24.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.6 KiB |
@@ -0,0 +1,5 @@
|
||||
<map id="range_queries::heavy_light_decomposition::HLD::HLD" name="range_queries::heavy_light_decomposition::HLD::HLD">
|
||||
<area shape="rect" id="node1" title="Class parameterized constructor. Resizes the and initilizes the data members." alt="" coords="5,39,152,95"/>
|
||||
<area shape="rect" id="node2" 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="200,5,347,61"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="234,85,313,112"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
1bc573c2c35f81f7d068d1ef8f03da9f
|
||||
@@ -0,0 +1,56 @@
|
||||
<?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 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::HLD::HLD Pages: 1 -->
|
||||
<svg width="264pt" height="88pt"
|
||||
viewBox="0.00 0.00 264.00 88.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 84)">
|
||||
<title>range_queries::heavy_light_decomposition::HLD::HLD</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-84 260,-84 260,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Class parameterized constructor. Resizes the and initilizes the data members.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-13.5 0,-54.5 110,-54.5 110,-13.5 0,-13.5"/>
|
||||
<text text-anchor="start" x="8" y="-42.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="8" y="-31.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="55" y="-20.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::HLD</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><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="black" points="146,-38.5 146,-79.5 256,-79.5 256,-38.5 146,-38.5"/>
|
||||
<text text-anchor="start" x="154" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="154" y="-56.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="201" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M110.03,-43.38C118.4,-44.83 127.13,-46.35 135.7,-47.84"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="135.22,-51.31 145.67,-49.57 136.41,-44.41 135.22,-51.31"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="171.5,-0.5 171.5,-19.5 230.5,-19.5 230.5,-0.5 171.5,-0.5"/>
|
||||
<text text-anchor="middle" x="201" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M110.03,-25C127.05,-22.16 145.5,-19.08 161.24,-16.46"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="161.86,-19.9 171.15,-14.81 160.71,-13 161.86,-19.9"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,4 @@
|
||||
<map id="range_queries::heavy_light_decomposition::HLD::update" name="range_queries::heavy_light_decomposition::HLD::update">
|
||||
<area shape="rect" id="node1" title="This function updates the value at node with val." alt="" coords="5,5,152,61"/>
|
||||
<area shape="rect" id="node2" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c" title="Update the value at a node." alt="" coords="200,5,347,61"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
5ff9b2f90f9c3cd04184b7012e6c613f
|
||||
@@ -0,0 +1,41 @@
|
||||
<?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 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::HLD::update Pages: 1 -->
|
||||
<svg width="264pt" height="50pt"
|
||||
viewBox="0.00 0.00 264.00 50.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 46)">
|
||||
<title>range_queries::heavy_light_decomposition::HLD::update</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-46 260,-46 260,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="This function updates the value at node with val.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-41.5 110,-41.5 110,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="55" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><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="black" points="146,-0.5 146,-41.5 256,-41.5 256,-0.5 146,-0.5"/>
|
||||
<text text-anchor="start" x="154" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="154" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="201" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M110.03,-21C118.31,-21 126.94,-21 135.42,-21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="135.67,-24.5 145.67,-21 135.67,-17.5 135.67,-24.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1,10 @@
|
||||
<map id="range_queries::heavy_light_decomposition::HLD::init" name="range_queries::heavy_light_decomposition::HLD::init">
|
||||
<area shape="rect" id="node1" title="This function must be called after the tree adjacency list and node values are populated The function..." alt="" coords="5,165,152,221"/>
|
||||
<area shape="rect" id="node2" 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="200,5,347,61"/>
|
||||
<area shape="rect" id="node3" 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="200,85,347,141"/>
|
||||
<area shape="rect" id="node4" 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="200,165,347,221"/>
|
||||
<area shape="rect" id="node5" 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="200,245,347,301"/>
|
||||
<area shape="rect" id="node6" 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="200,325,347,381"/>
|
||||
<area shape="rect" id="node7" 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="395,285,541,341"/>
|
||||
<area shape="rect" id="node8" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" title="Utility function to compute sub-tree sizes." alt="" coords="395,365,541,421"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
1d3a59fdba7e391132e6cdc60cbcc3fa
|
||||
@@ -0,0 +1,143 @@
|
||||
<?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 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: range_queries::heavy_light_decomposition::HLD::init Pages: 1 -->
|
||||
<svg width="410pt" height="320pt"
|
||||
viewBox="0.00 0.00 410.00 320.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 316)">
|
||||
<title>range_queries::heavy_light_decomposition::HLD::init</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-316 406,-316 406,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="This function must be called after the tree adjacency list and node values are populated The function...">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-150.5 0,-191.5 110,-191.5 110,-150.5 0,-150.5"/>
|
||||
<text text-anchor="start" x="8" y="-179.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="8" y="-168.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="55" y="-157.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><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="black" points="146,-270.5 146,-311.5 256,-311.5 256,-270.5 146,-270.5"/>
|
||||
<text text-anchor="start" x="154" y="-299.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="154" y="-288.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="201" y="-277.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M73.54,-191.6C90.73,-210.99 118.3,-240.11 146,-261 147.77,-262.34 149.61,-263.66 151.5,-264.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="149.68,-267.94 159.98,-270.43 153.48,-262.06 149.68,-267.94"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><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="black" points="146,-210.5 146,-251.5 256,-251.5 256,-210.5 146,-210.5"/>
|
||||
<text text-anchor="start" x="154" y="-239.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="154" y="-228.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="201" y="-217.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M105.56,-191.65C116.98,-196.41 129.25,-201.52 141.03,-206.43"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="139.78,-209.7 150.35,-210.31 142.47,-203.24 139.78,-209.7"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><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="black" points="146,-150.5 146,-191.5 256,-191.5 256,-150.5 146,-150.5"/>
|
||||
<text text-anchor="start" x="154" y="-179.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="154" y="-168.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="201" y="-157.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M110.03,-171C118.31,-171 126.94,-171 135.42,-171"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="135.67,-174.5 145.67,-171 135.67,-167.5 135.67,-174.5"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><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="black" points="146,-90.5 146,-131.5 256,-131.5 256,-90.5 146,-90.5"/>
|
||||
<text text-anchor="start" x="154" y="-119.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="154" y="-108.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="201" y="-97.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M105.56,-150.35C116.98,-145.59 129.25,-140.48 141.03,-135.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="142.47,-138.76 150.35,-131.69 139.78,-132.3 142.47,-138.76"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><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="black" points="146,-30.5 146,-71.5 256,-71.5 256,-30.5 146,-30.5"/>
|
||||
<text text-anchor="start" x="154" y="-59.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="154" y="-48.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="201" y="-37.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node1->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M73.54,-150.4C90.73,-131.01 118.3,-101.89 146,-81 147.77,-79.66 149.61,-78.34 151.5,-77.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="153.48,-79.94 159.98,-71.57 149.68,-74.06 153.48,-79.94"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><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="black" points="292,-60.5 292,-101.5 402,-101.5 402,-60.5 292,-60.5"/>
|
||||
<text text-anchor="start" x="300" y="-89.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="300" y="-78.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="347" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node6->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M256.03,-62.26C264.4,-64 273.13,-65.82 281.7,-67.6"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="281.16,-71.07 291.67,-69.68 282.59,-64.21 281.16,-71.07"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><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="black" points="292,-0.5 292,-41.5 402,-41.5 402,-0.5 292,-0.5"/>
|
||||
<text text-anchor="start" x="300" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="300" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="347" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node6->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M256.03,-39.74C264.4,-38 273.13,-36.18 281.7,-34.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="282.59,-37.79 291.67,-32.32 281.16,-30.93 282.59,-37.79"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.0 KiB |
433
d2/de9/heavy__light__decomposition_8cpp.html
Normal file
@@ -0,0 +1,433 @@
|
||||
<!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">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: range_queries/heavy_light_decomposition.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Algorithms_in_C++
|
||||
 <span id="projectnumber">1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
/* @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:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(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:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('d2/de9/heavy__light__decomposition_8cpp.html','../../'); initResizable(); });
|
||||
/* @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">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> |
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">heavy_light_decomposition.cpp File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p><a href="https://en.wikipedia.org/wiki/Heavy_path_decomposition">Heavy Light Decomposition</a> implementation
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <algorithm></code><br />
|
||||
<code>#include <cassert></code><br />
|
||||
<code>#include <cmath></code><br />
|
||||
<code>#include <cstring></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <list></code><br />
|
||||
<code>#include <numeric></code><br />
|
||||
<code>#include <string></code><br />
|
||||
<code>#include <vector></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
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="395"><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">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a 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>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A Basic <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html" title="A Basic Tree, which supports binary lifting.">Tree</a>, which supports binary lifting. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG< X ></a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Segment <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html" title="A Basic Tree, which supports binary lifting.">Tree</a>, to store heavy chains. <a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD< X ></a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The Heavy-Light Decomposition class. <a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
|
||||
Namespaces</h2></td></tr>
|
||||
<tr class="memitem:dd/d69/namespacerange__queries"><td class="memItemLeft" align="right" valign="top">  </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">Algorithms and Data Structures that support range queries and updates. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:db/d6f/namespaceheavy__light__decomposition"><td class="memItemLeft" align="right" valign="top">  </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>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a34b8683a2b429de5cce57e6d733ec817"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817">test_1</a> ()</td></tr>
|
||||
<tr class="separator:a34b8683a2b429de5cce57e6d733ec817"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a458410412185a5f09199deaff7157a8d"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d">test_2</a> ()</td></tr>
|
||||
<tr class="separator:a458410412185a5f09199deaff7157a8d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af31ec5409537703d9c8a47350386b32a"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a">test_3</a> ()</td></tr>
|
||||
<tr class="separator:af31ec5409537703d9c8a47350386b32a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p><a href="https://en.wikipedia.org/wiki/Heavy_path_decomposition">Heavy Light Decomposition</a> implementation </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/aneee004">Aniruthan R</a></dd></dl>
|
||||
<p>Heavy-Light Decomposition is a technique on trees, that supports the following:</p><ol type="1">
|
||||
<li>Update node s, with a value v</li>
|
||||
<li>Return the (sum) of all node values on the simple path from a to b (sum) can also be replced with <a class="el" href="../../d7/d47/namespace_x_o_r.html" title="Functions for XOR cipher algorithm.">XOR</a>, OR, AND, min, or max</li>
|
||||
</ol>
|
||||
<p>The update is done in O(log n) time, and the query is done in O(log^2 n) time with HLD where, n is the number of nodes</p>
|
||||
<p>The template type is the data type of the value stored in the nodes. If a non-primitive data-type is used as a template, the coressponding operators must be overloaded.</p>
|
||||
<p>An HLD object can only be created with a constant number of nodes, and it cannot be changed later. Creaty an empty instance is not supported.</p>
|
||||
<p>To start answering updates and queries,</p><ol type="1">
|
||||
<li>Create an instance of HLD<X> object (obj), with the required data type.</li>
|
||||
<li>Read in the edge/parent information and update it with obj.add_edge(). Note: The edges addes must be 0 indexed.</li>
|
||||
<li>Create a vector with initial node values, and call set_node_val() with it.</li>
|
||||
<li>Call obj.init() to populate the required information for supporting operations.</li>
|
||||
<li>Call obj.update(node, new_val), to update the value at index 'node' to the new value. Note: node must be 0 indexed</li>
|
||||
<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#_todo000010">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>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int main </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Main function </p>
|
||||
<div class="fragment"><div class="line"><a name="l00634"></a><span class="lineno"> 634</span>  {</div>
|
||||
<div class="line"><a name="l00635"></a><span class="lineno"> 635</span>  <a class="code" href="../../d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817">test_1</a>();</div>
|
||||
<div class="line"><a name="l00636"></a><span class="lineno"> 636</span>  <a class="code" href="../../d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d">test_2</a>();</div>
|
||||
<div class="line"><a name="l00637"></a><span class="lineno"> 637</span>  <a class="code" href="../../d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a">test_3</a>();</div>
|
||||
<div class="line"><a name="l00638"></a><span class="lineno"> 638</span>  <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a name="l00639"></a><span class="lineno"> 639</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_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>
|
||||
</div>
|
||||
<a id="a34b8683a2b429de5cce57e6d733ec817"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a34b8683a2b429de5cce57e6d733ec817">◆ </a></span>test_1()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static void test_1 </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Test implementations </p><dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  {</div>
|
||||
<div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  <a class="codeRef" 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"><a name="l00507"></a><span class="lineno"> 507</span>  </div>
|
||||
<div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  <span class="comment">// Test details</span></div>
|
||||
<div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  <span class="keywordtype">int</span> n = 5;</div>
|
||||
<div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  <a class="codeRef" 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"><a name="l00511"></a><span class="lineno"> 511</span>  <a class="codeRef" 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"><a name="l00512"></a><span class="lineno"> 512</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<int></a>> queries = {</div>
|
||||
<div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  {2, 1, 4},</div>
|
||||
<div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  {1, 3, 2},</div>
|
||||
<div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  {2, 1, 4},</div>
|
||||
<div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  };</div>
|
||||
<div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> expected_result = {11, 8};</div>
|
||||
<div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> code_result;</div>
|
||||
<div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  </div>
|
||||
<div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  <a class="code" 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 name="l00521"></a><span class="lineno"> 521</span>  hld.set_node_val(node_values);</div>
|
||||
<div class="line"><a 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 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 name="l00524"></a><span class="lineno"> 524</span>  hld.add_edge(u - 1, v - 1);</div>
|
||||
<div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  }</div>
|
||||
<div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  hld.init();</div>
|
||||
<div class="line"><a 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 name="l00528"></a><span class="lineno"> 528</span>  <span class="keywordtype">int</span> type = q[0];</div>
|
||||
<div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  <span class="keywordflow">if</span> (type == 1) {</div>
|
||||
<div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  <span class="keywordtype">int</span> p = q[1], x = q[2];</div>
|
||||
<div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  hld.update(p - 1, x);</div>
|
||||
<div class="line"><a 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 name="l00533"></a><span class="lineno"> 533</span>  <span class="keywordtype">int</span> a = q[1], b = q[2];</div>
|
||||
<div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  code_result.<a class="codeRef" 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"><a name="l00535"></a><span class="lineno"> 535</span>  } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  }</div>
|
||||
<div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  }</div>
|
||||
<div class="line"><a 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.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>()); i++) {</div>
|
||||
<div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  assert(expected_result[i] == code_result[i]);</div>
|
||||
<div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  }</div>
|
||||
<div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  <a class="codeRef" 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"><a name="l00543"></a><span class="lineno"> 543</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_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>
|
||||
</div>
|
||||
<a id="a458410412185a5f09199deaff7157a8d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a458410412185a5f09199deaff7157a8d">◆ </a></span>test_2()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static void test_2 </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Second test implementations </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>  {</div>
|
||||
<div class="line"><a name="l00550"></a><span class="lineno"> 550</span>  <a class="codeRef" 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"><a name="l00551"></a><span class="lineno"> 551</span>  </div>
|
||||
<div class="line"><a name="l00552"></a><span class="lineno"> 552</span>  <span class="comment">// Test details (Bamboo)</span></div>
|
||||
<div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  <span class="keywordtype">int</span> n = 10;</div>
|
||||
<div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  <a class="codeRef" 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"><a name="l00555"></a><span class="lineno"> 555</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<int></a>> edges = {</div>
|
||||
<div class="line"><a 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 name="l00557"></a><span class="lineno"> 557</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<int></a>> queries = {</div>
|
||||
<div class="line"><a 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 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 name="l00560"></a><span class="lineno"> 560</span>  <a class="codeRef" 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"><a name="l00561"></a><span class="lineno"> 561</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> code_result;</div>
|
||||
<div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  </div>
|
||||
<div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  <a class="code" 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 name="l00564"></a><span class="lineno"> 564</span>  hld.set_node_val(node_values);</div>
|
||||
<div class="line"><a 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 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 name="l00567"></a><span class="lineno"> 567</span>  hld.add_edge(u - 1, v - 1);</div>
|
||||
<div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  }</div>
|
||||
<div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  hld.init();</div>
|
||||
<div class="line"><a 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 name="l00571"></a><span class="lineno"> 571</span>  <span class="keywordtype">int</span> type = q[0];</div>
|
||||
<div class="line"><a name="l00572"></a><span class="lineno"> 572</span>  <span class="keywordflow">if</span> (type == 1) {</div>
|
||||
<div class="line"><a name="l00573"></a><span class="lineno"> 573</span>  <span class="keywordtype">int</span> p = q[1], x = q[2];</div>
|
||||
<div class="line"><a name="l00574"></a><span class="lineno"> 574</span>  hld.update(p - 1, x);</div>
|
||||
<div class="line"><a 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 name="l00576"></a><span class="lineno"> 576</span>  <span class="keywordtype">int</span> a = q[1], b = q[2];</div>
|
||||
<div class="line"><a name="l00577"></a><span class="lineno"> 577</span>  code_result.<a class="codeRef" 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"><a name="l00578"></a><span class="lineno"> 578</span>  } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a name="l00580"></a><span class="lineno"> 580</span>  }</div>
|
||||
<div class="line"><a name="l00581"></a><span class="lineno"> 581</span>  }</div>
|
||||
<div class="line"><a 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.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>()); i++) {</div>
|
||||
<div class="line"><a name="l00583"></a><span class="lineno"> 583</span>  assert(expected_result[i] == code_result[i]);</div>
|
||||
<div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  }</div>
|
||||
<div class="line"><a name="l00585"></a><span class="lineno"> 585</span>  <a class="codeRef" 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"><a name="l00586"></a><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>
|
||||
</div>
|
||||
<a id="af31ec5409537703d9c8a47350386b32a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af31ec5409537703d9c8a47350386b32a">◆ </a></span>test_3()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static void test_3 </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Third test implementations </p><dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  {</div>
|
||||
<div class="line"><a name="l00593"></a><span class="lineno"> 593</span>  <a class="codeRef" 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"><a name="l00594"></a><span class="lineno"> 594</span>  </div>
|
||||
<div class="line"><a name="l00595"></a><span class="lineno"> 595</span>  <span class="comment">// Test details</span></div>
|
||||
<div class="line"><a name="l00596"></a><span class="lineno"> 596</span>  <span class="keywordtype">int</span> n = 8;</div>
|
||||
<div class="line"><a name="l00597"></a><span class="lineno"> 597</span>  <a class="codeRef" 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"><a name="l00598"></a><span class="lineno"> 598</span>  <a class="codeRef" 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"><a name="l00599"></a><span class="lineno"> 599</span>  {6, 3}, {7, 5}, {8, 7}};</div>
|
||||
<div class="line"><a name="l00600"></a><span class="lineno"> 600</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<int></a>> queries = {</div>
|
||||
<div class="line"><a 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 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 name="l00603"></a><span class="lineno"> 603</span>  <a class="codeRef" 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"><a name="l00604"></a><span class="lineno"> 604</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a> code_result;</div>
|
||||
<div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  </div>
|
||||
<div class="line"><a name="l00606"></a><span class="lineno"> 606</span>  <a class="code" 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 name="l00607"></a><span class="lineno"> 607</span>  hld.set_node_val(node_values);</div>
|
||||
<div class="line"><a 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 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 name="l00610"></a><span class="lineno"> 610</span>  hld.add_edge(u - 1, v - 1);</div>
|
||||
<div class="line"><a name="l00611"></a><span class="lineno"> 611</span>  }</div>
|
||||
<div class="line"><a name="l00612"></a><span class="lineno"> 612</span>  hld.init();</div>
|
||||
<div class="line"><a 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 name="l00614"></a><span class="lineno"> 614</span>  <span class="keywordtype">int</span> type = q[0];</div>
|
||||
<div class="line"><a name="l00615"></a><span class="lineno"> 615</span>  <span class="keywordflow">if</span> (type == 1) {</div>
|
||||
<div class="line"><a name="l00616"></a><span class="lineno"> 616</span>  <span class="keywordtype">int</span> p = q[1], x = q[2];</div>
|
||||
<div class="line"><a name="l00617"></a><span class="lineno"> 617</span>  hld.update(p - 1, x);</div>
|
||||
<div class="line"><a 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 name="l00619"></a><span class="lineno"> 619</span>  <span class="keywordtype">int</span> a = q[1], b = q[2];</div>
|
||||
<div class="line"><a name="l00620"></a><span class="lineno"> 620</span>  code_result.<a class="codeRef" 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"><a name="l00621"></a><span class="lineno"> 621</span>  } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a name="l00622"></a><span class="lineno"> 622</span>  <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a name="l00623"></a><span class="lineno"> 623</span>  }</div>
|
||||
<div class="line"><a name="l00624"></a><span class="lineno"> 624</span>  }</div>
|
||||
<div class="line"><a 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.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>()); i++) {</div>
|
||||
<div class="line"><a name="l00626"></a><span class="lineno"> 626</span>  assert(expected_result[i] == code_result[i]);</div>
|
||||
<div class="line"><a name="l00627"></a><span class="lineno"> 627</span>  }</div>
|
||||
<div class="line"><a name="l00628"></a><span class="lineno"> 628</span>  <a class="codeRef" 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"><a name="l00629"></a><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>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<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> heavy_light_decomposition.cpp:592</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 class="ttdoc">STL class.</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="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> heavy_light_decomposition.cpp:549</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="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="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> heavy_light_decomposition.cpp:505</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_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="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
10
d2/de9/heavy__light__decomposition_8cpp.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var heavy__light__decomposition_8cpp =
|
||||
[
|
||||
[ "Tree", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree" ],
|
||||
[ "SG", "d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html", "d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g" ],
|
||||
[ "HLD", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html", "d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d" ],
|
||||
[ "main", "d2/de9/heavy__light__decomposition_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "test_1", "d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817", null ],
|
||||
[ "test_2", "d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d", null ],
|
||||
[ "test_3", "d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a", null ]
|
||||
];
|
||||
@@ -0,0 +1,21 @@
|
||||
<map id="test_1" name="test_1">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,471,64,497"/>
|
||||
<area shape="rect" id="node2" 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="112,25,259,81"/>
|
||||
<area shape="rect" id="node3" 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="307,5,461,32"/>
|
||||
<area shape="rect" id="node4" 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="112,256,259,312"/>
|
||||
<area shape="rect" id="node12" 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="112,456,259,512"/>
|
||||
<area shape="rect" id="node16" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" title="Set the values for all the nodes." alt="" coords="112,536,259,592"/>
|
||||
<area shape="rect" id="node17" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="326,616,442,643"/>
|
||||
<area shape="rect" id="node18" 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="112,667,259,723"/>
|
||||
<area shape="rect" id="node5" 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="311,56,457,112"/>
|
||||
<area shape="rect" id="node6" 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="311,136,457,192"/>
|
||||
<area shape="rect" id="node7" 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="311,216,457,272"/>
|
||||
<area shape="rect" id="node8" 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="311,296,457,352"/>
|
||||
<area shape="rect" id="node9" 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="311,376,457,432"/>
|
||||
<area shape="rect" id="node10" 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="509,336,656,392"/>
|
||||
<area shape="rect" id="node11" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" title="Utility function to compute sub-tree sizes." alt="" coords="509,416,656,472"/>
|
||||
<area shape="rect" id="node13" 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="311,456,457,512"/>
|
||||
<area shape="rect" id="node14" 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="311,536,457,592"/>
|
||||
<area shape="rect" id="node15" 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="509,536,656,592"/>
|
||||
<area shape="rect" id="node19" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c" title="Update the value at a node." alt="" coords="311,667,457,723"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
fdf2e1d607d6492ec2d0cd82c3962d4f
|
||||
@@ -0,0 +1,424 @@
|
||||
<?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 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: test_1 Pages: 1 -->
|
||||
<!--zoomable 546 -->
|
||||
<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[
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="text/javascript"><![CDATA[
|
||||
var edges = document.getElementsByTagName('g');
|
||||
if (edges && edges.length) {
|
||||
for (var i=0;i<edges.length;i++) {
|
||||
if (edges[i].id.substr(0,4)=='edge') {
|
||||
edges[i].setAttribute('class','edge');
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></script>
|
||||
<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="dirArrow">
|
||||
<path 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="text/javascript">
|
||||
var viewWidth = 496;
|
||||
var viewHeight = 546;
|
||||
var sectionId = 'dynsection-2';
|
||||
</script>
|
||||
<script xlink:href="../../svgpan.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="viewport">
|
||||
<title>test_1</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-542 492,-542 492,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-169.5 0,-188.5 44,-188.5 44,-169.5 0,-169.5"/>
|
||||
<text text-anchor="middle" x="22" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_1</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><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="black" points="80,-481.5 80,-522.5 190,-522.5 190,-481.5 80,-481.5"/>
|
||||
<text text-anchor="start" x="88" y="-510.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-499.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-488.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M23.33,-188.67C24.89,-224.37 33.59,-351.34 80,-442 85.89,-453.5 94.54,-464.5 103.2,-473.86"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="100.94,-476.57 110.41,-481.32 105.97,-471.7 100.94,-476.57"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="226,-518.5 226,-537.5 342,-537.5 342,-518.5 226,-518.5"/>
|
||||
<text text-anchor="middle" x="284" y="-525.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M24.44,-188.63C28.94,-216.65 44.65,-299.93 80,-359 80,-359 226,-509 226,-509 229.19,-511 232.62,-512.82 236.15,-514.46"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="235.07,-517.8 245.65,-518.41 237.76,-511.34 235.07,-517.8"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><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="black" points="80,-308.5 80,-349.5 190,-349.5 190,-308.5 80,-308.5"/>
|
||||
<text text-anchor="start" x="88" y="-337.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-326.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-315.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M30.28,-188.84C46.78,-211.13 87.52,-266.19 112.75,-300.28"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="110.04,-302.51 118.81,-308.47 115.67,-298.35 110.04,-302.51"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><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="black" points="80,-158.5 80,-199.5 190,-199.5 190,-158.5 80,-158.5"/>
|
||||
<text text-anchor="start" x="88" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M44.14,-179C51.62,-179 60.48,-179 69.67,-179"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="69.72,-182.5 79.72,-179 69.72,-175.5 69.72,-182.5"/>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="node16" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_node16"><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="black" points="80,-98.5 80,-139.5 190,-139.5 190,-98.5 80,-98.5"/>
|
||||
<text text-anchor="start" x="88" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node16 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>Node1->Node16</title>
|
||||
<path fill="none" stroke="midnightblue" d="M40.83,-169.36C53.35,-162.6 70.7,-153.22 87.04,-144.39"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="88.84,-147.39 95.97,-139.56 85.51,-141.23 88.84,-147.39"/>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="node17" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_node17"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="240.5,-60.5 240.5,-79.5 327.5,-79.5 327.5,-60.5 240.5,-60.5"/>
|
||||
<text text-anchor="middle" x="284" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node17 -->
|
||||
<g id="edge18" class="edge">
|
||||
<title>Node1->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.93,-169.31C32.27,-150.2 49.25,-107.84 80,-89 125.12,-61.35 186.78,-59.51 230.27,-62.77"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="230.1,-66.27 240.36,-63.65 230.7,-59.3 230.1,-66.27"/>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="node18" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_node18"><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="black" points="80,-0.5 80,-41.5 190,-41.5 190,-0.5 80,-0.5"/>
|
||||
<text text-anchor="start" x="88" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node18 -->
|
||||
<g id="edge19" class="edge">
|
||||
<title>Node1->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.47,-169.35C31.54,-147.18 48.99,-91.73 80,-56 82.45,-53.18 85.18,-50.49 88.08,-47.96"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="90.41,-50.58 96.07,-41.62 86.06,-45.1 90.41,-50.58"/>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-511.61C199.67,-513.26 209.46,-514.99 219.03,-516.69"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.45,-520.14 228.9,-518.43 219.67,-513.24 218.45,-520.14"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><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="black" points="229,-458.5 229,-499.5 339,-499.5 339,-458.5 229,-458.5"/>
|
||||
<text text-anchor="start" x="237" y="-487.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-476.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-465.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M147.7,-349.9C163,-375.76 191.91,-419.94 226,-449 227.5,-450.28 229.06,-451.52 230.67,-452.73"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="228.83,-455.71 239.06,-458.48 232.79,-449.94 228.83,-455.71"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><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="black" points="229,-398.5 229,-439.5 339,-439.5 339,-398.5 229,-398.5"/>
|
||||
<text text-anchor="start" x="237" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-416.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-405.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M165.1,-349.51C182.49,-361.48 205.18,-376.62 226,-389 228.48,-390.47 231.04,-391.95 233.63,-393.43"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="232.1,-396.58 242.54,-398.37 235.5,-390.46 232.1,-396.58"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><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="black" points="229,-338.5 229,-379.5 339,-379.5 339,-338.5 229,-338.5"/>
|
||||
<text text-anchor="start" x="237" y="-367.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-356.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-345.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-340.09C199.67,-341.99 209.46,-343.99 219.03,-345.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.41,-349.39 228.9,-347.96 219.81,-342.53 218.41,-349.39"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><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="black" points="229,-278.5 229,-319.5 339,-319.5 339,-278.5 229,-278.5"/>
|
||||
<text text-anchor="start" x="237" y="-307.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-296.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-285.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-317.91C199.67,-316.01 209.46,-314.01 219.03,-312.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="219.81,-315.47 228.9,-310.04 218.41,-308.61 219.81,-315.47"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><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="black" points="229,-218.5 229,-259.5 339,-259.5 339,-218.5 229,-218.5"/>
|
||||
<text text-anchor="start" x="237" y="-247.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-236.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-225.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node9 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node4->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M165.1,-308.49C182.49,-296.52 205.18,-281.38 226,-269 228.48,-267.53 231.04,-266.05 233.63,-264.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="235.5,-267.54 242.54,-259.63 232.1,-261.42 235.5,-267.54"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><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="black" points="378,-248.5 378,-289.5 488,-289.5 488,-248.5 378,-248.5"/>
|
||||
<text text-anchor="start" x="386" y="-277.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-266.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-255.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-250.09C348.67,-251.99 358.46,-253.99 368.03,-255.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="367.41,-259.39 377.9,-257.96 368.81,-252.53 367.41,-259.39"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><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="black" points="378,-188.5 378,-229.5 488,-229.5 488,-188.5 378,-188.5"/>
|
||||
<text text-anchor="start" x="386" y="-217.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-206.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-195.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-227.91C348.67,-226.01 358.46,-224.01 368.03,-222.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="368.81,-225.47 377.9,-220.04 367.41,-218.61 368.81,-225.47"/>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="node13" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_node13"><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="black" points="229,-158.5 229,-199.5 339,-199.5 339,-158.5 229,-158.5"/>
|
||||
<text text-anchor="start" x="237" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-179C199.57,-179 209.25,-179 218.73,-179"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.9,-182.5 228.9,-179 218.9,-175.5 218.9,-182.5"/>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="node14" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_node14"><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="black" points="229,-98.5 229,-139.5 339,-139.5 339,-98.5 229,-98.5"/>
|
||||
<text text-anchor="start" x="237" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node14 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>Node12->Node14</title>
|
||||
<path fill="none" stroke="midnightblue" d="M186.59,-158.35C198.25,-153.59 210.77,-148.48 222.8,-143.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="224.38,-146.71 232.32,-139.69 221.74,-140.23 224.38,-146.71"/>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="node15" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_node15"><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="black" points="378,-98.5 378,-139.5 488,-139.5 488,-98.5 378,-98.5"/>
|
||||
<text text-anchor="start" x="386" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14->Node15 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>Node14->Node15</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-119C348.57,-119 358.25,-119 367.73,-119"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="367.9,-122.5 377.9,-119 367.9,-115.5 367.9,-122.5"/>
|
||||
</g>
|
||||
<!-- Node16->Node17 -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>Node16->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-100.89C208.34,-94.89 228,-88.33 244.57,-82.81"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="246.06,-86 254.44,-79.52 243.85,-79.36 246.06,-86"/>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="node19" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_node19"><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="black" points="229,-0.5 229,-41.5 339,-41.5 339,-0.5 229,-0.5"/>
|
||||
<text text-anchor="start" x="237" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18->Node19 -->
|
||||
<g id="edge20" class="edge">
|
||||
<title>Node18->Node19</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-21C199.57,-21 209.25,-21 218.73,-21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.9,-24.5 228.9,-21 218.9,-17.5 218.9,-24.5"/>
|
||||
</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()"/>
|
||||
<g id="arrowUp" xlink:href="#dirArrow" transform="translate(30 24)" onmousedown="handlePan(0,-1)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowUp.mouseover" end="arrowUp.mouseout"/>
|
||||
</use>
|
||||
<path 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" xlink:href="#dirArrow" transform="rotate(90) translate(36 -43)" onmousedown="handlePan(1,0)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowRight.mouseover" end="arrowRight.mouseout"/>
|
||||
</use>
|
||||
<path 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" xlink:href="#dirArrow" transform="rotate(180) translate(-30 -48)" onmousedown="handlePan(0,1)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowDown.mouseover" end="arrowDown.mouseout"/>
|
||||
</use>
|
||||
<path 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" xlink:href="#dirArrow" transform="rotate(270) translate(-36 17)" onmousedown="handlePan(-1,0)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowLeft.mouseover" end="arrowLeft.mouseout"/>
|
||||
</use>
|
||||
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
</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>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1,336 @@
|
||||
<?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 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: test_1 Pages: 1 -->
|
||||
<svg width="496pt" height="546pt"
|
||||
viewBox="0.00 0.00 496.00 546.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 542)">
|
||||
<title>test_1</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-542 492,-542 492,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-169.5 0,-188.5 44,-188.5 44,-169.5 0,-169.5"/>
|
||||
<text text-anchor="middle" x="22" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_1</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><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="black" points="80,-481.5 80,-522.5 190,-522.5 190,-481.5 80,-481.5"/>
|
||||
<text text-anchor="start" x="88" y="-510.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-499.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-488.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M23.33,-188.67C24.89,-224.37 33.59,-351.34 80,-442 85.89,-453.5 94.54,-464.5 103.2,-473.86"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="100.94,-476.57 110.41,-481.32 105.97,-471.7 100.94,-476.57"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="226,-518.5 226,-537.5 342,-537.5 342,-518.5 226,-518.5"/>
|
||||
<text text-anchor="middle" x="284" y="-525.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M24.44,-188.63C28.94,-216.65 44.65,-299.93 80,-359 80,-359 226,-509 226,-509 229.19,-511 232.62,-512.82 236.15,-514.46"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="235.07,-517.8 245.65,-518.41 237.76,-511.34 235.07,-517.8"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><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="black" points="80,-308.5 80,-349.5 190,-349.5 190,-308.5 80,-308.5"/>
|
||||
<text text-anchor="start" x="88" y="-337.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-326.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-315.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M30.28,-188.84C46.78,-211.13 87.52,-266.19 112.75,-300.28"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="110.04,-302.51 118.81,-308.47 115.67,-298.35 110.04,-302.51"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><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="black" points="80,-158.5 80,-199.5 190,-199.5 190,-158.5 80,-158.5"/>
|
||||
<text text-anchor="start" x="88" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M44.14,-179C51.62,-179 60.48,-179 69.67,-179"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="69.72,-182.5 79.72,-179 69.72,-175.5 69.72,-182.5"/>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="node16" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_node16"><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="black" points="80,-98.5 80,-139.5 190,-139.5 190,-98.5 80,-98.5"/>
|
||||
<text text-anchor="start" x="88" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node16 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>Node1->Node16</title>
|
||||
<path fill="none" stroke="midnightblue" d="M40.83,-169.36C53.35,-162.6 70.7,-153.22 87.04,-144.39"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="88.84,-147.39 95.97,-139.56 85.51,-141.23 88.84,-147.39"/>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="node17" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_node17"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="240.5,-60.5 240.5,-79.5 327.5,-79.5 327.5,-60.5 240.5,-60.5"/>
|
||||
<text text-anchor="middle" x="284" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node17 -->
|
||||
<g id="edge18" class="edge">
|
||||
<title>Node1->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.93,-169.31C32.27,-150.2 49.25,-107.84 80,-89 125.12,-61.35 186.78,-59.51 230.27,-62.77"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="230.1,-66.27 240.36,-63.65 230.7,-59.3 230.1,-66.27"/>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="node18" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_node18"><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="black" points="80,-0.5 80,-41.5 190,-41.5 190,-0.5 80,-0.5"/>
|
||||
<text text-anchor="start" x="88" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node18 -->
|
||||
<g id="edge19" class="edge">
|
||||
<title>Node1->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.47,-169.35C31.54,-147.18 48.99,-91.73 80,-56 82.45,-53.18 85.18,-50.49 88.08,-47.96"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="90.41,-50.58 96.07,-41.62 86.06,-45.1 90.41,-50.58"/>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-511.61C199.67,-513.26 209.46,-514.99 219.03,-516.69"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.45,-520.14 228.9,-518.43 219.67,-513.24 218.45,-520.14"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><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="black" points="229,-458.5 229,-499.5 339,-499.5 339,-458.5 229,-458.5"/>
|
||||
<text text-anchor="start" x="237" y="-487.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-476.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-465.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M147.7,-349.9C163,-375.76 191.91,-419.94 226,-449 227.5,-450.28 229.06,-451.52 230.67,-452.73"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="228.83,-455.71 239.06,-458.48 232.79,-449.94 228.83,-455.71"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><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="black" points="229,-398.5 229,-439.5 339,-439.5 339,-398.5 229,-398.5"/>
|
||||
<text text-anchor="start" x="237" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-416.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-405.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M165.1,-349.51C182.49,-361.48 205.18,-376.62 226,-389 228.48,-390.47 231.04,-391.95 233.63,-393.43"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="232.1,-396.58 242.54,-398.37 235.5,-390.46 232.1,-396.58"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><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="black" points="229,-338.5 229,-379.5 339,-379.5 339,-338.5 229,-338.5"/>
|
||||
<text text-anchor="start" x="237" y="-367.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-356.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-345.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-340.09C199.67,-341.99 209.46,-343.99 219.03,-345.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.41,-349.39 228.9,-347.96 219.81,-342.53 218.41,-349.39"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><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="black" points="229,-278.5 229,-319.5 339,-319.5 339,-278.5 229,-278.5"/>
|
||||
<text text-anchor="start" x="237" y="-307.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-296.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-285.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-317.91C199.67,-316.01 209.46,-314.01 219.03,-312.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="219.81,-315.47 228.9,-310.04 218.41,-308.61 219.81,-315.47"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><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="black" points="229,-218.5 229,-259.5 339,-259.5 339,-218.5 229,-218.5"/>
|
||||
<text text-anchor="start" x="237" y="-247.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-236.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-225.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node9 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node4->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M165.1,-308.49C182.49,-296.52 205.18,-281.38 226,-269 228.48,-267.53 231.04,-266.05 233.63,-264.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="235.5,-267.54 242.54,-259.63 232.1,-261.42 235.5,-267.54"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><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="black" points="378,-248.5 378,-289.5 488,-289.5 488,-248.5 378,-248.5"/>
|
||||
<text text-anchor="start" x="386" y="-277.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-266.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-255.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-250.09C348.67,-251.99 358.46,-253.99 368.03,-255.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="367.41,-259.39 377.9,-257.96 368.81,-252.53 367.41,-259.39"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><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="black" points="378,-188.5 378,-229.5 488,-229.5 488,-188.5 378,-188.5"/>
|
||||
<text text-anchor="start" x="386" y="-217.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-206.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-195.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-227.91C348.67,-226.01 358.46,-224.01 368.03,-222.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="368.81,-225.47 377.9,-220.04 367.41,-218.61 368.81,-225.47"/>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="node13" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_node13"><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="black" points="229,-158.5 229,-199.5 339,-199.5 339,-158.5 229,-158.5"/>
|
||||
<text text-anchor="start" x="237" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-179C199.57,-179 209.25,-179 218.73,-179"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.9,-182.5 228.9,-179 218.9,-175.5 218.9,-182.5"/>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="node14" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_node14"><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="black" points="229,-98.5 229,-139.5 339,-139.5 339,-98.5 229,-98.5"/>
|
||||
<text text-anchor="start" x="237" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node14 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>Node12->Node14</title>
|
||||
<path fill="none" stroke="midnightblue" d="M186.59,-158.35C198.25,-153.59 210.77,-148.48 222.8,-143.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="224.38,-146.71 232.32,-139.69 221.74,-140.23 224.38,-146.71"/>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="node15" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_node15"><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="black" points="378,-98.5 378,-139.5 488,-139.5 488,-98.5 378,-98.5"/>
|
||||
<text text-anchor="start" x="386" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14->Node15 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>Node14->Node15</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-119C348.57,-119 358.25,-119 367.73,-119"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="367.9,-122.5 377.9,-119 367.9,-115.5 367.9,-122.5"/>
|
||||
</g>
|
||||
<!-- Node16->Node17 -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>Node16->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-100.89C208.34,-94.89 228,-88.33 244.57,-82.81"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="246.06,-86 254.44,-79.52 243.85,-79.36 246.06,-86"/>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="node19" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_node19"><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="black" points="229,-0.5 229,-41.5 339,-41.5 339,-0.5 229,-0.5"/>
|
||||
<text text-anchor="start" x="237" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18->Node19 -->
|
||||
<g id="edge20" class="edge">
|
||||
<title>Node18->Node19</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-21C199.57,-21 209.25,-21 218.73,-21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.9,-24.5 228.9,-21 218.9,-17.5 218.9,-24.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 21 KiB |
@@ -0,0 +1,21 @@
|
||||
<map id="test_2" name="test_2">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,471,64,497"/>
|
||||
<area shape="rect" id="node2" 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="112,25,259,81"/>
|
||||
<area shape="rect" id="node3" 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="307,5,461,32"/>
|
||||
<area shape="rect" id="node4" 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="112,256,259,312"/>
|
||||
<area shape="rect" id="node12" 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="112,456,259,512"/>
|
||||
<area shape="rect" id="node16" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" title="Set the values for all the nodes." alt="" coords="112,536,259,592"/>
|
||||
<area shape="rect" id="node17" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="326,616,442,643"/>
|
||||
<area shape="rect" id="node18" 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="112,667,259,723"/>
|
||||
<area shape="rect" id="node5" 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="311,56,457,112"/>
|
||||
<area shape="rect" id="node6" 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="311,136,457,192"/>
|
||||
<area shape="rect" id="node7" 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="311,216,457,272"/>
|
||||
<area shape="rect" id="node8" 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="311,296,457,352"/>
|
||||
<area shape="rect" id="node9" 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="311,376,457,432"/>
|
||||
<area shape="rect" id="node10" 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="509,336,656,392"/>
|
||||
<area shape="rect" id="node11" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" title="Utility function to compute sub-tree sizes." alt="" coords="509,416,656,472"/>
|
||||
<area shape="rect" id="node13" 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="311,456,457,512"/>
|
||||
<area shape="rect" id="node14" 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="311,536,457,592"/>
|
||||
<area shape="rect" id="node15" 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="509,536,656,592"/>
|
||||
<area shape="rect" id="node19" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c" title="Update the value at a node." alt="" coords="311,667,457,723"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
528c23ffeae1541b94cd7d5fc3d9be94
|
||||
@@ -0,0 +1,424 @@
|
||||
<?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 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: test_2 Pages: 1 -->
|
||||
<!--zoomable 546 -->
|
||||
<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[
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="text/javascript"><![CDATA[
|
||||
var edges = document.getElementsByTagName('g');
|
||||
if (edges && edges.length) {
|
||||
for (var i=0;i<edges.length;i++) {
|
||||
if (edges[i].id.substr(0,4)=='edge') {
|
||||
edges[i].setAttribute('class','edge');
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></script>
|
||||
<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="dirArrow">
|
||||
<path 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="text/javascript">
|
||||
var viewWidth = 496;
|
||||
var viewHeight = 546;
|
||||
var sectionId = 'dynsection-3';
|
||||
</script>
|
||||
<script xlink:href="../../svgpan.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="viewport">
|
||||
<title>test_2</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-542 492,-542 492,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-169.5 0,-188.5 44,-188.5 44,-169.5 0,-169.5"/>
|
||||
<text text-anchor="middle" x="22" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_2</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><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="black" points="80,-481.5 80,-522.5 190,-522.5 190,-481.5 80,-481.5"/>
|
||||
<text text-anchor="start" x="88" y="-510.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-499.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-488.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M23.33,-188.67C24.89,-224.37 33.59,-351.34 80,-442 85.89,-453.5 94.54,-464.5 103.2,-473.86"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="100.94,-476.57 110.41,-481.32 105.97,-471.7 100.94,-476.57"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="226,-518.5 226,-537.5 342,-537.5 342,-518.5 226,-518.5"/>
|
||||
<text text-anchor="middle" x="284" y="-525.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M24.44,-188.63C28.94,-216.65 44.65,-299.93 80,-359 80,-359 226,-509 226,-509 229.19,-511 232.62,-512.82 236.15,-514.46"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="235.07,-517.8 245.65,-518.41 237.76,-511.34 235.07,-517.8"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><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="black" points="80,-308.5 80,-349.5 190,-349.5 190,-308.5 80,-308.5"/>
|
||||
<text text-anchor="start" x="88" y="-337.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-326.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-315.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M30.28,-188.84C46.78,-211.13 87.52,-266.19 112.75,-300.28"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="110.04,-302.51 118.81,-308.47 115.67,-298.35 110.04,-302.51"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><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="black" points="80,-158.5 80,-199.5 190,-199.5 190,-158.5 80,-158.5"/>
|
||||
<text text-anchor="start" x="88" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M44.14,-179C51.62,-179 60.48,-179 69.67,-179"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="69.72,-182.5 79.72,-179 69.72,-175.5 69.72,-182.5"/>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="node16" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_node16"><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="black" points="80,-98.5 80,-139.5 190,-139.5 190,-98.5 80,-98.5"/>
|
||||
<text text-anchor="start" x="88" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node16 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>Node1->Node16</title>
|
||||
<path fill="none" stroke="midnightblue" d="M40.83,-169.36C53.35,-162.6 70.7,-153.22 87.04,-144.39"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="88.84,-147.39 95.97,-139.56 85.51,-141.23 88.84,-147.39"/>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="node17" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_node17"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="240.5,-60.5 240.5,-79.5 327.5,-79.5 327.5,-60.5 240.5,-60.5"/>
|
||||
<text text-anchor="middle" x="284" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node17 -->
|
||||
<g id="edge18" class="edge">
|
||||
<title>Node1->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.93,-169.31C32.27,-150.2 49.25,-107.84 80,-89 125.12,-61.35 186.78,-59.51 230.27,-62.77"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="230.1,-66.27 240.36,-63.65 230.7,-59.3 230.1,-66.27"/>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="node18" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_node18"><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="black" points="80,-0.5 80,-41.5 190,-41.5 190,-0.5 80,-0.5"/>
|
||||
<text text-anchor="start" x="88" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node18 -->
|
||||
<g id="edge19" class="edge">
|
||||
<title>Node1->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.47,-169.35C31.54,-147.18 48.99,-91.73 80,-56 82.45,-53.18 85.18,-50.49 88.08,-47.96"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="90.41,-50.58 96.07,-41.62 86.06,-45.1 90.41,-50.58"/>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-511.61C199.67,-513.26 209.46,-514.99 219.03,-516.69"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.45,-520.14 228.9,-518.43 219.67,-513.24 218.45,-520.14"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><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="black" points="229,-458.5 229,-499.5 339,-499.5 339,-458.5 229,-458.5"/>
|
||||
<text text-anchor="start" x="237" y="-487.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-476.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-465.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M147.7,-349.9C163,-375.76 191.91,-419.94 226,-449 227.5,-450.28 229.06,-451.52 230.67,-452.73"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="228.83,-455.71 239.06,-458.48 232.79,-449.94 228.83,-455.71"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><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="black" points="229,-398.5 229,-439.5 339,-439.5 339,-398.5 229,-398.5"/>
|
||||
<text text-anchor="start" x="237" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-416.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-405.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M165.1,-349.51C182.49,-361.48 205.18,-376.62 226,-389 228.48,-390.47 231.04,-391.95 233.63,-393.43"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="232.1,-396.58 242.54,-398.37 235.5,-390.46 232.1,-396.58"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><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="black" points="229,-338.5 229,-379.5 339,-379.5 339,-338.5 229,-338.5"/>
|
||||
<text text-anchor="start" x="237" y="-367.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-356.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-345.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-340.09C199.67,-341.99 209.46,-343.99 219.03,-345.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.41,-349.39 228.9,-347.96 219.81,-342.53 218.41,-349.39"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><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="black" points="229,-278.5 229,-319.5 339,-319.5 339,-278.5 229,-278.5"/>
|
||||
<text text-anchor="start" x="237" y="-307.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-296.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-285.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-317.91C199.67,-316.01 209.46,-314.01 219.03,-312.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="219.81,-315.47 228.9,-310.04 218.41,-308.61 219.81,-315.47"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><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="black" points="229,-218.5 229,-259.5 339,-259.5 339,-218.5 229,-218.5"/>
|
||||
<text text-anchor="start" x="237" y="-247.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-236.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-225.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node9 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node4->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M165.1,-308.49C182.49,-296.52 205.18,-281.38 226,-269 228.48,-267.53 231.04,-266.05 233.63,-264.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="235.5,-267.54 242.54,-259.63 232.1,-261.42 235.5,-267.54"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><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="black" points="378,-248.5 378,-289.5 488,-289.5 488,-248.5 378,-248.5"/>
|
||||
<text text-anchor="start" x="386" y="-277.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-266.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-255.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-250.09C348.67,-251.99 358.46,-253.99 368.03,-255.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="367.41,-259.39 377.9,-257.96 368.81,-252.53 367.41,-259.39"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><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="black" points="378,-188.5 378,-229.5 488,-229.5 488,-188.5 378,-188.5"/>
|
||||
<text text-anchor="start" x="386" y="-217.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-206.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-195.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-227.91C348.67,-226.01 358.46,-224.01 368.03,-222.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="368.81,-225.47 377.9,-220.04 367.41,-218.61 368.81,-225.47"/>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="node13" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_node13"><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="black" points="229,-158.5 229,-199.5 339,-199.5 339,-158.5 229,-158.5"/>
|
||||
<text text-anchor="start" x="237" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-179C199.57,-179 209.25,-179 218.73,-179"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.9,-182.5 228.9,-179 218.9,-175.5 218.9,-182.5"/>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="node14" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_node14"><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="black" points="229,-98.5 229,-139.5 339,-139.5 339,-98.5 229,-98.5"/>
|
||||
<text text-anchor="start" x="237" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node14 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>Node12->Node14</title>
|
||||
<path fill="none" stroke="midnightblue" d="M186.59,-158.35C198.25,-153.59 210.77,-148.48 222.8,-143.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="224.38,-146.71 232.32,-139.69 221.74,-140.23 224.38,-146.71"/>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="node15" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_node15"><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="black" points="378,-98.5 378,-139.5 488,-139.5 488,-98.5 378,-98.5"/>
|
||||
<text text-anchor="start" x="386" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14->Node15 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>Node14->Node15</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-119C348.57,-119 358.25,-119 367.73,-119"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="367.9,-122.5 377.9,-119 367.9,-115.5 367.9,-122.5"/>
|
||||
</g>
|
||||
<!-- Node16->Node17 -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>Node16->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-100.89C208.34,-94.89 228,-88.33 244.57,-82.81"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="246.06,-86 254.44,-79.52 243.85,-79.36 246.06,-86"/>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="node19" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_node19"><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="black" points="229,-0.5 229,-41.5 339,-41.5 339,-0.5 229,-0.5"/>
|
||||
<text text-anchor="start" x="237" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18->Node19 -->
|
||||
<g id="edge20" class="edge">
|
||||
<title>Node18->Node19</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-21C199.57,-21 209.25,-21 218.73,-21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.9,-24.5 228.9,-21 218.9,-17.5 218.9,-24.5"/>
|
||||
</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()"/>
|
||||
<g id="arrowUp" xlink:href="#dirArrow" transform="translate(30 24)" onmousedown="handlePan(0,-1)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowUp.mouseover" end="arrowUp.mouseout"/>
|
||||
</use>
|
||||
<path 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" xlink:href="#dirArrow" transform="rotate(90) translate(36 -43)" onmousedown="handlePan(1,0)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowRight.mouseover" end="arrowRight.mouseout"/>
|
||||
</use>
|
||||
<path 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" xlink:href="#dirArrow" transform="rotate(180) translate(-30 -48)" onmousedown="handlePan(0,1)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowDown.mouseover" end="arrowDown.mouseout"/>
|
||||
</use>
|
||||
<path 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" xlink:href="#dirArrow" transform="rotate(270) translate(-36 17)" onmousedown="handlePan(-1,0)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowLeft.mouseover" end="arrowLeft.mouseout"/>
|
||||
</use>
|
||||
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
</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>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1,336 @@
|
||||
<?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 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: test_2 Pages: 1 -->
|
||||
<svg width="496pt" height="546pt"
|
||||
viewBox="0.00 0.00 496.00 546.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 542)">
|
||||
<title>test_2</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-542 492,-542 492,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-169.5 0,-188.5 44,-188.5 44,-169.5 0,-169.5"/>
|
||||
<text text-anchor="middle" x="22" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_2</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><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="black" points="80,-481.5 80,-522.5 190,-522.5 190,-481.5 80,-481.5"/>
|
||||
<text text-anchor="start" x="88" y="-510.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-499.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-488.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M23.33,-188.67C24.89,-224.37 33.59,-351.34 80,-442 85.89,-453.5 94.54,-464.5 103.2,-473.86"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="100.94,-476.57 110.41,-481.32 105.97,-471.7 100.94,-476.57"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="226,-518.5 226,-537.5 342,-537.5 342,-518.5 226,-518.5"/>
|
||||
<text text-anchor="middle" x="284" y="-525.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M24.44,-188.63C28.94,-216.65 44.65,-299.93 80,-359 80,-359 226,-509 226,-509 229.19,-511 232.62,-512.82 236.15,-514.46"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="235.07,-517.8 245.65,-518.41 237.76,-511.34 235.07,-517.8"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><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="black" points="80,-308.5 80,-349.5 190,-349.5 190,-308.5 80,-308.5"/>
|
||||
<text text-anchor="start" x="88" y="-337.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-326.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-315.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M30.28,-188.84C46.78,-211.13 87.52,-266.19 112.75,-300.28"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="110.04,-302.51 118.81,-308.47 115.67,-298.35 110.04,-302.51"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><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="black" points="80,-158.5 80,-199.5 190,-199.5 190,-158.5 80,-158.5"/>
|
||||
<text text-anchor="start" x="88" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M44.14,-179C51.62,-179 60.48,-179 69.67,-179"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="69.72,-182.5 79.72,-179 69.72,-175.5 69.72,-182.5"/>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="node16" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_node16"><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="black" points="80,-98.5 80,-139.5 190,-139.5 190,-98.5 80,-98.5"/>
|
||||
<text text-anchor="start" x="88" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node16 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>Node1->Node16</title>
|
||||
<path fill="none" stroke="midnightblue" d="M40.83,-169.36C53.35,-162.6 70.7,-153.22 87.04,-144.39"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="88.84,-147.39 95.97,-139.56 85.51,-141.23 88.84,-147.39"/>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="node17" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_node17"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="240.5,-60.5 240.5,-79.5 327.5,-79.5 327.5,-60.5 240.5,-60.5"/>
|
||||
<text text-anchor="middle" x="284" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node17 -->
|
||||
<g id="edge18" class="edge">
|
||||
<title>Node1->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.93,-169.31C32.27,-150.2 49.25,-107.84 80,-89 125.12,-61.35 186.78,-59.51 230.27,-62.77"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="230.1,-66.27 240.36,-63.65 230.7,-59.3 230.1,-66.27"/>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="node18" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_node18"><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="black" points="80,-0.5 80,-41.5 190,-41.5 190,-0.5 80,-0.5"/>
|
||||
<text text-anchor="start" x="88" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node18 -->
|
||||
<g id="edge19" class="edge">
|
||||
<title>Node1->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.47,-169.35C31.54,-147.18 48.99,-91.73 80,-56 82.45,-53.18 85.18,-50.49 88.08,-47.96"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="90.41,-50.58 96.07,-41.62 86.06,-45.1 90.41,-50.58"/>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-511.61C199.67,-513.26 209.46,-514.99 219.03,-516.69"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.45,-520.14 228.9,-518.43 219.67,-513.24 218.45,-520.14"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><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="black" points="229,-458.5 229,-499.5 339,-499.5 339,-458.5 229,-458.5"/>
|
||||
<text text-anchor="start" x="237" y="-487.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-476.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-465.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M147.7,-349.9C163,-375.76 191.91,-419.94 226,-449 227.5,-450.28 229.06,-451.52 230.67,-452.73"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="228.83,-455.71 239.06,-458.48 232.79,-449.94 228.83,-455.71"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><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="black" points="229,-398.5 229,-439.5 339,-439.5 339,-398.5 229,-398.5"/>
|
||||
<text text-anchor="start" x="237" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-416.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-405.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M165.1,-349.51C182.49,-361.48 205.18,-376.62 226,-389 228.48,-390.47 231.04,-391.95 233.63,-393.43"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="232.1,-396.58 242.54,-398.37 235.5,-390.46 232.1,-396.58"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><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="black" points="229,-338.5 229,-379.5 339,-379.5 339,-338.5 229,-338.5"/>
|
||||
<text text-anchor="start" x="237" y="-367.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-356.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-345.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-340.09C199.67,-341.99 209.46,-343.99 219.03,-345.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.41,-349.39 228.9,-347.96 219.81,-342.53 218.41,-349.39"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><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="black" points="229,-278.5 229,-319.5 339,-319.5 339,-278.5 229,-278.5"/>
|
||||
<text text-anchor="start" x="237" y="-307.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-296.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-285.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-317.91C199.67,-316.01 209.46,-314.01 219.03,-312.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="219.81,-315.47 228.9,-310.04 218.41,-308.61 219.81,-315.47"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><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="black" points="229,-218.5 229,-259.5 339,-259.5 339,-218.5 229,-218.5"/>
|
||||
<text text-anchor="start" x="237" y="-247.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-236.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-225.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node9 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node4->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M165.1,-308.49C182.49,-296.52 205.18,-281.38 226,-269 228.48,-267.53 231.04,-266.05 233.63,-264.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="235.5,-267.54 242.54,-259.63 232.1,-261.42 235.5,-267.54"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><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="black" points="378,-248.5 378,-289.5 488,-289.5 488,-248.5 378,-248.5"/>
|
||||
<text text-anchor="start" x="386" y="-277.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-266.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-255.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-250.09C348.67,-251.99 358.46,-253.99 368.03,-255.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="367.41,-259.39 377.9,-257.96 368.81,-252.53 367.41,-259.39"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><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="black" points="378,-188.5 378,-229.5 488,-229.5 488,-188.5 378,-188.5"/>
|
||||
<text text-anchor="start" x="386" y="-217.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-206.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-195.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-227.91C348.67,-226.01 358.46,-224.01 368.03,-222.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="368.81,-225.47 377.9,-220.04 367.41,-218.61 368.81,-225.47"/>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="node13" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_node13"><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="black" points="229,-158.5 229,-199.5 339,-199.5 339,-158.5 229,-158.5"/>
|
||||
<text text-anchor="start" x="237" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-179C199.57,-179 209.25,-179 218.73,-179"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.9,-182.5 228.9,-179 218.9,-175.5 218.9,-182.5"/>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="node14" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_node14"><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="black" points="229,-98.5 229,-139.5 339,-139.5 339,-98.5 229,-98.5"/>
|
||||
<text text-anchor="start" x="237" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node14 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>Node12->Node14</title>
|
||||
<path fill="none" stroke="midnightblue" d="M186.59,-158.35C198.25,-153.59 210.77,-148.48 222.8,-143.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="224.38,-146.71 232.32,-139.69 221.74,-140.23 224.38,-146.71"/>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="node15" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_node15"><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="black" points="378,-98.5 378,-139.5 488,-139.5 488,-98.5 378,-98.5"/>
|
||||
<text text-anchor="start" x="386" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14->Node15 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>Node14->Node15</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-119C348.57,-119 358.25,-119 367.73,-119"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="367.9,-122.5 377.9,-119 367.9,-115.5 367.9,-122.5"/>
|
||||
</g>
|
||||
<!-- Node16->Node17 -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>Node16->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-100.89C208.34,-94.89 228,-88.33 244.57,-82.81"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="246.06,-86 254.44,-79.52 243.85,-79.36 246.06,-86"/>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="node19" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_node19"><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="black" points="229,-0.5 229,-41.5 339,-41.5 339,-0.5 229,-0.5"/>
|
||||
<text text-anchor="start" x="237" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18->Node19 -->
|
||||
<g id="edge20" class="edge">
|
||||
<title>Node18->Node19</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-21C199.57,-21 209.25,-21 218.73,-21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.9,-24.5 228.9,-21 218.9,-17.5 218.9,-24.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 21 KiB |
@@ -0,0 +1,24 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,298,56,325"/>
|
||||
<area shape="rect" id="node2" href="$d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817" title=" " alt="" coords="104,381,163,407"/>
|
||||
<area shape="rect" id="node21" href="$d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d" title=" " alt="" coords="104,233,163,259"/>
|
||||
<area shape="rect" id="node22" href="$d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a" title=" " alt="" coords="104,298,163,325"/>
|
||||
<area shape="rect" id="node3" 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="211,283,357,339"/>
|
||||
<area shape="rect" id="node4" 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="405,298,560,325"/>
|
||||
<area shape="rect" id="node5" 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="211,515,357,571"/>
|
||||
<area shape="rect" id="node13" 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="211,595,357,651"/>
|
||||
<area shape="rect" id="node17" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" title="Set the values for all the nodes." alt="" coords="211,73,357,129"/>
|
||||
<area shape="rect" id="node18" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="425,119,541,146"/>
|
||||
<area shape="rect" id="node19" 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="211,203,357,259"/>
|
||||
<area shape="rect" id="node6" 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="409,429,556,485"/>
|
||||
<area shape="rect" id="node7" 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="409,509,556,565"/>
|
||||
<area shape="rect" id="node8" 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="409,589,556,645"/>
|
||||
<area shape="rect" id="node9" 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="409,669,556,725"/>
|
||||
<area shape="rect" id="node10" 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="409,349,556,405"/>
|
||||
<area shape="rect" id="node11" 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="608,389,755,445"/>
|
||||
<area shape="rect" id="node12" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" title="Utility function to compute sub-tree sizes." alt="" coords="608,309,755,365"/>
|
||||
<area shape="rect" id="node14" 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="409,749,556,805"/>
|
||||
<area shape="rect" id="node15" 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="409,829,556,885"/>
|
||||
<area shape="rect" id="node16" 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="608,829,755,885"/>
|
||||
<area shape="rect" id="node20" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c" title="Update the value at a node." alt="" coords="409,203,556,259"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
20bffa84e5da91b3b14d79e9259df1e8
|
||||
@@ -0,0 +1,553 @@
|
||||
<?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 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<!--zoomable 668 -->
|
||||
<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[
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="text/javascript"><![CDATA[
|
||||
var edges = document.getElementsByTagName('g');
|
||||
if (edges && edges.length) {
|
||||
for (var i=0;i<edges.length;i++) {
|
||||
if (edges[i].id.substr(0,4)=='edge') {
|
||||
edges[i].setAttribute('class','edge');
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></script>
|
||||
<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="dirArrow">
|
||||
<path 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="text/javascript">
|
||||
var viewWidth = 570;
|
||||
var viewHeight = 668;
|
||||
var sectionId = 'dynsection-1';
|
||||
</script>
|
||||
<script xlink:href="../../svgpan.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="viewport">
|
||||
<title>main</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-663.6 566,-663.6 566,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-420.5 0,-439.5 38,-439.5 38,-420.5 0,-420.5"/>
|
||||
<text text-anchor="middle" x="19" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-358.5 74,-377.5 118,-377.5 118,-358.5 74,-358.5"/>
|
||||
<text text-anchor="middle" x="96" y="-365.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_1</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M31.72,-420.31C43.32,-410.72 61.3,-395.86 75.13,-384.42"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="77.64,-386.89 83.12,-377.82 73.18,-381.5 77.64,-386.89"/>
|
||||
</g>
|
||||
<!-- Node21 -->
|
||||
<g id="node21" class="node">
|
||||
<title>Node21</title>
|
||||
<g id="a_node21"><a xlink:href="../../d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-469.5 74,-488.5 118,-488.5 118,-469.5 74,-469.5"/>
|
||||
<text text-anchor="middle" x="96" y="-476.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_2</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node21 -->
|
||||
<g id="edge22" class="edge">
|
||||
<title>Node1->Node21</title>
|
||||
<path fill="none" stroke="midnightblue" d="M34.82,-439.68C45.3,-446.53 59.56,-455.84 71.57,-463.69"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="69.93,-466.8 80.21,-469.34 73.76,-460.94 69.93,-466.8"/>
|
||||
</g>
|
||||
<!-- Node22 -->
|
||||
<g id="node22" class="node">
|
||||
<title>Node22</title>
|
||||
<g id="a_node22"><a xlink:href="../../d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-420.5 74,-439.5 118,-439.5 118,-420.5 74,-420.5"/>
|
||||
<text text-anchor="middle" x="96" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_3</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node22 -->
|
||||
<g id="edge30" class="edge">
|
||||
<title>Node1->Node22</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.16,-430C45.8,-430 54.92,-430 63.59,-430"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="63.82,-433.5 73.82,-430 63.82,-426.5 63.82,-433.5"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><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="black" points="154,-409.5 154,-450.5 264,-450.5 264,-409.5 154,-409.5"/>
|
||||
<text text-anchor="start" x="162" y="-438.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="162" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="209" y="-416.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M114.34,-377.69C127.1,-384.81 145.08,-394.85 161.87,-404.23"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="160.6,-407.53 171.04,-409.35 164.01,-401.42 160.6,-407.53"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="300,-420.5 300,-439.5 416,-439.5 416,-420.5 300,-420.5"/>
|
||||
<text text-anchor="middle" x="358" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node4 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node2->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M106.91,-358.41C117.55,-348.83 135.44,-334.74 154,-329 200.7,-314.55 223.07,-302.27 264,-329 297.32,-350.76 270.59,-384.18 300,-411 301.72,-412.57 303.58,-414.01 305.53,-415.33"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="304.17,-418.58 314.6,-420.4 307.58,-412.47 304.17,-418.58"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><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="black" points="154,-235.5 154,-276.5 264,-276.5 264,-235.5 154,-235.5"/>
|
||||
<text text-anchor="start" x="162" y="-264.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="162" y="-253.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="209" y="-242.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node2->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M102.7,-358.13C112.01,-342.57 131.7,-311.96 154,-291 157.07,-288.12 160.4,-285.32 163.86,-282.66"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="166.05,-285.39 172.08,-276.68 161.93,-279.73 166.05,-285.39"/>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="node13" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_node13"><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="black" points="154,-175.5 154,-216.5 264,-216.5 264,-175.5 154,-175.5"/>
|
||||
<text text-anchor="start" x="162" y="-204.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="162" y="-193.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="209" y="-182.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node13 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>Node2->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M98.6,-358.2C103.1,-333.33 117.98,-266.84 154,-226 154.86,-225.03 155.76,-224.08 156.69,-223.16"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="159.07,-225.72 164.39,-216.56 154.52,-220.4 159.07,-225.72"/>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="node17" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_node17"><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="black" points="154,-567.5 154,-608.5 264,-608.5 264,-567.5 154,-567.5"/>
|
||||
<text text-anchor="start" x="162" y="-596.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="162" y="-585.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="209" y="-574.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node17 -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>Node2->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M102.22,-377.73C106.73,-386.34 113.24,-399.3 118,-411 137.24,-458.25 129.76,-475.11 154,-520 161.56,-534.01 172.08,-548.04 181.82,-559.68"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="179.23,-562.03 188.4,-567.33 184.53,-557.46 179.23,-562.03"/>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="node18" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_node18"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="314.5,-554.5 314.5,-573.5 401.5,-573.5 401.5,-554.5 314.5,-554.5"/>
|
||||
<text text-anchor="middle" x="358" y="-561.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node18 -->
|
||||
<g id="edge19" class="edge">
|
||||
<title>Node2->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M118.21,-365.64C153.18,-362.99 223.13,-363.11 264,-400 305.33,-437.31 268.45,-474.12 300,-520 307.99,-531.62 320.01,-541.55 330.96,-549.01"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="329.11,-551.98 339.41,-554.46 332.9,-546.1 329.11,-551.98"/>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="node19" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_node19"><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="black" points="154,-469.5 154,-510.5 264,-510.5 264,-469.5 154,-469.5"/>
|
||||
<text text-anchor="start" x="162" y="-498.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="162" y="-487.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="209" y="-476.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node19 -->
|
||||
<g id="edge20" class="edge">
|
||||
<title>Node2->Node19</title>
|
||||
<path fill="none" stroke="midnightblue" d="M102.21,-377.73C113.53,-398.66 140.47,-447.1 154,-460 155.12,-461.06 156.28,-462.1 157.47,-463.12"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="155.73,-466.18 165.81,-469.43 159.95,-460.6 155.73,-466.18"/>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M264.32,-430C272.58,-430 281.18,-430 289.67,-430"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="289.95,-433.5 299.95,-430 289.95,-426.5 289.95,-433.5"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><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="black" points="303,-300.5 303,-341.5 413,-341.5 413,-300.5 303,-300.5"/>
|
||||
<text text-anchor="start" x="311" y="-329.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-318.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-307.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node5->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M256.51,-276.57C270.66,-282.82 286.35,-289.76 301.05,-296.26"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="299.98,-299.61 310.54,-300.46 302.81,-293.21 299.98,-299.61"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><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="black" points="303,-240.5 303,-281.5 413,-281.5 413,-240.5 303,-240.5"/>
|
||||
<text text-anchor="start" x="311" y="-269.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-258.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-247.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node5->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M264.32,-257.85C273.57,-258.16 283.25,-258.49 292.73,-258.81"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="292.79,-262.32 302.9,-259.16 293.03,-255.32 292.79,-262.32"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><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="black" points="303,-180.5 303,-221.5 413,-221.5 413,-180.5 303,-180.5"/>
|
||||
<text text-anchor="start" x="311" y="-209.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-198.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node5->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M264.32,-235.68C273.77,-232.14 283.67,-228.44 293.34,-224.82"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="294.76,-228.02 302.9,-221.24 292.31,-221.47 294.76,-228.02"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><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="black" points="303,-120.5 303,-161.5 413,-161.5 413,-120.5 303,-120.5"/>
|
||||
<text text-anchor="start" x="311" y="-149.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-138.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node9 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node5->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M252.1,-235.34C256.33,-232.48 260.39,-229.36 264,-226 285.39,-206.1 278.38,-190.65 300,-171 301.28,-169.84 302.61,-168.7 303.99,-167.6"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="306.19,-170.33 312.25,-161.65 302.09,-164.65 306.19,-170.33"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><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="black" points="303,-360.5 303,-401.5 413,-401.5 413,-360.5 303,-360.5"/>
|
||||
<text text-anchor="start" x="311" y="-389.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-378.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-367.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node10 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node5->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M246.9,-276.65C252.99,-280.95 258.95,-285.78 264,-291 285.61,-313.37 277.4,-329.63 300,-351 301.12,-352.06 302.28,-353.09 303.48,-354.09"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="301.72,-357.14 311.83,-360.31 305.9,-351.53 301.72,-357.14"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><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="black" points="452,-330.5 452,-371.5 562,-371.5 562,-330.5 452,-330.5"/>
|
||||
<text text-anchor="start" x="460" y="-359.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="460" y="-348.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="507" y="-337.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node11 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node10->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M413.32,-369.91C422.67,-368.01 432.46,-366.01 442.03,-364.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="442.81,-367.47 451.9,-362.04 441.41,-360.61 442.81,-367.47"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><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="black" points="452,-390.5 452,-431.5 562,-431.5 562,-390.5 452,-390.5"/>
|
||||
<text text-anchor="start" x="460" y="-419.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="460" y="-408.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="507" y="-397.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node12 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node10->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M413.32,-392.09C422.67,-393.99 432.46,-395.99 442.03,-397.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="441.41,-401.39 451.9,-399.96 442.81,-394.53 441.41,-401.39"/>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="node14" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_node14"><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="black" points="303,-60.5 303,-101.5 413,-101.5 413,-60.5 303,-60.5"/>
|
||||
<text text-anchor="start" x="311" y="-89.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-78.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node14 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>Node13->Node14</title>
|
||||
<path fill="none" stroke="midnightblue" d="M228.65,-175.44C245.98,-157.1 273.08,-130.25 300,-111 301.88,-109.65 303.84,-108.33 305.84,-107.03"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="308.12,-109.73 314.81,-101.52 304.46,-103.77 308.12,-109.73"/>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="node15" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_node15"><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="black" points="303,-0.5 303,-41.5 413,-41.5 413,-0.5 303,-0.5"/>
|
||||
<text text-anchor="start" x="311" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node15 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>Node13->Node15</title>
|
||||
<path fill="none" stroke="midnightblue" d="M218.54,-175.37C232.02,-144.9 260.76,-87.55 300,-51 301.27,-49.82 302.59,-48.67 303.95,-47.56"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="306.16,-50.28 312.17,-41.56 302.03,-44.63 306.16,-50.28"/>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="node16" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_node16"><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="black" points="452,-0.5 452,-41.5 562,-41.5 562,-0.5 452,-0.5"/>
|
||||
<text text-anchor="start" x="460" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="460" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="507" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15->Node16 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>Node15->Node16</title>
|
||||
<path fill="none" stroke="midnightblue" d="M413.32,-21C422.57,-21 432.25,-21 441.73,-21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="441.9,-24.5 451.9,-21 441.9,-17.5 441.9,-24.5"/>
|
||||
</g>
|
||||
<!-- Node17->Node18 -->
|
||||
<g id="edge18" class="edge">
|
||||
<title>Node17->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M264.32,-579.13C277.36,-577 291.26,-574.73 304.22,-572.62"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="305.08,-576.02 314.38,-570.96 303.95,-569.11 305.08,-576.02"/>
|
||||
</g>
|
||||
<!-- Node20 -->
|
||||
<g id="node20" class="node">
|
||||
<title>Node20</title>
|
||||
<g id="a_node20"><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="black" points="303,-469.5 303,-510.5 413,-510.5 413,-469.5 303,-469.5"/>
|
||||
<text text-anchor="start" x="311" y="-498.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-487.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-476.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19->Node20 -->
|
||||
<g id="edge21" class="edge">
|
||||
<title>Node19->Node20</title>
|
||||
<path fill="none" stroke="midnightblue" d="M264.32,-490C273.57,-490 283.25,-490 292.73,-490"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="292.9,-493.5 302.9,-490 292.9,-486.5 292.9,-493.5"/>
|
||||
</g>
|
||||
<!-- Node21->Node3 -->
|
||||
<g id="edge23" class="edge">
|
||||
<title>Node21->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M118.14,-469.67C127.86,-465.38 139.91,-460.06 151.98,-454.73"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="153.45,-457.9 161.19,-450.66 150.63,-451.5 153.45,-457.9"/>
|
||||
</g>
|
||||
<!-- Node21->Node4 -->
|
||||
<g id="edge25" class="edge">
|
||||
<title>Node21->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M97.51,-488.64C99.48,-514.91 108.95,-587.78 154,-618 194.6,-645.23 225.78,-648.49 264,-618 320.3,-573.08 256.12,-517.11 300,-460 304.93,-453.58 311.64,-448.39 318.72,-444.25"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="320.51,-447.26 327.78,-439.55 317.29,-441.05 320.51,-447.26"/>
|
||||
</g>
|
||||
<!-- Node21->Node5 -->
|
||||
<g id="edge24" class="edge">
|
||||
<title>Node21->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M104.45,-469.29C108.68,-463.55 113.93,-456.05 118,-449 149.98,-393.6 179.85,-324.91 195.85,-286.21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="199.24,-287.17 199.8,-276.59 192.76,-284.51 199.24,-287.17"/>
|
||||
</g>
|
||||
<!-- Node21->Node13 -->
|
||||
<g id="edge26" class="edge">
|
||||
<title>Node21->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M105.42,-469.39C109.85,-463.81 114.99,-456.42 118,-449 155.74,-355.97 96.33,-308.18 154,-226 154.54,-225.23 155.1,-224.48 155.69,-223.75"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="158.28,-226.11 162.81,-216.53 153.29,-221.2 158.28,-226.11"/>
|
||||
</g>
|
||||
<!-- Node21->Node17 -->
|
||||
<g id="edge27" class="edge">
|
||||
<title>Node21->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M102.94,-488.71C112.43,-503.71 132.18,-532.89 154,-553 157.14,-555.9 160.55,-558.71 164.08,-561.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="162.28,-564.42 172.44,-567.43 166.38,-558.74 162.28,-564.42"/>
|
||||
</g>
|
||||
<!-- Node21->Node18 -->
|
||||
<g id="edge28" class="edge">
|
||||
<title>Node21->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M96.88,-488.53C97.09,-517.57 102.17,-605.22 154,-642 193.87,-670.29 218.06,-658.72 264,-642 297.12,-629.95 326.66,-600.35 343.16,-581.28"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="345.86,-583.51 349.6,-573.59 340.49,-579.01 345.86,-583.51"/>
|
||||
</g>
|
||||
<!-- Node21->Node19 -->
|
||||
<g id="edge29" class="edge">
|
||||
<title>Node21->Node19</title>
|
||||
<path fill="none" stroke="midnightblue" d="M118.14,-481.09C125.62,-481.84 134.48,-482.71 143.67,-483.62"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="143.42,-487.12 153.72,-484.62 144.11,-480.15 143.42,-487.12"/>
|
||||
</g>
|
||||
<!-- Node22->Node3 -->
|
||||
<g id="edge31" class="edge">
|
||||
<title>Node22->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M118.14,-430C125.62,-430 134.48,-430 143.67,-430"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="143.72,-433.5 153.72,-430 143.72,-426.5 143.72,-433.5"/>
|
||||
</g>
|
||||
<!-- Node22->Node4 -->
|
||||
<g id="edge33" class="edge">
|
||||
<title>Node22->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M110.75,-420.31C121.84,-413.12 138.15,-403.92 154,-400 201.46,-388.27 215.7,-392.4 264,-400 266.91,-400.46 294.03,-409.25 318.23,-417.19"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="317.41,-420.61 328,-420.41 319.6,-413.96 317.41,-420.61"/>
|
||||
</g>
|
||||
<!-- Node22->Node5 -->
|
||||
<g id="edge32" class="edge">
|
||||
<title>Node22->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M103.13,-420.4C119.35,-394.96 163.94,-325.07 189.45,-285.08"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="192.46,-286.87 194.89,-276.56 186.56,-283.11 192.46,-286.87"/>
|
||||
</g>
|
||||
<!-- Node22->Node13 -->
|
||||
<g id="edge34" class="edge">
|
||||
<title>Node22->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M102.51,-420.38C107.2,-411.84 113.82,-398.92 118,-387 142.25,-317.81 110.1,-284.73 154,-226 154.56,-225.25 155.15,-224.51 155.76,-223.79"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="158.32,-226.18 163.03,-216.69 153.43,-221.18 158.32,-226.18"/>
|
||||
</g>
|
||||
<!-- Node22->Node17 -->
|
||||
<g id="edge35" class="edge">
|
||||
<title>Node22->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M104.63,-439.61C108.92,-445.32 114.17,-452.82 118,-460 138.86,-499.11 126.04,-518.61 154,-553 156.32,-555.86 158.94,-558.56 161.74,-561.09"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="159.53,-563.81 169.5,-567.42 163.96,-558.39 159.53,-563.81"/>
|
||||
</g>
|
||||
<!-- Node22->Node18 -->
|
||||
<g id="edge36" class="edge">
|
||||
<title>Node22->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M103.98,-439.61C108.16,-445.44 113.5,-453.07 118,-460 134.93,-486.09 128.72,-501.88 154,-520 177.7,-536.99 252.47,-550.07 304.32,-557.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="303.98,-560.89 314.37,-558.79 304.94,-553.96 303.98,-560.89"/>
|
||||
</g>
|
||||
<!-- Node22->Node19 -->
|
||||
<g id="edge37" class="edge">
|
||||
<title>Node22->Node19</title>
|
||||
<path fill="none" stroke="midnightblue" d="M114.83,-439.64C127.35,-446.4 144.7,-455.78 161.04,-464.61"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="159.51,-467.77 169.97,-469.44 162.84,-461.61 159.51,-467.77"/>
|
||||
</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()"/>
|
||||
<g id="arrowUp" xlink:href="#dirArrow" transform="translate(30 24)" onmousedown="handlePan(0,-1)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowUp.mouseover" end="arrowUp.mouseout"/>
|
||||
</use>
|
||||
<path 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" xlink:href="#dirArrow" transform="rotate(90) translate(36 -43)" onmousedown="handlePan(1,0)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowRight.mouseover" end="arrowRight.mouseout"/>
|
||||
</use>
|
||||
<path 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" xlink:href="#dirArrow" transform="rotate(180) translate(-30 -48)" onmousedown="handlePan(0,1)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowDown.mouseover" end="arrowDown.mouseout"/>
|
||||
</use>
|
||||
<path 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" xlink:href="#dirArrow" transform="rotate(270) translate(-36 17)" onmousedown="handlePan(-1,0)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowLeft.mouseover" end="arrowLeft.mouseout"/>
|
||||
</use>
|
||||
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
</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>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 34 KiB |
@@ -0,0 +1,465 @@
|
||||
<?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 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="570pt" height="668pt"
|
||||
viewBox="0.00 0.00 570.00 667.60" 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 663.6)">
|
||||
<title>main</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-663.6 566,-663.6 566,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-420.5 0,-439.5 38,-439.5 38,-420.5 0,-420.5"/>
|
||||
<text text-anchor="middle" x="19" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d2/de9/heavy__light__decomposition_8cpp.html#a34b8683a2b429de5cce57e6d733ec817" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-358.5 74,-377.5 118,-377.5 118,-358.5 74,-358.5"/>
|
||||
<text text-anchor="middle" x="96" y="-365.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_1</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M31.72,-420.31C43.32,-410.72 61.3,-395.86 75.13,-384.42"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="77.64,-386.89 83.12,-377.82 73.18,-381.5 77.64,-386.89"/>
|
||||
</g>
|
||||
<!-- Node21 -->
|
||||
<g id="node21" class="node">
|
||||
<title>Node21</title>
|
||||
<g id="a_node21"><a xlink:href="../../d2/de9/heavy__light__decomposition_8cpp.html#a458410412185a5f09199deaff7157a8d" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-469.5 74,-488.5 118,-488.5 118,-469.5 74,-469.5"/>
|
||||
<text text-anchor="middle" x="96" y="-476.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_2</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node21 -->
|
||||
<g id="edge22" class="edge">
|
||||
<title>Node1->Node21</title>
|
||||
<path fill="none" stroke="midnightblue" d="M34.82,-439.68C45.3,-446.53 59.56,-455.84 71.57,-463.69"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="69.93,-466.8 80.21,-469.34 73.76,-460.94 69.93,-466.8"/>
|
||||
</g>
|
||||
<!-- Node22 -->
|
||||
<g id="node22" class="node">
|
||||
<title>Node22</title>
|
||||
<g id="a_node22"><a xlink:href="../../d2/de9/heavy__light__decomposition_8cpp.html#af31ec5409537703d9c8a47350386b32a" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-420.5 74,-439.5 118,-439.5 118,-420.5 74,-420.5"/>
|
||||
<text text-anchor="middle" x="96" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_3</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node22 -->
|
||||
<g id="edge30" class="edge">
|
||||
<title>Node1->Node22</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.16,-430C45.8,-430 54.92,-430 63.59,-430"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="63.82,-433.5 73.82,-430 63.82,-426.5 63.82,-433.5"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><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="black" points="154,-409.5 154,-450.5 264,-450.5 264,-409.5 154,-409.5"/>
|
||||
<text text-anchor="start" x="162" y="-438.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="162" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="209" y="-416.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M114.34,-377.69C127.1,-384.81 145.08,-394.85 161.87,-404.23"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="160.6,-407.53 171.04,-409.35 164.01,-401.42 160.6,-407.53"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="300,-420.5 300,-439.5 416,-439.5 416,-420.5 300,-420.5"/>
|
||||
<text text-anchor="middle" x="358" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node4 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node2->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M106.91,-358.41C117.55,-348.83 135.44,-334.74 154,-329 200.7,-314.55 223.07,-302.27 264,-329 297.32,-350.76 270.59,-384.18 300,-411 301.72,-412.57 303.58,-414.01 305.53,-415.33"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="304.17,-418.58 314.6,-420.4 307.58,-412.47 304.17,-418.58"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><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="black" points="154,-235.5 154,-276.5 264,-276.5 264,-235.5 154,-235.5"/>
|
||||
<text text-anchor="start" x="162" y="-264.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="162" y="-253.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="209" y="-242.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node2->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M102.7,-358.13C112.01,-342.57 131.7,-311.96 154,-291 157.07,-288.12 160.4,-285.32 163.86,-282.66"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="166.05,-285.39 172.08,-276.68 161.93,-279.73 166.05,-285.39"/>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="node13" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_node13"><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="black" points="154,-175.5 154,-216.5 264,-216.5 264,-175.5 154,-175.5"/>
|
||||
<text text-anchor="start" x="162" y="-204.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="162" y="-193.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="209" y="-182.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node13 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>Node2->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M98.6,-358.2C103.1,-333.33 117.98,-266.84 154,-226 154.86,-225.03 155.76,-224.08 156.69,-223.16"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="159.07,-225.72 164.39,-216.56 154.52,-220.4 159.07,-225.72"/>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="node17" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_node17"><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="black" points="154,-567.5 154,-608.5 264,-608.5 264,-567.5 154,-567.5"/>
|
||||
<text text-anchor="start" x="162" y="-596.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="162" y="-585.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="209" y="-574.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node17 -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>Node2->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M102.22,-377.73C106.73,-386.34 113.24,-399.3 118,-411 137.24,-458.25 129.76,-475.11 154,-520 161.56,-534.01 172.08,-548.04 181.82,-559.68"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="179.23,-562.03 188.4,-567.33 184.53,-557.46 179.23,-562.03"/>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="node18" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_node18"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="314.5,-554.5 314.5,-573.5 401.5,-573.5 401.5,-554.5 314.5,-554.5"/>
|
||||
<text text-anchor="middle" x="358" y="-561.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node18 -->
|
||||
<g id="edge19" class="edge">
|
||||
<title>Node2->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M118.21,-365.64C153.18,-362.99 223.13,-363.11 264,-400 305.33,-437.31 268.45,-474.12 300,-520 307.99,-531.62 320.01,-541.55 330.96,-549.01"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="329.11,-551.98 339.41,-554.46 332.9,-546.1 329.11,-551.98"/>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="node19" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_node19"><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="black" points="154,-469.5 154,-510.5 264,-510.5 264,-469.5 154,-469.5"/>
|
||||
<text text-anchor="start" x="162" y="-498.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="162" y="-487.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="209" y="-476.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node19 -->
|
||||
<g id="edge20" class="edge">
|
||||
<title>Node2->Node19</title>
|
||||
<path fill="none" stroke="midnightblue" d="M102.21,-377.73C113.53,-398.66 140.47,-447.1 154,-460 155.12,-461.06 156.28,-462.1 157.47,-463.12"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="155.73,-466.18 165.81,-469.43 159.95,-460.6 155.73,-466.18"/>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M264.32,-430C272.58,-430 281.18,-430 289.67,-430"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="289.95,-433.5 299.95,-430 289.95,-426.5 289.95,-433.5"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><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="black" points="303,-300.5 303,-341.5 413,-341.5 413,-300.5 303,-300.5"/>
|
||||
<text text-anchor="start" x="311" y="-329.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-318.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-307.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node5->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M256.51,-276.57C270.66,-282.82 286.35,-289.76 301.05,-296.26"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="299.98,-299.61 310.54,-300.46 302.81,-293.21 299.98,-299.61"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><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="black" points="303,-240.5 303,-281.5 413,-281.5 413,-240.5 303,-240.5"/>
|
||||
<text text-anchor="start" x="311" y="-269.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-258.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-247.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node5->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M264.32,-257.85C273.57,-258.16 283.25,-258.49 292.73,-258.81"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="292.79,-262.32 302.9,-259.16 293.03,-255.32 292.79,-262.32"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><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="black" points="303,-180.5 303,-221.5 413,-221.5 413,-180.5 303,-180.5"/>
|
||||
<text text-anchor="start" x="311" y="-209.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-198.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node5->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M264.32,-235.68C273.77,-232.14 283.67,-228.44 293.34,-224.82"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="294.76,-228.02 302.9,-221.24 292.31,-221.47 294.76,-228.02"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><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="black" points="303,-120.5 303,-161.5 413,-161.5 413,-120.5 303,-120.5"/>
|
||||
<text text-anchor="start" x="311" y="-149.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-138.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node9 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node5->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M252.1,-235.34C256.33,-232.48 260.39,-229.36 264,-226 285.39,-206.1 278.38,-190.65 300,-171 301.28,-169.84 302.61,-168.7 303.99,-167.6"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="306.19,-170.33 312.25,-161.65 302.09,-164.65 306.19,-170.33"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><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="black" points="303,-360.5 303,-401.5 413,-401.5 413,-360.5 303,-360.5"/>
|
||||
<text text-anchor="start" x="311" y="-389.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-378.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-367.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node10 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node5->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M246.9,-276.65C252.99,-280.95 258.95,-285.78 264,-291 285.61,-313.37 277.4,-329.63 300,-351 301.12,-352.06 302.28,-353.09 303.48,-354.09"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="301.72,-357.14 311.83,-360.31 305.9,-351.53 301.72,-357.14"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><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="black" points="452,-330.5 452,-371.5 562,-371.5 562,-330.5 452,-330.5"/>
|
||||
<text text-anchor="start" x="460" y="-359.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="460" y="-348.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="507" y="-337.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node11 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node10->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M413.32,-369.91C422.67,-368.01 432.46,-366.01 442.03,-364.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="442.81,-367.47 451.9,-362.04 441.41,-360.61 442.81,-367.47"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><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="black" points="452,-390.5 452,-431.5 562,-431.5 562,-390.5 452,-390.5"/>
|
||||
<text text-anchor="start" x="460" y="-419.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="460" y="-408.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="507" y="-397.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node12 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node10->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M413.32,-392.09C422.67,-393.99 432.46,-395.99 442.03,-397.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="441.41,-401.39 451.9,-399.96 442.81,-394.53 441.41,-401.39"/>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="node14" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_node14"><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="black" points="303,-60.5 303,-101.5 413,-101.5 413,-60.5 303,-60.5"/>
|
||||
<text text-anchor="start" x="311" y="-89.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-78.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node14 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>Node13->Node14</title>
|
||||
<path fill="none" stroke="midnightblue" d="M228.65,-175.44C245.98,-157.1 273.08,-130.25 300,-111 301.88,-109.65 303.84,-108.33 305.84,-107.03"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="308.12,-109.73 314.81,-101.52 304.46,-103.77 308.12,-109.73"/>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="node15" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_node15"><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="black" points="303,-0.5 303,-41.5 413,-41.5 413,-0.5 303,-0.5"/>
|
||||
<text text-anchor="start" x="311" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node15 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>Node13->Node15</title>
|
||||
<path fill="none" stroke="midnightblue" d="M218.54,-175.37C232.02,-144.9 260.76,-87.55 300,-51 301.27,-49.82 302.59,-48.67 303.95,-47.56"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="306.16,-50.28 312.17,-41.56 302.03,-44.63 306.16,-50.28"/>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="node16" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_node16"><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="black" points="452,-0.5 452,-41.5 562,-41.5 562,-0.5 452,-0.5"/>
|
||||
<text text-anchor="start" x="460" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="460" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="507" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15->Node16 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>Node15->Node16</title>
|
||||
<path fill="none" stroke="midnightblue" d="M413.32,-21C422.57,-21 432.25,-21 441.73,-21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="441.9,-24.5 451.9,-21 441.9,-17.5 441.9,-24.5"/>
|
||||
</g>
|
||||
<!-- Node17->Node18 -->
|
||||
<g id="edge18" class="edge">
|
||||
<title>Node17->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M264.32,-579.13C277.36,-577 291.26,-574.73 304.22,-572.62"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="305.08,-576.02 314.38,-570.96 303.95,-569.11 305.08,-576.02"/>
|
||||
</g>
|
||||
<!-- Node20 -->
|
||||
<g id="node20" class="node">
|
||||
<title>Node20</title>
|
||||
<g id="a_node20"><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="black" points="303,-469.5 303,-510.5 413,-510.5 413,-469.5 303,-469.5"/>
|
||||
<text text-anchor="start" x="311" y="-498.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="311" y="-487.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="358" y="-476.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node19->Node20 -->
|
||||
<g id="edge21" class="edge">
|
||||
<title>Node19->Node20</title>
|
||||
<path fill="none" stroke="midnightblue" d="M264.32,-490C273.57,-490 283.25,-490 292.73,-490"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="292.9,-493.5 302.9,-490 292.9,-486.5 292.9,-493.5"/>
|
||||
</g>
|
||||
<!-- Node21->Node3 -->
|
||||
<g id="edge23" class="edge">
|
||||
<title>Node21->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M118.14,-469.67C127.86,-465.38 139.91,-460.06 151.98,-454.73"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="153.45,-457.9 161.19,-450.66 150.63,-451.5 153.45,-457.9"/>
|
||||
</g>
|
||||
<!-- Node21->Node4 -->
|
||||
<g id="edge25" class="edge">
|
||||
<title>Node21->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M97.51,-488.64C99.48,-514.91 108.95,-587.78 154,-618 194.6,-645.23 225.78,-648.49 264,-618 320.3,-573.08 256.12,-517.11 300,-460 304.93,-453.58 311.64,-448.39 318.72,-444.25"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="320.51,-447.26 327.78,-439.55 317.29,-441.05 320.51,-447.26"/>
|
||||
</g>
|
||||
<!-- Node21->Node5 -->
|
||||
<g id="edge24" class="edge">
|
||||
<title>Node21->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M104.45,-469.29C108.68,-463.55 113.93,-456.05 118,-449 149.98,-393.6 179.85,-324.91 195.85,-286.21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="199.24,-287.17 199.8,-276.59 192.76,-284.51 199.24,-287.17"/>
|
||||
</g>
|
||||
<!-- Node21->Node13 -->
|
||||
<g id="edge26" class="edge">
|
||||
<title>Node21->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M105.42,-469.39C109.85,-463.81 114.99,-456.42 118,-449 155.74,-355.97 96.33,-308.18 154,-226 154.54,-225.23 155.1,-224.48 155.69,-223.75"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="158.28,-226.11 162.81,-216.53 153.29,-221.2 158.28,-226.11"/>
|
||||
</g>
|
||||
<!-- Node21->Node17 -->
|
||||
<g id="edge27" class="edge">
|
||||
<title>Node21->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M102.94,-488.71C112.43,-503.71 132.18,-532.89 154,-553 157.14,-555.9 160.55,-558.71 164.08,-561.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="162.28,-564.42 172.44,-567.43 166.38,-558.74 162.28,-564.42"/>
|
||||
</g>
|
||||
<!-- Node21->Node18 -->
|
||||
<g id="edge28" class="edge">
|
||||
<title>Node21->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M96.88,-488.53C97.09,-517.57 102.17,-605.22 154,-642 193.87,-670.29 218.06,-658.72 264,-642 297.12,-629.95 326.66,-600.35 343.16,-581.28"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="345.86,-583.51 349.6,-573.59 340.49,-579.01 345.86,-583.51"/>
|
||||
</g>
|
||||
<!-- Node21->Node19 -->
|
||||
<g id="edge29" class="edge">
|
||||
<title>Node21->Node19</title>
|
||||
<path fill="none" stroke="midnightblue" d="M118.14,-481.09C125.62,-481.84 134.48,-482.71 143.67,-483.62"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="143.42,-487.12 153.72,-484.62 144.11,-480.15 143.42,-487.12"/>
|
||||
</g>
|
||||
<!-- Node22->Node3 -->
|
||||
<g id="edge31" class="edge">
|
||||
<title>Node22->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M118.14,-430C125.62,-430 134.48,-430 143.67,-430"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="143.72,-433.5 153.72,-430 143.72,-426.5 143.72,-433.5"/>
|
||||
</g>
|
||||
<!-- Node22->Node4 -->
|
||||
<g id="edge33" class="edge">
|
||||
<title>Node22->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M110.75,-420.31C121.84,-413.12 138.15,-403.92 154,-400 201.46,-388.27 215.7,-392.4 264,-400 266.91,-400.46 294.03,-409.25 318.23,-417.19"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="317.41,-420.61 328,-420.41 319.6,-413.96 317.41,-420.61"/>
|
||||
</g>
|
||||
<!-- Node22->Node5 -->
|
||||
<g id="edge32" class="edge">
|
||||
<title>Node22->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M103.13,-420.4C119.35,-394.96 163.94,-325.07 189.45,-285.08"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="192.46,-286.87 194.89,-276.56 186.56,-283.11 192.46,-286.87"/>
|
||||
</g>
|
||||
<!-- Node22->Node13 -->
|
||||
<g id="edge34" class="edge">
|
||||
<title>Node22->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M102.51,-420.38C107.2,-411.84 113.82,-398.92 118,-387 142.25,-317.81 110.1,-284.73 154,-226 154.56,-225.25 155.15,-224.51 155.76,-223.79"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="158.32,-226.18 163.03,-216.69 153.43,-221.18 158.32,-226.18"/>
|
||||
</g>
|
||||
<!-- Node22->Node17 -->
|
||||
<g id="edge35" class="edge">
|
||||
<title>Node22->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M104.63,-439.61C108.92,-445.32 114.17,-452.82 118,-460 138.86,-499.11 126.04,-518.61 154,-553 156.32,-555.86 158.94,-558.56 161.74,-561.09"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="159.53,-563.81 169.5,-567.42 163.96,-558.39 159.53,-563.81"/>
|
||||
</g>
|
||||
<!-- Node22->Node18 -->
|
||||
<g id="edge36" class="edge">
|
||||
<title>Node22->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M103.98,-439.61C108.16,-445.44 113.5,-453.07 118,-460 134.93,-486.09 128.72,-501.88 154,-520 177.7,-536.99 252.47,-550.07 304.32,-557.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="303.98,-560.89 314.37,-558.79 304.94,-553.96 303.98,-560.89"/>
|
||||
</g>
|
||||
<!-- Node22->Node19 -->
|
||||
<g id="edge37" class="edge">
|
||||
<title>Node22->Node19</title>
|
||||
<path fill="none" stroke="midnightblue" d="M114.83,-439.64C127.35,-446.4 144.7,-455.78 161.04,-464.61"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="159.51,-467.77 169.97,-469.44 162.84,-461.61 159.51,-467.77"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 28 KiB |
@@ -0,0 +1,21 @@
|
||||
<map id="test_3" name="test_3">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,471,64,497"/>
|
||||
<area shape="rect" id="node2" 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="112,25,259,81"/>
|
||||
<area shape="rect" id="node3" 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="307,5,461,32"/>
|
||||
<area shape="rect" id="node4" 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="112,256,259,312"/>
|
||||
<area shape="rect" id="node12" 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="112,456,259,512"/>
|
||||
<area shape="rect" id="node16" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70" title="Set the values for all the nodes." alt="" coords="112,536,259,592"/>
|
||||
<area shape="rect" id="node17" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="326,616,442,643"/>
|
||||
<area shape="rect" id="node18" 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="112,667,259,723"/>
|
||||
<area shape="rect" id="node5" 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="311,56,457,112"/>
|
||||
<area shape="rect" id="node6" 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="311,136,457,192"/>
|
||||
<area shape="rect" id="node7" 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="311,216,457,272"/>
|
||||
<area shape="rect" id="node8" 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="311,296,457,352"/>
|
||||
<area shape="rect" id="node9" 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="311,376,457,432"/>
|
||||
<area shape="rect" id="node10" 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="509,336,656,392"/>
|
||||
<area shape="rect" id="node11" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" title="Utility function to compute sub-tree sizes." alt="" coords="509,416,656,472"/>
|
||||
<area shape="rect" id="node13" 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="311,456,457,512"/>
|
||||
<area shape="rect" id="node14" 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="311,536,457,592"/>
|
||||
<area shape="rect" id="node15" 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="509,536,656,592"/>
|
||||
<area shape="rect" id="node19" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c" title="Update the value at a node." alt="" coords="311,667,457,723"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
5764309ab9b9b4eea055eef788603a20
|
||||
@@ -0,0 +1,424 @@
|
||||
<?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 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: test_3 Pages: 1 -->
|
||||
<!--zoomable 546 -->
|
||||
<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[
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="text/javascript"><![CDATA[
|
||||
var edges = document.getElementsByTagName('g');
|
||||
if (edges && edges.length) {
|
||||
for (var i=0;i<edges.length;i++) {
|
||||
if (edges[i].id.substr(0,4)=='edge') {
|
||||
edges[i].setAttribute('class','edge');
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></script>
|
||||
<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="dirArrow">
|
||||
<path 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="text/javascript">
|
||||
var viewWidth = 496;
|
||||
var viewHeight = 546;
|
||||
var sectionId = 'dynsection-4';
|
||||
</script>
|
||||
<script xlink:href="../../svgpan.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="viewport">
|
||||
<title>test_3</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-542 492,-542 492,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-169.5 0,-188.5 44,-188.5 44,-169.5 0,-169.5"/>
|
||||
<text text-anchor="middle" x="22" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_3</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><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="black" points="80,-481.5 80,-522.5 190,-522.5 190,-481.5 80,-481.5"/>
|
||||
<text text-anchor="start" x="88" y="-510.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-499.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-488.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M23.33,-188.67C24.89,-224.37 33.59,-351.34 80,-442 85.89,-453.5 94.54,-464.5 103.2,-473.86"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="100.94,-476.57 110.41,-481.32 105.97,-471.7 100.94,-476.57"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="226,-518.5 226,-537.5 342,-537.5 342,-518.5 226,-518.5"/>
|
||||
<text text-anchor="middle" x="284" y="-525.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M24.44,-188.63C28.94,-216.65 44.65,-299.93 80,-359 80,-359 226,-509 226,-509 229.19,-511 232.62,-512.82 236.15,-514.46"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="235.07,-517.8 245.65,-518.41 237.76,-511.34 235.07,-517.8"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><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="black" points="80,-308.5 80,-349.5 190,-349.5 190,-308.5 80,-308.5"/>
|
||||
<text text-anchor="start" x="88" y="-337.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-326.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-315.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M30.28,-188.84C46.78,-211.13 87.52,-266.19 112.75,-300.28"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="110.04,-302.51 118.81,-308.47 115.67,-298.35 110.04,-302.51"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><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="black" points="80,-158.5 80,-199.5 190,-199.5 190,-158.5 80,-158.5"/>
|
||||
<text text-anchor="start" x="88" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M44.14,-179C51.62,-179 60.48,-179 69.67,-179"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="69.72,-182.5 79.72,-179 69.72,-175.5 69.72,-182.5"/>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="node16" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_node16"><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="black" points="80,-98.5 80,-139.5 190,-139.5 190,-98.5 80,-98.5"/>
|
||||
<text text-anchor="start" x="88" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node16 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>Node1->Node16</title>
|
||||
<path fill="none" stroke="midnightblue" d="M40.83,-169.36C53.35,-162.6 70.7,-153.22 87.04,-144.39"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="88.84,-147.39 95.97,-139.56 85.51,-141.23 88.84,-147.39"/>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="node17" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_node17"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="240.5,-60.5 240.5,-79.5 327.5,-79.5 327.5,-60.5 240.5,-60.5"/>
|
||||
<text text-anchor="middle" x="284" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node17 -->
|
||||
<g id="edge18" class="edge">
|
||||
<title>Node1->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.93,-169.31C32.27,-150.2 49.25,-107.84 80,-89 125.12,-61.35 186.78,-59.51 230.27,-62.77"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="230.1,-66.27 240.36,-63.65 230.7,-59.3 230.1,-66.27"/>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="node18" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_node18"><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="black" points="80,-0.5 80,-41.5 190,-41.5 190,-0.5 80,-0.5"/>
|
||||
<text text-anchor="start" x="88" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node18 -->
|
||||
<g id="edge19" class="edge">
|
||||
<title>Node1->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.47,-169.35C31.54,-147.18 48.99,-91.73 80,-56 82.45,-53.18 85.18,-50.49 88.08,-47.96"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="90.41,-50.58 96.07,-41.62 86.06,-45.1 90.41,-50.58"/>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-511.61C199.67,-513.26 209.46,-514.99 219.03,-516.69"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.45,-520.14 228.9,-518.43 219.67,-513.24 218.45,-520.14"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><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="black" points="229,-458.5 229,-499.5 339,-499.5 339,-458.5 229,-458.5"/>
|
||||
<text text-anchor="start" x="237" y="-487.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-476.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-465.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M147.7,-349.9C163,-375.76 191.91,-419.94 226,-449 227.5,-450.28 229.06,-451.52 230.67,-452.73"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="228.83,-455.71 239.06,-458.48 232.79,-449.94 228.83,-455.71"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><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="black" points="229,-398.5 229,-439.5 339,-439.5 339,-398.5 229,-398.5"/>
|
||||
<text text-anchor="start" x="237" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-416.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-405.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M165.1,-349.51C182.49,-361.48 205.18,-376.62 226,-389 228.48,-390.47 231.04,-391.95 233.63,-393.43"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="232.1,-396.58 242.54,-398.37 235.5,-390.46 232.1,-396.58"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><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="black" points="229,-338.5 229,-379.5 339,-379.5 339,-338.5 229,-338.5"/>
|
||||
<text text-anchor="start" x="237" y="-367.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-356.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-345.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-340.09C199.67,-341.99 209.46,-343.99 219.03,-345.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.41,-349.39 228.9,-347.96 219.81,-342.53 218.41,-349.39"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><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="black" points="229,-278.5 229,-319.5 339,-319.5 339,-278.5 229,-278.5"/>
|
||||
<text text-anchor="start" x="237" y="-307.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-296.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-285.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-317.91C199.67,-316.01 209.46,-314.01 219.03,-312.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="219.81,-315.47 228.9,-310.04 218.41,-308.61 219.81,-315.47"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><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="black" points="229,-218.5 229,-259.5 339,-259.5 339,-218.5 229,-218.5"/>
|
||||
<text text-anchor="start" x="237" y="-247.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-236.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-225.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node9 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node4->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M165.1,-308.49C182.49,-296.52 205.18,-281.38 226,-269 228.48,-267.53 231.04,-266.05 233.63,-264.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="235.5,-267.54 242.54,-259.63 232.1,-261.42 235.5,-267.54"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><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="black" points="378,-248.5 378,-289.5 488,-289.5 488,-248.5 378,-248.5"/>
|
||||
<text text-anchor="start" x="386" y="-277.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-266.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-255.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-250.09C348.67,-251.99 358.46,-253.99 368.03,-255.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="367.41,-259.39 377.9,-257.96 368.81,-252.53 367.41,-259.39"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><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="black" points="378,-188.5 378,-229.5 488,-229.5 488,-188.5 378,-188.5"/>
|
||||
<text text-anchor="start" x="386" y="-217.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-206.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-195.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-227.91C348.67,-226.01 358.46,-224.01 368.03,-222.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="368.81,-225.47 377.9,-220.04 367.41,-218.61 368.81,-225.47"/>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="node13" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_node13"><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="black" points="229,-158.5 229,-199.5 339,-199.5 339,-158.5 229,-158.5"/>
|
||||
<text text-anchor="start" x="237" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-179C199.57,-179 209.25,-179 218.73,-179"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.9,-182.5 228.9,-179 218.9,-175.5 218.9,-182.5"/>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="node14" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_node14"><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="black" points="229,-98.5 229,-139.5 339,-139.5 339,-98.5 229,-98.5"/>
|
||||
<text text-anchor="start" x="237" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node14 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>Node12->Node14</title>
|
||||
<path fill="none" stroke="midnightblue" d="M186.59,-158.35C198.25,-153.59 210.77,-148.48 222.8,-143.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="224.38,-146.71 232.32,-139.69 221.74,-140.23 224.38,-146.71"/>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="node15" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_node15"><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="black" points="378,-98.5 378,-139.5 488,-139.5 488,-98.5 378,-98.5"/>
|
||||
<text text-anchor="start" x="386" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14->Node15 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>Node14->Node15</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-119C348.57,-119 358.25,-119 367.73,-119"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="367.9,-122.5 377.9,-119 367.9,-115.5 367.9,-122.5"/>
|
||||
</g>
|
||||
<!-- Node16->Node17 -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>Node16->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-100.89C208.34,-94.89 228,-88.33 244.57,-82.81"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="246.06,-86 254.44,-79.52 243.85,-79.36 246.06,-86"/>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="node19" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_node19"><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="black" points="229,-0.5 229,-41.5 339,-41.5 339,-0.5 229,-0.5"/>
|
||||
<text text-anchor="start" x="237" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18->Node19 -->
|
||||
<g id="edge20" class="edge">
|
||||
<title>Node18->Node19</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-21C199.57,-21 209.25,-21 218.73,-21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.9,-24.5 228.9,-21 218.9,-17.5 218.9,-24.5"/>
|
||||
</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()"/>
|
||||
<g id="arrowUp" xlink:href="#dirArrow" transform="translate(30 24)" onmousedown="handlePan(0,-1)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowUp.mouseover" end="arrowUp.mouseout"/>
|
||||
</use>
|
||||
<path 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" xlink:href="#dirArrow" transform="rotate(90) translate(36 -43)" onmousedown="handlePan(1,0)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowRight.mouseover" end="arrowRight.mouseout"/>
|
||||
</use>
|
||||
<path 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" xlink:href="#dirArrow" transform="rotate(180) translate(-30 -48)" onmousedown="handlePan(0,1)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowDown.mouseover" end="arrowDown.mouseout"/>
|
||||
</use>
|
||||
<path 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" xlink:href="#dirArrow" transform="rotate(270) translate(-36 17)" onmousedown="handlePan(-1,0)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowLeft.mouseover" end="arrowLeft.mouseout"/>
|
||||
</use>
|
||||
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
</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>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1,336 @@
|
||||
<?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 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: test_3 Pages: 1 -->
|
||||
<svg width="496pt" height="546pt"
|
||||
viewBox="0.00 0.00 496.00 546.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 542)">
|
||||
<title>test_3</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-542 492,-542 492,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-169.5 0,-188.5 44,-188.5 44,-169.5 0,-169.5"/>
|
||||
<text text-anchor="middle" x="22" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">test_3</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><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="black" points="80,-481.5 80,-522.5 190,-522.5 190,-481.5 80,-481.5"/>
|
||||
<text text-anchor="start" x="88" y="-510.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-499.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-488.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M23.33,-188.67C24.89,-224.37 33.59,-351.34 80,-442 85.89,-453.5 94.54,-464.5 103.2,-473.86"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="100.94,-476.57 110.41,-481.32 105.97,-471.7 100.94,-476.57"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="226,-518.5 226,-537.5 342,-537.5 342,-518.5 226,-518.5"/>
|
||||
<text text-anchor="middle" x="284" y="-525.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M24.44,-188.63C28.94,-216.65 44.65,-299.93 80,-359 80,-359 226,-509 226,-509 229.19,-511 232.62,-512.82 236.15,-514.46"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="235.07,-517.8 245.65,-518.41 237.76,-511.34 235.07,-517.8"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><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="black" points="80,-308.5 80,-349.5 190,-349.5 190,-308.5 80,-308.5"/>
|
||||
<text text-anchor="start" x="88" y="-337.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-326.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-315.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M30.28,-188.84C46.78,-211.13 87.52,-266.19 112.75,-300.28"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="110.04,-302.51 118.81,-308.47 115.67,-298.35 110.04,-302.51"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><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="black" points="80,-158.5 80,-199.5 190,-199.5 190,-158.5 80,-158.5"/>
|
||||
<text text-anchor="start" x="88" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M44.14,-179C51.62,-179 60.48,-179 69.67,-179"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="69.72,-182.5 79.72,-179 69.72,-175.5 69.72,-182.5"/>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="node16" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_node16"><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="black" points="80,-98.5 80,-139.5 190,-139.5 190,-98.5 80,-98.5"/>
|
||||
<text text-anchor="start" x="88" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::set_node_val</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node16 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>Node1->Node16</title>
|
||||
<path fill="none" stroke="midnightblue" d="M40.83,-169.36C53.35,-162.6 70.7,-153.22 87.04,-144.39"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="88.84,-147.39 95.97,-139.56 85.51,-141.23 88.84,-147.39"/>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="node17" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_node17"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="240.5,-60.5 240.5,-79.5 327.5,-79.5 327.5,-60.5 240.5,-60.5"/>
|
||||
<text text-anchor="middle" x="284" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node17 -->
|
||||
<g id="edge18" class="edge">
|
||||
<title>Node1->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.93,-169.31C32.27,-150.2 49.25,-107.84 80,-89 125.12,-61.35 186.78,-59.51 230.27,-62.77"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="230.1,-66.27 240.36,-63.65 230.7,-59.3 230.1,-66.27"/>
|
||||
</g>
|
||||
<!-- Node18 -->
|
||||
<g id="node18" class="node">
|
||||
<title>Node18</title>
|
||||
<g id="a_node18"><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="black" points="80,-0.5 80,-41.5 190,-41.5 190,-0.5 80,-0.5"/>
|
||||
<text text-anchor="start" x="88" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="88" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="135" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node18 -->
|
||||
<g id="edge19" class="edge">
|
||||
<title>Node1->Node18</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.47,-169.35C31.54,-147.18 48.99,-91.73 80,-56 82.45,-53.18 85.18,-50.49 88.08,-47.96"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="90.41,-50.58 96.07,-41.62 86.06,-45.1 90.41,-50.58"/>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-511.61C199.67,-513.26 209.46,-514.99 219.03,-516.69"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.45,-520.14 228.9,-518.43 219.67,-513.24 218.45,-520.14"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><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="black" points="229,-458.5 229,-499.5 339,-499.5 339,-458.5 229,-458.5"/>
|
||||
<text text-anchor="start" x="237" y="-487.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-476.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-465.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::combine</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M147.7,-349.9C163,-375.76 191.91,-419.94 226,-449 227.5,-450.28 229.06,-451.52 230.67,-452.73"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="228.83,-455.71 239.06,-458.48 232.79,-449.94 228.83,-455.71"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><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="black" points="229,-398.5 229,-439.5 339,-439.5 339,-398.5 229,-398.5"/>
|
||||
<text text-anchor="start" x="237" y="-427.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-416.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-405.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_hc</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M165.1,-349.51C182.49,-361.48 205.18,-376.62 226,-389 228.48,-390.47 231.04,-391.95 233.63,-393.43"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="232.1,-396.58 242.54,-398.37 235.5,-390.46 232.1,-396.58"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><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="black" points="229,-338.5 229,-379.5 339,-379.5 339,-338.5 229,-338.5"/>
|
||||
<text text-anchor="start" x="237" y="-367.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-356.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-345.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_labels</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-340.09C199.67,-341.99 209.46,-343.99 219.03,-345.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.41,-349.39 228.9,-347.96 219.81,-342.53 218.41,-349.39"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><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="black" points="229,-278.5 229,-319.5 339,-319.5 339,-278.5 229,-278.5"/>
|
||||
<text text-anchor="start" x="237" y="-307.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-296.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-285.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::dfs_par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-317.91C199.67,-316.01 209.46,-314.01 219.03,-312.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="219.81,-315.47 228.9,-310.04 218.41,-308.61 219.81,-315.47"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><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="black" points="229,-218.5 229,-259.5 339,-259.5 339,-218.5 229,-218.5"/>
|
||||
<text text-anchor="start" x="237" y="-247.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-236.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-225.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::init</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node9 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node4->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M165.1,-308.49C182.49,-296.52 205.18,-281.38 226,-269 228.48,-267.53 231.04,-266.05 233.63,-264.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="235.5,-267.54 242.54,-259.63 232.1,-261.42 235.5,-267.54"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><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="black" points="378,-248.5 378,-289.5 488,-289.5 488,-248.5 378,-248.5"/>
|
||||
<text text-anchor="start" x="386" y="-277.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-266.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-255.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-250.09C348.67,-251.99 358.46,-253.99 368.03,-255.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="367.41,-259.39 377.9,-257.96 368.81,-252.53 367.41,-259.39"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><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="black" points="378,-188.5 378,-229.5 488,-229.5 488,-188.5 378,-188.5"/>
|
||||
<text text-anchor="start" x="386" y="-217.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-206.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-195.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::dfs_size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-227.91C348.67,-226.01 358.46,-224.01 368.03,-222.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="368.81,-225.47 377.9,-220.04 367.41,-218.61 368.81,-225.47"/>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="node13" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_node13"><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="black" points="229,-158.5 229,-199.5 339,-199.5 339,-158.5 229,-158.5"/>
|
||||
<text text-anchor="start" x="237" y="-187.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-176.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-165.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD::chain_query</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-179C199.57,-179 209.25,-179 218.73,-179"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.9,-182.5 228.9,-179 218.9,-175.5 218.9,-182.5"/>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="node14" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_node14"><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="black" points="229,-98.5 229,-139.5 339,-139.5 339,-98.5 229,-98.5"/>
|
||||
<text text-anchor="start" x="237" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lca</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node14 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>Node12->Node14</title>
|
||||
<path fill="none" stroke="midnightblue" d="M186.59,-158.35C198.25,-153.59 210.77,-148.48 222.8,-143.57"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="224.38,-146.71 232.32,-139.69 221.74,-140.23 224.38,-146.71"/>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="node15" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_node15"><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="black" points="378,-98.5 378,-139.5 488,-139.5 488,-98.5 378,-98.5"/>
|
||||
<text text-anchor="start" x="386" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="386" y="-116.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="433" y="-105.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::lift</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14->Node15 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>Node14->Node15</title>
|
||||
<path fill="none" stroke="midnightblue" d="M339.32,-119C348.57,-119 358.25,-119 367.73,-119"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="367.9,-122.5 377.9,-119 367.9,-115.5 367.9,-122.5"/>
|
||||
</g>
|
||||
<!-- Node16->Node17 -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>Node16->Node17</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-100.89C208.34,-94.89 228,-88.33 244.57,-82.81"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="246.06,-86 254.44,-79.52 243.85,-79.36 246.06,-86"/>
|
||||
</g>
|
||||
<!-- Node19 -->
|
||||
<g id="node19" class="node">
|
||||
<title>Node19</title>
|
||||
<g id="a_node19"><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="black" points="229,-0.5 229,-41.5 339,-41.5 339,-0.5 229,-0.5"/>
|
||||
<text text-anchor="start" x="237" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
|
||||
<text text-anchor="start" x="237" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
|
||||
<text text-anchor="middle" x="284" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG::update</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node18->Node19 -->
|
||||
<g id="edge20" class="edge">
|
||||
<title>Node18->Node19</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.32,-21C199.57,-21 209.25,-21 218.73,-21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="218.9,-24.5 228.9,-21 218.9,-17.5 218.9,-24.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 21 KiB |