Documentation for 416a3bc169

This commit is contained in:
github-actions
2020-08-19 19:45:18 +00:00
parent b3f9bef796
commit 00c8db1c8b
326 changed files with 14135 additions and 5183 deletions

View File

@@ -123,41 +123,46 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
<tr id="row_6_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d30/classmachine__learning_1_1adaline.html" target="_self">adaline</a></td><td class="desc"></td></tr>
<tr id="row_7_"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_7_" class="arrow" onclick="toggleFolder('7_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="d4/dd2/namespacequadratic__probing.html" target="_self">quadratic_probing</a></td><td class="desc">An implementation of hash table using <a href="https://en.wikipedia.org/wiki/Quadratic_probing">quadratic probing</a> algorithm </td></tr>
<tr id="row_7_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/dd1/structquadratic__probing_1_1_entry.html" target="_self">Entry</a></td><td class="desc"></td></tr>
<tr id="row_8_"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_8_" class="arrow" onclick="toggleFolder('8_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="d2/dcf/namespacestatistics.html" target="_self">statistics</a></td><td class="desc">Statistical algorithms </td></tr>
<tr id="row_8_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d7c/classstatistics_1_1stats__computer1.html" target="_self">stats_computer1</a></td><td class="desc"></td></tr>
<tr id="row_8_1_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/dab/classstatistics_1_1stats__computer2.html" target="_self">stats_computer2</a></td><td class="desc"></td></tr>
<tr id="row_9_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/d90/struct_btree.html" target="_self">Btree</a></td><td class="desc"></td></tr>
<tr id="row_10_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d15/classcll.html" target="_self">cll</a></td><td class="desc"></td></tr>
<tr id="row_11_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/db3/structcompare.html" target="_self">compare</a></td><td class="desc"></td></tr>
<tr id="row_12_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/d5a/class_complex.html" target="_self">Complex</a></td><td class="desc">Class <a class="el" href="da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> to represent complex numbers as a field </td></tr>
<tr id="row_13_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/dbb/class_cycle_check.html" target="_self">CycleCheck</a></td><td class="desc"></td></tr>
<tr id="row_14_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/dee/classdouble__linked__list.html" target="_self">double_linked_list</a></td><td class="desc"></td></tr>
<tr id="row_15_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d77/class_edge.html" target="_self">Edge</a></td><td class="desc"></td></tr>
<tr id="row_16_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d91/class_fenwick_tree.html" target="_self">FenwickTree</a></td><td class="desc"></td></tr>
<tr id="row_17_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/d9a/class_graph.html" target="_self">Graph</a></td><td class="desc"></td></tr>
<tr id="row_18_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d1c/classhash__chain.html" target="_self">hash_chain</a></td><td class="desc">Chain class with a given modulus </td></tr>
<tr id="row_19_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d66/struct_item.html" target="_self">Item</a></td><td class="desc"></td></tr>
<tr id="row_20_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d82/classlarge__number.html" target="_self">large_number</a></td><td class="desc"></td></tr>
<tr id="row_21_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d0/dff/structlinkedlist.html" target="_self">linkedlist</a></td><td class="desc"></td></tr>
<tr id="row_22_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/d10/structlist.html" target="_self">list</a></td><td class="desc"></td></tr>
<tr id="row_23_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d05/class_min_heap.html" target="_self">MinHeap</a></td><td class="desc"></td></tr>
<tr id="row_24_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d29/struct_min_heap_node.html" target="_self">MinHeapNode</a></td><td class="desc"></td></tr>
<tr id="row_25_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d77/structmst.html" target="_self">mst</a></td><td class="desc"></td></tr>
<tr id="row_26_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d8b/struct_node.html" target="_self">Node</a></td><td class="desc"></td></tr>
<tr id="row_27_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/da1/structnode.html" target="_self">node</a></td><td class="desc"></td></tr>
<tr id="row_28_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/dc8/struct_point.html" target="_self">Point</a></td><td class="desc"></td></tr>
<tr id="row_29_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d1b/structquery.html" target="_self">query</a></td><td class="desc"></td></tr>
<tr id="row_30_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/db5/struct_queue.html" target="_self">Queue</a></td><td class="desc"></td></tr>
<tr id="row_8_"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_8_" class="arrow" onclick="toggleFolder('8_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="dd/d69/namespacerange__queries.html" target="_self">range_queries</a></td><td class="desc">Algorithms and Data Structures that support range queries and updates </td></tr>
<tr id="row_8_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_8_0_" class="arrow" onclick="toggleFolder('8_0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>heavy_light_decomposition</b></td><td class="desc"></td></tr>
<tr id="row_8_0_0_"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html" target="_self">HLD</a></td><td class="desc">The Heavy-Light Decomposition class </td></tr>
<tr id="row_8_0_1_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html" target="_self">SG</a></td><td class="desc">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 </td></tr>
<tr id="row_8_0_2_"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html" target="_self">Tree</a></td><td class="desc">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 </td></tr>
<tr id="row_9_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_9_" class="arrow" onclick="toggleFolder('9_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="d2/dcf/namespacestatistics.html" target="_self">statistics</a></td><td class="desc">Statistical algorithms </td></tr>
<tr id="row_9_0_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d7c/classstatistics_1_1stats__computer1.html" target="_self">stats_computer1</a></td><td class="desc"></td></tr>
<tr id="row_9_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/dab/classstatistics_1_1stats__computer2.html" target="_self">stats_computer2</a></td><td class="desc"></td></tr>
<tr id="row_10_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/d90/struct_btree.html" target="_self">Btree</a></td><td class="desc"></td></tr>
<tr id="row_11_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d15/classcll.html" target="_self">cll</a></td><td class="desc"></td></tr>
<tr id="row_12_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/db3/structcompare.html" target="_self">compare</a></td><td class="desc"></td></tr>
<tr id="row_13_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/d5a/class_complex.html" target="_self">Complex</a></td><td class="desc">Class <a class="el" href="da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> to represent complex numbers as a field </td></tr>
<tr id="row_14_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/dbb/class_cycle_check.html" target="_self">CycleCheck</a></td><td class="desc"></td></tr>
<tr id="row_15_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/dee/classdouble__linked__list.html" target="_self">double_linked_list</a></td><td class="desc"></td></tr>
<tr id="row_16_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/d77/class_edge.html" target="_self">Edge</a></td><td class="desc"></td></tr>
<tr id="row_17_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d91/class_fenwick_tree.html" target="_self">FenwickTree</a></td><td class="desc"></td></tr>
<tr id="row_18_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/d9a/class_graph.html" target="_self">Graph</a></td><td class="desc"></td></tr>
<tr id="row_19_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d1c/classhash__chain.html" target="_self">hash_chain</a></td><td class="desc">Chain class with a given modulus </td></tr>
<tr id="row_20_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d66/struct_item.html" target="_self">Item</a></td><td class="desc"></td></tr>
<tr id="row_21_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d82/classlarge__number.html" target="_self">large_number</a></td><td class="desc"></td></tr>
<tr id="row_22_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d0/dff/structlinkedlist.html" target="_self">linkedlist</a></td><td class="desc"></td></tr>
<tr id="row_23_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/d10/structlist.html" target="_self">list</a></td><td class="desc"></td></tr>
<tr id="row_24_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d05/class_min_heap.html" target="_self">MinHeap</a></td><td class="desc"></td></tr>
<tr id="row_25_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d29/struct_min_heap_node.html" target="_self">MinHeapNode</a></td><td class="desc"></td></tr>
<tr id="row_26_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d77/structmst.html" target="_self">mst</a></td><td class="desc"></td></tr>
<tr id="row_27_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d8b/struct_node.html" target="_self">Node</a></td><td class="desc"></td></tr>
<tr id="row_28_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/da1/structnode.html" target="_self">node</a></td><td class="desc"></td></tr>
<tr id="row_29_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/dc8/struct_point.html" target="_self">Point</a></td><td class="desc"></td></tr>
<tr id="row_30_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d1b/structquery.html" target="_self">query</a></td><td class="desc"></td></tr>
<tr id="row_31_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/da9/classqueue.html" target="_self">queue</a></td><td class="desc"></td></tr>
<tr id="row_32_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d0/dd2/class_queue___array.html" target="_self">Queue_Array</a></td><td class="desc"></td></tr>
<tr id="row_33_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/db4/struct_segment_intersection.html" target="_self">SegmentIntersection</a></td><td class="desc"></td></tr>
<tr id="row_34_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d4f/class_solution.html" target="_self">Solution</a></td><td class="desc"></td></tr>
<tr id="row_35_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/dc2/classstack.html" target="_self">stack</a></td><td class="desc"></td></tr>
<tr id="row_36_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/dc4/classstack__linked_list.html" target="_self">stack_linkedList</a></td><td class="desc"></td></tr>
<tr id="row_37_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d2c/structtower.html" target="_self">tower</a></td><td class="desc"></td></tr>
<tr id="row_38_"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_38_" class="arrow" onclick="toggleFolder('38_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d2f/class_trie.html" target="_self">Trie</a></td><td class="desc"></td></tr>
<tr id="row_38_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="de/d48/struct_trie_1_1_trie_node.html" target="_self">TrieNode</a></td><td class="desc"></td></tr>
<tr id="row_39_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/dd9/structtrie.html" target="_self">trie</a></td><td class="desc"></td></tr>
<tr id="row_32_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/db5/struct_queue.html" target="_self">Queue</a></td><td class="desc"></td></tr>
<tr id="row_33_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d0/dd2/class_queue___array.html" target="_self">Queue_Array</a></td><td class="desc"></td></tr>
<tr id="row_34_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/db4/struct_segment_intersection.html" target="_self">SegmentIntersection</a></td><td class="desc"></td></tr>
<tr id="row_35_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d4f/class_solution.html" target="_self">Solution</a></td><td class="desc"></td></tr>
<tr id="row_36_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/dc2/classstack.html" target="_self">stack</a></td><td class="desc"></td></tr>
<tr id="row_37_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/dc4/classstack__linked_list.html" target="_self">stack_linkedList</a></td><td class="desc"></td></tr>
<tr id="row_38_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d2c/structtower.html" target="_self">tower</a></td><td class="desc"></td></tr>
<tr id="row_39_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/dd9/structtrie.html" target="_self">trie</a></td><td class="desc"></td></tr>
<tr id="row_40_"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_40_" class="arrow" onclick="toggleFolder('40_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d2f/class_trie.html" target="_self">Trie</a></td><td class="desc"></td></tr>
<tr id="row_40_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="de/d48/struct_trie_1_1_trie_node.html" target="_self">TrieNode</a></td><td class="desc"></td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->

View File

@@ -8,6 +8,7 @@ var annotated_dup =
[ "linear_probing", "d8/d89/namespacelinear__probing.html", "d8/d89/namespacelinear__probing" ],
[ "machine_learning", "d8/d77/namespacemachine__learning.html", "d8/d77/namespacemachine__learning" ],
[ "quadratic_probing", "d4/dd2/namespacequadratic__probing.html", "d4/dd2/namespacequadratic__probing" ],
[ "range_queries", "dd/d69/namespacerange__queries.html", "dd/d69/namespacerange__queries" ],
[ "statistics", "d2/dcf/namespacestatistics.html", "d2/dcf/namespacestatistics" ],
[ "Btree", "d9/d90/struct_btree.html", "d9/d90/struct_btree" ],
[ "cll", "d5/d15/classcll.html", "d5/d15/classcll" ],
@@ -30,14 +31,14 @@ var annotated_dup =
[ "node", "d5/da1/structnode.html", "d5/da1/structnode" ],
[ "Point", "d8/dc8/struct_point.html", "d8/dc8/struct_point" ],
[ "query", "dd/d1b/structquery.html", "dd/d1b/structquery" ],
[ "Queue", "dc/db5/struct_queue.html", "dc/db5/struct_queue" ],
[ "queue", "db/da9/classqueue.html", "db/da9/classqueue" ],
[ "Queue", "dc/db5/struct_queue.html", "dc/db5/struct_queue" ],
[ "Queue_Array", "d0/dd2/class_queue___array.html", "d0/dd2/class_queue___array" ],
[ "SegmentIntersection", "d4/db4/struct_segment_intersection.html", "d4/db4/struct_segment_intersection" ],
[ "Solution", "dd/d4f/class_solution.html", "dd/d4f/class_solution" ],
[ "stack", "d1/dc2/classstack.html", "d1/dc2/classstack" ],
[ "stack_linkedList", "d2/dc4/classstack__linked_list.html", "d2/dc4/classstack__linked_list" ],
[ "tower", "d2/d2c/structtower.html", "d2/d2c/structtower" ],
[ "Trie", "dd/d2f/class_trie.html", "dd/d2f/class_trie" ],
[ "trie", "d4/dd9/structtrie.html", "d4/dd9/structtrie" ]
[ "trie", "d4/dd9/structtrie.html", "d4/dd9/structtrie" ],
[ "Trie", "dd/d2f/class_trie.html", "dd/d2f/class_trie" ]
];

View File

@@ -98,106 +98,110 @@ $(document).ready(function(){initNavTree('classes.html',''); initResizable(); })
<table class="classindex">
<tr><td rowspan="2" valign="bottom"><a name="letter_a"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;a&#160;&#160;</div></td></tr></table>
</td>
<td rowspan="2" valign="bottom"><a name="letter_e"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;e&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="d6/d26/classciphers_1_1_hill_cipher.html">HillCipher</a> (<a class="el" href="d6/d4e/namespaceciphers.html">ciphers</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="db/d8b/struct_node.html">Node</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d1/d46/classdata__structure_1_1_skip_list.html">SkipList</a> (<a class="el" href="d1/db4/namespacedata__structure.html">data_structure</a>)&#160;&#160;&#160;</td>
</tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_i"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;i&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="d5/da1/structnode.html">node</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="dd/d4f/class_solution.html">Solution</a>&#160;&#160;&#160;</td>
</tr>
<tr><td valign="top"><a class="el" href="d6/d30/classmachine__learning_1_1adaline.html">adaline</a> (<a class="el" href="d8/d77/namespacemachine__learning.html">machine_learning</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d7/d77/class_edge.html">Edge</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d3/d6f/structdata__structure_1_1_node.html">Node</a> (<a class="el" href="d1/db4/namespacedata__structure.html">data_structure</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d1/dc2/classstack.html">stack</a>&#160;&#160;&#160;</td>
</tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_b"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;b&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="db/d19/structlinear__probing_1_1_entry.html">Entry</a> (<a class="el" href="d8/d89/namespacelinear__probing.html">linear_probing</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="db/d66/struct_item.html">Item</a>&#160;&#160;&#160;</td>
<td rowspan="2" valign="bottom"><a name="letter_p"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;p&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="d2/dc4/classstack__linked_list.html">stack_linkedList</a>&#160;&#160;&#160;</td>
</tr>
<tr><td valign="top"><a class="el" href="d9/dde/structdouble__hashing_1_1_entry.html">Entry</a> (<a class="el" href="d0/d65/namespacedouble__hashing.html">double_hashing</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="da/dd1/structquadratic__probing_1_1_entry.html">Entry</a> (<a class="el" href="d4/dd2/namespacequadratic__probing.html">quadratic_probing</a>)&#160;&#160;&#160;</td>
<td rowspan="2" valign="bottom"><a name="letter_l"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;l&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="d9/d5a/structgeometry_1_1jarvis_1_1_point.html">Point</a> (geometry::jarvis)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d7/d7c/classstatistics_1_1stats__computer1.html">stats_computer1</a> (<a class="el" href="d2/dcf/namespacestatistics.html">statistics</a>)&#160;&#160;&#160;</td>
</tr>
<tr><td valign="top"><a class="el" href="d9/d90/struct_btree.html">Btree</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="da/dd1/structquadratic__probing_1_1_entry.html">Entry</a> (<a class="el" href="d4/dd2/namespacequadratic__probing.html">quadratic_probing</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d8/dc8/struct_point.html">Point</a>&#160;&#160;&#160;</td>
<tr><td valign="top"><a class="el" href="db/d19/structlinear__probing_1_1_entry.html">Entry</a> (<a class="el" href="d8/d89/namespacelinear__probing.html">linear_probing</a>)&#160;&#160;&#160;</td>
<td rowspan="2" valign="bottom"><a name="letter_q"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;q&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="d8/dab/classstatistics_1_1stats__computer2.html">stats_computer2</a> (<a class="el" href="d2/dcf/namespacestatistics.html">statistics</a>)&#160;&#160;&#160;</td>
</tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_c"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;c&#160;&#160;</div></td></tr></table>
</td>
<td rowspan="2" valign="bottom"><a name="letter_f"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;f&#160;&#160;</div></td></tr></table>
</td>
<tr><td valign="top"><a class="el" href="d6/d30/classmachine__learning_1_1adaline.html">adaline</a> (<a class="el" href="d8/d77/namespacemachine__learning.html">machine_learning</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d9/dde/structdouble__hashing_1_1_entry.html">Entry</a> (<a class="el" href="d0/d65/namespacedouble__hashing.html">double_hashing</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="db/d82/classlarge__number.html">large_number</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d9/d5a/structgeometry_1_1jarvis_1_1_point.html">Point</a> (geometry::jarvis)&#160;&#160;&#160;</td>
<td rowspan="2" valign="bottom"><a name="letter_t"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;t&#160;&#160;</div></td></tr></table>
</td>
</tr>
<tr><td valign="top"><a class="el" href="d0/dff/structlinkedlist.html">linkedlist</a>&#160;&#160;&#160;</td>
<td rowspan="2" valign="bottom"><a name="letter_q"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;q&#160;&#160;</div></td></tr></table>
<tr><td rowspan="2" valign="bottom"><a name="letter_b"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;b&#160;&#160;</div></td></tr></table>
</td>
<td rowspan="2" valign="bottom"><a name="letter_f"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;f&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="d0/dff/structlinkedlist.html">linkedlist</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="dd/d1b/structquery.html">query</a>&#160;&#160;&#160;</td>
</tr>
<tr><td valign="top"><a class="el" href="d5/d15/classcll.html">cll</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="dd/d91/class_fenwick_tree.html">FenwickTree</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d8/d10/structlist.html">list</a>&#160;&#160;&#160;</td>
<tr><td valign="top"><a class="el" href="d8/d10/structlist.html">list</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="db/da9/classqueue.html">queue</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d2/d2c/structtower.html">tower</a>&#160;&#160;&#160;</td>
</tr>
<tr><td valign="top"><a class="el" href="d1/db3/structcompare.html">compare</a>&#160;&#160;&#160;</td>
<tr><td valign="top"><a class="el" href="d9/d90/struct_btree.html">Btree</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="dd/d91/class_fenwick_tree.html">FenwickTree</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d9/d23/classgraph_1_1_lowest_common_ancestor.html">LowestCommonAncestor</a> (<a class="el" href="df/dce/namespacegraph.html">graph</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="dc/db5/struct_queue.html">Queue</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree</a> (range_queries::heavy_light_decomposition)&#160;&#160;&#160;</td>
</tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_c"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;c&#160;&#160;</div></td></tr></table>
</td>
<td rowspan="2" valign="bottom"><a name="letter_g"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;g&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="d9/d23/classgraph_1_1_lowest_common_ancestor.html">LowestCommonAncestor</a> (<a class="el" href="df/dce/namespacegraph.html">graph</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="dd/d1b/structquery.html">query</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="dd/d2f/class_trie.html">Trie</a>&#160;&#160;&#160;</td>
</tr>
<tr><td valign="top"><a class="el" href="da/d5a/class_complex.html">Complex</a>&#160;&#160;&#160;</td>
<td rowspan="2" valign="bottom"><a name="letter_m"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;m&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="dc/db5/struct_queue.html">Queue</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d0/dd2/class_queue___array.html">Queue_Array</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d4/dd9/structtrie.html">trie</a>&#160;&#160;&#160;</td>
</tr>
<tr><td valign="top"><a class="el" href="d4/dde/classgeometry_1_1jarvis_1_1_convexhull.html">Convexhull</a> (geometry::jarvis)&#160;&#160;&#160;</td>
<tr><td rowspan="2" valign="bottom"><a name="letter_r"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;r&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="dd/d2f/class_trie.html">Trie</a>&#160;&#160;&#160;</td>
</tr>
<tr><td valign="top"><a class="el" href="d5/d15/classcll.html">cll</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="da/d9a/class_graph.html">Graph</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="db/da9/classqueue.html">queue</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d2/d05/class_min_heap.html">MinHeap</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="de/d48/struct_trie_1_1_trie_node.html">Trie::TrieNode</a>&#160;&#160;&#160;</td>
</tr>
<tr><td valign="top"><a class="el" href="d3/dbb/class_cycle_check.html">CycleCheck</a>&#160;&#160;&#160;</td>
<tr><td valign="top"><a class="el" href="d1/db3/structcompare.html">compare</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html">Graph</a> (graph::is_graph_bipartite)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d2/d05/class_min_heap.html">MinHeap</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d0/dd2/class_queue___array.html">Queue_Array</a>&#160;&#160;&#160;</td>
<td></td></tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_d"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;d&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="dc/d61/classgraph_1_1_graph.html">Graph</a> (<a class="el" href="df/dce/namespacegraph.html">graph</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d5/d29/struct_min_heap_node.html">MinHeapNode</a>&#160;&#160;&#160;</td>
<td rowspan="2" valign="bottom"><a name="letter_r"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;r&#160;&#160;</div></td></tr></table>
</td>
<td></td></tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_h"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;h&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="d1/d77/structmst.html">mst</a>&#160;&#160;&#160;</td>
<td></td></tr>
<tr><td valign="top"><a class="el" href="dc/d93/classmachine__learning_1_1neural__network_1_1layers_1_1_dense_layer.html">DenseLayer</a> (machine_learning::neural_network::layers)&#160;&#160;&#160;</td>
<td rowspan="2" valign="bottom"><a name="letter_n"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;n&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="d0/d58/classgraph_1_1_rooted_tree.html">RootedTree</a> (<a class="el" href="df/dce/namespacegraph.html">graph</a>)&#160;&#160;&#160;</td>
<td></td></tr>
<tr><td valign="top"><a class="el" href="d9/dee/classdouble__linked__list.html">double_linked_list</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="dd/d1c/classhash__chain.html">hash_chain</a>&#160;&#160;&#160;</td>
<tr><td valign="top"><a class="el" href="da/d5a/class_complex.html">Complex</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="dc/d61/classgraph_1_1_graph.html">Graph</a> (<a class="el" href="df/dce/namespacegraph.html">graph</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d1/d77/structmst.html">mst</a>&#160;&#160;&#160;</td>
<td rowspan="2" valign="bottom"><a name="letter_s"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;s&#160;&#160;</div></td></tr></table>
</td>
<td></td></tr>
<tr><td></td><td></td><td valign="top"><a class="el" href="d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html">NeuralNetwork</a> (machine_learning::neural_network)&#160;&#160;&#160;</td>
<tr><td valign="top"><a class="el" href="d4/dde/classgeometry_1_1jarvis_1_1_convexhull.html">Convexhull</a> (geometry::jarvis)&#160;&#160;&#160;</td>
<td rowspan="2" valign="bottom"><a name="letter_h"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;h&#160;&#160;</div></td></tr></table>
</td>
<td rowspan="2" valign="bottom"><a name="letter_n"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;n&#160;&#160;</div></td></tr></table>
</td>
<td></td></tr>
<tr><td></td><td></td><td></td><td valign="top"><a class="el" href="d4/db4/struct_segment_intersection.html">SegmentIntersection</a>&#160;&#160;&#160;</td>
<tr><td valign="top"><a class="el" href="d3/dbb/class_cycle_check.html">CycleCheck</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d4/db4/struct_segment_intersection.html">SegmentIntersection</a>&#160;&#160;&#160;</td>
<td></td></tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_d"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;d&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="dd/d1c/classhash__chain.html">hash_chain</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html">NeuralNetwork</a> (machine_learning::neural_network)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG</a> (range_queries::heavy_light_decomposition)&#160;&#160;&#160;</td>
<td></td></tr>
<tr><td valign="top"><a class="el" href="d6/d26/classciphers_1_1_hill_cipher.html">HillCipher</a> (<a class="el" href="d6/d4e/namespaceciphers.html">ciphers</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d3/d6f/structdata__structure_1_1_node.html">Node</a> (<a class="el" href="d1/db4/namespacedata__structure.html">data_structure</a>)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d1/d46/classdata__structure_1_1_skip_list.html">SkipList</a> (<a class="el" href="d1/db4/namespacedata__structure.html">data_structure</a>)&#160;&#160;&#160;</td>
<td></td></tr>
<tr><td valign="top"><a class="el" href="dc/d93/classmachine__learning_1_1neural__network_1_1layers_1_1_dense_layer.html">DenseLayer</a> (machine_learning::neural_network::layers)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">HLD</a> (range_queries::heavy_light_decomposition)&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="db/d8b/struct_node.html">Node</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="dd/d4f/class_solution.html">Solution</a>&#160;&#160;&#160;</td>
<td></td></tr>
<tr><td valign="top"><a class="el" href="d9/dee/classdouble__linked__list.html">double_linked_list</a>&#160;&#160;&#160;</td>
<td rowspan="2" valign="bottom"><a name="letter_i"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;i&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="d5/da1/structnode.html">node</a>&#160;&#160;&#160;</td>
<td valign="top"><a class="el" href="d1/dc2/classstack.html">stack</a>&#160;&#160;&#160;</td>
<td></td></tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_e"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;e&#160;&#160;</div></td></tr></table>
</td>
<td rowspan="2" valign="bottom"><a name="letter_p"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;p&#160;&#160;</div></td></tr></table>
</td>
<td valign="top"><a class="el" href="d2/dc4/classstack__linked_list.html">stack_linkedList</a>&#160;&#160;&#160;</td>
<td></td></tr>
<tr><td valign="top"><a class="el" href="db/d66/struct_item.html">Item</a>&#160;&#160;&#160;</td>
<td></td><td></td></tr>
<tr><td valign="top"><a class="el" href="d7/d77/class_edge.html">Edge</a>&#160;&#160;&#160;</td>
<td></td><td valign="top"><a class="el" href="d8/dc8/struct_point.html">Point</a>&#160;&#160;&#160;</td>
<td></td><td></td></tr>
<tr><td></td><td></td><td></td><td></td><td></td></tr>
</table>
<div class="qindex"><a class="qindex" href="#letter_a">a</a>&#160;|&#160;<a class="qindex" href="#letter_b">b</a>&#160;|&#160;<a class="qindex" href="#letter_c">c</a>&#160;|&#160;<a class="qindex" href="#letter_d">d</a>&#160;|&#160;<a class="qindex" href="#letter_e">e</a>&#160;|&#160;<a class="qindex" href="#letter_f">f</a>&#160;|&#160;<a class="qindex" href="#letter_g">g</a>&#160;|&#160;<a class="qindex" href="#letter_h">h</a>&#160;|&#160;<a class="qindex" href="#letter_i">i</a>&#160;|&#160;<a class="qindex" href="#letter_l">l</a>&#160;|&#160;<a class="qindex" href="#letter_m">m</a>&#160;|&#160;<a class="qindex" href="#letter_n">n</a>&#160;|&#160;<a class="qindex" href="#letter_p">p</a>&#160;|&#160;<a class="qindex" href="#letter_q">q</a>&#160;|&#160;<a class="qindex" href="#letter_r">r</a>&#160;|&#160;<a class="qindex" href="#letter_s">s</a>&#160;|&#160;<a class="qindex" href="#letter_t">t</a></div>

View File

@@ -0,0 +1,5 @@
<map id="range_queries::heavy_light_decomposition::HLD&lt; X &gt;" name="range_queries::heavy_light_decomposition::HLD&lt; X &gt;">
<area shape="rect" id="node1" title="The Heavy&#45;Light Decomposition class." alt="" coords="200,45,347,101"/>
<area shape="rect" id="node2" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html" title="A Basic Tree, which supports binary lifting." alt="" coords="5,5,152,61"/>
<area shape="rect" id="node3" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html" title="Segment Tree, to store heavy chains." alt="" coords="5,85,152,141"/>
</map>

View File

@@ -0,0 +1 @@
0d6902849303905cd17d404a329a289a

View File

@@ -0,0 +1,58 @@
<?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&lt; X &gt; Pages: 1 -->
<svg width="264pt" height="110pt"
viewBox="0.00 0.00 264.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&lt; X &gt;</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-106 260,-106 260,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="The Heavy&#45;Light Decomposition class.">
<polygon fill="#bfbfbf" 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">::HLD&lt; X &gt;</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" target="_top" xlink:title="A Basic Tree, which supports binary lifting.">
<polygon fill="white" stroke="black" points="0,-60.5 0,-101.5 110,-101.5 110,-60.5 0,-60.5"/>
<text text-anchor="start" x="8" y="-89.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-78.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="55" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node2&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M119.99,-67.67C128.56,-65.88 137.28,-64.07 145.67,-62.32"/>
<polygon fill="midnightblue" stroke="midnightblue" points="119.11,-64.28 110.03,-69.74 120.53,-71.13 119.11,-64.28"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html" target="_top" xlink:title="Segment Tree, to store heavy chains.">
<polygon fill="white" 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">::SG&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node1 -->
<g id="edge2" class="edge">
<title>Node3&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M119.99,-34.33C128.56,-36.12 137.28,-37.93 145.67,-39.68"/>
<polygon fill="midnightblue" stroke="midnightblue" points="120.53,-30.87 110.03,-32.26 119.11,-37.72 120.53,-30.87"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,790 @@
<!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::Tree&lt; X &gt; 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++
&#160;<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&amp;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&amp;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&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.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> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="../../d9/d4e/classrange__queries_1_1heavy__light__decomposition_1_1_tree-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">range_queries::heavy_light_decomposition::Tree&lt; X &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>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></p>
<div class="dynheader">
Inheritance diagram for range_queries::heavy_light_decomposition::Tree&lt; X &gt;:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../da/dcc/classrange__queries_1_1heavy__light__decomposition_1_1_tree__inherit__graph.svg" width="158" height="171"><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::Tree&lt; X &gt;:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../de/d4c/classrange__queries_1_1heavy__light__decomposition_1_1_tree__coll__graph.svg" width="626" height="231"><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>
<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:a835fb2bbb27307b8cacad9b287968bc1"><td class="memItemLeft" align="right" valign="top">&#160;</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"><td class="mdescLeft">&#160;</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"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79ab4601c4a95c0902ac04e779e5f54d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d">add_edge</a> (const int u, const int v)</td></tr>
<tr class="memdesc:a79ab4601c4a95c0902ac04e779e5f54d"><td class="mdescLeft">&#160;</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"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab916d554afa8ca5230b4310c2c69fae0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">change_root</a> (int new_root)</td></tr>
<tr class="memdesc:ab916d554afa8ca5230b4310c2c69fae0"><td class="mdescLeft">&#160;</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"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04cd96efaba147b19d3afc769b90ff70"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">set_node_val</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; X &gt; &amp;node_val)</td></tr>
<tr class="memdesc:a04cd96efaba147b19d3afc769b90ff70"><td class="mdescLeft">&#160;</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"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad22d760a5a33545a70e7ea5e1786c8dc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">init</a> ()</td></tr>
<tr class="memdesc:ad22d760a5a33545a70e7ea5e1786c8dc"><td class="mdescLeft">&#160;</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"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7761255f2ba06b398b9aae5e4dce5f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">lift</a> (int *const p, int dist)</td></tr>
<tr class="memdesc:ac7761255f2ba06b398b9aae5e4dce5f3"><td class="mdescLeft">&#160;</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"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f7bca1746d40f21ad832fcea59aa6c6"><td class="memItemLeft" align="right" valign="top">int&#160;</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 &amp;dist)</td></tr>
<tr class="memdesc:a8f7bca1746d40f21ad832fcea59aa6c6"><td class="mdescLeft">&#160;</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"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2b407e64aaf9878fbee7ee6efe9c7d4"><td class="memItemLeft" align="right" valign="top">int&#160;</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"><td class="mdescLeft">&#160;</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"><td class="memSeparator" colspan="2">&#160;</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:aa339c31ec74cd86a4842a8b09653d460"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460">dfs_size</a> (int u, int p=-1)</td></tr>
<tr class="memdesc:aa339c31ec74cd86a4842a8b09653d460"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility function to compute sub-tree sizes. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460">More...</a><br /></td></tr>
<tr class="separator:aa339c31ec74cd86a4842a8b09653d460"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8de7aefcb6635d3dacdd174cd4890c4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4">dfs_lca</a> (int u, int p=-1)</td></tr>
<tr class="memdesc:ae8de7aefcb6635d3dacdd174cd4890c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility function to populate the t_par vector. <a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4">More...</a><br /></td></tr>
<tr class="separator:ae8de7aefcb6635d3dacdd174cd4890c4"><td class="memSeparator" colspan="2">&#160;</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:ab1aeaefa1bd97b867c652ba916fbdb43"><td class="memItemLeft" align="right" valign="top"><a id="ab1aeaefa1bd97b867c652ba916fbdb43"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list.html">std::list</a>&lt; int &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a></td></tr>
<tr class="memdesc:ab1aeaefa1bd97b867c652ba916fbdb43"><td class="mdescLeft">&#160;</td><td class="mdescRight">an adjacency list to stores the tree edges <br /></td></tr>
<tr class="separator:ab1aeaefa1bd97b867c652ba916fbdb43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4630fa70a80a1dc65a875488a67178a"><td class="memItemLeft" align="right" valign="top"><a id="ae4630fa70a80a1dc65a875488a67178a"></a>
const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a></td></tr>
<tr class="memdesc:ae4630fa70a80a1dc65a875488a67178a"><td class="mdescLeft">&#160;</td><td class="mdescRight">number of nodes <br /></td></tr>
<tr class="separator:ae4630fa70a80a1dc65a875488a67178a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2ab020f798d00be2613ecf63074b7c1"><td class="memItemLeft" align="right" valign="top"><a id="ab2ab020f798d00be2613ecf63074b7c1"></a>
const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a></td></tr>
<tr class="memdesc:ab2ab020f798d00be2613ecf63074b7c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">maximum possible height of the tree <br /></td></tr>
<tr class="separator:ab2ab020f798d00be2613ecf63074b7c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a350157a5fb79f76fceae33fc84171203"><td class="memItemLeft" align="right" valign="top"><a id="a350157a5fb79f76fceae33fc84171203"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a></td></tr>
<tr class="memdesc:a350157a5fb79f76fceae33fc84171203"><td class="mdescLeft">&#160;</td><td class="mdescRight">a matrix to store every node's 2^kth parent <br /></td></tr>
<tr class="separator:a350157a5fb79f76fceae33fc84171203"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0efd0b9c564092f443ca97030d866ef1"><td class="memItemLeft" align="right" valign="top"><a id="a0efd0b9c564092f443ca97030d866ef1"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a></td></tr>
<tr class="memdesc:a0efd0b9c564092f443ca97030d866ef1"><td class="mdescLeft">&#160;</td><td class="mdescRight">a vector to store the depth of a node, <br /></td></tr>
<tr class="separator:a0efd0b9c564092f443ca97030d866ef1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada1494fccbc7f1f07b2f9be9f7e07ad5"><td class="memItemLeft" align="right" valign="top"><a id="ada1494fccbc7f1f07b2f9be9f7e07ad5"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">t_size</a></td></tr>
<tr class="memdesc:ada1494fccbc7f1f07b2f9be9f7e07ad5"><td class="mdescLeft">&#160;</td><td class="mdescRight">a vector to store the subtree size rooted at node <br /></td></tr>
<tr class="separator:ada1494fccbc7f1f07b2f9be9f7e07ad5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6c37e840355b9fb2105181c578694e8"><td class="memItemLeft" align="right" valign="top"><a id="aa6c37e840355b9fb2105181c578694e8"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">t_root</a></td></tr>
<tr class="memdesc:aa6c37e840355b9fb2105181c578694e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">the root of the tree <br /></td></tr>
<tr class="separator:aa6c37e840355b9fb2105181c578694e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a135b7952593c9b1aae38fcaf1cc1abf7"><td class="memItemLeft" align="right" valign="top"><a id="a135b7952593c9b1aae38fcaf1cc1abf7"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; X &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">t_val</a></td></tr>
<tr class="memdesc:a135b7952593c9b1aae38fcaf1cc1abf7"><td class="mdescLeft">&#160;</td><td class="mdescRight">values of nodes <br /></td></tr>
<tr class="separator:a135b7952593c9b1aae38fcaf1cc1abf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:afcdadbdea1e2391cebbb17d2c1ae2f0b"><td class="memTemplParams" colspan="2"><a id="afcdadbdea1e2391cebbb17d2c1ae2f0b"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:afcdadbdea1e2391cebbb17d2c1ae2f0b"><td class="memTemplItemLeft" align="right" valign="top">class&#160;</td><td class="memTemplItemRight" valign="bottom"><b>HLD</b></td></tr>
<tr class="separator:afcdadbdea1e2391cebbb17d2c1ae2f0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename X&gt;<br />
class range_queries::heavy_light_decomposition::Tree&lt; X &gt;</h3>
<p>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. </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>
<p>Deleting the default constructor An instance can only be created with the number of nodes Defaults: t_node indexing are zero based t_root is 0 depth of root_node is 0 Supports: lift :- lift a node k units up the tree kth_ancestor :- returns the kth ancestor lca :- returns the least common ancestor </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a835fb2bbb27307b8cacad9b287968bc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a835fb2bbb27307b8cacad9b287968bc1">&#9670;&nbsp;</a></span>Tree()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree</a>&lt; X &gt;::<a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree</a> </td>
<td>(</td>
<td class="paramtype">int&#160;</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 initializes 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="l00141"></a><span class="lineno"> 141</span>&#160; : <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a>(nodes), <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a>(<span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/floor.html">floor</a>(log2(nodes))) + 1) {</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="comment">/* Initialize and resize all the vectors */</span></div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">t_root</a> = 0; <span class="comment">/* Default */</span></div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</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">t_nodes</a>);</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</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">t_nodes</a>, <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a>(<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a>, -1));</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</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">t_nodes</a>, 0);</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">t_size</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">t_nodes</a>, 1);</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">t_val</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">t_nodes</a>);</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; }</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree_a835fb2bbb27307b8cacad9b287968bc1_cgraph.svg" width="336" height="88"><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="a79ab4601c4a95c0902ac04e779e5f54d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a79ab4601c4a95c0902ac04e779e5f54d">&#9670;&nbsp;</a></span>add_edge()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree</a>&lt; X &gt;::add_edge </td>
<td>(</td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>u</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>v</em>&#160;</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>Adds an undirected edge from node u to node v in the tree. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">u</td><td>the node where the edge is from </td></tr>
<tr><td class="paramname">v</td><td>the node where the edge is to </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; {</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a>[u].<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(v);</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a>[v].<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(u);</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; }</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree_a79ab4601c4a95c0902ac04e779e5f54d_cgraph.svg" width="360" 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>
<a id="ab916d554afa8ca5230b4310c2c69fae0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab916d554afa8ca5230b4310c2c69fae0">&#9670;&nbsp;</a></span>change_root()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree</a>&lt; X &gt;::change_root </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>new_root</em></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>Set the root for the tree. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">new_root</td><td>the new root </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;{ <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">t_root</a> = new_root; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ae8de7aefcb6635d3dacdd174cd4890c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae8de7aefcb6635d3dacdd174cd4890c4">&#9670;&nbsp;</a></span>dfs_lca()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree</a>&lt; X &gt;::dfs_lca </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>u</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>p</em> = <code>-1</code>&#160;</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 populate the t_par vector. </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="l00116"></a><span class="lineno"> 116</span>&#160; {</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[u][0] = p;</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="keywordflow">if</span> (p != -1) {</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[u] = 1 + <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[p];</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; }</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = 1; k &lt; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a>; k++) {</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[u][k - 1] != -1) {</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[u][k] = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[u][k - 1]][k - 1];</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; }</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; }</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> &amp;v : <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a>[u]) {</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keywordflow">if</span> (v ^ p) {</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4">dfs_lca</a>(v, u);</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; }</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; }</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="aa339c31ec74cd86a4842a8b09653d460"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa339c31ec74cd86a4842a8b09653d460">&#9670;&nbsp;</a></span>dfs_size()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree</a>&lt; X &gt;::dfs_size </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>u</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>p</em> = <code>-1</code>&#160;</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 compute sub-tree sizes. </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</td></tr>
<tr><td class="paramname">u</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; {</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> &amp;v : <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a>[u]) {</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordflow">if</span> (v ^ p) {</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460">dfs_size</a>(v, u);</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">t_size</a>[u] += <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">t_size</a>[v];</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; }</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; }</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ad22d760a5a33545a70e7ea5e1786c8dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad22d760a5a33545a70e7ea5e1786c8dc">&#9670;&nbsp;</a></span>init()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree</a>&lt; X &gt;::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 parameters, 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="l00186"></a><span class="lineno"> 186</span>&#160; {</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; assert(<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a> &gt; 0);</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460">dfs_size</a>(<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">t_root</a>);</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4">dfs_lca</a>(<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">t_root</a>);</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; }</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree_ad22d760a5a33545a70e7ea5e1786c8dc_cgraph.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>
</div>
</div>
</div>
<a id="a8f7bca1746d40f21ad832fcea59aa6c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8f7bca1746d40f21ad832fcea59aa6c6">&#9670;&nbsp;</a></span>kth_ancestor()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree</a>&lt; X &gt;::kth_ancestor </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>p</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int &amp;&#160;</td>
<td class="paramname"><em>dist</em>&#160;</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>The function returns the kth ancestor of a node. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>the node id whose kth ancestor is to be found </td></tr>
<tr><td class="paramname">dist</td><td>the distance to move up the tree </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the kth ancestor of node </dd></dl>
<div class="fragment"><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; {</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">lift</a>(&amp;p, dist);</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="keywordflow">return</span> p;</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; }</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree_a8f7bca1746d40f21ad832fcea59aa6c6_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>
<a id="ae2b407e64aaf9878fbee7ee6efe9c7d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2b407e64aaf9878fbee7ee6efe9c7d4">&#9670;&nbsp;</a></span>lca()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree</a>&lt; X &gt;::lca </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>b</em>&#160;</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>The function returns the least common ancestor of two nodes. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">a</td><td>node id_1 </td></tr>
<tr><td class="paramname">b</td><td>node id_2 </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the least common ancestor of node a, and node b </dd></dl>
<div class="fragment"><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; {</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; assert(a &gt;= 0 and b &gt;= 0 and a &lt; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a> and b &lt; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a>);</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[a] &gt; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[b]) {</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">lift</a>(&amp;a, <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[a] - <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[b]);</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; }</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[b] &gt; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[a]) {</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">lift</a>(&amp;b, <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[b] - <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a>[a]);</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; }</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; <span class="keywordflow">if</span> (a == b) {</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <span class="keywordflow">return</span> a;</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; }</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a> - 1; k &gt;= 0; k--) {</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[a][k] != <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[b][k]) {</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; a = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[a][k];</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; b = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[b][k];</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; }</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; }</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[a][0];</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; }</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree_ae2b407e64aaf9878fbee7ee6efe9c7d4_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>
<a id="ac7761255f2ba06b398b9aae5e4dce5f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7761255f2ba06b398b9aae5e4dce5f3">&#9670;&nbsp;</a></span>lift()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree</a>&lt; X &gt;::lift </td>
<td>(</td>
<td class="paramtype">int *const&#160;</td>
<td class="paramname"><em>p</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>dist</em>&#160;</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>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. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>a pointer to the variable that stores the node id </td></tr>
<tr><td class="paramname">dist</td><td>the distance to move up the tree </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; {</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> k = 0; k &lt; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a>; k++) {</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <span class="keywordflow">if</span> (*p == -1) {</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; }</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="keywordflow">if</span> (dist &amp; 1) {</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; *p = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a>[*p][k];</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; }</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; dist &gt;&gt;= 1;</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; }</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a04cd96efaba147b19d3afc769b90ff70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04cd96efaba147b19d3afc769b90ff70">&#9670;&nbsp;</a></span>set_node_val()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree</a>&lt; X &gt;::set_node_val </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; X &gt; &amp;&#160;</td>
<td class="paramname"><em>node_val</em></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>Set the values for all the nodes. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">node_val</td><td>a vector of size n, with all the node values where, n is the number of nodes </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; {</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; assert(<span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(node_val.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>()) == <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a>);</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">t_val</a> = node_val;</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; }</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree_a04cd96efaba147b19d3afc769b90ff70_cgraph.svg" width="322" 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="afloor_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/floor.html">std::floor</a></div><div class="ttdeci">T floor(T... args)</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ada1494fccbc7f1f07b2f9be9f7e07ad5"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">range_queries::heavy_light_decomposition::Tree::t_size</a></div><div class="ttdeci">std::vector&lt; int &gt; t_size</div><div class="ttdoc">a vector to store the subtree size rooted at node</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:89</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ae8de7aefcb6635d3dacdd174cd4890c4"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4">range_queries::heavy_light_decomposition::Tree::dfs_lca</a></div><div class="ttdeci">void dfs_lca(int u, int p=-1)</div><div class="ttdoc">Utility function to populate the t_par vector.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:116</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_ab2ab020f798d00be2613ecf63074b7c1"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">range_queries::heavy_light_decomposition::Tree::t_maxlift</a></div><div class="ttdeci">const int t_maxlift</div><div class="ttdoc">maximum possible height of the tree</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:85</div></div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt; int &gt;</a></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="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ac7761255f2ba06b398b9aae5e4dce5f3"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">range_queries::heavy_light_decomposition::Tree::lift</a></div><div class="ttdeci">void lift(int *const p, int dist)</div><div class="ttdoc">The function lifts a node, k units up the tree. The lifting is done in place, and the result is store...</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:200</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="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ab1aeaefa1bd97b867c652ba916fbdb43"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">range_queries::heavy_light_decomposition::Tree::t_adj</a></div><div class="ttdeci">std::vector&lt; std::list&lt; int &gt; &gt; t_adj</div><div class="ttdoc">an adjacency list to stores the tree edges</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:83</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_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_tree_html_a350157a5fb79f76fceae33fc84171203"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">range_queries::heavy_light_decomposition::Tree::t_par</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; int &gt; &gt; t_par</div><div class="ttdoc">a matrix to store every node's 2^kth parent</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:87</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a135b7952593c9b1aae38fcaf1cc1abf7"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">range_queries::heavy_light_decomposition::Tree::t_val</a></div><div class="ttdeci">std::vector&lt; X &gt; t_val</div><div class="ttdoc">values of nodes</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:92</div></div>
<div class="ttc" id="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="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_aa339c31ec74cd86a4842a8b09653d460"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460">range_queries::heavy_light_decomposition::Tree::dfs_size</a></div><div class="ttdeci">void dfs_size(int u, int p=-1)</div><div class="ttdoc">Utility function to compute sub-tree sizes.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:101</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a0efd0b9c564092f443ca97030d866ef1"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">range_queries::heavy_light_decomposition::Tree::t_depth</a></div><div class="ttdeci">std::vector&lt; int &gt; t_depth</div><div class="ttdoc">a vector to store the depth of a node,</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:88</div></div>
<!-- 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="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">Tree</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>

View File

@@ -0,0 +1,22 @@
var classrange__queries_1_1heavy__light__decomposition_1_1_tree =
[
[ "Tree", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1", null ],
[ "add_edge", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d", null ],
[ "change_root", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0", null ],
[ "dfs_lca", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4", null ],
[ "dfs_size", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460", null ],
[ "init", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc", null ],
[ "kth_ancestor", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a8f7bca1746d40f21ad832fcea59aa6c6", null ],
[ "lca", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4", null ],
[ "lift", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3", null ],
[ "set_node_val", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70", null ],
[ "HLD", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#afcdadbdea1e2391cebbb17d2c1ae2f0b", null ],
[ "t_adj", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43", null ],
[ "t_depth", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1", null ],
[ "t_maxlift", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1", null ],
[ "t_nodes", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a", null ],
[ "t_par", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203", null ],
[ "t_root", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8", null ],
[ "t_size", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5", null ],
[ "t_val", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7", null ]
];

View File

@@ -0,0 +1,4 @@
<map id="range_queries::heavy_light_decomposition::Tree::set_node_val" name="range_queries::heavy_light_decomposition::Tree::set_node_val">
<area shape="rect" id="node1" title="Set the values for all the nodes." alt="" coords="5,5,152,61"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="200,20,316,47"/>
</map>

View File

@@ -0,0 +1 @@
785c0081baceccc1ca988a4db54ca8dd

View File

@@ -0,0 +1,39 @@
<?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::Tree::set_node_val Pages: 1 -->
<svg width="241pt" height="50pt"
viewBox="0.00 0.00 241.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::Tree::set_node_val</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-46 237,-46 237,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Set the values for all the nodes.">
<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">::Tree::set_node_val</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="146,-11.5 146,-30.5 233,-30.5 233,-11.5 146,-11.5"/>
<text text-anchor="middle" x="189.5" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M110.28,-21C118.71,-21 127.41,-21 135.81,-21"/>
<polygon fill="midnightblue" stroke="midnightblue" points="135.87,-24.5 145.87,-21 135.87,-17.5 135.87,-24.5"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,4 @@
<map id="range_queries::heavy_light_decomposition::Tree::add_edge" name="range_queries::heavy_light_decomposition::Tree::add_edge">
<area shape="rect" id="node1" title="Adds an undirected edge from node u to node v in the tree." alt="" coords="5,5,152,61"/>
<area shape="rect" id="node2" 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="200,20,355,47"/>
</map>

View File

@@ -0,0 +1 @@
d7dc869b3ab041c99ebc389f6d275089

View File

@@ -0,0 +1,39 @@
<?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::Tree::add_edge Pages: 1 -->
<svg width="270pt" height="50pt"
viewBox="0.00 0.00 270.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::Tree::add_edge</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-46 266,-46 266,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Adds an undirected edge from node u to node v in the tree.">
<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">::Tree::add_edge</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="146,-11.5 146,-30.5 262,-30.5 262,-11.5 146,-11.5"/>
<text text-anchor="middle" x="204" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M110.32,-21C118.58,-21 127.18,-21 135.67,-21"/>
<polygon fill="midnightblue" stroke="midnightblue" points="135.95,-24.5 145.95,-21 135.95,-17.5 135.95,-24.5"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,5 @@
<map id="range_queries::heavy_light_decomposition::Tree::Tree" name="range_queries::heavy_light_decomposition::Tree::Tree">
<area shape="rect" id="node1" title="Class parameterized constructor, resizes the and initializes the data members." alt="" coords="5,16,152,72"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/assign.html#" title=" " alt="" coords="200,5,331,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/resize.html#" title=" " alt="" coords="202,56,329,83"/>
</map>

View File

@@ -0,0 +1 @@
61c0a4773a48d5c4a57a34196fbc1b6d

View File

@@ -0,0 +1,54 @@
<?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::Tree::Tree Pages: 1 -->
<svg width="252pt" height="66pt"
viewBox="0.00 0.00 252.00 66.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 62)">
<title>range_queries::heavy_light_decomposition::Tree::Tree</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-62 248,-62 248,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 initializes the data members.">
<polygon fill="#bfbfbf" stroke="black" points="0,-8.5 0,-49.5 110,-49.5 110,-8.5 0,-8.5"/>
<text text-anchor="start" x="8" y="-37.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-26.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="55" y="-15.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree::Tree</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/assign.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="146,-38.5 146,-57.5 244,-57.5 244,-38.5 146,-38.5"/>
<text text-anchor="middle" x="195" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::assign</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M110.15,-36.45C118.52,-37.61 127.2,-38.8 135.66,-39.97"/>
<polygon fill="midnightblue" stroke="midnightblue" points="135.46,-43.47 145.84,-41.37 136.41,-36.54 135.46,-43.47"/>
</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/resize.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="147.5,-0.5 147.5,-19.5 242.5,-19.5 242.5,-0.5 147.5,-0.5"/>
<text text-anchor="middle" x="195" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M110.15,-21.55C119.03,-20.32 128.27,-19.05 137.22,-17.82"/>
<polygon fill="midnightblue" stroke="midnightblue" points="137.74,-21.28 147.17,-16.45 136.78,-14.34 137.74,-21.28"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,4 @@
<map id="range_queries::heavy_light_decomposition::Tree::kth_ancestor" name="range_queries::heavy_light_decomposition::Tree::kth_ancestor">
<area shape="rect" id="node1" title="The function returns the kth ancestor of a node." alt="" coords="5,5,152,61"/>
<area shape="rect" id="node2" 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="200,5,347,61"/>
</map>

View File

@@ -0,0 +1 @@
3a7a40c14ff24c6e9c9d07b9d75c658d

View File

@@ -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::Tree::kth_ancestor 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::Tree::kth_ancestor</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="The function returns the kth ancestor of a node.">
<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">::Tree::kth_ancestor</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#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="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::lift</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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.4 KiB

View File

@@ -0,0 +1,5 @@
<map id="range_queries::heavy_light_decomposition::Tree::init" name="range_queries::heavy_light_decomposition::Tree::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,45,152,101"/>
<area shape="rect" id="node2" 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="200,5,347,61"/>
<area shape="rect" id="node3" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460" title="Utility function to compute sub&#45;tree sizes." alt="" coords="200,85,347,141"/>
</map>

View File

@@ -0,0 +1 @@
41e2a595a15a8cfb2d32c9b139971bf2

View File

@@ -0,0 +1,58 @@
<?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::Tree::init Pages: 1 -->
<svg width="264pt" height="110pt"
viewBox="0.00 0.00 264.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::Tree::init</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-106 260,-106 260,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,-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">::Tree::init</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#ae8de7aefcb6635d3dacdd174cd4890c4" target="_top" xlink:title="Utility function to populate the t_par vector.">
<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">::Tree::dfs_lca</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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#aa339c31ec74cd86a4842a8b09653d460" target="_top" xlink:title="Utility function to compute sub&#45;tree sizes.">
<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::dfs_size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;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>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -0,0 +1,4 @@
<map id="range_queries::heavy_light_decomposition::Tree::lca" name="range_queries::heavy_light_decomposition::Tree::lca">
<area shape="rect" id="node1" title="The function returns the least common ancestor of two nodes." alt="" coords="5,5,152,61"/>
<area shape="rect" id="node2" 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="200,5,347,61"/>
</map>

View File

@@ -0,0 +1 @@
e8e04603408d0ef33d0dcbaf5b08a9e8

View File

@@ -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::Tree::lca 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::Tree::lca</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="The function returns the least common ancestor of two nodes.">
<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">::Tree::lca</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#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="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::lift</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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.4 KiB

View File

@@ -0,0 +1,4 @@
<map id="range_queries::heavy_light_decomposition::SG&lt; X &gt;" name="range_queries::heavy_light_decomposition::SG&lt; X &gt;">
<area shape="rect" id="node1" title="Segment Tree, to store heavy chains." alt="" coords="5,95,152,151"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="20,5,137,32"/>
</map>

View File

@@ -0,0 +1 @@
cc7656369f63f8b4fa9956e3ff7de06d

View File

@@ -0,0 +1,40 @@
<?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::SG&lt; X &gt; Pages: 1 -->
<svg width="118pt" height="117pt"
viewBox="0.00 0.00 118.00 117.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 113)">
<title>range_queries::heavy_light_decomposition::SG&lt; X &gt;</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-113 114,-113 114,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Segment Tree, to store heavy chains.">
<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">::SG&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="11,-89.5 11,-108.5 99,-108.5 99,-89.5 11,-89.5"/>
<text text-anchor="middle" x="55" y="-96.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node2&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M55,-79.14C55,-67.73 55,-53.21 55,-41.66"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="51.5,-79.28 55,-89.28 58.5,-79.28 51.5,-79.28"/>
<text text-anchor="middle" x="70.5" y="-63" font-family="Helvetica,sans-Serif" font-size="10.00"> s_tree</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,4 @@
<map id="range_queries::heavy_light_decomposition::SG&lt; X &gt;" name="range_queries::heavy_light_decomposition::SG&lt; X &gt;">
<area shape="rect" id="node1" title="Segment Tree, to store heavy chains." alt="" coords="5,5,152,61"/>
<area shape="rect" id="node2" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html" title="The Heavy&#45;Light Decomposition class." alt="" coords="5,109,152,165"/>
</map>

View File

@@ -0,0 +1 @@
2bb159e6758b43b8174a6f9e88a3ca2a

View File

@@ -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::SG&lt; X &gt; Pages: 1 -->
<svg width="118pt" height="128pt"
viewBox="0.00 0.00 118.00 128.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 124)">
<title>range_queries::heavy_light_decomposition::SG&lt; X &gt;</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-124 114,-124 114,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Segment Tree, to store heavy chains.">
<polygon fill="#bfbfbf" stroke="black" points="0,-78.5 0,-119.5 110,-119.5 110,-78.5 0,-78.5"/>
<text text-anchor="start" x="8" y="-107.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-96.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="55" y="-85.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG&lt; X &gt;</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" target="_top" xlink:title="The Heavy&#45;Light Decomposition class.">
<polygon fill="white" 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&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M55,-68.3C55,-59.3 55,-49.65 55,-41.51"/>
<polygon fill="midnightblue" stroke="midnightblue" points="51.5,-68.43 55,-78.43 58.5,-68.43 51.5,-68.43"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -164,7 +164,7 @@ int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../..
<dl class="section copyright"><dt>Copyright</dt><dd>2020 Arctic2333</dd></dl>
<p>In this algorithm, we use the method of division and reservation remainder to construct the hash function, and use the method of chain address to solve the conflict, that is, we link a chain list after the data, and store all the records whose keywords are synonyms in the same linear chain list.</p>
<dl class="section warning"><dt>Warning</dt><dd>This program is only for educational purposes. It has serious flaws in implementation with regards to memory management resulting in large amounts of memory leaks. </dd></dl>
<dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000010">Todo:</a></b></dt><dd>fix the program for memory leaks and better structure in C++ and not C fashion </dd></dl>
<dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000011">Todo:</a></b></dt><dd>fix the program for memory leaks and better structure in C++ and not C fashion </dd></dl>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a8ca8dcb494104d273679e219e53d0555"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ca8dcb494104d273679e219e53d0555">&#9670;&nbsp;</a></span>node</h2>
@@ -204,7 +204,7 @@ int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../..
</dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>dynamic memory allocated to <code>n</code> never gets freed. </dd></dl>
<dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000011">Todo:</a></b></dt><dd>fix memory leak </dd></dl>
<dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000012">Todo:</a></b></dt><dd>fix memory leak </dd></dl>
<div class="fragment"><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; { <span class="comment">// Construct hash table</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list.html">link</a> p, n;</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keywordtype">int</span> index;</div>

View File

@@ -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&lt; X &gt; 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++
&#160;<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&amp;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&amp;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&amp;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> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<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&lt; X &gt; 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&lt; X &gt;:</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&lt; X &gt;:</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">&#160;</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">&#160;</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">&#160;</td></tr>
<tr class="memitem:ae9e979edd69678b85665c01e2ee97828"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</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">&#160;</td></tr>
<tr class="memitem:a9f1cb54ed09fde931bf3220d75ee4c57"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</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">&#160;</td></tr>
<tr class="memitem:a4dfbf5d9df825eeb63b294c6849bdcab"><td class="memItemLeft" align="right" valign="top">X&#160;</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">&#160;</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">&#160;</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="-"/>&#160;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&lt; X &gt;</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">&#160;</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">&#160;</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">&#160;</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&#160;</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">&#160;</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">&#160;</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&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">change_root</a> (int new_root)</td></tr>
<tr class="memdesc:ab916d554afa8ca5230b4310c2c69fae0 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the root for the tree. <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">&#160;</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&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">set_node_val</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; X &gt; &amp;node_val)</td></tr>
<tr class="memdesc:a04cd96efaba147b19d3afc769b90ff70 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the values for all the nodes. <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">&#160;</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&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">init</a> ()</td></tr>
<tr class="memdesc:ad22d760a5a33545a70e7ea5e1786c8dc inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft">&#160;</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">&#160;</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&#160;</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">&#160;</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">&#160;</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&#160;</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 &amp;dist)</td></tr>
<tr class="memdesc:a8f7bca1746d40f21ad832fcea59aa6c6 inherit pub_methods_classrange__queries_1_1heavy__light__decomposition_1_1_tree"><td class="mdescLeft">&#160;</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">&#160;</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&#160;</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">&#160;</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">&#160;</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&#160;</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">&#160;</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">&#160;</td></tr>
<tr class="memitem:a2dfbda148aad0bfaba2ebfda9ebc915a"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</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">&#160;</td></tr>
<tr class="memitem:a0579062b384e54b611b80c6337c7f2c8"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</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">&#160;</td></tr>
<tr class="memitem:a7d5b40c076347a6aabfb37a0590f2f24"><td class="memItemLeft" align="right" valign="top">X&#160;</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">&#160;</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">&#160;</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&#160;</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">&#160;</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">&#160;</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>&lt; int &gt;&#160;</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">&#160;</td><td class="mdescRight">stores the label of a node <br /></td></tr>
<tr class="separator:aa86a91ae0cd7898990a8170a2f2c9cda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84424f180f12b514eaab57a6aa20b104"><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>&lt; int &gt;&#160;</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">&#160;</td><td class="mdescRight">stores the heavy child of a node <br /></td></tr>
<tr class="separator:a84424f180f12b514eaab57a6aa20b104"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b336474d17eff1aa4be73d4068dc725"><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>&lt; int &gt;&#160;</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">&#160;</td><td class="mdescRight">stores the top of the heavy chain from a node <br /></td></tr>
<tr class="separator:a1b336474d17eff1aa4be73d4068dc725"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename X&gt;<br />
class range_queries::heavy_light_decomposition::HLD&lt; X &gt;</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 &amp; Destructor Documentation</h2>
<a id="a6e486767434e44076c1ac374a22da726"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e486767434e44076c1ac374a22da726">&#9670;&nbsp;</a></span>HLD()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD</a>&lt; X &gt;::<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&#160;</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>&#160; : Tree&lt;X&gt;(nodes), SG&lt;X&gt;(nodes) {</div>
<div class="line"><a name="l00436"></a><span class="lineno"> 436</span>&#160; <span class="comment">/* Initialization and resize vectors */</span></div>
<div class="line"><a name="l00437"></a><span class="lineno"> 437</span>&#160; <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>&#160; <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&lt;X&gt;::t_nodes</a>, -1);</div>
<div class="line"><a name="l00439"></a><span class="lineno"> 439</span>&#160; <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&lt;X&gt;::t_nodes</a>, -1);</div>
<div class="line"><a name="l00440"></a><span class="lineno"> 440</span>&#160; <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&lt;X&gt;::t_nodes</a>);</div>
<div class="line"><a name="l00441"></a><span class="lineno"> 441</span>&#160; <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>&#160; }</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">&#9670;&nbsp;</a></span>chain_query()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">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>&lt; X &gt;::chain_query </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>b</em>&#160;</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>&#160; {</div>
<div class="line"><a name="l00410"></a><span class="lineno"> 410</span>&#160; X ret = <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">SG&lt;X&gt;::sret_init</a>;</div>
<div class="line"><a name="l00411"></a><span class="lineno"> 411</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree&lt;X&gt;::t_depth</a>[a] &lt; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree&lt;X&gt;::t_depth</a>[b]) {</div>
<div class="line"><a name="l00412"></a><span class="lineno"> 412</span>&#160; <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>&#160; }</div>
<div class="line"><a name="l00414"></a><span class="lineno"> 414</span>&#160; <span class="keywordflow">while</span> (<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree&lt;X&gt;::t_depth</a>[a] &gt;= <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree&lt;X&gt;::t_depth</a>[b]) {</div>
<div class="line"><a name="l00415"></a><span class="lineno"> 415</span>&#160; <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>&#160; <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>&#160; <span class="keywordflow">if</span> (<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree&lt;X&gt;::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]] &lt; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree&lt;X&gt;::t_depth</a>[b]) {</div>
<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>&#160; l += <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree&lt;X&gt;::t_depth</a>[b] - <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">Tree&lt;X&gt;::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>&#160; }</div>
<div class="line"><a name="l00420"></a><span class="lineno"> 420</span>&#160; ret = <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">SG&lt;X&gt;::combine</a>(ret, <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a1fda852e6e522707fd97f61cdb0a2591">SG&lt;X&gt;::query</a>(l, r));</div>
<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>&#160; a = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">Tree&lt;X&gt;::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>&#160; <span class="keywordflow">if</span> (a == -1) {</div>
<div class="line"><a name="l00423"></a><span class="lineno"> 423</span>&#160; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>&#160; }</div>
<div class="line"><a name="l00425"></a><span class="lineno"> 425</span>&#160; }</div>
<div class="line"><a name="l00426"></a><span class="lineno"> 426</span>&#160; <span class="keywordflow">return</span> ret;</div>
<div class="line"><a name="l00427"></a><span class="lineno"> 427</span>&#160; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="af64848d6630c39d0f09ce2359cc7c4f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af64848d6630c39d0f09ce2359cc7c4f8">&#9670;&nbsp;</a></span>dfs_hc()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">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>&lt; X &gt;::dfs_hc </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>u</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>p</em> = <code>-1</code>&#160;</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>&#160; {</div>
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160; <span class="keywordtype">int</span> hc_size = -1, hc_id = -1;</div>
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> &amp;v : <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">Tree&lt;X&gt;::t_adj</a>[u]) {</div>
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160; <span class="keywordflow">if</span> (v ^ p) {</div>
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160; <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>&#160; <span class="keywordflow">if</span> (<a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">Tree&lt;X&gt;::t_size</a>[v] &gt; hc_size) {</div>
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>&#160; hc_size = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">Tree&lt;X&gt;::t_size</a>[v];</div>
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>&#160; hc_id = v;</div>
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160; }</div>
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160; }</div>
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>&#160; }</div>
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160; <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>&#160; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a0579062b384e54b611b80c6337c7f2c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0579062b384e54b611b80c6337c7f2c8">&#9670;&nbsp;</a></span>dfs_labels()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">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>&lt; X &gt;::dfs_labels </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>u</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>p</em> = <code>-1</code>&#160;</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>&#160; {</div>
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>&#160; <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>&#160; <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>&#160; <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>&#160; }</div>
<div class="line"><a name="l00395"></a><span class="lineno"> 395</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> &amp;v : <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">Tree&lt;X&gt;::t_adj</a>[u]) {</div>
<div class="line"><a name="l00396"></a><span class="lineno"> 396</span>&#160; <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>&#160; <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>&#160; }</div>
<div class="line"><a name="l00399"></a><span class="lineno"> 399</span>&#160; }</div>
<div class="line"><a name="l00400"></a><span class="lineno"> 400</span>&#160; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a2dfbda148aad0bfaba2ebfda9ebc915a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2dfbda148aad0bfaba2ebfda9ebc915a">&#9670;&nbsp;</a></span>dfs_par()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">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>&lt; X &gt;::dfs_par </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>u</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>p</em> = <code>-1</code>&#160;</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>&#160; {</div>
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160; <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>&#160; <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>&#160; <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>&#160; }</div>
<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">int</span> &amp;v : <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">Tree&lt;X&gt;::t_adj</a>[u]) {</div>
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160; <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>&#160; <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>&#160; }</div>
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>&#160; }</div>
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>&#160; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ae9e979edd69678b85665c01e2ee97828"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9e979edd69678b85665c01e2ee97828">&#9670;&nbsp;</a></span>init()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">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>&lt; X &gt;::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>&#160; {</div>
<div class="line"><a name="l00451"></a><span class="lineno"> 451</span>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">Tree&lt;X&gt;::init</a>();</div>
<div class="line"><a name="l00452"></a><span class="lineno"> 452</span>&#160; </div>
<div class="line"><a name="l00453"></a><span class="lineno"> 453</span>&#160; <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>&#160; <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>&#160; <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&lt;X&gt;::t_root</a>);</div>
<div class="line"><a name="l00456"></a><span class="lineno"> 456</span>&#160; <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&lt;X&gt;::t_root</a>);</div>
<div class="line"><a name="l00457"></a><span class="lineno"> 457</span>&#160; <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&lt;X&gt;::t_root</a>);</div>
<div class="line"><a name="l00458"></a><span class="lineno"> 458</span>&#160; </div>
<div class="line"><a name="l00459"></a><span class="lineno"> 459</span>&#160; <span class="comment">// Segment Tree Initialization</span></div>
<div class="line"><a name="l00460"></a><span class="lineno"> 460</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; Tree&lt;X&gt;::t_nodes; i++) {</div>
<div class="line"><a name="l00461"></a><span class="lineno"> 461</span>&#160; <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">SG&lt;X&gt;::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&lt;X&gt;::t_nodes</a>] = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">Tree&lt;X&gt;::t_val</a>[i];</div>
<div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160; }</div>
<div class="line"><a name="l00463"></a><span class="lineno"> 463</span>&#160; <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&lt;X&gt;::t_nodes</a> - 1; i &gt; 0; i--) {</div>
<div class="line"><a name="l00464"></a><span class="lineno"> 464</span>&#160; <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">SG&lt;X&gt;::s_tree</a>[i] =</div>
<div class="line"><a name="l00465"></a><span class="lineno"> 465</span>&#160; <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">SG&lt;X&gt;::combine</a>(<a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">SG&lt;X&gt;::s_tree</a>[i &lt;&lt; 1], <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">SG&lt;X&gt;::s_tree</a>[i &lt;&lt; 1 | 1]);</div>
<div class="line"><a name="l00466"></a><span class="lineno"> 466</span>&#160; }</div>
<div class="line"><a name="l00467"></a><span class="lineno"> 467</span>&#160; }</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">&#9670;&nbsp;</a></span>query()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">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>&lt; X &gt;::<a class="el" href="../../dd/d1b/structquery.html">query</a> </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>b</em>&#160;</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>&#160; {</div>
<div class="line"><a name="l00490"></a><span class="lineno"> 490</span>&#160; <span class="keywordtype">int</span> lc = <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">Tree&lt;X&gt;::lca</a>(a, b);</div>
<div class="line"><a name="l00491"></a><span class="lineno"> 491</span>&#160; X ret = <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">SG&lt;X&gt;::sret_init</a>;</div>
<div class="line"><a name="l00492"></a><span class="lineno"> 492</span>&#160; assert(lc != -1);</div>
<div class="line"><a name="l00493"></a><span class="lineno"> 493</span>&#160; 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>&#160; 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>&#160; <span class="keywordflow">return</span> ret - <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">Tree&lt;X&gt;::t_val</a>[lc];</div>
<div class="line"><a name="l00496"></a><span class="lineno"> 496</span>&#160; }</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">&#9670;&nbsp;</a></span>update()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">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>&lt; X &gt;::update </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>node</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">X&#160;</td>
<td class="paramname"><em>val</em>&#160;</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>&#160; {</div>
<div class="line"><a name="l00476"></a><span class="lineno"> 476</span>&#160; X diff = val - <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">Tree&lt;X&gt;::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>&#160; <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c">SG&lt;X&gt;::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>&#160; <a class="code" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">Tree&lt;X&gt;::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>&#160; }</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&lt; int &gt; t_size</div><div class="ttdoc">a vector to store the subtree size rooted at node</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:89</div></div>
<div 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&lt; int &gt; h_heavychlid</div><div class="ttdoc">stores the heavy child of a node</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:340</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ab1aeaefa1bd97b867c652ba916fbdb43"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">range_queries::heavy_light_decomposition::Tree::t_adj</a></div><div class="ttdeci">std::vector&lt; std::list&lt; int &gt; &gt; t_adj</div><div class="ttdoc">an adjacency list to stores the tree edges</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:83</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_afbf8a9cb9449d5ca844f4e141a801e6a"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">range_queries::heavy_light_decomposition::SG::s_tree</a></div><div class="ttdeci">std::vector&lt; X &gt; s_tree</div><div class="ttdoc">Everything here is private, and can only be accessed through the methods, in the derived class (HLD)</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:262</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_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&lt; std::vector&lt; int &gt; &gt; t_par</div><div class="ttdoc">a matrix to store every node's 2^kth parent</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:87</div></div>
<div class="ttc" id="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&lt; X &gt; t_val</div><div class="ttdoc">values of nodes</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:92</div></div>
<div class="ttc" id="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&lt; int &gt; h_parent</div><div class="ttdoc">stores the top of the heavy chain from a node</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:341</div></div>
<div class="ttc" id="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&lt; int &gt; h_label</div><div class="ttdoc">stores the label of a node</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:339</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a0efd0b9c564092f443ca97030d866ef1"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">range_queries::heavy_light_decomposition::Tree::t_depth</a></div><div class="ttdeci">std::vector&lt; int &gt; t_depth</div><div class="ttdoc">a vector to store the depth of a node,</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:88</div></div>
<!-- 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>

View File

@@ -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 ]
];

View File

@@ -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>

View File

@@ -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&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node3&#45;&gt;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

View File

@@ -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>

View File

@@ -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&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;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

View File

@@ -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>

View File

@@ -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&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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

View File

@@ -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 (&#45;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&#45;tree sizes." alt="" coords="395,365,541,421"/>
</map>

View File

@@ -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&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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 (&#45;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&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node6&#45;&gt;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&#45;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&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node6&#45;&gt;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

View 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++
&#160;<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&amp;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&amp;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&amp;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> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<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 &lt;algorithm&gt;</code><br />
<code>#include &lt;cassert&gt;</code><br />
<code>#include &lt;cmath&gt;</code><br />
<code>#include &lt;cstring&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;list&gt;</code><br />
<code>#include &lt;numeric&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
<code>#include &lt;vector&gt;</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 &#160;</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&lt; X &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</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">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</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&lt; X &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</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">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</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&lt; X &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</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">&#160;</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"> &#160;</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">&#160;</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">&#160;</td></tr>
<tr class="memitem:db/d6f/namespaceheavy__light__decomposition"><td class="memItemLeft" align="right" valign="top"> &#160;</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">&#160;</td><td class="mdescRight">Heavy light decomposition algorithm. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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&#160;</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">&#160;</td></tr>
<tr class="memitem:a458410412185a5f09199deaff7157a8d"><td class="memItemLeft" align="right" valign="top">static void&#160;</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">&#160;</td></tr>
<tr class="memitem:af31ec5409537703d9c8a47350386b32a"><td class="memItemLeft" align="right" valign="top">static void&#160;</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">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</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">&#160;</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&lt;X&gt; 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">&#9670;&nbsp;</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>&#160; {</div>
<div class="line"><a name="l00635"></a><span class="lineno"> 635</span>&#160; <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>&#160; <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>&#160; <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>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00639"></a><span class="lineno"> 639</span>&#160;}</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">&#9670;&nbsp;</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>&#160; {</div>
<div class="line"><a name="l00506"></a><span class="lineno"> 506</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 1:\n&quot;</span>;</div>
<div class="line"><a name="l00507"></a><span class="lineno"> 507</span>&#160; </div>
<div class="line"><a name="l00508"></a><span class="lineno"> 508</span>&#160; <span class="comment">// Test details</span></div>
<div class="line"><a name="l00509"></a><span class="lineno"> 509</span>&#160; <span class="keywordtype">int</span> n = 5;</div>
<div class="line"><a name="l00510"></a><span class="lineno"> 510</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int64_t&gt;</a> node_values = {4, 2, 5, 2, 1};</div>
<div class="line"><a name="l00511"></a><span class="lineno"> 511</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;std::vector&lt;int&gt;</a>&gt; edges = {{1, 2}, {1, 3}, {3, 4}, {3, 5}};</div>
<div class="line"><a name="l00512"></a><span class="lineno"> 512</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;std::vector&lt;int&gt;</a>&gt; queries = {</div>
<div class="line"><a name="l00513"></a><span class="lineno"> 513</span>&#160; {2, 1, 4},</div>
<div class="line"><a name="l00514"></a><span class="lineno"> 514</span>&#160; {1, 3, 2},</div>
<div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160; {2, 1, 4},</div>
<div class="line"><a name="l00516"></a><span class="lineno"> 516</span>&#160; };</div>
<div class="line"><a name="l00517"></a><span class="lineno"> 517</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> expected_result = {11, 8};</div>
<div class="line"><a name="l00518"></a><span class="lineno"> 518</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> code_result;</div>
<div class="line"><a name="l00519"></a><span class="lineno"> 519</span>&#160; </div>
<div class="line"><a name="l00520"></a><span class="lineno"> 520</span>&#160; <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt;int64_t&gt;</a> hld(n);</div>
<div class="line"><a name="l00521"></a><span class="lineno"> 521</span>&#160; hld.set_node_val(node_values);</div>
<div class="line"><a name="l00522"></a><span class="lineno"> 522</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; n - 1; i++) {</div>
<div class="line"><a name="l00523"></a><span class="lineno"> 523</span>&#160; <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>&#160; hld.add_edge(u - 1, v - 1);</div>
<div class="line"><a name="l00525"></a><span class="lineno"> 525</span>&#160; }</div>
<div class="line"><a name="l00526"></a><span class="lineno"> 526</span>&#160; hld.init();</div>
<div class="line"><a name="l00527"></a><span class="lineno"> 527</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> &amp;q : queries) {</div>
<div class="line"><a name="l00528"></a><span class="lineno"> 528</span>&#160; <span class="keywordtype">int</span> type = q[0];</div>
<div class="line"><a name="l00529"></a><span class="lineno"> 529</span>&#160; <span class="keywordflow">if</span> (type == 1) {</div>
<div class="line"><a name="l00530"></a><span class="lineno"> 530</span>&#160; <span class="keywordtype">int</span> p = q[1], x = q[2];</div>
<div class="line"><a name="l00531"></a><span class="lineno"> 531</span>&#160; hld.update(p - 1, x);</div>
<div class="line"><a name="l00532"></a><span class="lineno"> 532</span>&#160; } <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>&#160; <span class="keywordtype">int</span> a = q[1], b = q[2];</div>
<div class="line"><a name="l00534"></a><span class="lineno"> 534</span>&#160; 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>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00536"></a><span class="lineno"> 536</span>&#160; <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00537"></a><span class="lineno"> 537</span>&#160; }</div>
<div class="line"><a name="l00538"></a><span class="lineno"> 538</span>&#160; }</div>
<div class="line"><a name="l00539"></a><span class="lineno"> 539</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; static_cast&lt;int&gt;(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>&#160; assert(expected_result[i] == code_result[i]);</div>
<div class="line"><a name="l00541"></a><span class="lineno"> 541</span>&#160; }</div>
<div class="line"><a name="l00542"></a><span class="lineno"> 542</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\nTest 1 passed!\n&quot;</span>;</div>
<div class="line"><a name="l00543"></a><span class="lineno"> 543</span>&#160;}</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">&#9670;&nbsp;</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>&#160; {</div>
<div class="line"><a name="l00550"></a><span class="lineno"> 550</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 2:\n&quot;</span>;</div>
<div class="line"><a name="l00551"></a><span class="lineno"> 551</span>&#160; </div>
<div class="line"><a name="l00552"></a><span class="lineno"> 552</span>&#160; <span class="comment">// Test details (Bamboo)</span></div>
<div class="line"><a name="l00553"></a><span class="lineno"> 553</span>&#160; <span class="keywordtype">int</span> n = 10;</div>
<div class="line"><a name="l00554"></a><span class="lineno"> 554</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int64_t&gt;</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>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;std::vector&lt;int&gt;</a>&gt; edges = {</div>
<div class="line"><a name="l00556"></a><span class="lineno"> 556</span>&#160; {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>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;std::vector&lt;int&gt;</a>&gt; queries = {</div>
<div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160; {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>&#160; {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>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> expected_result = {27, 11, 45, 9, 34};</div>
<div class="line"><a name="l00561"></a><span class="lineno"> 561</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> code_result;</div>
<div class="line"><a name="l00562"></a><span class="lineno"> 562</span>&#160; </div>
<div class="line"><a name="l00563"></a><span class="lineno"> 563</span>&#160; <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt;int64_t&gt;</a> hld(n);</div>
<div class="line"><a name="l00564"></a><span class="lineno"> 564</span>&#160; hld.set_node_val(node_values);</div>
<div class="line"><a name="l00565"></a><span class="lineno"> 565</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; n - 1; i++) {</div>
<div class="line"><a name="l00566"></a><span class="lineno"> 566</span>&#160; <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>&#160; hld.add_edge(u - 1, v - 1);</div>
<div class="line"><a name="l00568"></a><span class="lineno"> 568</span>&#160; }</div>
<div class="line"><a name="l00569"></a><span class="lineno"> 569</span>&#160; hld.init();</div>
<div class="line"><a name="l00570"></a><span class="lineno"> 570</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> &amp;q : queries) {</div>
<div class="line"><a name="l00571"></a><span class="lineno"> 571</span>&#160; <span class="keywordtype">int</span> type = q[0];</div>
<div class="line"><a name="l00572"></a><span class="lineno"> 572</span>&#160; <span class="keywordflow">if</span> (type == 1) {</div>
<div class="line"><a name="l00573"></a><span class="lineno"> 573</span>&#160; <span class="keywordtype">int</span> p = q[1], x = q[2];</div>
<div class="line"><a name="l00574"></a><span class="lineno"> 574</span>&#160; hld.update(p - 1, x);</div>
<div class="line"><a name="l00575"></a><span class="lineno"> 575</span>&#160; } <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>&#160; <span class="keywordtype">int</span> a = q[1], b = q[2];</div>
<div class="line"><a name="l00577"></a><span class="lineno"> 577</span>&#160; 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>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00579"></a><span class="lineno"> 579</span>&#160; <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00580"></a><span class="lineno"> 580</span>&#160; }</div>
<div class="line"><a name="l00581"></a><span class="lineno"> 581</span>&#160; }</div>
<div class="line"><a name="l00582"></a><span class="lineno"> 582</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; static_cast&lt;int&gt;(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>&#160; assert(expected_result[i] == code_result[i]);</div>
<div class="line"><a name="l00584"></a><span class="lineno"> 584</span>&#160; }</div>
<div class="line"><a name="l00585"></a><span class="lineno"> 585</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\nTest2 passed!\n&quot;</span>;</div>
<div class="line"><a name="l00586"></a><span class="lineno"> 586</span>&#160;}</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">&#9670;&nbsp;</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>&#160; {</div>
<div class="line"><a name="l00593"></a><span class="lineno"> 593</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 3:\n&quot;</span>;</div>
<div class="line"><a name="l00594"></a><span class="lineno"> 594</span>&#160; </div>
<div class="line"><a name="l00595"></a><span class="lineno"> 595</span>&#160; <span class="comment">// Test details</span></div>
<div class="line"><a name="l00596"></a><span class="lineno"> 596</span>&#160; <span class="keywordtype">int</span> n = 8;</div>
<div class="line"><a name="l00597"></a><span class="lineno"> 597</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int64_t&gt;</a> node_values = {1, 8, 6, 8, 6, 2, 9, 2};</div>
<div class="line"><a name="l00598"></a><span class="lineno"> 598</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;std::vector&lt;int&gt;</a>&gt; edges = {{1, 2}, {2, 3}, {3, 4}, {1, 5},</div>
<div class="line"><a name="l00599"></a><span class="lineno"> 599</span>&#160; {6, 3}, {7, 5}, {8, 7}};</div>
<div class="line"><a name="l00600"></a><span class="lineno"> 600</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;std::vector&lt;int&gt;</a>&gt; queries = {</div>
<div class="line"><a name="l00601"></a><span class="lineno"> 601</span>&#160; {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>&#160; {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>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> expected_result = {34, 8, 16, 14, 10};</div>
<div class="line"><a name="l00604"></a><span class="lineno"> 604</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a> code_result;</div>
<div class="line"><a name="l00605"></a><span class="lineno"> 605</span>&#160; </div>
<div class="line"><a name="l00606"></a><span class="lineno"> 606</span>&#160; <a class="code" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt;int64_t&gt;</a> hld(n);</div>
<div class="line"><a name="l00607"></a><span class="lineno"> 607</span>&#160; hld.set_node_val(node_values);</div>
<div class="line"><a name="l00608"></a><span class="lineno"> 608</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; n - 1; i++) {</div>
<div class="line"><a name="l00609"></a><span class="lineno"> 609</span>&#160; <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>&#160; hld.add_edge(u - 1, v - 1);</div>
<div class="line"><a name="l00611"></a><span class="lineno"> 611</span>&#160; }</div>
<div class="line"><a name="l00612"></a><span class="lineno"> 612</span>&#160; hld.init();</div>
<div class="line"><a name="l00613"></a><span class="lineno"> 613</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> &amp;q : queries) {</div>
<div class="line"><a name="l00614"></a><span class="lineno"> 614</span>&#160; <span class="keywordtype">int</span> type = q[0];</div>
<div class="line"><a name="l00615"></a><span class="lineno"> 615</span>&#160; <span class="keywordflow">if</span> (type == 1) {</div>
<div class="line"><a name="l00616"></a><span class="lineno"> 616</span>&#160; <span class="keywordtype">int</span> p = q[1], x = q[2];</div>
<div class="line"><a name="l00617"></a><span class="lineno"> 617</span>&#160; hld.update(p - 1, x);</div>
<div class="line"><a name="l00618"></a><span class="lineno"> 618</span>&#160; } <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>&#160; <span class="keywordtype">int</span> a = q[1], b = q[2];</div>
<div class="line"><a name="l00620"></a><span class="lineno"> 620</span>&#160; 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>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00622"></a><span class="lineno"> 622</span>&#160; <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00623"></a><span class="lineno"> 623</span>&#160; }</div>
<div class="line"><a name="l00624"></a><span class="lineno"> 624</span>&#160; }</div>
<div class="line"><a name="l00625"></a><span class="lineno"> 625</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; static_cast&lt;int&gt;(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>&#160; assert(expected_result[i] == code_result[i]);</div>
<div class="line"><a name="l00627"></a><span class="lineno"> 627</span>&#160; }</div>
<div class="line"><a name="l00628"></a><span class="lineno"> 628</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;\nTest3 passed!\n&quot;</span>;</div>
<div class="line"><a name="l00629"></a><span class="lineno"> 629</span>&#160;}</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>

View 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 ]
];

View File

@@ -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 (&#45;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&#45;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>

View File

@@ -0,0 +1 @@
fdf2e1d607d6492ec2d0cd82c3962d4f

View File

@@ -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&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge11" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node12 -->
<g id="edge12" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node16 -->
<g id="edge16" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge18" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge19" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node4&#45;&gt;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 (&#45;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&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node9&#45;&gt;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&#45;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&#45;&gt;Node11 -->
<g id="edge10" class="edge">
<title>Node9&#45;&gt;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&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<title>Node12&#45;&gt;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&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<title>Node12&#45;&gt;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&#45;&gt;Node15 -->
<g id="edge15" class="edge">
<title>Node14&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge17" class="edge">
<title>Node16&#45;&gt;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&#45;&gt;Node19 -->
<g id="edge20" class="edge">
<title>Node18&#45;&gt;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

View File

@@ -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&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge11" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node12 -->
<g id="edge12" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node16 -->
<g id="edge16" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge18" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge19" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node4&#45;&gt;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 (&#45;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&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node9&#45;&gt;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&#45;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&#45;&gt;Node11 -->
<g id="edge10" class="edge">
<title>Node9&#45;&gt;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&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<title>Node12&#45;&gt;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&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<title>Node12&#45;&gt;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&#45;&gt;Node15 -->
<g id="edge15" class="edge">
<title>Node14&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge17" class="edge">
<title>Node16&#45;&gt;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&#45;&gt;Node19 -->
<g id="edge20" class="edge">
<title>Node18&#45;&gt;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

View File

@@ -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 (&#45;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&#45;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>

View File

@@ -0,0 +1 @@
528c23ffeae1541b94cd7d5fc3d9be94

View File

@@ -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&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge11" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node12 -->
<g id="edge12" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node16 -->
<g id="edge16" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge18" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge19" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node4&#45;&gt;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 (&#45;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&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node9&#45;&gt;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&#45;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&#45;&gt;Node11 -->
<g id="edge10" class="edge">
<title>Node9&#45;&gt;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&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<title>Node12&#45;&gt;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&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<title>Node12&#45;&gt;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&#45;&gt;Node15 -->
<g id="edge15" class="edge">
<title>Node14&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge17" class="edge">
<title>Node16&#45;&gt;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&#45;&gt;Node19 -->
<g id="edge20" class="edge">
<title>Node18&#45;&gt;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

View File

@@ -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&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge11" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node12 -->
<g id="edge12" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node16 -->
<g id="edge16" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge18" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge19" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node4&#45;&gt;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 (&#45;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&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node9&#45;&gt;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&#45;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&#45;&gt;Node11 -->
<g id="edge10" class="edge">
<title>Node9&#45;&gt;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&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<title>Node12&#45;&gt;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&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<title>Node12&#45;&gt;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&#45;&gt;Node15 -->
<g id="edge15" class="edge">
<title>Node14&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge17" class="edge">
<title>Node16&#45;&gt;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&#45;&gt;Node19 -->
<g id="edge20" class="edge">
<title>Node18&#45;&gt;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

View File

@@ -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 (&#45;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&#45;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>

View File

@@ -0,0 +1 @@
20bffa84e5da91b3b14d79e9259df1e8

View File

@@ -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&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node21 -->
<g id="edge22" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node22 -->
<g id="edge30" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge12" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge17" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge19" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node19 -->
<g id="edge20" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node3&#45;&gt;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&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node5&#45;&gt;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 (&#45;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&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node5&#45;&gt;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&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node5&#45;&gt;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&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node5&#45;&gt;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&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node5&#45;&gt;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&#45;&gt;Node11 -->
<g id="edge10" class="edge">
<title>Node10&#45;&gt;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&#45;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&#45;&gt;Node12 -->
<g id="edge11" class="edge">
<title>Node10&#45;&gt;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&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<title>Node13&#45;&gt;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&#45;&gt;Node15 -->
<g id="edge15" class="edge">
<title>Node13&#45;&gt;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&#45;&gt;Node16 -->
<g id="edge16" class="edge">
<title>Node15&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge18" class="edge">
<title>Node17&#45;&gt;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&#45;&gt;Node20 -->
<g id="edge21" class="edge">
<title>Node19&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge23" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge25" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge24" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node13 -->
<g id="edge26" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge27" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge28" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node19 -->
<g id="edge29" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge31" class="edge">
<title>Node22&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge33" class="edge">
<title>Node22&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge32" class="edge">
<title>Node22&#45;&gt;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&#45;&gt;Node13 -->
<g id="edge34" class="edge">
<title>Node22&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge35" class="edge">
<title>Node22&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge36" class="edge">
<title>Node22&#45;&gt;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&#45;&gt;Node19 -->
<g id="edge37" class="edge">
<title>Node22&#45;&gt;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

View File

@@ -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&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node21 -->
<g id="edge22" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node22 -->
<g id="edge30" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge12" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge17" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge19" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node19 -->
<g id="edge20" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node3&#45;&gt;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&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node5&#45;&gt;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 (&#45;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&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node5&#45;&gt;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&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node5&#45;&gt;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&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node5&#45;&gt;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&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node5&#45;&gt;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&#45;&gt;Node11 -->
<g id="edge10" class="edge">
<title>Node10&#45;&gt;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&#45;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&#45;&gt;Node12 -->
<g id="edge11" class="edge">
<title>Node10&#45;&gt;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&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<title>Node13&#45;&gt;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&#45;&gt;Node15 -->
<g id="edge15" class="edge">
<title>Node13&#45;&gt;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&#45;&gt;Node16 -->
<g id="edge16" class="edge">
<title>Node15&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge18" class="edge">
<title>Node17&#45;&gt;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&#45;&gt;Node20 -->
<g id="edge21" class="edge">
<title>Node19&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge23" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge25" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge24" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node13 -->
<g id="edge26" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge27" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge28" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node19 -->
<g id="edge29" class="edge">
<title>Node21&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge31" class="edge">
<title>Node22&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge33" class="edge">
<title>Node22&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge32" class="edge">
<title>Node22&#45;&gt;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&#45;&gt;Node13 -->
<g id="edge34" class="edge">
<title>Node22&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge35" class="edge">
<title>Node22&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge36" class="edge">
<title>Node22&#45;&gt;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&#45;&gt;Node19 -->
<g id="edge37" class="edge">
<title>Node22&#45;&gt;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

View File

@@ -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 (&#45;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&#45;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>

View File

@@ -0,0 +1 @@
5764309ab9b9b4eea055eef788603a20

View File

@@ -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&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge11" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node12 -->
<g id="edge12" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node16 -->
<g id="edge16" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge18" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge19" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node4&#45;&gt;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 (&#45;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&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node9&#45;&gt;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&#45;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&#45;&gt;Node11 -->
<g id="edge10" class="edge">
<title>Node9&#45;&gt;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&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<title>Node12&#45;&gt;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&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<title>Node12&#45;&gt;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&#45;&gt;Node15 -->
<g id="edge15" class="edge">
<title>Node14&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge17" class="edge">
<title>Node16&#45;&gt;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&#45;&gt;Node19 -->
<g id="edge20" class="edge">
<title>Node18&#45;&gt;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

View File

@@ -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&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge11" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node12 -->
<g id="edge12" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node16 -->
<g id="edge16" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge18" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node18 -->
<g id="edge19" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;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&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node4&#45;&gt;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 (&#45;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&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node4&#45;&gt;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&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node9&#45;&gt;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&#45;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&#45;&gt;Node11 -->
<g id="edge10" class="edge">
<title>Node9&#45;&gt;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&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<title>Node12&#45;&gt;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&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<title>Node12&#45;&gt;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&#45;&gt;Node15 -->
<g id="edge15" class="edge">
<title>Node14&#45;&gt;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&#45;&gt;Node17 -->
<g id="edge17" class="edge">
<title>Node16&#45;&gt;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&#45;&gt;Node19 -->
<g id="edge20" class="edge">
<title>Node18&#45;&gt;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

View File

@@ -183,6 +183,7 @@ Functions</h2></td></tr>
<div class="ttc" id="asrand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a></div><div class="ttdeci">T srand(T... args)</div></div>
<div class="ttc" id="aknuth__morris__pratt_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../de/d6a/knuth__morris__pratt_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> knuth_morris_pratt.cpp:76</div></div>
<div class="ttc" id="afenwick__tree_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d6/d2e/fenwick__tree_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> fenwick_tree.cpp:69</div></div>
<div class="ttc" id="aresize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/resize.html">std::vector::resize</a></div><div class="ttdeci">T resize(T... args)</div></div>
<div class="ttc" id="aternary__search_8cpp_html_aef655a27eb82efa299bf9d0becf6e9c8"><div class="ttname"><a href="../../dc/dfe/ternary__search_8cpp.html#aef655a27eb82efa299bf9d0becf6e9c8">ternary_search</a></div><div class="ttdeci">void ternary_search(int N, int A[], int target)</div><div class="ttdef"><b>Definition:</b> ternary_search.cpp:127</div></div>
<div class="ttc" id="afloor_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/floor.html">std::floor</a></div><div class="ttdeci">T floor(T... args)</div></div>
<div class="ttc" id="asmallest__circle_8cpp_html_a6d0455dd5c30adda100e95f0423c786e"><div class="ttname"><a href="../../d0/d01/smallest__circle_8cpp.html#a6d0455dd5c30adda100e95f0423c786e">test3</a></div><div class="ttdeci">void test3()</div><div class="ttdef"><b>Definition:</b> smallest_circle.cpp:188</div></div>
@@ -198,27 +199,44 @@ Functions</h2></td></tr>
<div class="ttc" id="adecimal__to__roman__numeral_8cpp_html_a003fb4e1b08279fe4cd50fbbc2782c2d"><div class="ttname"><a href="../../de/d85/decimal__to__roman__numeral_8cpp.html#a003fb4e1b08279fe4cd50fbbc2782c2d">tolowerRoman</a></div><div class="ttdeci">std::string tolowerRoman(int n)</div><div class="ttdef"><b>Definition:</b> decimal_to_roman_numeral.cpp:24</div></div>
<div class="ttc" id="ashell__sort2_8cpp_html_a22ea0d1f7943ebb4371d31e44b465b6d"><div class="ttname"><a href="../../d4/d7a/shell__sort2_8cpp.html#a22ea0d1f7943ebb4371d31e44b465b6d">test_f</a></div><div class="ttdeci">void test_f(const int NUM_DATA)</div><div class="ttdef"><b>Definition:</b> shell_sort2.cpp:145</div></div>
<div class="ttc" id="anamespacestring__search_html"><div class="ttname"><a href="../../d9/d03/namespacestring__search.html">string_search</a></div><div class="ttdoc">String search algorithms.</div><div class="ttdef"><b>Definition:</b> brute_force_string_searching.cpp:13</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="afibonacci__fast_8cpp_html_a392fb874e547e582e9c66a08a1f23326"><div class="ttname"><a href="../../d4/d32/fibonacci__fast_8cpp.html#a392fb874e547e582e9c66a08a1f23326">MAX</a></div><div class="ttdeci">#define MAX</div><div class="ttdef"><b>Definition:</b> fibonacci_fast.cpp:27</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ada1494fccbc7f1f07b2f9be9f7e07ad5"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">range_queries::heavy_light_decomposition::Tree::t_size</a></div><div class="ttdeci">std::vector&lt; int &gt; t_size</div><div class="ttdoc">a vector to store the subtree size rooted at node</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:89</div></div>
<div class="ttc" id="ashell__sort2_8cpp_html_a951127aea9d7e1e53ea9ae0868633246"><div class="ttname"><a href="../../d4/d7a/shell__sort2_8cpp.html#a951127aea9d7e1e53ea9ae0868633246">show_data</a></div><div class="ttdeci">void show_data(T *arr, size_t LEN)</div><div class="ttdef"><b>Definition:</b> shell_sort2.cpp:18</div></div>
<div class="ttc" id="alist_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/list.html">std::list</a></div><div class="ttdoc">STL class.</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ae8de7aefcb6635d3dacdd174cd4890c4"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4">range_queries::heavy_light_decomposition::Tree::dfs_lca</a></div><div class="ttdeci">void dfs_lca(int u, int p=-1)</div><div class="ttdoc">Utility function to populate the t_par vector.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:116</div></div>
<div class="ttc" id="agroup__sorting_html_ga29d28b140174dbdde7c9f5157758435f"><div class="ttname"><a href="../../d5/d4c/group__sorting.html#ga29d28b140174dbdde7c9f5157758435f">heapSort</a></div><div class="ttdeci">void heapSort(T *arr, int n)</div><div class="ttdef"><b>Definition:</b> heap_sort.cpp:84</div></div>
<div class="ttc" id="aclock_t_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/c/clock_t.html">std::clock_t</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_aa6c37e840355b9fb2105181c578694e8"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">range_queries::heavy_light_decomposition::Tree::t_root</a></div><div class="ttdeci">int t_root</div><div class="ttdoc">the root of the tree</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:91</div></div>
<div class="ttc" id="amove_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/move.html">std::move</a></div><div class="ttdeci">T move(T... args)</div></div>
<div class="ttc" id="abinomial__dist_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d6/db0/binomial__dist_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> binomial_dist.cpp:84</div></div>
<div class="ttc" id="aaddition__rule_8cpp_html_a565ffcbbdbe496ced37250bc8dc36bc0"><div class="ttname"><a href="../../d6/d4a/addition__rule_8cpp.html#a565ffcbbdbe496ced37250bc8dc36bc0">addition_rule_dependent</a></div><div class="ttdeci">double addition_rule_dependent(double A, double B, double B_given_A)</div><div class="ttdef"><b>Definition:</b> addition_rule.cpp:25</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ab2ab020f798d00be2613ecf63074b7c1"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">range_queries::heavy_light_decomposition::Tree::t_maxlift</a></div><div class="ttdeci">const int t_maxlift</div><div class="ttdoc">maximum possible height of the tree</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:85</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_a04cd96efaba147b19d3afc769b90ff70"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">range_queries::heavy_light_decomposition::Tree::set_node_val</a></div><div class="ttdeci">void set_node_val(const std::vector&lt; X &gt; &amp;node_val)</div><div class="ttdoc">Set the values for all the nodes.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:175</div></div>
<div class="ttc" id="asmallest__circle_8cpp_html_a0283886819c7c140a023582b7269e2d0"><div class="ttname"><a href="../../d0/d01/smallest__circle_8cpp.html#a0283886819c7c140a023582b7269e2d0">test2</a></div><div class="ttdeci">void test2()</div><div class="ttdef"><b>Definition:</b> smallest_circle.cpp:173</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="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="apair_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair</a></div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree</a></div><div class="ttdoc">A Basic Tree, which supports binary lifting.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:78</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_tree_html_a835fb2bbb27307b8cacad9b287968bc1"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1">range_queries::heavy_light_decomposition::Tree::Tree</a></div><div class="ttdeci">Tree(int nodes)</div><div class="ttdoc">Class parameterized constructor, resizes the and initializes the data members.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:140</div></div>
<div class="ttc" id="afibonacci__search_8cpp_html_a2aa09bef74ee063c1331de0883af4f4f"><div class="ttname"><a href="../../de/d0d/fibonacci__search_8cpp.html#a2aa09bef74ee063c1331de0883af4f4f">random_tests</a></div><div class="ttdeci">bool random_tests()</div><div class="ttdoc">random tests which cover cases when we have one, multiple or zero occurences of the value we're looki...</div><div class="ttdef"><b>Definition:</b> fibonacci_search.cpp:96</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="afind_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/find.html">std::find</a></div><div class="ttdeci">T find(T... args)</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="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="astruct_point_html_ab99c56589bc8ad5fa5071387110a5bc7"><div class="ttname"><a href="../../d8/dc8/struct_point.html#ab99c56589bc8ad5fa5071387110a5bc7">Point::x</a></div><div class="ttdeci">double x</div><div class="ttdef"><b>Definition:</b> smallest_circle.cpp:16</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="adecimal__to__roman__numeral_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../de/d85/decimal__to__roman__numeral_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> decimal_to_roman_numeral.cpp:90</div></div>
<div class="ttc" id="aclass_fenwick_tree_html_a115ff5c548b429b737ea09f75817d1f9"><div class="ttname"><a href="../../dd/d91/class_fenwick_tree.html#a115ff5c548b429b737ea09f75817d1f9">FenwickTree::sum_range</a></div><div class="ttdeci">int sum_range(int l, int r)</div><div class="ttdef"><b>Definition:</b> fenwick_tree.cpp:65</div></div>
<div class="ttc" id="aheap__sort_8cpp_html_ae1a3968e7947464bee7714f6d43b7002"><div class="ttname"><a href="../../d2/d52/heap__sort_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a></div><div class="ttdeci">void test()</div><div class="ttdef"><b>Definition:</b> heap_sort.cpp:99</div></div>
<div class="ttc" id="aternary__search_8cpp_html_ae01eda5098801bb6b5b778828fb4fddc"><div class="ttname"><a href="../../dc/dfe/ternary__search_8cpp.html#ae01eda5098801bb6b5b778828fb4fddc">absolutePrecision</a></div><div class="ttdeci">#define absolutePrecision</div><div class="ttdef"><b>Definition:</b> ternary_search.cpp:22</div></div>
<div class="ttc" id="amatrix__exponentiation_8cpp_html_ad8389ed58fd0ec66df248014775ad1fa"><div class="ttname"><a href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa">ans</a></div><div class="ttdeci">ll ans(ll n)</div><div class="ttdef"><b>Definition:</b> matrix_exponentiation.cpp:91</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_ae9e979edd69678b85665c01e2ee97828"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">range_queries::heavy_light_decomposition::HLD::init</a></div><div class="ttdeci">void init()</div><div class="ttdoc">This function must be called after the tree adjacency list and node values are populated The function...</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:450</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="aclass_fenwick_tree_html"><div class="ttname"><a href="../../dd/d91/class_fenwick_tree.html">FenwickTree</a></div><div class="ttdef"><b>Definition:</b> fenwick_tree.cpp:17</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a79ab4601c4a95c0902ac04e779e5f54d"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d">range_queries::heavy_light_decomposition::Tree::add_edge</a></div><div class="ttdeci">void add_edge(const int u, const int v)</div><div class="ttdoc">Adds an undirected edge from node u to node v in the tree.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:157</div></div>
<div class="ttc" id="agnome__sort_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d2/d21/gnome__sort_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> gnome_sort.cpp:130</div></div>
<div class="ttc" id="anamespacesorting_html_a78cb2f3b97b6db2c062b2a1df05c9ea9"><div class="ttname"><a href="../../d5/d91/namespacesorting.html#a78cb2f3b97b6db2c062b2a1df05c9ea9">sorting::insertionSort</a></div><div class="ttdeci">void insertionSort(T *arr, int n)</div><div class="ttdoc">Insertion Sort Function.</div><div class="ttdef"><b>Definition:</b> insertion_sort.cpp:59</div></div>
<div class="ttc" id="ahash__search_8cpp_html_a77c722016053a1d484aa177ce205b367"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a77c722016053a1d484aa177ce205b367">HASHMAX</a></div><div class="ttdeci">#define HASHMAX</div><div class="ttdoc">Determines the length of the hash table.</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:22</div></div>
@@ -247,8 +265,10 @@ Functions</h2></td></tr>
<div class="ttc" id="anamespacesorting_html_aa26de383227859210f14dcf12201a079"><div class="ttname"><a href="../../d5/d91/namespacesorting.html#aa26de383227859210f14dcf12201a079">sorting::merge</a></div><div class="ttdeci">void merge(Iterator, Iterator, const Iterator, char[])</div><div class="ttdoc">merges 2 sorted adjacent segments into a larger sorted segment</div><div class="ttdef"><b>Definition:</b> non_recursive_merge_sort.cpp:57</div></div>
<div class="ttc" id="anamespacesorting_html_aedfb88e2d6fff1871f038221fe5870fe"><div class="ttname"><a href="../../d5/d91/namespacesorting.html#aedfb88e2d6fff1871f038221fe5870fe">sorting::shuffle</a></div><div class="ttdeci">std::array&lt; T, N &gt; shuffle(std::array&lt; T, N &gt; arr)</div><div class="ttdef"><b>Definition:</b> bogo_sort.cpp:36</div></div>
<div class="ttc" id="alinear__search_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d9/d02/linear__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> linear_search.cpp:27</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a9f1cb54ed09fde931bf3220d75ee4c57"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57">range_queries::heavy_light_decomposition::HLD::update</a></div><div class="ttdeci">void update(int node, X val)</div><div class="ttdoc">This function updates the value at node with val.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:475</div></div>
<div class="ttc" id="asuccessive__approximation_8cpp_html_ae89c36add7c55298c5195d0a83de1456"><div class="ttname"><a href="../../df/dc8/successive__approximation_8cpp.html#ae89c36add7c55298c5195d0a83de1456">eqd</a></div><div class="ttdeci">static float eqd(float y)</div><div class="ttdef"><b>Definition:</b> successive_approximation.cpp:17</div></div>
<div class="ttc" id="abogo__sort_8cpp_html_ae8adaeff66471f9ed84f2e673b38a859"><div class="ttname"><a href="../../d5/ddb/bogo__sort_8cpp.html#ae8adaeff66471f9ed84f2e673b38a859">show_array</a></div><div class="ttdeci">void show_array(const std::array&lt; T, N &gt; &amp;arr)</div><div class="ttdef"><b>Definition:</b> bogo_sort.cpp:68</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_afba5c1225ba04c0025c7786c09ff28f1"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afba5c1225ba04c0025c7786c09ff28f1">range_queries::heavy_light_decomposition::SG::SG</a></div><div class="ttdeci">SG(int size)</div><div class="ttdoc">Class parameterized constructor. Resizes the and initilizes the data members.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:282</div></div>
<div class="ttc" id="asort_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/sort.html">std::sort</a></div><div class="ttdeci">T sort(T... args)</div></div>
<div class="ttc" id="adecimal__to__roman__numeral_8cpp_html_a88203bd297e8405160c132faa1187780"><div class="ttname"><a href="../../de/d85/decimal__to__roman__numeral_8cpp.html#a88203bd297e8405160c132faa1187780">fill</a></div><div class="ttdeci">std::string fill(char c, int n)</div><div class="ttdef"><b>Definition:</b> decimal_to_roman_numeral.cpp:15</div></div>
<div class="ttc" id="aqr__eigen__values_8cpp_html_a7558fd7779bf207157ced66f275951a0"><div class="ttname"><a href="../../de/d75/qr__eigen__values_8cpp.html#a7558fd7779bf207157ced66f275951a0">mat_mul</a></div><div class="ttdeci">void mat_mul(const std::valarray&lt; std::valarray&lt; double &gt;&gt; &amp;A, const std::valarray&lt; std::valarray&lt; double &gt;&gt; &amp;B, std::valarray&lt; std::valarray&lt; double &gt;&gt; *OUT)</div><div class="ttdef"><b>Definition:</b> qr_eigen_values.cpp:54</div></div>
@@ -256,6 +276,7 @@ Functions</h2></td></tr>
<div class="ttc" id="asqrt_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html">std::sqrt</a></div><div class="ttdeci">T sqrt(T... args)</div></div>
<div class="ttc" id="aparanthesis__matching_8cpp_html_af4c937d823c412d99fbe60c99dbf0a4f"><div class="ttname"><a href="../../dc/dc5/paranthesis__matching_8cpp.html#af4c937d823c412d99fbe60c99dbf0a4f">stack_idx</a></div><div class="ttdeci">int stack_idx</div><div class="ttdoc">pointer to track stack index</div><div class="ttdef"><b>Definition:</b> paranthesis_matching.cpp:23</div></div>
<div class="ttc" id="ashell__sort2_8cpp_html_a0ddf1224851353fc92bfbff6f499fa97"><div class="ttname"><a href="../../d4/d7a/shell__sort2_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97">main</a></div><div class="ttdeci">int main(int argc, char *argv[])</div><div class="ttdef"><b>Definition:</b> shell_sort2.cpp:183</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="ainterpolation__search2_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../df/d39/interpolation__search2_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> interpolation_search2.cpp:32</div></div>
<div class="ttc" id="ashell__sort2_8cpp_html_a7eb77daed2cf1513f6d68c47a1c2db1c"><div class="ttname"><a href="../../d4/d7a/shell__sort2_8cpp.html#a7eb77daed2cf1513f6d68c47a1c2db1c">compare</a></div><div class="ttdeci">int compare(const void *a, const void *b)</div><div class="ttdef"><b>Definition:</b> shell_sort2.cpp:87</div></div>
<div class="ttc" id="anamespacestring__search_html_aeb2cd81064717aedd62bfb096b1a73d8"><div class="ttname"><a href="../../d9/d03/namespacestring__search.html#aeb2cd81064717aedd62bfb096b1a73d8">string_search::brute_force</a></div><div class="ttdeci">int brute_force(const std::string &amp;text, const std::string &amp;pattern)</div><div class="ttdef"><b>Definition:</b> brute_force_string_searching.cpp:21</div></div>
@@ -263,6 +284,7 @@ Functions</h2></td></tr>
<div class="ttc" id="ais_sorted_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/is_sorted.html">std::is_sorted</a></div><div class="ttdeci">T is_sorted(T... args)</div></div>
<div class="ttc" id="afibonacci__search_8cpp_html_a0bc61b3903d9a53061bf31e5d110fe61"><div class="ttname"><a href="../../de/d0d/fibonacci__search_8cpp.html#a0bc61b3903d9a53061bf31e5d110fe61">fibonacci_search</a></div><div class="ttdeci">int fibonacci_search(const std::vector&lt; int &gt; &amp;arr, int value)</div><div class="ttdoc">using fibonacci search algorithm finds an index of a given element in a sorted array</div><div class="ttdef"><b>Definition:</b> fibonacci_search.cpp:23</div></div>
<div class="ttc" id="anamespaceqr__algorithm_html"><div class="ttname"><a href="../../d2/d3b/namespaceqr__algorithm.html">qr_algorithm</a></div><div class="ttdoc">Functions to compute QR decomposition of any rectangular matrix.</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ac7761255f2ba06b398b9aae5e4dce5f3"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ac7761255f2ba06b398b9aae5e4dce5f3">range_queries::heavy_light_decomposition::Tree::lift</a></div><div class="ttdeci">void lift(int *const p, int dist)</div><div class="ttdoc">The function lifts a node, k units up the tree. The lifting is done in place, and the result is store...</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:200</div></div>
<div class="ttc" id="aclass_fenwick_tree_html_aaae15ea71455315e257baa11017cec10"><div class="ttname"><a href="../../dd/d91/class_fenwick_tree.html#aaae15ea71455315e257baa11017cec10">FenwickTree::offset</a></div><div class="ttdeci">int offset(int x)</div><div class="ttdef"><b>Definition:</b> fenwick_tree.cpp:22</div></div>
<div class="ttc" id="aqr__eigen__values_8cpp_html_a33cb0a68c36aa26fd599c7c66da86ed7"><div class="ttname"><a href="../../de/d75/qr__eigen__values_8cpp.html#a33cb0a68c36aa26fd599c7c66da86ed7">create_matrix</a></div><div class="ttdeci">void create_matrix(std::valarray&lt; std::valarray&lt; double &gt;&gt; *A)</div><div class="ttdef"><b>Definition:</b> qr_eigen_values.cpp:28</div></div>
<div class="ttc" id="ahappy__number_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../db/df3/happy__number_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> happy_number.cpp:29</div></div>
@@ -279,18 +301,23 @@ Functions</h2></td></tr>
<div class="ttc" id="anamespacestring__search_html_aed769d565b705a9b3e0eb1ec74088893"><div class="ttname"><a href="../../d9/d03/namespacestring__search.html#aed769d565b705a9b3e0eb1ec74088893">string_search::recalculate_hash</a></div><div class="ttdeci">int64_t recalculate_hash(const std::string &amp;s, int old_index, int new_index, int64_t old_hash, int patLength)</div><div class="ttdef"><b>Definition:</b> rabin_karp.cpp:42</div></div>
<div class="ttc" id="asmallest__circle_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d0/d01/smallest__circle_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> smallest_circle.cpp:198</div></div>
<div class="ttc" id="ashell__sort2_8cpp_html_a895b313cb2671e8f712040460325573e"><div class="ttname"><a href="../../d4/d7a/shell__sort2_8cpp.html#a895b313cb2671e8f712040460325573e">test_int</a></div><div class="ttdeci">void test_int(const int NUM_DATA)</div><div class="ttdef"><b>Definition:</b> shell_sort2.cpp:105</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="apascal__triangle_8cpp_html_afd3f52dd56ddedbf7af5d26a202a199e"><div class="ttname"><a href="../../dc/d1a/pascal__triangle_8cpp.html#afd3f52dd56ddedbf7af5d26a202a199e">pascal_triangle</a></div><div class="ttdeci">int ** pascal_triangle(int **arr, int n)</div><div class="ttdef"><b>Definition:</b> pascal_triangle.cpp:36</div></div>
<div class="ttc" id="acomb__sort_8cpp_html_a0f4e7569090083fb53d5cdeaf0e2974f"><div class="ttname"><a href="../../d9/dfd/comb__sort_8cpp.html#a0f4e7569090083fb53d5cdeaf0e2974f">CombSort</a></div><div class="ttdeci">void CombSort(int *arr, int l, int r)</div><div class="ttdef"><b>Definition:</b> comb_sort.cpp:42</div></div>
<div class="ttc" id="anamespacesorting_html_a9f59fe72dacc1f1218ef3c303d843168"><div class="ttname"><a href="../../d5/d91/namespacesorting.html#a9f59fe72dacc1f1218ef3c303d843168">sorting::quicksort</a></div><div class="ttdeci">void quicksort(std::vector&lt; T &gt; *arr, int32_t low, int32_t high)</div><div class="ttdef"><b>Definition:</b> quick_sort_3.cpp:94</div></div>
<div class="ttc" id="aavltree_8cpp_html_aa7cd8a68075fae1c33df41233c1bed6a"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#aa7cd8a68075fae1c33df41233c1bed6a">insert</a></div><div class="ttdeci">node * insert(node *root, int item)</div><div class="ttdef"><b>Definition:</b> avltree.cpp:66</div></div>
<div class="ttc" id="afprintf_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/c/fprintf.html">std::printf</a></div><div class="ttdeci">T printf(T... args)</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&lt; int &gt; h_heavychlid</div><div class="ttdoc">stores the heavy child of a node</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:340</div></div>
<div class="ttc" id="aclass_fenwick_tree_html_aaddab1f03d4941212a82cc647b1adb17"><div class="ttname"><a href="../../dd/d91/class_fenwick_tree.html#aaddab1f03d4941212a82cc647b1adb17">FenwickTree::FenwickTree</a></div><div class="ttdeci">FenwickTree(const std::vector&lt; int &gt; &amp;arr)</div><div class="ttdef"><b>Definition:</b> fenwick_tree.cpp:28</div></div>
<div class="ttc" id="agroup__sorting_html_gab6b14fea48d9841e29b9fc26be6e05d7"><div class="ttname"><a href="../../d5/d4c/group__sorting.html#gab6b14fea48d9841e29b9fc26be6e05d7">mergeSort</a></div><div class="ttdeci">void mergeSort(int *arr, int l, int r)</div><div class="ttdef"><b>Definition:</b> merge_sort.cpp:83</div></div>
<div class="ttc" id="amatrix__exponentiation_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d7/d35/matrix__exponentiation_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> matrix_exponentiation.cpp:126</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ab1aeaefa1bd97b867c652ba916fbdb43"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">range_queries::heavy_light_decomposition::Tree::t_adj</a></div><div class="ttdeci">std::vector&lt; std::list&lt; int &gt; &gt; t_adj</div><div class="ttdoc">an adjacency list to stores the tree edges</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:83</div></div>
<div class="ttc" id="afast__interger__input_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d4/de8/fast__interger__input_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> fast_interger_input.cpp:39</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="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_afbf8a9cb9449d5ca844f4e141a801e6a"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">range_queries::heavy_light_decomposition::SG::s_tree</a></div><div class="ttdeci">std::vector&lt; X &gt; s_tree</div><div class="ttdoc">Everything here is private, and can only be accessed through the methods, in the derived class (HLD)</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:262</div></div>
<div class="ttc" id="aqr__decompose_8h_html"><div class="ttname"><a href="../../d4/d68/qr__decompose_8h.html">qr_decompose.h</a></div><div class="ttdoc">Library functions to compute QR decomposition of a given matrix.</div></div>
<div class="ttc" id="agroup__sorting_html_ga460c61cd948203b4816bef2accb3fc73"><div class="ttname"><a href="../../d5/d4c/group__sorting.html#ga460c61cd948203b4816bef2accb3fc73">merge</a></div><div class="ttdeci">void merge(int *arr, int l, int m, int r)</div><div class="ttdef"><b>Definition:</b> merge_sort.cpp:33</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a8f7bca1746d40f21ad832fcea59aa6c6"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a8f7bca1746d40f21ad832fcea59aa6c6">range_queries::heavy_light_decomposition::Tree::kth_ancestor</a></div><div class="ttdeci">int kth_ancestor(int p, const int &amp;dist)</div><div class="ttdoc">The function returns the kth ancestor of a node.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:218</div></div>
<div class="ttc" id="ainsertion__sort_8cpp_html_a59914553f24088342c139645a02a8a49"><div class="ttname"><a href="../../dd/d0d/insertion__sort_8cpp.html#a59914553f24088342c139645a02a8a49">create_random_array</a></div><div class="ttdeci">static void create_random_array(T *arr, int N)</div><div class="ttdoc">Create a random array objecthelper function to create a random array.</div><div class="ttdef"><b>Definition:</b> insertion_sort.cpp:101</div></div>
<div class="ttc" id="ahash__search_8cpp_html_a566eaf0ffafd50bc61e644561fd27001"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a566eaf0ffafd50bc61e644561fd27001">h</a></div><div class="ttdeci">int h(int key)</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:45</div></div>
<div class="ttc" id="anamespacesorting_html_ae97f4dd815654c4682f564afd718e824"><div class="ttname"><a href="../../d5/d91/namespacesorting.html#ae97f4dd815654c4682f564afd718e824">sorting::non_recursive_merge_sort</a></div><div class="ttdeci">void non_recursive_merge_sort(const Iterator first, const Iterator last)</div><div class="ttdoc">bottom-up merge sort which sorts elements in a non-decreasing order</div><div class="ttdef"><b>Definition:</b> non_recursive_merge_sort.cpp:86</div></div>
@@ -300,7 +327,9 @@ Functions</h2></td></tr>
<div class="ttc" id="aternary__search_8cpp_html_a23ad617bfce1e7cf4591059c85c1a027"><div class="ttname"><a href="../../dc/dfe/ternary__search_8cpp.html#a23ad617bfce1e7cf4591059c85c1a027">_target</a></div><div class="ttdeci">#define _target</div><div class="ttdef"><b>Definition:</b> ternary_search.cpp:27</div></div>
<div class="ttc" id="abogo__sort_8cpp_html_ae1a3968e7947464bee7714f6d43b7002"><div class="ttname"><a href="../../d5/ddb/bogo__sort_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a></div><div class="ttdeci">void test()</div><div class="ttdef"><b>Definition:</b> bogo_sort.cpp:78</div></div>
<div class="ttc" id="abinary__search_8cpp_html_a78df202b718cfe3c2c9216979b08298d"><div class="ttname"><a href="../../df/dd5/binary__search_8cpp.html#a78df202b718cfe3c2c9216979b08298d">binary_search</a></div><div class="ttdeci">int binary_search(int a[], int r, int key)</div><div class="ttdef"><b>Definition:</b> binary_search.cpp:15</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="aparanthesis__matching_8cpp_html_ade525d33459755a32ba21e1b6910ff21"><div class="ttname"><a href="../../dc/dc5/paranthesis__matching_8cpp.html#ade525d33459755a32ba21e1b6910ff21">opening</a></div><div class="ttdeci">char opening(char ch)</div><div class="ttdef"><b>Definition:</b> paranthesis_matching.cpp:36</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="ahappy__number_8cpp_html_a00ccdb1166a7c83ac3c33ac67a2532b7"><div class="ttname"><a href="../../db/df3/happy__number_8cpp.html#a00ccdb1166a7c83ac3c33ac67a2532b7">is_happy</a></div><div class="ttdeci">bool is_happy(T n)</div><div class="ttdef"><b>Definition:</b> happy_number.cpp:14</div></div>
<div class="ttc" id="anamespacestring__search_html_aebe07cea289a13142503d98be7df11fd"><div class="ttname"><a href="../../d9/d03/namespacestring__search.html#aebe07cea289a13142503d98be7df11fd">string_search::check_if_equal</a></div><div class="ttdeci">bool check_if_equal(const std::string &amp;str1, const std::string &amp;str2, int start1, int end1, int start2, int end2)</div><div class="ttdef"><b>Definition:</b> rabin_karp.cpp:60</div></div>
<div class="ttc" id="amedian__search_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d9/d69/median__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> median_search.cpp:38</div></div>
@@ -314,11 +343,13 @@ Functions</h2></td></tr>
<div class="ttc" id="apoisson__dist_8cpp_html_ad9c9e74079278ca10e3b97a8d5391c9a"><div class="ttname"><a href="../../d9/d24/poisson__dist_8cpp.html#ad9c9e74079278ca10e3b97a8d5391c9a">poisson_range_successes</a></div><div class="ttdeci">double poisson_range_successes(double expected, double lower, double upper)</div><div class="ttdef"><b>Definition:</b> poisson_dist.cpp:54</div></div>
<div class="ttc" id="atower__of__hanoi_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../db/d3c/tower__of__hanoi_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> tower_of_hanoi.cpp:65</div></div>
<div class="ttc" id="anamespacesorting_html_a140d913e42fb94176a0b2c8b29a80420"><div class="ttname"><a href="../../d5/d91/namespacesorting.html#a140d913e42fb94176a0b2c8b29a80420">sorting::non_recursive_merge_sort</a></div><div class="ttdeci">void non_recursive_merge_sort(const Iterator first, const Iterator last, const size_t n)</div><div class="ttdoc">bottom-up merge sort which sorts elements in a non-decreasing order</div><div class="ttdef"><b>Definition:</b> non_recursive_merge_sort.cpp:25</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="amatrix__exponentiation_8cpp_html_ae1d1ec9482079231e898236e2b23c9ba"><div class="ttname"><a href="../../d7/d35/matrix__exponentiation_8cpp.html#ae1d1ec9482079231e898236e2b23c9ba">ll</a></div><div class="ttdeci">#define ll</div><div class="ttdef"><b>Definition:</b> matrix_exponentiation.cpp:33</div></div>
<div class="ttc" id="aerase_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/erase.html">std::string::erase</a></div><div class="ttdeci">T erase(T... args)</div></div>
<div class="ttc" id="avalarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a></div><div class="ttdoc">STL class.</div></div>
<div class="ttc" id="abinomial__dist_8cpp_html_af09e51f513cee647d41192ab0a872cdc"><div class="ttname"><a href="../../d6/db0/binomial__dist_8cpp.html#af09e51f513cee647d41192ab0a872cdc">binomial_standard_deviation</a></div><div class="ttdeci">double binomial_standard_deviation(double n, double p)</div><div class="ttdef"><b>Definition:</b> binomial_dist.cpp:36</div></div>
<div class="ttc" id="anamespacesorting_html_a2f8bc626eb57acae24a94636a23af6a1"><div class="ttname"><a href="../../d5/d91/namespacesorting.html#a2f8bc626eb57acae24a94636a23af6a1">sorting::gnomeSort</a></div><div class="ttdeci">void gnomeSort(T *arr, int size)</div><div class="ttdef"><b>Definition:</b> gnome_sort.cpp:34</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a350157a5fb79f76fceae33fc84171203"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">range_queries::heavy_light_decomposition::Tree::t_par</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; int &gt; &gt; t_par</div><div class="ttdoc">a matrix to store every node's 2^kth parent</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:87</div></div>
<div class="ttc" id="asmallest__circle_8cpp_html_a94682a4a70d5906857ca09de5b9fb2cc"><div class="ttname"><a href="../../d0/d01/smallest__circle_8cpp.html#a94682a4a70d5906857ca09de5b9fb2cc">TriangleArea</a></div><div class="ttdeci">double TriangleArea(const Point &amp;A, const Point &amp;B, const Point &amp;C)</div><div class="ttdef"><b>Definition:</b> smallest_circle.cpp:54</div></div>
<div class="ttc" id="abrute__force__string__searching_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d3/d7d/brute__force__string__searching_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> brute_force_string_searching.cpp:47</div></div>
<div class="ttc" id="ainteger_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/integer.html">std::int64_t</a></div></div>
@@ -349,28 +380,38 @@ Functions</h2></td></tr>
<div class="ttc" id="aheap__sort_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d2/d52/heap__sort_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> heap_sort.cpp:120</div></div>
<div class="ttc" id="ahash__search_8cpp_html_af413b1740073db54796642b0ab814d6d"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#af413b1740073db54796642b0ab814d6d">hashtab</a></div><div class="ttdeci">node hashtab[HASHMAX]</div><div class="ttdoc">array of nodes</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:35</div></div>
<div class="ttc" id="asubstr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/substr.html">std::string::substr</a></div><div class="ttdeci">T substr(T... args)</div></div>
<div class="ttc" id="anamespaceheavy__light__decomposition_html"><div class="ttname"><a href="../../db/d6f/namespaceheavy__light__decomposition.html">heavy_light_decomposition</a></div><div class="ttdoc">Heavy light decomposition algorithm.</div></div>
<div class="ttc" id="aternary__search_8cpp_html_ae30dfe2894191bfeffe5b3b1854b95b0"><div class="ttname"><a href="../../dc/dfe/ternary__search_8cpp.html#ae30dfe2894191bfeffe5b3b1854b95b0">it_ternary_search</a></div><div class="ttdeci">int it_ternary_search(int left, int right, int A[], int target)</div><div class="ttdef"><b>Definition:</b> ternary_search.cpp:48</div></div>
<div class="ttc" id="ajump__search_8cpp_html_ab49fd8f401bfc71f63b74711390cccf0"><div class="ttname"><a href="../../d2/d22/jump__search_8cpp.html#ab49fd8f401bfc71f63b74711390cccf0">jumpSearch</a></div><div class="ttdeci">int jumpSearch(int arr[], int x, int n)</div><div class="ttdef"><b>Definition:</b> jump_search.cpp:12</div></div>
<div class="ttc" id="ahash__search_8cpp_html_a6e1a77282bc65ad359d753d25df23243"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a></div><div class="ttdeci">int data[MAX]</div><div class="ttdoc">test data</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:24</div></div>
<div class="ttc" id="adecimal__to__binary_8cpp_html_a9240f2e79074a2a248395258aebbfa11"><div class="ttname"><a href="../../df/d06/decimal__to__binary_8cpp.html#a9240f2e79074a2a248395258aebbfa11">method1</a></div><div class="ttdeci">void method1(int number)</div><div class="ttdef"><b>Definition:</b> decimal_to_binary.cpp:11</div></div>
<div class="ttc" id="aqr__eigen__values_8cpp_html_a1440a7779ac56f47a3f355ce4a8c7da0"><div class="ttname"><a href="../../de/d75/qr__eigen__values_8cpp.html#a1440a7779ac56f47a3f355ce4a8c7da0">test1</a></div><div class="ttdeci">void test1()</div><div class="ttdef"><b>Definition:</b> qr_eigen_values.cpp:177</div></div>
<div class="ttc" id="afibonacci__search_8cpp_html_a5e144326104e57a3808aed7eb098db0d"><div class="ttname"><a href="../../de/d0d/fibonacci__search_8cpp.html#a5e144326104e57a3808aed7eb098db0d">no_occurence_tests</a></div><div class="ttdeci">bool no_occurence_tests()</div><div class="ttdoc">random tests for checking performance when an array doesn't contain an element</div><div class="ttdef"><b>Definition:</b> fibonacci_search.cpp:72</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>
<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="aheap__sort_8cpp_html_a9ed3e1510afdf3edd06cf2b68769a767"><div class="ttname"><a href="../../d2/d52/heap__sort_8cpp.html#a9ed3e1510afdf3edd06cf2b68769a767">printArray</a></div><div class="ttdeci">void printArray(T *arr, int sz)</div><div class="ttdef"><b>Definition:</b> heap_sort.cpp:37</div></div>
<div class="ttc" id="alower_bound_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/lower_bound.html">std::lower_bound</a></div><div class="ttdeci">T lower_bound(T... args)</div></div>
<div class="ttc" id="ahash__search_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:99</div></div>
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a135b7952593c9b1aae38fcaf1cc1abf7"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">range_queries::heavy_light_decomposition::Tree::t_val</a></div><div class="ttdeci">std::vector&lt; X &gt; t_val</div><div class="ttdoc">values of nodes</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:92</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_ac6d912bbfafa3a7509f66bbc1729ca25"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">range_queries::heavy_light_decomposition::SG::s_size</a></div><div class="ttdeci">int s_size</div><div class="ttdoc">number of leaves in the segment tree</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:263</div></div>
<div class="ttc" id="aleft_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/left.html">std::left</a></div><div class="ttdeci">T left(T... args)</div></div>
<div class="ttc" id="ahash__search_8cpp_html_ad0831425f1389166a9518f422d0c6ec5"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#ad0831425f1389166a9518f422d0c6ec5">create_list</a></div><div class="ttdeci">void create_list(int key)</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:55</div></div>
<div class="ttc" id="apoisson__dist_8cpp_html_a63ffd347e75d5ed7a518cbcfbfeec71a"><div class="ttname"><a href="../../d9/d24/poisson__dist_8cpp.html#a63ffd347e75d5ed7a518cbcfbfeec71a">fact</a></div><div class="ttdeci">double fact(double x)</div><div class="ttdef"><b>Definition:</b> poisson_dist.cpp:30</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_ad3b942be27a1b0fe3cff6cb6edf01294"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ad3b942be27a1b0fe3cff6cb6edf01294">range_queries::heavy_light_decomposition::SG::set_sret_init</a></div><div class="ttdeci">void set_sret_init(X new_sret_init)</div><div class="ttdoc">Set the initialization for the query data type, based on requirement.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:329</div></div>
<div class="ttc" id="aexp_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/exp.html">std::exp</a></div><div class="ttdeci">T exp(T... args)</div></div>
<div class="ttc" id="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/begin.html">std::string::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
<div class="ttc" id="agetline_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/getline.html">std::getline</a></div><div class="ttdeci">T getline(T... args)</div></div>
<div class="ttc" id="anamespacestd_html"><div class="ttname"><a href="../../d8/dcc/namespacestd.html">std</a></div><div class="ttdoc">STL namespace.</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG</a></div><div class="ttdoc">Segment Tree, to store heavy chains.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:254</div></div>
<div class="ttc" id="aheavy__light__decomposition_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d2/de9/heavy__light__decomposition_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:634</div></div>
<div class="ttc" id="aaddition__rule_8cpp_html_a4adfd055c758546456d440ee9133555d"><div class="ttname"><a href="../../d6/d4a/addition__rule_8cpp.html#a4adfd055c758546456d440ee9133555d">addition_rule_independent</a></div><div class="ttdeci">double addition_rule_independent(double A, double B)</div><div class="ttdef"><b>Definition:</b> addition_rule.cpp:14</div></div>
<div class="ttc" id="anamespacesorting_html_a4c5bd73ffb6082f63dc57d8dcc76794f"><div class="ttname"><a href="../../d5/d91/namespacesorting.html#a4c5bd73ffb6082f63dc57d8dcc76794f">sorting::randomized_bogosort</a></div><div class="ttdeci">std::array&lt; T, N &gt; randomized_bogosort(std::array&lt; T, N &gt; arr)</div><div class="ttdef"><b>Definition:</b> bogo_sort.cpp:51</div></div>
<div class="ttc" id="atower__of__hanoi_8cpp_html_a746d9a3984bba88fd6dd91978f6931ed"><div class="ttname"><a href="../../db/d3c/tower__of__hanoi_8cpp.html#a746d9a3984bba88fd6dd91978f6931ed">show</a></div><div class="ttdeci">void show(const struct tower *const F, const struct tower *const T, const struct tower *const U)</div><div class="ttdef"><b>Definition:</b> tower_of_hanoi.cpp:19</div></div>
<div class="ttc" id="asparse__matrix_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d3/d19/sparse__matrix_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> sparse_matrix.cpp:9</div></div>
<div class="ttc" id="asmallest__circle_8cpp_html_ae1a3968e7947464bee7714f6d43b7002"><div class="ttname"><a href="../../d0/d01/smallest__circle_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a></div><div class="ttdeci">void test()</div><div class="ttdef"><b>Definition:</b> smallest_circle.cpp:158</div></div>
<div class="ttc" id="anamespacerange__queries_html"><div class="ttname"><a href="../../dd/d69/namespacerange__queries.html">range_queries</a></div><div class="ttdoc">Algorithms and Data Structures that support range queries and updates.</div></div>
<div class="ttc" id="astructcompare_html"><div class="ttname"><a href="../../d1/db3/structcompare.html">compare</a></div><div class="ttdef"><b>Definition:</b> huffman.cpp:28</div></div>
<div class="ttc" id="aspiral__print_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../db/d07/spiral__print_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> spiral_print.cpp:69</div></div>
<div class="ttc" id="aparanthesis__matching_8cpp_html_a392fb874e547e582e9c66a08a1f23326"><div class="ttname"><a href="../../dc/dc5/paranthesis__matching_8cpp.html#a392fb874e547e582e9c66a08a1f23326">MAX</a></div><div class="ttdeci">#define MAX</div><div class="ttdef"><b>Definition:</b> paranthesis_matching.cpp:16</div></div>
@@ -378,8 +419,10 @@ Functions</h2></td></tr>
<div class="ttc" id="amatrix__exponentiation_8cpp_html_a5769b745458157ef2679949155684f3b"><div class="ttname"><a href="../../d7/d35/matrix__exponentiation_8cpp.html#a5769b745458157ef2679949155684f3b">power</a></div><div class="ttdeci">vector&lt; vector&lt; ll &gt; &gt; power(const vector&lt; vector&lt; ll &gt;&gt; &amp;A, ll p)</div><div class="ttdef"><b>Definition:</b> matrix_exponentiation.cpp:76</div></div>
<div class="ttc" id="anamespacegraph_html"><div class="ttname"><a href="../../df/dce/namespacegraph.html">graph</a></div><div class="ttdoc">Graph algorithms.</div></div>
<div class="ttc" id="asuccessive__approximation_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../df/dc8/successive__approximation_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> successive_approximation.cpp:20</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&lt; int &gt; h_parent</div><div class="ttdoc">stores the top of the heavy chain from a node</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:341</div></div>
<div class="ttc" id="acount_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/count.html">std::count</a></div><div class="ttdeci">T count(T... args)</div></div>
<div class="ttc" id="ainsertion__sort_8cpp_html_a88ec9ad42717780d6caaff9d3d6977f9"><div class="ttname"><a href="../../dd/d0d/insertion__sort_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a></div><div class="ttdeci">void tests()</div><div class="ttdef"><b>Definition:</b> insertion_sort.cpp:109</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_h_l_d_html_a4dfbf5d9df825eeb63b294c6849bdcab"><div class="ttname"><a href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a4dfbf5d9df825eeb63b294c6849bdcab">range_queries::heavy_light_decomposition::HLD::query</a></div><div class="ttdeci">X query(int a, int b)</div><div class="ttdoc">This function returns the sum of node values in the simple path from from node_1 to node_2.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:489</div></div>
<div class="ttc" id="alinear__search_8cpp_html_a84ac3988a534eb60ca351ed6caf56d84"><div class="ttname"><a href="../../d9/d02/linear__search_8cpp.html#a84ac3988a534eb60ca351ed6caf56d84">LinearSearch</a></div><div class="ttdeci">int LinearSearch(int *array, int size, int key)</div><div class="ttdef"><b>Definition:</b> linear_search.cpp:16</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="aprimality__test_8cpp_html_a2bfa6adead2bdcbf1dac94cbe08d7eaf"><div class="ttname"><a href="../../da/d7b/primality__test_8cpp.html#a2bfa6adead2bdcbf1dac94cbe08d7eaf">IsPrime</a></div><div class="ttdeci">bool IsPrime(int number)</div><div class="ttdef"><b>Definition:</b> primality_test.cpp:18</div></div>
@@ -390,6 +433,7 @@ Functions</h2></td></tr>
<div class="ttc" id="aspiral__print_8cpp_html_acfff36db81326fb990a643ab198ee8a5"><div class="ttname"><a href="../../db/d07/spiral__print_8cpp.html#acfff36db81326fb990a643ab198ee8a5">genArray</a></div><div class="ttdeci">void genArray(int **a, int r, int c)</div><div class="ttdef"><b>Definition:</b> spiral_print.cpp:12</div></div>
<div class="ttc" id="acomb__sort_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d9/dfd/comb__sort_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> comb_sort.cpp:88</div></div>
<div class="ttc" id="ahill__cipher_8cpp_html_aeff09ac6b8f060c828354394a3189519"><div class="ttname"><a href="../../d7/db9/hill__cipher_8cpp.html#aeff09ac6b8f060c828354394a3189519">operator&lt;&lt;</a></div><div class="ttdeci">static std::ostream &amp; operator&lt;&lt;(std::ostream &amp;out, matrix&lt; T &gt; const &amp;v)</div><div class="ttdef"><b>Definition:</b> hill_cipher.cpp:54</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_aa339c31ec74cd86a4842a8b09653d460"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460">range_queries::heavy_light_decomposition::Tree::dfs_size</a></div><div class="ttdeci">void dfs_size(int u, int p=-1)</div><div class="ttdoc">Utility function to compute sub-tree sizes.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:101</div></div>
<div class="ttc" id="ainterpolation__search_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d9/dd7/interpolation__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> interpolation_search.cpp:37</div></div>
<div class="ttc" id="astring__fibonacci_8cpp_html_a28052eee05d43c2ebc5147c52bd50c35"><div class="ttname"><a href="../../de/d47/string__fibonacci_8cpp.html#a28052eee05d43c2ebc5147c52bd50c35">add</a></div><div class="ttdeci">std::string add(std::string a, std::string b)</div><div class="ttdef"><b>Definition:</b> string_fibonacci.cpp:24</div></div>
<div class="ttc" id="atime_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a></div><div class="ttdeci">T time(T... args)</div></div>
@@ -402,9 +446,11 @@ Functions</h2></td></tr>
<div class="ttc" id="asetw_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/setw.html">std::setw</a></div><div class="ttdeci">T setw(T... args)</div></div>
<div class="ttc" id="aquick__sort_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d1/d21/quick__sort_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> quick_sort.cpp:82</div></div>
<div class="ttc" id="amax_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a></div><div class="ttdeci">T max(T... args)</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_ab916d554afa8ca5230b4310c2c69fae0"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">range_queries::heavy_light_decomposition::Tree::change_root</a></div><div class="ttdeci">void change_root(int new_root)</div><div class="ttdoc">Set the root for the tree.</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:167</div></div>
<div class="ttc" id="aclass_fenwick_tree_html_a70f8c261393ca09ec1ad716ac806ead6"><div class="ttname"><a href="../../dd/d91/class_fenwick_tree.html#a70f8c261393ca09ec1ad716ac806ead6">FenwickTree::FenwickTree</a></div><div class="ttdeci">FenwickTree(int x)</div><div class="ttdef"><b>Definition:</b> fenwick_tree.cpp:39</div></div>
<div class="ttc" id="astruct_point_html_ae2d6fb1b3fd3a96169d963d62e37130a"><div class="ttname"><a href="../../d8/dc8/struct_point.html#ae2d6fb1b3fd3a96169d963d62e37130a">Point::Point</a></div><div class="ttdeci">Point(double a=0.f, double b=0.f)</div><div class="ttdef"><b>Definition:</b> smallest_circle.cpp:23</div></div>
<div class="ttc" id="aprimality__test_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../da/d7b/primality__test_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> primality_test.cpp:31</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&lt; int &gt; h_label</div><div class="ttdoc">stores the label of a node</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:339</div></div>
<div class="ttc" id="astructlist_html_a1900fe79e875e2838625b2eb60837f8f"><div class="ttname"><a href="../../d8/d10/structlist.html#a1900fe79e875e2838625b2eb60837f8f">list::next</a></div><div class="ttdeci">struct list * next</div><div class="ttdoc">pointer to next link in the chain</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:31</div></div>
<div class="ttc" id="astructtower_html_acb535964abd34c47678a4ade0628223d"><div class="ttname"><a href="../../d2/d2c/structtower.html#acb535964abd34c47678a4ade0628223d">tower::top</a></div><div class="ttdeci">int top</div><div class="ttdoc">top tower ID</div><div class="ttdef"><b>Definition:</b> tower_of_hanoi.cpp:15</div></div>
<div class="ttc" id="astruct_point_html"><div class="ttname"><a href="../../d8/dc8/struct_point.html">Point</a></div><div class="ttdef"><b>Definition:</b> line_segment_intersection.cpp:12</div></div>
@@ -431,6 +477,7 @@ Functions</h2></td></tr>
<div class="ttc" id="acomb__sort_8cpp_html_a88ec9ad42717780d6caaff9d3d6977f9"><div class="ttname"><a href="../../d9/dfd/comb__sort_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a></div><div class="ttdeci">void tests()</div><div class="ttdef"><b>Definition:</b> comb_sort.cpp:73</div></div>
<div class="ttc" id="astructlist_html"><div class="ttname"><a href="../../d8/d10/structlist.html">list</a></div><div class="ttdef"><b>Definition:</b> list_array.cpp:8</div></div>
<div class="ttc" id="amemset_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/byte/memset.html">std::memset</a></div><div class="ttdeci">T memset(T... args)</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_tree_html_a0efd0b9c564092f443ca97030d866ef1"><div class="ttname"><a href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">range_queries::heavy_light_decomposition::Tree::t_depth</a></div><div class="ttdeci">std::vector&lt; int &gt; t_depth</div><div class="ttdoc">a vector to store the depth of a node,</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:88</div></div>
<div class="ttc" id="abinomial__dist_8cpp_html_acd4dd4558031e4c5d045c801f73d8861"><div class="ttname"><a href="../../d6/db0/binomial__dist_8cpp.html#acd4dd4558031e4c5d045c801f73d8861">binomial_variance</a></div><div class="ttdeci">double binomial_variance(double n, double p)</div><div class="ttdef"><b>Definition:</b> binomial_dist.cpp:29</div></div>
<div class="ttc" id="anamespacemachine__learning_html_a5305cc18d11943d3dc0d66e70d7e9c44"><div class="ttname"><a href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44">machine_learning::sum</a></div><div class="ttdeci">T sum(const std::vector&lt; std::valarray&lt; T &gt;&gt; &amp;A)</div><div class="ttdef"><b>Definition:</b> vector_ops.hpp:228</div></div>
<div class="ttc" id="anext_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/iterator/next.html">std::next</a></div><div class="ttdeci">T next(T... args)</div></div>

View File

@@ -0,0 +1,120 @@
<!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++: Member List</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++
&#160;<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&amp;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&amp;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&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.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="headertitle">
<div class="title">range_queries::heavy_light_decomposition::SG&lt; X &gt; Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">combine</a>(X lhs, X rhs)</td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>HLD</b> (defined in <a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a>)</td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a1fda852e6e522707fd97f61cdb0a2591">query</a>(int l, int r)</td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a></td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">s_tree</a></td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ad3b942be27a1b0fe3cff6cb6edf01294">set_sret_init</a>(X new_sret_init)</td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afba5c1225ba04c0025c7786c09ff28f1">SG</a>(int size)</td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">sret_init</a></td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c">update</a>(int p, X v)</td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
</table></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<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>

View File

@@ -332,6 +332,7 @@ Probability</h1>
Range Queries</h1>
<ul>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/fenwick_tree.cpp">Fenwick Tree</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/heavy_light_decomposition.cpp">Heavy Light Decomposition</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/mo.cpp">Mo</a></li>
<li><a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/range_queries/segtree.cpp">Segtree</a></li>
</ul>

View File

@@ -0,0 +1,12 @@
<map id="range_queries/heavy_light_decomposition.cpp" name="range_queries/heavy_light_decomposition.cpp">
<area shape="rect" id="node1" title="Heavy Light Decomposition implementation" alt="" coords="314,5,483,47"/>
<area shape="rect" id="node2" title=" " alt="" coords="5,95,80,121"/>
<area shape="rect" id="node3" title=" " alt="" coords="105,95,170,121"/>
<area shape="rect" id="node4" title=" " alt="" coords="195,95,253,121"/>
<area shape="rect" id="node5" title=" " alt="" coords="277,95,339,121"/>
<area shape="rect" id="node6" title=" " alt="" coords="363,95,435,121"/>
<area shape="rect" id="node7" title=" " alt="" coords="459,95,498,121"/>
<area shape="rect" id="node8" title=" " alt="" coords="522,95,590,121"/>
<area shape="rect" id="node9" title=" " alt="" coords="614,95,669,121"/>
<area shape="rect" id="node10" title=" " alt="" coords="693,95,752,121"/>
</map>

View File

@@ -0,0 +1 @@
108ca232924a02ff6933e026d475b272

View File

@@ -0,0 +1,246 @@
<?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.cpp Pages: 1 -->
<!--zoomable 95 -->
<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 = 568;
var viewHeight = 95;
var sectionId = 'dynsection-0';
</script>
<script xlink:href="../../svgpan.js"/>
<svg id="graph" class="graph">
<g id="viewport">
<title>range_queries/heavy_light_decomposition.cpp</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-91 564,-91 564,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Heavy Light Decomposition implementation">
<polygon fill="#bfbfbf" stroke="black" points="231.5,-56.5 231.5,-86.5 358.5,-86.5 358.5,-56.5 231.5,-56.5"/>
<text text-anchor="start" x="239.5" y="-74.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries/heavy</text>
<text text-anchor="middle" x="295" y="-63.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition.cpp</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="0,-0.5 0,-19.5 56,-19.5 56,-0.5 0,-0.5"/>
<text text-anchor="middle" x="28" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">algorithm</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M231.46,-56.95C187.58,-47.5 127.62,-34.41 66.14,-20.23"/>
<polygon fill="midnightblue" stroke="midnightblue" points="66.8,-16.79 56.27,-17.94 65.22,-23.61 66.8,-16.79"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="74.5,-0.5 74.5,-19.5 123.5,-19.5 123.5,-0.5 74.5,-0.5"/>
<text text-anchor="middle" x="99" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">cassert</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M248.55,-56.4C213.21,-45.67 165.36,-31.14 133.4,-21.44"/>
<polygon fill="midnightblue" stroke="midnightblue" points="134.2,-18.03 123.62,-18.47 132.17,-24.73 134.2,-18.03"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="142,-0.5 142,-19.5 186,-19.5 186,-0.5 142,-0.5"/>
<text text-anchor="middle" x="164" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">cmath</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M263.95,-56.4C242.27,-46.55 213.54,-33.5 192.45,-23.92"/>
<polygon fill="midnightblue" stroke="midnightblue" points="193.61,-20.61 183.06,-19.66 190.72,-26.98 193.61,-20.61"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="204,-0.5 204,-19.5 250,-19.5 250,-0.5 204,-0.5"/>
<text text-anchor="middle" x="227" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">cstring</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node1&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M278.88,-56.4C268.6,-47.4 255.25,-35.72 244.67,-26.47"/>
<polygon fill="midnightblue" stroke="midnightblue" points="246.73,-23.61 236.89,-19.66 242.12,-28.88 246.73,-23.61"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="268,-0.5 268,-19.5 322,-19.5 322,-0.5 268,-0.5"/>
<text text-anchor="middle" x="295" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node1&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M295,-56.4C295,-48.47 295,-38.46 295,-29.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="298.5,-29.66 295,-19.66 291.5,-29.66 298.5,-29.66"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="340.5,-0.5 340.5,-19.5 369.5,-19.5 369.5,-0.5 340.5,-0.5"/>
<text text-anchor="middle" x="355" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">list</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node1&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M309.22,-56.4C318.21,-47.49 329.84,-35.95 339.13,-26.74"/>
<polygon fill="midnightblue" stroke="midnightblue" points="341.63,-29.18 346.27,-19.66 336.7,-24.21 341.63,-29.18"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="387.5,-0.5 387.5,-19.5 438.5,-19.5 438.5,-0.5 387.5,-0.5"/>
<text text-anchor="middle" x="413" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">numeric</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node1&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M322.96,-56.4C342.32,-46.64 367.91,-33.74 386.86,-24.18"/>
<polygon fill="midnightblue" stroke="midnightblue" points="388.48,-27.29 395.83,-19.66 385.33,-21.04 388.48,-27.29"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="456.5,-0.5 456.5,-19.5 497.5,-19.5 497.5,-0.5 456.5,-0.5"/>
<text text-anchor="middle" x="477" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">string</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node1&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M338.13,-56.4C371.42,-45.52 416.65,-30.73 446.32,-21.03"/>
<polygon fill="midnightblue" stroke="midnightblue" points="447.7,-24.26 456.12,-17.83 445.53,-17.61 447.7,-24.26"/>
</g>
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="516,-0.5 516,-19.5 560,-19.5 560,-0.5 516,-0.5"/>
<text text-anchor="middle" x="538" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node1&#45;&gt;Node10</title>
<path fill="none" stroke="midnightblue" d="M357.35,-56.49C397.29,-47.32 450.45,-34.76 505.71,-20.25"/>
<polygon fill="midnightblue" stroke="midnightblue" points="506.91,-23.56 515.69,-17.62 505.12,-16.79 506.91,-23.56"/>
</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__incl_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: 12 KiB

View File

@@ -0,0 +1,158 @@
<?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.cpp Pages: 1 -->
<svg width="568pt" height="95pt"
viewBox="0.00 0.00 568.00 95.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 91)">
<title>range_queries/heavy_light_decomposition.cpp</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-91 564,-91 564,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Heavy Light Decomposition implementation">
<polygon fill="#bfbfbf" stroke="black" points="231.5,-56.5 231.5,-86.5 358.5,-86.5 358.5,-56.5 231.5,-56.5"/>
<text text-anchor="start" x="239.5" y="-74.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries/heavy</text>
<text text-anchor="middle" x="295" y="-63.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition.cpp</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="0,-0.5 0,-19.5 56,-19.5 56,-0.5 0,-0.5"/>
<text text-anchor="middle" x="28" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">algorithm</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M231.46,-56.95C187.58,-47.5 127.62,-34.41 66.14,-20.23"/>
<polygon fill="midnightblue" stroke="midnightblue" points="66.8,-16.79 56.27,-17.94 65.22,-23.61 66.8,-16.79"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="74.5,-0.5 74.5,-19.5 123.5,-19.5 123.5,-0.5 74.5,-0.5"/>
<text text-anchor="middle" x="99" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">cassert</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M248.55,-56.4C213.21,-45.67 165.36,-31.14 133.4,-21.44"/>
<polygon fill="midnightblue" stroke="midnightblue" points="134.2,-18.03 123.62,-18.47 132.17,-24.73 134.2,-18.03"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="142,-0.5 142,-19.5 186,-19.5 186,-0.5 142,-0.5"/>
<text text-anchor="middle" x="164" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">cmath</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M263.95,-56.4C242.27,-46.55 213.54,-33.5 192.45,-23.92"/>
<polygon fill="midnightblue" stroke="midnightblue" points="193.61,-20.61 183.06,-19.66 190.72,-26.98 193.61,-20.61"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="204,-0.5 204,-19.5 250,-19.5 250,-0.5 204,-0.5"/>
<text text-anchor="middle" x="227" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">cstring</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node1&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M278.88,-56.4C268.6,-47.4 255.25,-35.72 244.67,-26.47"/>
<polygon fill="midnightblue" stroke="midnightblue" points="246.73,-23.61 236.89,-19.66 242.12,-28.88 246.73,-23.61"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="268,-0.5 268,-19.5 322,-19.5 322,-0.5 268,-0.5"/>
<text text-anchor="middle" x="295" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node1&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M295,-56.4C295,-48.47 295,-38.46 295,-29.86"/>
<polygon fill="midnightblue" stroke="midnightblue" points="298.5,-29.66 295,-19.66 291.5,-29.66 298.5,-29.66"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="340.5,-0.5 340.5,-19.5 369.5,-19.5 369.5,-0.5 340.5,-0.5"/>
<text text-anchor="middle" x="355" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">list</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node1&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M309.22,-56.4C318.21,-47.49 329.84,-35.95 339.13,-26.74"/>
<polygon fill="midnightblue" stroke="midnightblue" points="341.63,-29.18 346.27,-19.66 336.7,-24.21 341.63,-29.18"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="387.5,-0.5 387.5,-19.5 438.5,-19.5 438.5,-0.5 387.5,-0.5"/>
<text text-anchor="middle" x="413" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">numeric</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node1&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M322.96,-56.4C342.32,-46.64 367.91,-33.74 386.86,-24.18"/>
<polygon fill="midnightblue" stroke="midnightblue" points="388.48,-27.29 395.83,-19.66 385.33,-21.04 388.48,-27.29"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="456.5,-0.5 456.5,-19.5 497.5,-19.5 497.5,-0.5 456.5,-0.5"/>
<text text-anchor="middle" x="477" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">string</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node1&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M338.13,-56.4C371.42,-45.52 416.65,-30.73 446.32,-21.03"/>
<polygon fill="midnightblue" stroke="midnightblue" points="447.7,-24.26 456.12,-17.83 445.53,-17.61 447.7,-24.26"/>
</g>
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a xlink:title=" ">
<polygon fill="white" stroke="#bfbfbf" points="516,-0.5 516,-19.5 560,-19.5 560,-0.5 516,-0.5"/>
<text text-anchor="middle" x="538" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">vector</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node1&#45;&gt;Node10</title>
<path fill="none" stroke="midnightblue" d="M357.35,-56.49C397.29,-47.32 450.45,-34.76 505.71,-20.25"/>
<polygon fill="midnightblue" stroke="midnightblue" points="506.91,-23.56 515.69,-17.62 505.12,-16.79 506.91,-23.56"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -0,0 +1,470 @@
<!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::SG&lt; X &gt; 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++
&#160;<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&amp;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&amp;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&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.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="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="../../d3/de4/classrange__queries_1_1heavy__light__decomposition_1_1_s_g-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">range_queries::heavy_light_decomposition::SG&lt; X &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>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></p>
<div class="dynheader">
Inheritance diagram for range_queries::heavy_light_decomposition::SG&lt; X &gt;:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/de6/classrange__queries_1_1heavy__light__decomposition_1_1_s_g__inherit__graph.svg" width="158" height="171"><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::SG&lt; X &gt;:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d67/classrange__queries_1_1heavy__light__decomposition_1_1_s_g__coll__graph.svg" width="158" height="156"><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>
<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:a41c733f5f5e262b308f7cb95c88c1e74"><td class="memItemLeft" align="right" valign="top">X&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">combine</a> (X lhs, X rhs)</td></tr>
<tr class="memdesc:a41c733f5f5e262b308f7cb95c88c1e74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that specifies the type of operation involved when segments are combined. <a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">More...</a><br /></td></tr>
<tr class="separator:a41c733f5f5e262b308f7cb95c88c1e74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afba5c1225ba04c0025c7786c09ff28f1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afba5c1225ba04c0025c7786c09ff28f1">SG</a> (int size)</td></tr>
<tr class="memdesc:afba5c1225ba04c0025c7786c09ff28f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Class parameterized constructor. Resizes the and initilizes the data members. <a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afba5c1225ba04c0025c7786c09ff28f1">More...</a><br /></td></tr>
<tr class="separator:afba5c1225ba04c0025c7786c09ff28f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c75bf5770790f8eba8cc92227b5400c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c">update</a> (int p, X v)</td></tr>
<tr class="memdesc:a3c75bf5770790f8eba8cc92227b5400c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the value at a node. <a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c">More...</a><br /></td></tr>
<tr class="separator:a3c75bf5770790f8eba8cc92227b5400c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fda852e6e522707fd97f61cdb0a2591"><td class="memItemLeft" align="right" valign="top">X&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a1fda852e6e522707fd97f61cdb0a2591">query</a> (int l, int r)</td></tr>
<tr class="memdesc:a1fda852e6e522707fd97f61cdb0a2591"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make a range query from node label l to node label r. <a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a1fda852e6e522707fd97f61cdb0a2591">More...</a><br /></td></tr>
<tr class="separator:a1fda852e6e522707fd97f61cdb0a2591"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3b942be27a1b0fe3cff6cb6edf01294"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ad3b942be27a1b0fe3cff6cb6edf01294">set_sret_init</a> (X new_sret_init)</td></tr>
<tr class="memdesc:ad3b942be27a1b0fe3cff6cb6edf01294"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the initialization for the query data type, based on requirement. <a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ad3b942be27a1b0fe3cff6cb6edf01294">More...</a><br /></td></tr>
<tr class="separator:ad3b942be27a1b0fe3cff6cb6edf01294"><td class="memSeparator" colspan="2">&#160;</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:afbf8a9cb9449d5ca844f4e141a801e6a"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; X &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">s_tree</a></td></tr>
<tr class="memdesc:afbf8a9cb9449d5ca844f4e141a801e6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Everything here is private, and can only be accessed through the methods, in the derived class (<a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html" title="The Heavy-Light Decomposition class.">HLD</a>) <a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">More...</a><br /></td></tr>
<tr class="separator:afbf8a9cb9449d5ca844f4e141a801e6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6d912bbfafa3a7509f66bbc1729ca25"><td class="memItemLeft" align="right" valign="top"><a id="ac6d912bbfafa3a7509f66bbc1729ca25"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a></td></tr>
<tr class="memdesc:ac6d912bbfafa3a7509f66bbc1729ca25"><td class="mdescLeft">&#160;</td><td class="mdescRight">number of leaves in the segment tree <br /></td></tr>
<tr class="separator:ac6d912bbfafa3a7509f66bbc1729ca25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7f93971a9f891e0bbb7023081f379d5"><td class="memItemLeft" align="right" valign="top"><a id="aa7f93971a9f891e0bbb7023081f379d5"></a>
X&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">sret_init</a> = 0</td></tr>
<tr class="memdesc:aa7f93971a9f891e0bbb7023081f379d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">inital query return value <br /></td></tr>
<tr class="separator:aa7f93971a9f891e0bbb7023081f379d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:afcdadbdea1e2391cebbb17d2c1ae2f0b"><td class="memTemplParams" colspan="2"><a id="afcdadbdea1e2391cebbb17d2c1ae2f0b"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:afcdadbdea1e2391cebbb17d2c1ae2f0b"><td class="memTemplItemLeft" align="right" valign="top">class&#160;</td><td class="memTemplItemRight" valign="bottom"><b>HLD</b></td></tr>
<tr class="separator:afcdadbdea1e2391cebbb17d2c1ae2f0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename X&gt;<br />
class range_queries::heavy_light_decomposition::SG&lt; X &gt;</h3>
<p>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. </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 &amp; Destructor Documentation</h2>
<a id="afba5c1225ba04c0025c7786c09ff28f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afba5c1225ba04c0025c7786c09ff28f1">&#9670;&nbsp;</a></span>SG()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG</a>&lt; X &gt;::<a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG</a> </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>size</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 class="mlabel">private</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>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; {</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a> = size;</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">s_tree</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/assign.html">assign</a>(2 * <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a>, 0ll);</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a41c733f5f5e262b308f7cb95c88c1e74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41c733f5f5e262b308f7cb95c88c1e74">&#9670;&nbsp;</a></span>combine()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">X <a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG</a>&lt; X &gt;::combine </td>
<td>(</td>
<td class="paramtype">X&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">X&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</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>Function that specifies the type of operation involved when segments are combined. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">lhs</td><td>the left segment </td></tr>
<tr><td class="paramname">rhs</td><td>the right segment </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the combined result </dd></dl>
<div class="fragment"><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160;{ <span class="keywordflow">return</span> lhs + rhs; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a1fda852e6e522707fd97f61cdb0a2591"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fda852e6e522707fd97f61cdb0a2591">&#9670;&nbsp;</a></span>query()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">X <a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG</a>&lt; X &gt;::<a class="el" href="../../dd/d1b/structquery.html">query</a> </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>l</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>r</em>&#160;</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>Make a range query from node label l to node label r. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">l</td><td>node label where the path starts </td></tr>
<tr><td class="paramname">r</td><td>node label where the path ends </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; {</div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; X lhs = <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">sret_init</a>, rhs = <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">sret_init</a>;</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; <span class="keywordflow">for</span> (l += <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a>, r += <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a> + 1; l &lt; r; l &gt;&gt;= 1, r &gt;&gt;= 1) {</div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; <span class="keywordflow">if</span> (l &amp; 1) {</div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; lhs = <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">combine</a>(lhs, <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">s_tree</a>[l++]);</div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; }</div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; <span class="keywordflow">if</span> (r &amp; 1) {</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; rhs = <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">combine</a>(<a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">s_tree</a>[--r], rhs);</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; }</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; }</div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; <span class="keywordflow">return</span> <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">combine</a>(lhs, rhs);</div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; }</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="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g_a1fda852e6e522707fd97f61cdb0a2591_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>
<a id="ad3b942be27a1b0fe3cff6cb6edf01294"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3b942be27a1b0fe3cff6cb6edf01294">&#9670;&nbsp;</a></span>set_sret_init()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG</a>&lt; X &gt;::set_sret_init </td>
<td>(</td>
<td class="paramtype">X&#160;</td>
<td class="paramname"><em>new_sret_init</em></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>Set the initialization for the query data type, based on requirement. </p>
<p>Change the sret_init, based on requirement:</p><ul>
<li>Sum Query: 0 (Default)</li>
<li><a class="el" href="../../d7/d47/namespace_x_o_r.html" title="Functions for XOR cipher algorithm.">XOR</a> Query: 0 (Default)</li>
<li>Min Query: Infinity</li>
<li>Max Query: -Infinity <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">new_sret_init</td><td>the new init </td></tr>
</table>
</dd>
</dl>
</li>
</ul>
<div class="fragment"><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160;{ <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">sret_init</a> = new_sret_init; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a3c75bf5770790f8eba8cc92227b5400c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c75bf5770790f8eba8cc92227b5400c">&#9670;&nbsp;</a></span>update()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG</a>&lt; X &gt;::update </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>p</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">X&#160;</td>
<td class="paramname"><em>v</em>&#160;</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>Update the value at a node. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>the node to be udpated </td></tr>
<tr><td class="paramname">v</td><td>the update value </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; {</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; <span class="keywordflow">for</span> (p += <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a>; p &gt; 0; p &gt;&gt;= 1) {</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <a class="code" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">s_tree</a>[p] += v;</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; }</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="afbf8a9cb9449d5ca844f4e141a801e6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbf8a9cb9449d5ca844f4e141a801e6a">&#9670;&nbsp;</a></span>s_tree</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename X &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt;X&gt; <a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG</a>&lt; X &gt;::s_tree</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Everything here is private, and can only be accessed through the methods, in the derived class (<a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html" title="The Heavy-Light Decomposition class.">HLD</a>) </p>
<p>the segment tree, stored as a vector </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>range_queries/<a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp.html">heavy_light_decomposition.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<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="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_afbf8a9cb9449d5ca844f4e141a801e6a"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">range_queries::heavy_light_decomposition::SG::s_tree</a></div><div class="ttdeci">std::vector&lt; X &gt; s_tree</div><div class="ttdoc">Everything here is private, and can only be accessed through the methods, in the derived class (HLD)</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:262</div></div>
<div class="ttc" id="aclassrange__queries_1_1heavy__light__decomposition_1_1_s_g_html_ac6d912bbfafa3a7509f66bbc1729ca25"><div class="ttname"><a href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">range_queries::heavy_light_decomposition::SG::s_size</a></div><div class="ttdeci">int s_size</div><div class="ttdoc">number of leaves in the segment tree</div><div class="ttdef"><b>Definition:</b> heavy_light_decomposition.cpp:263</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>
<!-- 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="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">SG</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>

View File

@@ -0,0 +1,12 @@
var classrange__queries_1_1heavy__light__decomposition_1_1_s_g =
[
[ "SG", "d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afba5c1225ba04c0025c7786c09ff28f1", null ],
[ "combine", "d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74", null ],
[ "query", "d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a1fda852e6e522707fd97f61cdb0a2591", null ],
[ "set_sret_init", "d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ad3b942be27a1b0fe3cff6cb6edf01294", null ],
[ "update", "d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a3c75bf5770790f8eba8cc92227b5400c", null ],
[ "HLD", "d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afcdadbdea1e2391cebbb17d2c1ae2f0b", null ],
[ "s_size", "d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25", null ],
[ "s_tree", "d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a", null ],
[ "sret_init", "d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5", null ]
];

View File

@@ -0,0 +1,4 @@
<map id="range_queries::heavy_light_decomposition::SG::query" name="range_queries::heavy_light_decomposition::SG::query">
<area shape="rect" id="node1" title="Make a range query from node label l to node label r." 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#a41c733f5f5e262b308f7cb95c88c1e74" title="Function that specifies the type of operation involved when segments are combined." alt="" coords="200,5,347,61"/>
</map>

View File

@@ -0,0 +1 @@
ee05b77207fa35354b2792288481cae8

View File

@@ -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::SG::query 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::SG::query</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="Make a range query from node label l to node label r.">
<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">::SG::query</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,-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::combine</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;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

View File

@@ -0,0 +1,130 @@
<!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++: Member List</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++
&#160;<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&amp;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&amp;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&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.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="headertitle">
<div class="title">range_queries::heavy_light_decomposition::Tree&lt; X &gt; Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><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><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">change_root</a>(int new_root)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4">dfs_lca</a>(int u, int p=-1)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460">dfs_size</a>(int u, int p=-1)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>HLD</b> (defined in <a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a>)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ad22d760a5a33545a70e7ea5e1786c8dc">init</a>()</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a8f7bca1746d40f21ad832fcea59aa6c6">kth_ancestor</a>(int p, const int &amp;dist)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">lca</a>(int a, int b)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><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><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">set_node_val</a>(const std::vector&lt; X &gt; &amp;node_val)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">t_root</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">t_size</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">t_val</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1">Tree</a>(int nodes)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
</table></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<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>

View File

@@ -160,7 +160,7 @@ template&lt;class X &gt; </div>
</tr>
</table>
</div><div class="memdoc">
<dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000012">Todo:</a></b></dt><dd>add documentation </dd></dl>
<dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000013">Todo:</a></b></dt><dd>add documentation </dd></dl>
<div class="fragment"><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; {</div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; <span class="keywordflow">if</span> (s1-&gt;<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() &gt;= x &amp;&amp; s1-&gt;<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() + s2-&gt;<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() &lt; x) {</div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; (*s2)[0] &lt;&lt; <span class="stringliteral">&quot; is the &quot;</span> &lt;&lt; x + 1 &lt;&lt; <span class="stringliteral">&quot;th element from front&quot;</span>;</div>

View File

@@ -0,0 +1,4 @@
<map id="range_queries::heavy_light_decomposition::Tree&lt; X &gt;" name="range_queries::heavy_light_decomposition::Tree&lt; X &gt;">
<area shape="rect" id="node1" title="A Basic Tree, which supports binary lifting." alt="" coords="5,5,152,61"/>
<area shape="rect" id="node2" href="$d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html" title="The Heavy&#45;Light Decomposition class." alt="" coords="5,109,152,165"/>
</map>

View File

@@ -0,0 +1 @@
a22753e77eff156759c1d6d9b426dac7

View File

@@ -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::Tree&lt; X &gt; Pages: 1 -->
<svg width="118pt" height="128pt"
viewBox="0.00 0.00 118.00 128.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 124)">
<title>range_queries::heavy_light_decomposition::Tree&lt; X &gt;</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-124 114,-124 114,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="A Basic Tree, which supports binary lifting.">
<polygon fill="#bfbfbf" stroke="black" points="0,-78.5 0,-119.5 110,-119.5 110,-78.5 0,-78.5"/>
<text text-anchor="start" x="8" y="-107.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="8" y="-96.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="55" y="-85.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree&lt; X &gt;</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" target="_top" xlink:title="The Heavy&#45;Light Decomposition class.">
<polygon fill="white" 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&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M55,-68.3C55,-59.3 55,-49.65 55,-41.51"/>
<polygon fill="midnightblue" stroke="midnightblue" points="51.5,-68.43 55,-78.43 58.5,-68.43 51.5,-68.43"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,114 @@
<!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++: heavy_light_decomposition Namespace 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++
&#160;<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&amp;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&amp;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&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('db/d6f/namespaceheavy__light__decomposition.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="headertitle">
<div class="title">heavy_light_decomposition Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Heavy light decomposition algorithm.
<a href="../../db/d6f/namespaceheavy__light__decomposition.html#details">More...</a></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Heavy light decomposition algorithm. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../db/d6f/namespaceheavy__light__decomposition.html">heavy_light_decomposition</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>

View File

@@ -0,0 +1,10 @@
<map id="range_queries::heavy_light_decomposition::HLD&lt; X &gt;" name="range_queries::heavy_light_decomposition::HLD&lt; X &gt;">
<area shape="rect" id="node1" title="The Heavy&#45;Light Decomposition class." alt="" coords="713,127,860,183"/>
<area shape="rect" id="node2" href="$d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html" title="A Basic Tree, which supports binary lifting." alt="" coords="517,127,664,183"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="233,115,392,157"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="5,53,128,80"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="243,181,382,222"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list.html" title=" " alt="" coords="15,188,118,215"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="254,249,371,276"/>
<area shape="rect" id="node8" href="$d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html" title="Segment Tree, to store heavy chains." alt="" coords="517,212,664,268"/>
</map>

View File

@@ -0,0 +1 @@
e6f815d7d7a7f773e6b2f78e9a402cdf

View File

@@ -0,0 +1,252 @@
<?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&lt; X &gt; Pages: 1 -->
<!--zoomable 211 -->
<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 = 649;
var viewHeight = 211;
var sectionId = 'dynsection-1';
</script>
<script xlink:href="../../svgpan.js"/>
<svg id="graph" class="graph">
<g id="viewport">
<title>range_queries::heavy_light_decomposition::HLD&lt; X &gt;</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-207 645,-207 645,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="The Heavy&#45;Light Decomposition class.">
<polygon fill="#bfbfbf" stroke="black" points="531,-70.5 531,-111.5 641,-111.5 641,-70.5 531,-70.5"/>
<text text-anchor="start" x="539" y="-99.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="539" y="-88.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="586" y="-77.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD&lt; X &gt;</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" target="_top" xlink:title="A Basic Tree, which supports binary lifting.">
<polygon fill="white" stroke="black" points="384,-70.5 384,-111.5 494,-111.5 494,-70.5 384,-70.5"/>
<text text-anchor="start" x="392" y="-99.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="392" y="-88.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="439" y="-77.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node2&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M504.57,-91C513.32,-91 522.23,-91 530.77,-91"/>
<polygon fill="midnightblue" stroke="midnightblue" points="504.41,-87.5 494.41,-91 504.41,-94.5 504.41,-87.5"/>
</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.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="171,-90 171,-120 290,-120 290,-90 171,-90"/>
<text text-anchor="start" x="179" y="-108" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; std::vector</text>
<text text-anchor="middle" x="230.5" y="-97" font-family="Helvetica,sans-Serif" font-size="10.00">&lt; int &gt; &gt;</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node3&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M300.34,-100.33C327.52,-98.49 358.29,-96.4 383.83,-94.67"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="299.86,-96.86 290.12,-101.03 300.34,-103.84 299.86,-96.86"/>
<text text-anchor="middle" x="337" y="-102" font-family="Helvetica,sans-Serif" font-size="10.00"> t_par</text>
</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.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="0,-147.5 0,-166.5 92,-166.5 92,-147.5 0,-147.5"/>
<text text-anchor="middle" x="46" y="-154.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; int &gt;</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node1 -->
<g id="edge10" class="edge">
<title>Node4&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M102.13,-165.65C123.57,-168.61 148.37,-171.55 171,-173 223.78,-176.39 237.52,-179.58 290,-173 382.84,-161.35 404.18,-147.22 494,-121 505.98,-117.5 518.75,-113.48 530.82,-109.54"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="102.61,-162.19 92.21,-164.25 101.62,-169.12 102.61,-162.19"/>
<text text-anchor="middle" x="337" y="-195" font-family="Helvetica,sans-Serif" font-size="10.00"> h_parent</text>
<text text-anchor="middle" x="337" y="-184" font-family="Helvetica,sans-Serif" font-size="10.00">h_heavychlid</text>
<text text-anchor="middle" x="337" y="-173" font-family="Helvetica,sans-Serif" font-size="10.00">h_label</text>
</g>
<!-- Node4&#45;&gt;Node2 -->
<g id="edge6" class="edge">
<title>Node4&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M102.38,-153.72C166.65,-148.96 275.41,-137.94 366,-114 371.84,-112.46 377.9,-110.73 383.92,-108.93"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="101.79,-150.26 92.07,-154.46 102.29,-157.24 101.79,-150.26"/>
<text text-anchor="middle" x="230.5" y="-161" font-family="Helvetica,sans-Serif" font-size="10.00"> t_depth</text>
<text text-anchor="middle" x="230.5" y="-150" font-family="Helvetica,sans-Serif" font-size="10.00">t_size</text>
</g>
<!-- Node4&#45;&gt;Node3 -->
<g id="edge3" class="edge">
<title>Node4&#45;&gt;Node3</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M77.83,-143.66C87.96,-139.57 99.35,-135.29 110,-132 129.61,-125.93 151.41,-120.61 170.97,-116.32"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="76.48,-140.43 68.57,-147.48 79.15,-146.9 76.48,-140.43"/>
<text text-anchor="middle" x="131.5" y="-135" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="178.5,-41 178.5,-71 282.5,-71 282.5,-41 178.5,-41"/>
<text text-anchor="start" x="186.5" y="-59" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; std::list</text>
<text text-anchor="middle" x="230.5" y="-48" font-family="Helvetica,sans-Serif" font-size="10.00">&lt; int &gt; &gt;</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node2 -->
<g id="edge4" class="edge">
<title>Node5&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M292.56,-66.35C321.55,-71.26 355.9,-77.08 383.93,-81.84"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="292.99,-62.87 282.54,-64.65 291.82,-69.77 292.99,-62.87"/>
<text text-anchor="middle" x="337" y="-82" font-family="Helvetica,sans-Serif" font-size="10.00"> t_adj</text>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="7.5,-46.5 7.5,-65.5 84.5,-65.5 84.5,-46.5 7.5,-46.5"/>
<text text-anchor="middle" x="46" y="-53.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list&lt; int &gt;</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node5 -->
<g id="edge5" class="edge">
<title>Node6&#45;&gt;Node5</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M95.03,-56C120.64,-56 152.16,-56 178.24,-56"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="94.81,-52.5 84.81,-56 94.81,-59.5 94.81,-52.5"/>
<text text-anchor="middle" x="131.5" y="-59" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="186.5,-0.5 186.5,-19.5 274.5,-19.5 274.5,-0.5 186.5,-0.5"/>
<text text-anchor="middle" x="230.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node7&#45;&gt;Node2 -->
<g id="edge7" class="edge">
<title>Node7&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M274.13,-22.57C300.86,-30.87 335.85,-42.49 366,-55 376.97,-59.55 388.6,-65.05 399.23,-70.36"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="274.9,-19.15 264.31,-19.56 272.84,-25.84 274.9,-19.15"/>
<text text-anchor="middle" x="337" y="-58" font-family="Helvetica,sans-Serif" font-size="10.00"> t_val</text>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a xlink:href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html" target="_top" xlink:title="Segment Tree, to store heavy chains.">
<polygon fill="white" stroke="black" points="384,-6.5 384,-47.5 494,-47.5 494,-6.5 384,-6.5"/>
<text text-anchor="start" x="392" y="-35.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="392" y="-24.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="439" y="-13.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node7&#45;&gt;Node8 -->
<g id="edge9" class="edge">
<title>Node7&#45;&gt;Node8</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M284.98,-4.96C309.74,-3.61 339.47,-3.38 366,-7 371.78,-7.79 377.76,-8.92 383.68,-10.24"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="284.47,-1.48 274.7,-5.6 284.9,-8.47 284.47,-1.48"/>
<text text-anchor="middle" x="337" y="-10" font-family="Helvetica,sans-Serif" font-size="10.00"> s_tree</text>
</g>
<!-- Node8&#45;&gt;Node1 -->
<g id="edge8" class="edge">
<title>Node8&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M496.18,-51.8C510.15,-57.96 524.96,-64.5 538.41,-70.44"/>
<polygon fill="midnightblue" stroke="midnightblue" points="497.24,-48.44 486.68,-47.6 494.41,-54.84 497.24,-48.44"/>
</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="classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d__coll__graph_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: 15 KiB

View File

@@ -0,0 +1,164 @@
<?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&lt; X &gt; Pages: 1 -->
<svg width="649pt" height="211pt"
viewBox="0.00 0.00 649.00 211.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 207)">
<title>range_queries::heavy_light_decomposition::HLD&lt; X &gt;</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-207 645,-207 645,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="The Heavy&#45;Light Decomposition class.">
<polygon fill="#bfbfbf" stroke="black" points="531,-70.5 531,-111.5 641,-111.5 641,-70.5 531,-70.5"/>
<text text-anchor="start" x="539" y="-99.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="539" y="-88.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="586" y="-77.5" font-family="Helvetica,sans-Serif" font-size="10.00">::HLD&lt; X &gt;</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" target="_top" xlink:title="A Basic Tree, which supports binary lifting.">
<polygon fill="white" stroke="black" points="384,-70.5 384,-111.5 494,-111.5 494,-70.5 384,-70.5"/>
<text text-anchor="start" x="392" y="-99.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="392" y="-88.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="439" y="-77.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node2&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M504.57,-91C513.32,-91 522.23,-91 530.77,-91"/>
<polygon fill="midnightblue" stroke="midnightblue" points="504.41,-87.5 494.41,-91 504.41,-94.5 504.41,-87.5"/>
</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.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="171,-90 171,-120 290,-120 290,-90 171,-90"/>
<text text-anchor="start" x="179" y="-108" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; std::vector</text>
<text text-anchor="middle" x="230.5" y="-97" font-family="Helvetica,sans-Serif" font-size="10.00">&lt; int &gt; &gt;</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node3&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M300.34,-100.33C327.52,-98.49 358.29,-96.4 383.83,-94.67"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="299.86,-96.86 290.12,-101.03 300.34,-103.84 299.86,-96.86"/>
<text text-anchor="middle" x="337" y="-102" font-family="Helvetica,sans-Serif" font-size="10.00"> t_par</text>
</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.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="0,-147.5 0,-166.5 92,-166.5 92,-147.5 0,-147.5"/>
<text text-anchor="middle" x="46" y="-154.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; int &gt;</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node1 -->
<g id="edge10" class="edge">
<title>Node4&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M102.13,-165.65C123.57,-168.61 148.37,-171.55 171,-173 223.78,-176.39 237.52,-179.58 290,-173 382.84,-161.35 404.18,-147.22 494,-121 505.98,-117.5 518.75,-113.48 530.82,-109.54"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="102.61,-162.19 92.21,-164.25 101.62,-169.12 102.61,-162.19"/>
<text text-anchor="middle" x="337" y="-195" font-family="Helvetica,sans-Serif" font-size="10.00"> h_parent</text>
<text text-anchor="middle" x="337" y="-184" font-family="Helvetica,sans-Serif" font-size="10.00">h_heavychlid</text>
<text text-anchor="middle" x="337" y="-173" font-family="Helvetica,sans-Serif" font-size="10.00">h_label</text>
</g>
<!-- Node4&#45;&gt;Node2 -->
<g id="edge6" class="edge">
<title>Node4&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M102.38,-153.72C166.65,-148.96 275.41,-137.94 366,-114 371.84,-112.46 377.9,-110.73 383.92,-108.93"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="101.79,-150.26 92.07,-154.46 102.29,-157.24 101.79,-150.26"/>
<text text-anchor="middle" x="230.5" y="-161" font-family="Helvetica,sans-Serif" font-size="10.00"> t_depth</text>
<text text-anchor="middle" x="230.5" y="-150" font-family="Helvetica,sans-Serif" font-size="10.00">t_size</text>
</g>
<!-- Node4&#45;&gt;Node3 -->
<g id="edge3" class="edge">
<title>Node4&#45;&gt;Node3</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M77.83,-143.66C87.96,-139.57 99.35,-135.29 110,-132 129.61,-125.93 151.41,-120.61 170.97,-116.32"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="76.48,-140.43 68.57,-147.48 79.15,-146.9 76.48,-140.43"/>
<text text-anchor="middle" x="131.5" y="-135" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="178.5,-41 178.5,-71 282.5,-71 282.5,-41 178.5,-41"/>
<text text-anchor="start" x="186.5" y="-59" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; std::list</text>
<text text-anchor="middle" x="230.5" y="-48" font-family="Helvetica,sans-Serif" font-size="10.00">&lt; int &gt; &gt;</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node2 -->
<g id="edge4" class="edge">
<title>Node5&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M292.56,-66.35C321.55,-71.26 355.9,-77.08 383.93,-81.84"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="292.99,-62.87 282.54,-64.65 291.82,-69.77 292.99,-62.87"/>
<text text-anchor="middle" x="337" y="-82" font-family="Helvetica,sans-Serif" font-size="10.00"> t_adj</text>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="7.5,-46.5 7.5,-65.5 84.5,-65.5 84.5,-46.5 7.5,-46.5"/>
<text text-anchor="middle" x="46" y="-53.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list&lt; int &gt;</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node5 -->
<g id="edge5" class="edge">
<title>Node6&#45;&gt;Node5</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M95.03,-56C120.64,-56 152.16,-56 178.24,-56"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="94.81,-52.5 84.81,-56 94.81,-59.5 94.81,-52.5"/>
<text text-anchor="middle" x="131.5" y="-59" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="186.5,-0.5 186.5,-19.5 274.5,-19.5 274.5,-0.5 186.5,-0.5"/>
<text text-anchor="middle" x="230.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node7&#45;&gt;Node2 -->
<g id="edge7" class="edge">
<title>Node7&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M274.13,-22.57C300.86,-30.87 335.85,-42.49 366,-55 376.97,-59.55 388.6,-65.05 399.23,-70.36"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="274.9,-19.15 264.31,-19.56 272.84,-25.84 274.9,-19.15"/>
<text text-anchor="middle" x="337" y="-58" font-family="Helvetica,sans-Serif" font-size="10.00"> t_val</text>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a xlink:href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html" target="_top" xlink:title="Segment Tree, to store heavy chains.">
<polygon fill="white" stroke="black" points="384,-6.5 384,-47.5 494,-47.5 494,-6.5 384,-6.5"/>
<text text-anchor="start" x="392" y="-35.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="392" y="-24.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="439" y="-13.5" font-family="Helvetica,sans-Serif" font-size="10.00">::SG&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node7&#45;&gt;Node8 -->
<g id="edge9" class="edge">
<title>Node7&#45;&gt;Node8</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M284.98,-4.96C309.74,-3.61 339.47,-3.38 366,-7 371.78,-7.79 377.76,-8.92 383.68,-10.24"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="284.47,-1.48 274.7,-5.6 284.9,-8.47 284.47,-1.48"/>
<text text-anchor="middle" x="337" y="-10" font-family="Helvetica,sans-Serif" font-size="10.00"> s_tree</text>
</g>
<!-- Node8&#45;&gt;Node1 -->
<g id="edge8" class="edge">
<title>Node8&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M496.18,-51.8C510.15,-57.96 524.96,-64.5 538.41,-70.44"/>
<polygon fill="midnightblue" stroke="midnightblue" points="497.24,-48.44 486.68,-47.6 494.41,-54.84 497.24,-48.44"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@@ -185,7 +185,7 @@ Functions</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>get_input function is to receive input from standard IO </p><dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000013">Todo:</a></b></dt><dd>@christianbender Get input from STDIO or write input to memory as done above. </dd></dl>
<p>get_input function is to receive input from standard IO </p><dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000014">Todo:</a></b></dt><dd>@christianbender Get input from STDIO or write input to memory as done above. </dd></dl>
<div class="fragment"><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;{}</div>
</div><!-- fragment -->
</div>

View File

@@ -0,0 +1,114 @@
<!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 Namespace 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++
&#160;<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&amp;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&amp;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&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('dd/d69/namespacerange__queries.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="headertitle">
<div class="title">range_queries Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Algorithms and Data Structures that support range queries and updates.
<a href="../../dd/d69/namespacerange__queries.html#details">More...</a></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Algorithms and Data Structures that support range queries and updates. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dd/d69/namespacerange__queries.html">range_queries</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>

View File

@@ -0,0 +1,8 @@
var namespacerange__queries =
[
[ "heavy_light_decomposition", null, [
[ "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" ],
[ "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" ],
[ "Tree", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html", "d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree" ]
] ]
];

View File

@@ -113,14 +113,16 @@ $(document).ready(function(){initNavTree('dd/da0/todo.html','../../'); initResiz
<dd><a class="anchor" id="_todo000008"></a>implement as a C++ class </dd>
<dt>Member <a class="el" href="../../d0/d01/smallest__circle_8cpp.html#a6d0455dd5c30adda100e95f0423c786e">test3</a> ()</dt>
<dd><a class="anchor" id="_todo000009"></a>This test fails </dd>
<dt>File <a class="el" href="../../d2/de9/heavy__light__decomposition_8cpp.html">heavy_light_decomposition.cpp</a> </dt>
<dd><a class="anchor" id="_todo000010"></a>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>
<dt>File <a class="el" href="../../d1/df3/hash__search_8cpp.html">hash_search.cpp</a> </dt>
<dd><a class="anchor" id="_todo000010"></a>fix the program for memory leaks and better structure in C++ and not C fashion </dd>
<dd><a class="anchor" id="_todo000011"></a>fix the program for memory leaks and better structure in C++ and not C fashion </dd>
<dt>Member <a class="el" href="../../d1/df3/hash__search_8cpp.html#ad0831425f1389166a9518f422d0c6ec5">create_list</a> (int key)</dt>
<dd><a class="anchor" id="_todo000011"></a>fix memory leak </dd>
<dd><a class="anchor" id="_todo000012"></a>fix memory leak </dd>
<dt>Member <a class="el" href="../../d9/d69/median__search_8cpp.html#a3a66390d0e407dce4fcbf63a169c6c8f">comp</a> (X x, std::vector&lt; int &gt; *s1, std::vector&lt; int &gt; *s2, std::vector&lt; int &gt; *s3)</dt>
<dd><a class="anchor" id="_todo000012"></a>add documentation </dd>
<dd><a class="anchor" id="_todo000013"></a>add documentation </dd>
<dt>Member <a class="el" href="../../dc/dfe/ternary__search_8cpp.html#a7f7d866eccdabe51bb16818a792618b1">get_input</a> ()</dt>
<dd><a class="anchor" id="_todo000013"></a>@christianbender Get input from STDIO or write input to memory as done above. </dd>
<dd><a class="anchor" id="_todo000014"></a>@christianbender Get input from STDIO or write input to memory as done above. </dd>
</dl>
</div></div><!-- contents -->
</div><!-- PageDoc -->

View File

@@ -0,0 +1,146 @@
<!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++: Member List</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++
&#160;<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&amp;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&amp;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&amp;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="headertitle">
<div class="title">range_queries::heavy_light_decomposition::HLD&lt; X &gt; Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><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><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><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><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">change_root</a>(int new_root)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">combine</a>(X lhs, X rhs)</td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><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><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><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><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae8de7aefcb6635d3dacdd174cd4890c4">dfs_lca</a>(int u, int p=-1)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><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><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa339c31ec74cd86a4842a8b09653d460">dfs_size</a>(int u, int p=-1)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a84424f180f12b514eaab57a6aa20b104">h_heavychlid</a></td><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#aa86a91ae0cd7898990a8170a2f2c9cda">h_label</a></td><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a1b336474d17eff1aa4be73d4068dc725">h_parent</a></td><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a6e486767434e44076c1ac374a22da726">HLD</a>(int nodes)</td><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#ae9e979edd69678b85665c01e2ee97828">init</a>()</td><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a8f7bca1746d40f21ad832fcea59aa6c6">kth_ancestor</a>(int p, const int &amp;dist)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a722cc7cf2c3e4d15583601a48b09776f">label</a></td><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae2b407e64aaf9878fbee7ee6efe9c7d4">lca</a>(int a, int b)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><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><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><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><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ac6d912bbfafa3a7509f66bbc1729ca25">s_size</a></td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afbf8a9cb9449d5ca844f4e141a801e6a">s_tree</a></td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a04cd96efaba147b19d3afc769b90ff70">set_node_val</a>(const std::vector&lt; X &gt; &amp;node_val)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#ad3b942be27a1b0fe3cff6cb6edf01294">set_sret_init</a>(X new_sret_init)</td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#afba5c1225ba04c0025c7786c09ff28f1">SG</a>(int size)</td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#aa7f93971a9f891e0bbb7023081f379d5">sret_init</a></td><td class="entry"><a class="el" href="../../d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab1aeaefa1bd97b867c652ba916fbdb43">t_adj</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a0efd0b9c564092f443ca97030d866ef1">t_depth</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab2ab020f798d00be2613ecf63074b7c1">t_maxlift</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ae4630fa70a80a1dc65a875488a67178a">t_nodes</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a350157a5fb79f76fceae33fc84171203">t_par</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#aa6c37e840355b9fb2105181c578694e8">t_root</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ada1494fccbc7f1f07b2f9be9f7e07ad5">t_size</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a135b7952593c9b1aae38fcaf1cc1abf7">t_val</a></td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
<tr><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a835fb2bbb27307b8cacad9b287968bc1">Tree</a>(int nodes)</td><td class="entry"><a class="el" href="../../d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a9f1cb54ed09fde931bf3220d75ee4c57">update</a>(int node, X val)</td><td class="entry"><a class="el" href="../../d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<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>

View File

@@ -0,0 +1,8 @@
<map id="range_queries::heavy_light_decomposition::Tree&lt; X &gt;" name="range_queries::heavy_light_decomposition::Tree&lt; X &gt;">
<area shape="rect" id="node1" title="A Basic Tree, which supports binary lifting." alt="" coords="473,88,620,144"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="233,67,392,109"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="5,23,128,49"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="243,133,382,174"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list.html" title=" " alt="" coords="15,140,118,167"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="254,199,371,225"/>
</map>

View File

@@ -0,0 +1 @@
2a4f39d133e81c5858d19787d0ea5b3a

View File

@@ -0,0 +1,114 @@
<?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::Tree&lt; X &gt; Pages: 1 -->
<svg width="469pt" height="173pt"
viewBox="0.00 0.00 469.00 173.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 169)">
<title>range_queries::heavy_light_decomposition::Tree&lt; X &gt;</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-169 465,-169 465,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="A Basic Tree, which supports binary lifting.">
<polygon fill="#bfbfbf" stroke="black" points="351,-61.5 351,-102.5 461,-102.5 461,-61.5 351,-61.5"/>
<text text-anchor="start" x="359" y="-90.5" font-family="Helvetica,sans-Serif" font-size="10.00">range_queries::heavy</text>
<text text-anchor="start" x="359" y="-79.5" font-family="Helvetica,sans-Serif" font-size="10.00">_light_decomposition</text>
<text text-anchor="middle" x="406" y="-68.5" font-family="Helvetica,sans-Serif" font-size="10.00">::Tree&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="171,-88 171,-118 290,-118 290,-88 171,-88"/>
<text text-anchor="start" x="179" y="-106" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; std::vector</text>
<text text-anchor="middle" x="230.5" y="-95" font-family="Helvetica,sans-Serif" font-size="10.00">&lt; int &gt; &gt;</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node2&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M300.54,-94.64C317.32,-92.61 335.03,-90.47 351,-88.54"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="299.75,-91.21 290.24,-95.89 300.59,-98.16 299.75,-91.21"/>
<text text-anchor="middle" x="320.5" y="-96" font-family="Helvetica,sans-Serif" font-size="10.00"> t_par</text>
</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.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="0,-132.5 0,-151.5 92,-151.5 92,-132.5 0,-132.5"/>
<text text-anchor="middle" x="46" y="-139.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; int &gt;</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node1 -->
<g id="edge5" class="edge">
<title>Node3&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M102.28,-144.4C152.08,-145.26 226.93,-143.27 290,-128 314.56,-122.05 340.8,-111.88 362,-102.6"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="102.12,-140.9 92.05,-144.18 101.97,-147.9 102.12,-140.9"/>
<text text-anchor="middle" x="230.5" y="-157" font-family="Helvetica,sans-Serif" font-size="10.00"> t_depth</text>
<text text-anchor="middle" x="230.5" y="-146" font-family="Helvetica,sans-Serif" font-size="10.00">t_size</text>
</g>
<!-- Node3&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node3&#45;&gt;Node2</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M101.43,-130.37C123.3,-125.69 148.56,-120.3 170.84,-115.54"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="100.69,-126.95 91.64,-132.46 102.16,-133.79 100.69,-126.95"/>
<text text-anchor="middle" x="131.5" y="-131" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
</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.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="178.5,-39 178.5,-69 282.5,-69 282.5,-39 178.5,-39"/>
<text text-anchor="start" x="186.5" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; std::list</text>
<text text-anchor="middle" x="230.5" y="-46" font-family="Helvetica,sans-Serif" font-size="10.00">&lt; int &gt; &gt;</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node1 -->
<g id="edge3" class="edge">
<title>Node4&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M292.66,-63.87C311.66,-66.94 332.45,-70.29 350.93,-73.27"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="293.05,-60.39 282.62,-62.25 291.93,-67.3 293.05,-60.39"/>
<text text-anchor="middle" x="320.5" y="-72" font-family="Helvetica,sans-Serif" font-size="10.00"> t_adj</text>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="7.5,-44.5 7.5,-63.5 84.5,-63.5 84.5,-44.5 7.5,-44.5"/>
<text text-anchor="middle" x="46" y="-51.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list&lt; int &gt;</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node4 -->
<g id="edge4" class="edge">
<title>Node5&#45;&gt;Node4</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M95.03,-54C120.64,-54 152.16,-54 178.24,-54"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="94.81,-50.5 84.81,-54 94.81,-57.5 94.81,-50.5"/>
<text text-anchor="middle" x="131.5" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<polygon fill="white" stroke="black" points="186.5,-0.5 186.5,-19.5 274.5,-19.5 274.5,-0.5 186.5,-0.5"/>
<text text-anchor="middle" x="230.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; X &gt;</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node1 -->
<g id="edge6" class="edge">
<title>Node6&#45;&gt;Node1</title>
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M272.91,-22.78C278.69,-24.76 284.52,-26.86 290,-29 314.77,-38.69 341.82,-51.06 363.45,-61.41"/>
<polygon fill="#9a32cd" stroke="#9a32cd" points="273.91,-19.42 263.32,-19.58 271.7,-26.06 273.91,-19.42"/>
<text text-anchor="middle" x="320.5" y="-50" font-family="Helvetica,sans-Serif" font-size="10.00"> t_val</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -100,6 +100,9 @@ Files</h2></td></tr>
<tr class="memitem:d6/d2e/fenwick__tree_8cpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="d6/d2e/fenwick__tree_8cpp.html">fenwick_tree.cpp</a></td></tr>
<tr class="memdesc:d6/d2e/fenwick__tree_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fenwick tree. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d2/de9/heavy__light__decomposition_8cpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="d2/de9/heavy__light__decomposition_8cpp.html">heavy_light_decomposition.cpp</a></td></tr>
<tr class="memdesc:d2/de9/heavy__light__decomposition_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a href="https://en.wikipedia.org/wiki/Heavy_path_decomposition">Heavy Light Decomposition</a> implementation <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->

View File

@@ -1,4 +1,5 @@
var dir_074119ce3a874b57120c49a0cc4bb5ad =
[
[ "fenwick_tree.cpp", "d6/d2e/fenwick__tree_8cpp.html", "d6/d2e/fenwick__tree_8cpp" ]
[ "fenwick_tree.cpp", "d6/d2e/fenwick__tree_8cpp.html", "d6/d2e/fenwick__tree_8cpp" ],
[ "heavy_light_decomposition.cpp", "d2/de9/heavy__light__decomposition_8cpp.html", "d2/de9/heavy__light__decomposition_8cpp" ]
];

View File

@@ -222,6 +222,7 @@ $(document).ready(function(){initNavTree('files.html',''); initResizable(); });
<tr id="row_12_3_" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="d9/d24/poisson__dist_8cpp.html" target="_self">poisson_dist.cpp</a></td><td class="desc"><a href="https://en.wikipedia.org/wiki/Poisson_distribution">Poisson statistics</a> </td></tr>
<tr id="row_13_"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_13_" class="arrow" onclick="toggleFolder('13_')">&#9658;</span><span id="img_13_" class="iconfclosed" onclick="toggleFolder('13_')">&#160;</span><a class="el" href="dir_074119ce3a874b57120c49a0cc4bb5ad.html" target="_self">range_queries</a></td><td class="desc"></td></tr>
<tr id="row_13_0_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="d6/d2e/fenwick__tree_8cpp.html" target="_self">fenwick_tree.cpp</a></td><td class="desc">Fenwick tree </td></tr>
<tr id="row_13_1_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="d2/de9/heavy__light__decomposition_8cpp.html" target="_self">heavy_light_decomposition.cpp</a></td><td class="desc"><a href="https://en.wikipedia.org/wiki/Heavy_path_decomposition">Heavy Light Decomposition</a> implementation </td></tr>
<tr id="row_14_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_14_" class="arrow" onclick="toggleFolder('14_')">&#9658;</span><span id="img_14_" class="iconfclosed" onclick="toggleFolder('14_')">&#160;</span><a class="el" href="dir_19b2bf9199a15c634a08b1ede1dd896a.html" target="_self">search</a></td><td class="desc"></td></tr>
<tr id="row_14_0_" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="df/dd5/binary__search_8cpp.html" target="_self">binary_search.cpp</a></td><td class="desc"><a href="https://en.wikipedia.org/wiki/Binary_search_algorithm">Binary search algorithm</a> </td></tr>
<tr id="row_14_1_" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="d8/d8a/exponential__search_8cpp.html" target="_self">exponential_search.cpp</a></td><td class="desc"><a href="https://en.wikipedia.org/wiki/Exponential_search">Exponential search algorithm</a> </td></tr>

View File

@@ -111,8 +111,11 @@ $(document).ready(function(){initNavTree('functions_a.html',''); initResizable()
<li>add_digit()
: <a class="el" href="db/d82/classlarge__number.html#a60c436d1a1c5e3795d6177d3815ad615">large_number</a>
</li>
<li>add_edge()
: <a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#a79ab4601c4a95c0902ac04e779e5f54d">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a>
</li>
<li>addEdge()
: <a class="el" href="da/d9a/class_graph.html#ac85c63bcca4764a621f9f8609a8e5910">Graph</a>
: <a class="el" href="da/d9a/class_graph.html#af765dda8f21280e1cecea19e129f1bc5">Graph</a>
, <a class="el" href="de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c">graph::is_graph_bipartite::Graph</a>
</li>
<li>addVertices()

View File

@@ -96,6 +96,12 @@ $(document).ready(function(){initNavTree('functions_c.html',''); initResizable()
<li>capacity
: <a class="el" href="d2/d05/class_min_heap.html#a88b4aa3e66392a3eabbf2517a9a79a02">MinHeap</a>
</li>
<li>chain_query()
: <a class="el" href="d2/d8a/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d.html#a7d5b40c076347a6aabfb37a0590f2f24">range_queries::heavy_light_decomposition::HLD&lt; X &gt;</a>
</li>
<li>change_root()
: <a class="el" href="d1/d51/classrange__queries_1_1heavy__light__decomposition_1_1_tree.html#ab916d554afa8ca5230b4310c2c69fae0">range_queries::heavy_light_decomposition::Tree&lt; X &gt;</a>
</li>
<li>check_size_match()
: <a class="el" href="d6/d30/classmachine__learning_1_1adaline.html#ac8a9c2aaaa63b0f27ea176857e1e7d56">machine_learning::adaline</a>
</li>
@@ -106,6 +112,9 @@ $(document).ready(function(){initNavTree('functions_c.html',''); initResizable()
<li>codec()
: <a class="el" href="d6/d26/classciphers_1_1_hill_cipher.html#ad667fa0860977f6d6d443fa1dbcd80aa">ciphers::HillCipher</a>
</li>
<li>combine()
: <a class="el" href="d9/d35/classrange__queries_1_1heavy__light__decomposition_1_1_s_g.html#a41c733f5f5e262b308f7cb95c88c1e74">range_queries::heavy_light_decomposition::SG&lt; X &gt;</a>
</li>
<li>Complex()
: <a class="el" href="da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a>
</li>

Some files were not shown because too many files have changed in this diff Show More