Documentation for 0953376d31

This commit is contained in:
github-actions
2023-06-16 21:18:14 +00:00
parent 26f1eee566
commit 14deeecd50
7241 changed files with 234176 additions and 54779 deletions

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: data_structures::SegmentTree&lt; T &gt; Class Template Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
@@ -186,9 +186,9 @@ template&lt;class T &gt; </div>
</table>
</div><div class="memdoc">
<div class="fragment"><div class="line"><span class="lineno"> 87</span>: <a class="code hl_variable" href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a735d072a603f3abb7c03818440575258">t</a>(n * 4, <a class="code hl_variable" href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a10ffa5fc03c66170f0bc2592b843baa3">ID</a>), <a class="code hl_variable" href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a167fd91b68048e49e97859a8947690f3">size</a>(n) {}</div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a10ffa5fc03c66170f0bc2592b843baa3"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a10ffa5fc03c66170f0bc2592b843baa3">data_structures::SegmentTree::ID</a></div><div class="ttdeci">const T ID</div><div class="ttdoc">Comb(ID, x) = x.</div><div class="ttdef"><b>Definition:</b> segment_tree.cpp:32</div></div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a167fd91b68048e49e97859a8947690f3"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a167fd91b68048e49e97859a8947690f3">data_structures::SegmentTree::size</a></div><div class="ttdeci">int size</div><div class="ttdoc">Number of elements available for querying in the tree.</div><div class="ttdef"><b>Definition:</b> segment_tree.cpp:34</div></div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a735d072a603f3abb7c03818440575258"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a735d072a603f3abb7c03818440575258">data_structures::SegmentTree::t</a></div><div class="ttdeci">std::vector&lt; T &gt; t</div><div class="ttdoc">Vector to represent the tree.</div><div class="ttdef"><b>Definition:</b> segment_tree.cpp:33</div></div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a10ffa5fc03c66170f0bc2592b843baa3"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a10ffa5fc03c66170f0bc2592b843baa3">data_structures::SegmentTree::ID</a></div><div class="ttdeci">const T ID</div><div class="ttdoc">Comb(ID, x) = x.</div><div class="ttdef"><b>Definition</b> segment_tree.cpp:32</div></div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a167fd91b68048e49e97859a8947690f3"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a167fd91b68048e49e97859a8947690f3">data_structures::SegmentTree::size</a></div><div class="ttdeci">int size</div><div class="ttdoc">Number of elements available for querying in the tree.</div><div class="ttdef"><b>Definition</b> segment_tree.cpp:34</div></div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a735d072a603f3abb7c03818440575258"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a735d072a603f3abb7c03818440575258">data_structures::SegmentTree::t</a></div><div class="ttdeci">std::vector&lt; T &gt; t</div><div class="ttdoc">Vector to represent the tree.</div><div class="ttdef"><b>Definition</b> segment_tree.cpp:33</div></div>
</div><!-- fragment -->
</div>
</div>
@@ -292,7 +292,7 @@ template&lt;class T &gt; </div>
<div class="fragment"><div class="line"><span class="lineno"> 51</span> {</div>
<div class="line"><span class="lineno"> 52</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a6d8df83a6f26ce24a75d3b358b7f5b8a">l</a> + (r - <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a6d8df83a6f26ce24a75d3b358b7f5b8a">l</a>) / 2;</div>
<div class="line"><span class="lineno"> 53</span> }</div>
<div class="ttc" id="acomposite__simpson__rule_8cpp_html_a6d8df83a6f26ce24a75d3b358b7f5b8a"><div class="ttname"><a href="../../d4/d18/composite__simpson__rule_8cpp.html#a6d8df83a6f26ce24a75d3b358b7f5b8a">numerical_methods::simpson_method::l</a></div><div class="ttdeci">double l(double x)</div><div class="ttdoc">Another test function.</div><div class="ttdef"><b>Definition:</b> composite_simpson_rule.cpp:119</div></div>
<div class="ttc" id="acomposite__simpson__rule_8cpp_html_a6d8df83a6f26ce24a75d3b358b7f5b8a"><div class="ttname"><a href="../../d4/d18/composite__simpson__rule_8cpp.html#a6d8df83a6f26ce24a75d3b358b7f5b8a">numerical_methods::simpson_method::l</a></div><div class="ttdeci">double l(double x)</div><div class="ttdoc">Another test function.</div><div class="ttdef"><b>Definition</b> composite_simpson_rule.cpp:119</div></div>
</div><!-- fragment -->
</div>
</div>
@@ -368,16 +368,15 @@ template&lt;class T &gt; </div>
<div class="line"><span class="lineno"> 83</span> <span class="keywordtype">int</span> m = <a class="code hl_function" href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a6d3beccc936af2377c8eeb17067fd141">mid</a>(l, r);</div>
<div class="line"><span class="lineno"> 84</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a8d22286b7be3dcbb701ac5c7d9c79841">comb</a>(<a class="code hl_function" href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a8fecc48e8e3f6f5f6e728495a4282e52">range_comb</a>(i * 2, l, m, tl, <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(tr, m)), <a class="code hl_function" href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a8fecc48e8e3f6f5f6e728495a4282e52">range_comb</a>(i * 2 + 1, m + 1, r, <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a>(tl, m + 1), tr));</div>
<div class="line"><span class="lineno"> 85</span> }</div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a6d3beccc936af2377c8eeb17067fd141"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a6d3beccc936af2377c8eeb17067fd141">data_structures::SegmentTree::mid</a></div><div class="ttdeci">int mid(int l, int r)</div><div class="ttdoc">Gives the midpoint between two integers.</div><div class="ttdef"><b>Definition:</b> segment_tree.cpp:51</div></div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a8d22286b7be3dcbb701ac5c7d9c79841"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a8d22286b7be3dcbb701ac5c7d9c79841">data_structures::SegmentTree::comb</a></div><div class="ttdeci">T comb(T x, T y)</div><div class="ttdoc">Any associative function that combines x and y.</div><div class="ttdef"><b>Definition:</b> segment_tree.cpp:42</div></div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a8fecc48e8e3f6f5f6e728495a4282e52"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a8fecc48e8e3f6f5f6e728495a4282e52">data_structures::SegmentTree::range_comb</a></div><div class="ttdeci">T range_comb(int i, int l, int r, int tl, int tr)</div><div class="ttdoc">Helper method for range_comb method below.</div><div class="ttdef"><b>Definition:</b> segment_tree.cpp:80</div></div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a6d3beccc936af2377c8eeb17067fd141"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a6d3beccc936af2377c8eeb17067fd141">data_structures::SegmentTree::mid</a></div><div class="ttdeci">int mid(int l, int r)</div><div class="ttdoc">Gives the midpoint between two integers.</div><div class="ttdef"><b>Definition</b> segment_tree.cpp:51</div></div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a8d22286b7be3dcbb701ac5c7d9c79841"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a8d22286b7be3dcbb701ac5c7d9c79841">data_structures::SegmentTree::comb</a></div><div class="ttdeci">T comb(T x, T y)</div><div class="ttdoc">Any associative function that combines x and y.</div><div class="ttdef"><b>Definition</b> segment_tree.cpp:42</div></div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a8fecc48e8e3f6f5f6e728495a4282e52"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a8fecc48e8e3f6f5f6e728495a4282e52">data_structures::SegmentTree::range_comb</a></div><div class="ttdeci">T range_comb(int i, int l, int r, int tl, int tr)</div><div class="ttdoc">Helper method for range_comb method below.</div><div class="ttdef"><b>Definition</b> segment_tree.cpp:80</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="amin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a></div><div class="ttdeci">T min(T... args)</div></div>
</div><!-- 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="../../dd/d95/classdata__structures_1_1_segment_tree_a8fecc48e8e3f6f5f6e728495a4282e52_cgraph.svg" width="402" height="216"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../dd/d95/classdata__structures_1_1_segment_tree_a8fecc48e8e3f6f5f6e728495a4282e52_cgraph.svg" width="402" height="216"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
@@ -433,8 +432,7 @@ template&lt;class T &gt; </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="../../dd/d95/classdata__structures_1_1_segment_tree_a1c5331b509d9b55bedfadf979b30dd5b_cgraph.svg" width="622" height="216"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../dd/d95/classdata__structures_1_1_segment_tree_a1c5331b509d9b55bedfadf979b30dd5b_cgraph.svg" width="622" height="216"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
@@ -513,12 +511,11 @@ template&lt;class T &gt; </div>
<div class="line"><span class="lineno"> 68</span> <a class="code hl_variable" href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a735d072a603f3abb7c03818440575258">t</a>[i] = <a class="code hl_function" href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a8d22286b7be3dcbb701ac5c7d9c79841">comb</a>(<a class="code hl_variable" href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a735d072a603f3abb7c03818440575258">t</a>[i * 2], <a class="code hl_variable" href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a735d072a603f3abb7c03818440575258">t</a>[i * 2 + 1]);</div>
<div class="line"><span class="lineno"> 69</span> }</div>
<div class="line"><span class="lineno"> 70</span> }</div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a2a04f1832c5ce86def50c3021b2ab6b1"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a2a04f1832c5ce86def50c3021b2ab6b1">data_structures::SegmentTree::update</a></div><div class="ttdeci">void update(int i, int l, int r, int pos, T val)</div><div class="ttdoc">Helper method for update method below.</div><div class="ttdef"><b>Definition:</b> segment_tree.cpp:62</div></div>
<div class="ttc" id="aclassdata__structures_1_1_segment_tree_html_a2a04f1832c5ce86def50c3021b2ab6b1"><div class="ttname"><a href="../../dd/d95/classdata__structures_1_1_segment_tree.html#a2a04f1832c5ce86def50c3021b2ab6b1">data_structures::SegmentTree::update</a></div><div class="ttdeci">void update(int i, int l, int r, int pos, T val)</div><div class="ttdoc">Helper method for update method below.</div><div class="ttdef"><b>Definition</b> segment_tree.cpp:62</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../dd/d95/classdata__structures_1_1_segment_tree_a2a04f1832c5ce86def50c3021b2ab6b1_cgraph.svg" width="402" height="118"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../dd/d95/classdata__structures_1_1_segment_tree_a2a04f1832c5ce86def50c3021b2ab6b1_cgraph.svg" width="402" 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>
@@ -573,8 +570,7 @@ template&lt;class T &gt; </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="../../dd/d95/classdata__structures_1_1_segment_tree_ad0e78179ab979ae2bc4304bdc181db17_cgraph.svg" width="622" height="118"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../dd/d95/classdata__structures_1_1_segment_tree_ad0e78179ab979ae2bc4304bdc181db17_cgraph.svg" width="622" 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>
@@ -588,7 +584,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d5/d3c/namespacedata__structures.html">data_structures</a></li><li class="navelem"><a class="el" href="../../dd/d95/classdata__structures_1_1_segment_tree.html">SegmentTree</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7 </li>
</ul>
</div>
</body>