mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-30 16:51:57 +08:00
Documentation for f821fae698
This commit is contained in:
289
d3/dae/dsu__path__compression_8cpp.html
Normal file
289
d3/dae/dsu__path__compression_8cpp.html
Normal file
@@ -0,0 +1,289 @@
|
||||
<!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=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: data_structures/dsu_path_compression.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('d3/dae/dsu__path__compression_8cpp.html','../../'); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">dsu_path_compression.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p><a href="https://en.wikipedia.org/wiki/Disjoint-set-data_structure" target="_blank">DSU (Disjoint sets)</a>
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <cassert></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <vector></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for dsu_path_compression.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../db/de3/dsu__path__compression_8cpp__incl.svg" width="258" height="127"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d1f/classdsu.html">dsu</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Disjoint sets union data structure, class based representation. <a href="../../dd/d1f/classdsu.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ae7880ce913f3058a35ff106d5be9e243"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dae/dsu__path__compression_8cpp.html#ae7880ce913f3058a35ff106d5be9e243">test1</a> ()</td></tr>
|
||||
<tr class="memdesc:ae7880ce913f3058a35ff106d5be9e243"><td class="mdescLeft"> </td><td class="mdescRight">Self-test implementations, 1st test. <a href="../../d3/dae/dsu__path__compression_8cpp.html#ae7880ce913f3058a35ff106d5be9e243">More...</a><br /></td></tr>
|
||||
<tr class="separator:ae7880ce913f3058a35ff106d5be9e243"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a45d94ead4cf4e1ff9f87c38bc99f59ae"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dae/dsu__path__compression_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae">test2</a> ()</td></tr>
|
||||
<tr class="memdesc:a45d94ead4cf4e1ff9f87c38bc99f59ae"><td class="mdescLeft"> </td><td class="mdescRight">Self-implementations, 2nd test. <a href="../../d3/dae/dsu__path__compression_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae">More...</a><br /></td></tr>
|
||||
<tr class="separator:a45d94ead4cf4e1ff9f87c38bc99f59ae"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dae/dsu__path__compression_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <a href="../../d3/dae/dsu__path__compression_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p ><a href="https://en.wikipedia.org/wiki/Disjoint-set-data_structure" target="_blank">DSU (Disjoint sets)</a> </p>
|
||||
<p >It is a very powerful data structure that keeps track of different clusters(sets) of elements, these sets are disjoint(doesnot have a common element). Disjoint sets uses cases : for finding connected components in a graph, used in Kruskal's algorithm for finding <a class="el" href="../../d4/d12/namespace_minimum.html" title="Implementation of Minimum Edit Distance algorithm.">Minimum</a> Spanning tree. Operations that can be performed: 1) UnionSet(i,j): add(element i and j to the set) 2) findSet(i): returns the representative of the set to which i belogngs to. 3) get_max(i),get_min(i) : returns the maximum and minimum Below is the class-based approach which uses the heuristic of path compression. Using path compression in findSet(i),we are able to get to the representative of i in O(1) time. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/AayushVyasKIIT" target="_blank">AayushVyasKIIT</a> </dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../df/d28/dsu__union__rank_8cpp.html" title="DSU (Disjoint sets)">dsu_union_rank.cpp</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int main </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Main function. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<p >< number of items</p>
|
||||
<p >< object of class disjoint sets</p>
|
||||
<div class="fragment"><div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> {</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> uint64_t n = 10; <span class="comment">///< number of items</span></div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <a class="code hl_class" href="../../dd/d1f/classdsu.html">dsu</a> d(n + 1); <span class="comment">///< object of class disjoint sets</span></div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> </div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <a class="code hl_function" href="../../d3/dae/dsu__path__compression_8cpp.html#ae7880ce913f3058a35ff106d5be9e243">test1</a>(); <span class="comment">// run 1st test case</span></div>
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <a class="code hl_function" href="../../d3/dae/dsu__path__compression_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae">test2</a>(); <span class="comment">// run 2nd test case</span></div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> </div>
|
||||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span>}</div>
|
||||
<div class="ttc" id="aclassdsu_html"><div class="ttname"><a href="../../dd/d1f/classdsu.html">dsu</a></div><div class="ttdoc">Disjoint sets union data structure, class based representation.</div><div class="ttdef"><b>Definition:</b> dsu_path_compression.cpp:33</div></div>
|
||||
<div class="ttc" id="adsu__path__compression_8cpp_html_a45d94ead4cf4e1ff9f87c38bc99f59ae"><div class="ttname"><a href="../../d3/dae/dsu__path__compression_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae">test2</a></div><div class="ttdeci">static void test2()</div><div class="ttdoc">Self-implementations, 2nd test.</div><div class="ttdef"><b>Definition:</b> dsu_path_compression.cpp:186</div></div>
|
||||
<div class="ttc" id="adsu__path__compression_8cpp_html_ae7880ce913f3058a35ff106d5be9e243"><div class="ttname"><a href="../../d3/dae/dsu__path__compression_8cpp.html#ae7880ce913f3058a35ff106d5be9e243">test1</a></div><div class="ttdeci">static void test1()</div><div class="ttdoc">Self-test implementations, 1st test.</div><div class="ttdef"><b>Definition:</b> dsu_path_compression.cpp:169</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="../../d3/dae/dsu__path__compression_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="604" height="443"><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="ae7880ce913f3058a35ff106d5be9e243" name="ae7880ce913f3058a35ff106d5be9e243"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae7880ce913f3058a35ff106d5be9e243">◆ </a></span>test1()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static void test1 </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>Self-test implementations, 1st test. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<p >< number of items</p>
|
||||
<p >< object of class disjoint sets</p>
|
||||
<div class="fragment"><div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> {</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="comment">// the minimum, maximum, and size of the set</span></div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> uint64_t n = 10; <span class="comment">///< number of items</span></div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <a class="code hl_class" href="../../dd/d1f/classdsu.html">dsu</a> d(n + 1); <span class="comment">///< object of class disjoint sets</span></div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="comment">// set 1</span></div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> d.UnionSet(1, 2); <span class="comment">// performs union operation on 1 and 2</span></div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> d.UnionSet(1, 4); <span class="comment">// performs union operation on 1 and 4</span></div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">vector<uint64_t></a> <a class="code hl_function" href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa">ans</a> = {1, 4, 3};</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="keywordflow">for</span> (uint64_t i = 0; i < <a class="code hl_function" href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa">ans</a>.size(); i++) {</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> assert(d.get(4).at(i) == <a class="code hl_function" href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa">ans</a>[i]); <span class="comment">// makes sure algorithm works fine</span></div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> }</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> << <span class="stringliteral">"1st test passed!"</span> << <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span>}</div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="amatrix__exponentiation_8cpp_html_a600eaf353befc174637855795f12d258"><div class="ttname"><a href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a></div><div class="ttdeci">#define endl</div><div class="ttdef"><b>Definition:</b> matrix_exponentiation.cpp:36</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="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/dae/dsu__path__compression_8cpp_ae7880ce913f3058a35ff106d5be9e243_cgraph.svg" width="506" height="443"><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="a45d94ead4cf4e1ff9f87c38bc99f59ae" name="a45d94ead4cf4e1ff9f87c38bc99f59ae"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a45d94ead4cf4e1ff9f87c38bc99f59ae">◆ </a></span>test2()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static void test2 </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>Self-implementations, 2nd test. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<p >< number of items</p>
|
||||
<p >< object of class disjoint sets</p>
|
||||
<div class="fragment"><div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> {</div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="comment">// the minimum, maximum, and size of the set </span></div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> uint64_t n = 10; <span class="comment">///< number of items</span></div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <a class="code hl_class" href="../../dd/d1f/classdsu.html">dsu</a> d(n + 1); <span class="comment">///< object of class disjoint sets</span></div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="comment">// set 1</span></div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> d.UnionSet(3, 5);</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> d.UnionSet(5, 6);</div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> d.UnionSet(5, 7);</div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">vector<uint64_t></a> <a class="code hl_function" href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa">ans</a> = {3, 7, 4};</div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="keywordflow">for</span> (uint64_t i = 0; i < <a class="code hl_function" href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa">ans</a>.size(); i++) {</div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> assert(d.get(3).at(i) == <a class="code hl_function" href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa">ans</a>[i]); <span class="comment">// makes sure algorithm works fine</span></div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> }</div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">cout</a> << <span class="stringliteral">"2nd test passed!"</span> << <a class="code hl_define" href="../../d7/d35/matrix__exponentiation_8cpp.html#a600eaf353befc174637855795f12d258">endl</a>;</div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/dae/dsu__path__compression_8cpp_a45d94ead4cf4e1ff9f87c38bc99f59ae_cgraph.svg" width="506" height="443"><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><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html">data_structures</a></li><li class="navelem"><a class="el" href="../../d3/dae/dsu__path__compression_8cpp.html">dsu_path_compression.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
7
d3/dae/dsu__path__compression_8cpp.js
vendored
Normal file
7
d3/dae/dsu__path__compression_8cpp.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
var dsu__path__compression_8cpp =
|
||||
[
|
||||
[ "dsu", "dd/d1f/classdsu.html", "dd/d1f/classdsu" ],
|
||||
[ "main", "d3/dae/dsu__path__compression_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "test1", "d3/dae/dsu__path__compression_8cpp.html#ae7880ce913f3058a35ff106d5be9e243", null ],
|
||||
[ "test2", "d3/dae/dsu__path__compression_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae", null ]
|
||||
];
|
||||
@@ -0,0 +1,14 @@
|
||||
<map id="test2" name="test2">
|
||||
<area shape="rect" id="node1" title="Self-implementations, 2nd test." alt="" coords="5,81,56,108"/>
|
||||
<area shape="rect" id="node2" href="$d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa" title=" " alt="" coords="287,5,331,32"/>
|
||||
<area shape="rect" id="node3" href="$dd/d1f/classdsu.html#a0ce2672c570f4235eafddb0c9a58115a" title="prints the minimum, maximum and size of the set to which i belongs to" alt="" coords="122,81,191,108"/>
|
||||
<area shape="rect" id="node8" href="$dd/d1f/classdsu.html#a6ac30c07abca2aaa3b291504c25c3559" title="Method that combines two disjoint sets to which i and j belongs to and make a single set having a com..." alt="" coords="104,284,209,311"/>
|
||||
<area shape="rect" id="node4" href="$dd/d1f/classdsu.html#a696141b8b092466767f4bfe1c5e46cde" title="A utility function that returns the max element of the set to which i belongs to." alt="" coords="257,56,360,83"/>
|
||||
<area shape="rect" id="node6" href="$dd/d1f/classdsu.html#ac713a5b496d0405c82e2808a85e58415" title="A utility function that returns the min element of the set to which i belongs to." alt="" coords="259,107,358,133"/>
|
||||
<area shape="rect" id="node7" href="$dd/d1f/classdsu.html#a1c24228b0f2f49220133fb8c3566a55c" title="A utility function that returns the size of the set to which i belongs to." alt="" coords="271,157,346,184"/>
|
||||
<area shape="rect" id="node5" href="$dd/d1f/classdsu.html#a16851f78fe390fc1430905c83d6a2f1c" title="Method to find the representative of the set to which i belongs to, T(n) = O(1)" alt="" coords="408,157,500,184"/>
|
||||
<area shape="rect" id="node9" href="$dd/d1f/classdsu.html#a64d25c5986742f7c234ed449b2ff7303" title="A utility function which check whether i and j belongs to same set or not." alt="" coords="261,259,357,285"/>
|
||||
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max.html#" title=" " alt="" coords="273,309,345,336"/>
|
||||
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min.html#" title=" " alt="" coords="274,360,343,387"/>
|
||||
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="269,411,348,437"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
3d43b694568d4acc9db14b0c16a23771
|
||||
@@ -0,0 +1,223 @@
|
||||
<?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.49.2 (20211016.1639)
|
||||
-->
|
||||
<!-- Title: test2 Pages: 1 -->
|
||||
<svg width="379pt" height="332pt"
|
||||
viewBox="0.00 0.00 379.00 332.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 328)">
|
||||
<title>test2</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-328 375,-328 375,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Self-implementations, 2nd test.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-247.5 0,-266.5 38,-266.5 38,-247.5 0,-247.5"/>
|
||||
<text text-anchor="middle" x="19" y="-254.5" font-family="Helvetica,sans-Serif" font-size="10.00">test2</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="211,-304.5 211,-323.5 244,-323.5 244,-304.5 211,-304.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-311.5" font-family="Helvetica,sans-Serif" font-size="10.00">ans</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.35,-263.94C48.74,-267.75 62.01,-272.4 74,-276 118.19,-289.25 170.52,-301.57 200.97,-308.41"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="200.26,-311.84 210.78,-310.6 201.78,-305.01 200.26,-311.84"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a xlink:href="../../dd/d1f/classdsu.html#a0ce2672c570f4235eafddb0c9a58115a" target="_top" xlink:title="prints the minimum, maximum and size of the set to which i belongs to">
|
||||
<polygon fill="white" stroke="black" points="87.5,-247.5 87.5,-266.5 139.5,-266.5 139.5,-247.5 87.5,-247.5"/>
|
||||
<text text-anchor="middle" x="113.5" y="-254.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::get</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.28,-257C49.33,-257 63.79,-257 77.01,-257"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="77.26,-260.5 87.26,-257 77.26,-253.5 77.26,-260.5"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a xlink:href="../../dd/d1f/classdsu.html#a6ac30c07abca2aaa3b291504c25c3559" target="_top" xlink:title="Method that combines two disjoint sets to which i and j belongs to and make a single set having a com...">
|
||||
<polygon fill="white" stroke="black" points="74,-95.5 74,-114.5 153,-114.5 153,-95.5 74,-95.5"/>
|
||||
<text text-anchor="middle" x="113.5" y="-102.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::UnionSet</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node8 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node1->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.79,-247.49C40.84,-222.75 81.43,-156.05 101.28,-123.44"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="104.51,-124.87 106.72,-114.5 98.53,-121.23 104.51,-124.87"/>
|
||||
</g>
|
||||
<!-- Node3->Node2 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node3->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M133.17,-266.54C148.23,-274.23 169.97,-285.33 189,-295 193.14,-297.1 197.53,-299.33 201.8,-301.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="200.3,-304.66 210.8,-306.06 203.47,-298.42 200.3,-304.66"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a xlink:href="../../dd/d1f/classdsu.html#a696141b8b092466767f4bfe1c5e46cde" target="_top" xlink:title="A utility function that returns the max element of the set to which i belongs to.">
|
||||
<polygon fill="white" stroke="black" points="189,-266.5 189,-285.5 266,-285.5 266,-266.5 189,-266.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-273.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::get_max</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M139.63,-261.26C151.15,-263.22 165.19,-265.6 178.6,-267.87"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="178.23,-271.36 188.68,-269.58 179.41,-264.46 178.23,-271.36"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a xlink:href="../../dd/d1f/classdsu.html#ac713a5b496d0405c82e2808a85e58415" target="_top" xlink:title="A utility function that returns the min element of the set to which i belongs to.">
|
||||
<polygon fill="white" stroke="black" points="190.5,-228.5 190.5,-247.5 264.5,-247.5 264.5,-228.5 190.5,-228.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-235.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::get_min</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node6 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node3->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M139.63,-252.74C151.68,-250.69 166.48,-248.18 180.44,-245.81"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="181.13,-249.25 190.4,-244.12 179.96,-242.35 181.13,-249.25"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a xlink:href="../../dd/d1f/classdsu.html#a1c24228b0f2f49220133fb8c3566a55c" target="_top" xlink:title="A utility function that returns the size of the set to which i belongs to.">
|
||||
<polygon fill="white" stroke="black" points="199.5,-190.5 199.5,-209.5 255.5,-209.5 255.5,-190.5 199.5,-190.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node7 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node3->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M133.17,-247.46C148.23,-239.77 169.97,-228.67 189,-219 191.99,-217.48 195.12,-215.89 198.24,-214.31"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="200.08,-217.3 207.42,-209.66 196.92,-211.06 200.08,-217.3"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a xlink:href="../../dd/d1f/classdsu.html#a16851f78fe390fc1430905c83d6a2f1c" target="_top" xlink:title="Method to find the representative of the set to which i belongs to, T(n) = O(1)">
|
||||
<polygon fill="white" stroke="black" points="302,-190.5 302,-209.5 371,-209.5 371,-190.5 302,-190.5"/>
|
||||
<text text-anchor="middle" x="336.5" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::findSet</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M249.58,-266.33C255.06,-263.55 260.87,-260.35 266,-257 284.62,-244.86 304.03,-228.58 317.6,-216.53"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="320.14,-218.94 325.22,-209.65 315.45,-213.75 320.14,-218.94"/>
|
||||
</g>
|
||||
<!-- Node5->Node5 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node5->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M319.85,-209.76C311.76,-218.57 317.3,-228 336.5,-228 348.5,-228 355.16,-224.31 356.5,-219.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="359.74,-218.05 353.15,-209.76 353.12,-220.35 359.74,-218.05"/>
|
||||
</g>
|
||||
<!-- Node6->Node5 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node6->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M255.5,-228.41C268.68,-223.73 284.73,-218.03 298.98,-212.97"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="300.26,-216.23 308.51,-209.59 297.91,-209.63 300.26,-216.23"/>
|
||||
</g>
|
||||
<!-- Node7->Node5 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node7->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M255.5,-200C266.53,-200 279.57,-200 291.88,-200"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="291.99,-203.5 301.99,-200 291.99,-196.5 291.99,-203.5"/>
|
||||
</g>
|
||||
<!-- Node8->Node5 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node8->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M132.02,-114.57C146.96,-122.58 169.13,-134.09 189,-143 225.92,-159.55 269.21,-176.04 299.1,-187"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="298.11,-190.36 308.7,-190.49 300.5,-183.78 298.11,-190.36"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a xlink:href="../../dd/d1f/classdsu.html#a64d25c5986742f7c234ed449b2ff7303" target="_top" xlink:title="A utility function which check whether i and j belongs to same set or not.">
|
||||
<polygon fill="white" stroke="black" points="191.5,-114.5 191.5,-133.5 263.5,-133.5 263.5,-114.5 191.5,-114.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::isSame</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node9 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>Node8->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M153.04,-111.54C162.15,-113.08 171.94,-114.75 181.32,-116.33"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="180.82,-119.8 191.27,-118.02 182,-112.9 180.82,-119.8"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="200.5,-76.5 200.5,-95.5 254.5,-95.5 254.5,-76.5 200.5,-76.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node10 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>Node8->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M153.04,-98.46C165.08,-96.42 178.32,-94.17 190.2,-92.16"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="190.95,-95.58 200.23,-90.46 189.78,-88.68 190.95,-95.58"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="201.5,-38.5 201.5,-57.5 253.5,-57.5 253.5,-38.5 201.5,-38.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node11 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>Node8->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M133.17,-95.46C148.23,-87.77 169.97,-76.67 189,-67 191.99,-65.48 195.12,-63.89 198.24,-62.31"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="200.08,-65.3 207.42,-57.66 196.92,-59.06 200.08,-65.3"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="198,-0.5 198,-19.5 257,-19.5 257,-0.5 198,-0.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node12 -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>Node8->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M122.36,-95.11C135.09,-79.56 161.57,-49.09 189,-29 191.06,-27.49 193.26,-26.04 195.52,-24.66"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="197.36,-27.64 204.38,-19.7 193.94,-21.53 197.36,-27.64"/>
|
||||
</g>
|
||||
<!-- Node9->Node5 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>Node9->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M243.99,-133.56C250.82,-137.86 258.88,-143.07 266,-148 282.67,-159.54 301.01,-173.32 314.66,-183.79"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="312.84,-186.8 322.89,-190.13 317.11,-181.25 312.84,-186.8"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,16 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="node1" title="Main function." alt="" coords="5,107,56,133"/>
|
||||
<area shape="rect" id="node2" href="$d3/dae/dsu__path__compression_8cpp.html#ae7880ce913f3058a35ff106d5be9e243" title="Self-test implementations, 1st test." alt="" coords="104,81,155,108"/>
|
||||
<area shape="rect" id="node14" href="$d3/dae/dsu__path__compression_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae" title="Self-implementations, 2nd test." alt="" coords="104,132,155,159"/>
|
||||
<area shape="rect" id="node3" href="$d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa" title=" " alt="" coords="385,5,429,32"/>
|
||||
<area shape="rect" id="node4" href="$dd/d1f/classdsu.html#a0ce2672c570f4235eafddb0c9a58115a" title="prints the minimum, maximum and size of the set to which i belongs to" alt="" coords="221,107,290,133"/>
|
||||
<area shape="rect" id="node9" href="$dd/d1f/classdsu.html#a6ac30c07abca2aaa3b291504c25c3559" title="Method that combines two disjoint sets to which i and j belongs to and make a single set having a com..." alt="" coords="203,259,308,285"/>
|
||||
<area shape="rect" id="node5" href="$dd/d1f/classdsu.html#a696141b8b092466767f4bfe1c5e46cde" title="A utility function that returns the max element of the set to which i belongs to." alt="" coords="356,56,459,83"/>
|
||||
<area shape="rect" id="node7" href="$dd/d1f/classdsu.html#ac713a5b496d0405c82e2808a85e58415" title="A utility function that returns the min element of the set to which i belongs to." alt="" coords="358,107,457,133"/>
|
||||
<area shape="rect" id="node8" href="$dd/d1f/classdsu.html#a1c24228b0f2f49220133fb8c3566a55c" title="A utility function that returns the size of the set to which i belongs to." alt="" coords="370,157,445,184"/>
|
||||
<area shape="rect" id="node6" href="$dd/d1f/classdsu.html#a16851f78fe390fc1430905c83d6a2f1c" title="Method to find the representative of the set to which i belongs to, T(n) = O(1)" alt="" coords="507,157,599,184"/>
|
||||
<area shape="rect" id="node10" href="$dd/d1f/classdsu.html#a64d25c5986742f7c234ed449b2ff7303" title="A utility function which check whether i and j belongs to same set or not." alt="" coords="359,208,455,235"/>
|
||||
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max.html#" title=" " alt="" coords="371,309,443,336"/>
|
||||
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min.html#" title=" " alt="" coords="373,360,442,387"/>
|
||||
<area shape="rect" id="node13" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="368,411,447,437"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
4fb177677523c9cec4ff5d035a533845
|
||||
@@ -0,0 +1,271 @@
|
||||
<?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.49.2 (20211016.1639)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="453pt" height="332pt"
|
||||
viewBox="0.00 0.00 453.00 332.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 328)">
|
||||
<title>main</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-328 449,-328 449,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Main function.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-228.5 0,-247.5 38,-247.5 38,-228.5 0,-228.5"/>
|
||||
<text text-anchor="middle" x="19" y="-235.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="../../d3/dae/dsu__path__compression_8cpp.html#ae7880ce913f3058a35ff106d5be9e243" target="_top" xlink:title="Self-test implementations, 1st test.">
|
||||
<polygon fill="white" stroke="black" points="74,-247.5 74,-266.5 112,-266.5 112,-247.5 74,-247.5"/>
|
||||
<text text-anchor="middle" x="93" y="-254.5" font-family="Helvetica,sans-Serif" font-size="10.00">test1</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.17,-242.79C45.95,-244.85 55.23,-247.3 63.87,-249.58"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="63.02,-252.97 73.59,-252.14 64.81,-246.21 63.02,-252.97"/>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="node14" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_node14"><a xlink:href="../../d3/dae/dsu__path__compression_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae" target="_top" xlink:title="Self-implementations, 2nd test.">
|
||||
<polygon fill="white" stroke="black" points="74,-209.5 74,-228.5 112,-228.5 112,-209.5 74,-209.5"/>
|
||||
<text text-anchor="middle" x="93" y="-216.5" font-family="Helvetica,sans-Serif" font-size="10.00">test2</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node14 -->
|
||||
<g id="edge19" class="edge">
|
||||
<title>Node1->Node14</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.17,-233.21C45.95,-231.15 55.23,-228.7 63.87,-226.42"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="64.81,-229.79 73.59,-223.86 63.02,-223.03 64.81,-229.79"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a xlink:href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="285,-304.5 285,-323.5 318,-323.5 318,-304.5 285,-304.5"/>
|
||||
<text text-anchor="middle" x="301.5" y="-311.5" font-family="Helvetica,sans-Serif" font-size="10.00">ans</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M106.57,-266.67C117.07,-274.24 132.74,-284.39 148,-290 190.57,-305.65 243.49,-311.1 274.48,-312.99"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="274.68,-316.51 284.85,-313.54 275.05,-309.52 274.68,-316.51"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a xlink:href="../../dd/d1f/classdsu.html#a0ce2672c570f4235eafddb0c9a58115a" target="_top" xlink:title="prints the minimum, maximum and size of the set to which i belongs to">
|
||||
<polygon fill="white" stroke="black" points="161.5,-228.5 161.5,-247.5 213.5,-247.5 213.5,-228.5 161.5,-228.5"/>
|
||||
<text text-anchor="middle" x="187.5" y="-235.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::get</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node2->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M112.28,-253.25C123.44,-250.95 138.08,-247.95 151.4,-245.21"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="152.17,-248.62 161.26,-243.18 150.76,-241.77 152.17,-248.62"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a xlink:href="../../dd/d1f/classdsu.html#a6ac30c07abca2aaa3b291504c25c3559" target="_top" xlink:title="Method that combines two disjoint sets to which i and j belongs to and make a single set having a com...">
|
||||
<polygon fill="white" stroke="black" points="148,-114.5 148,-133.5 227,-133.5 227,-114.5 148,-114.5"/>
|
||||
<text text-anchor="middle" x="187.5" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::UnionSet</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node9 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node2->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M103.88,-247.25C106.62,-244.36 109.52,-241.14 112,-238 137.26,-206.02 162.28,-165.42 175.93,-142.31"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="179.03,-143.95 181.05,-133.55 172.98,-140.42 179.03,-143.95"/>
|
||||
</g>
|
||||
<!-- Node4->Node3 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node4->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M205.43,-247.63C212.32,-251.78 220.23,-256.85 227,-262 244.28,-275.13 245.15,-282.65 263,-295 266.89,-297.69 271.2,-300.23 275.49,-302.53"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="274.13,-305.77 284.63,-307.14 277.28,-299.52 274.13,-305.77"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a xlink:href="../../dd/d1f/classdsu.html#a696141b8b092466767f4bfe1c5e46cde" target="_top" xlink:title="A utility function that returns the max element of the set to which i belongs to.">
|
||||
<polygon fill="white" stroke="black" points="263,-266.5 263,-285.5 340,-285.5 340,-266.5 263,-266.5"/>
|
||||
<text text-anchor="middle" x="301.5" y="-273.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::get_max</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M213.63,-246.53C228.06,-251.42 246.45,-257.66 262.59,-263.14"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="261.7,-266.53 272.3,-266.43 263.95,-259.9 261.7,-266.53"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a xlink:href="../../dd/d1f/classdsu.html#ac713a5b496d0405c82e2808a85e58415" target="_top" xlink:title="A utility function that returns the min element of the set to which i belongs to.">
|
||||
<polygon fill="white" stroke="black" points="264.5,-228.5 264.5,-247.5 338.5,-247.5 338.5,-228.5 264.5,-228.5"/>
|
||||
<text text-anchor="middle" x="301.5" y="-235.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::get_min</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node7 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node4->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M213.63,-238C225.56,-238 240.2,-238 254.03,-238"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="254.4,-241.5 264.4,-238 254.4,-234.5 254.4,-241.5"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a xlink:href="../../dd/d1f/classdsu.html#a1c24228b0f2f49220133fb8c3566a55c" target="_top" xlink:title="A utility function that returns the size of the set to which i belongs to.">
|
||||
<polygon fill="white" stroke="black" points="273.5,-190.5 273.5,-209.5 329.5,-209.5 329.5,-190.5 273.5,-190.5"/>
|
||||
<text text-anchor="middle" x="301.5" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node8 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node4->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M213.63,-229.47C228.38,-224.47 247.27,-218.06 263.66,-212.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="265.15,-215.69 273.49,-209.16 262.9,-209.06 265.15,-215.69"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a xlink:href="../../dd/d1f/classdsu.html#a16851f78fe390fc1430905c83d6a2f1c" target="_top" xlink:title="Method to find the representative of the set to which i belongs to, T(n) = O(1)">
|
||||
<polygon fill="white" stroke="black" points="376,-190.5 376,-209.5 445,-209.5 445,-190.5 376,-190.5"/>
|
||||
<text text-anchor="middle" x="410.5" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::findSet</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node6 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node5->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M323.58,-266.33C329.06,-263.55 334.87,-260.35 340,-257 358.62,-244.86 378.03,-228.58 391.6,-216.53"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="394.14,-218.94 399.22,-209.65 389.45,-213.75 394.14,-218.94"/>
|
||||
</g>
|
||||
<!-- Node6->Node6 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node6->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M393.85,-209.76C385.76,-218.57 391.3,-228 410.5,-228 422.5,-228 429.16,-224.31 430.5,-219.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="433.74,-218.05 427.15,-209.76 427.12,-220.35 433.74,-218.05"/>
|
||||
</g>
|
||||
<!-- Node7->Node6 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node7->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M329.5,-228.41C342.68,-223.73 358.73,-218.03 372.98,-212.97"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="374.26,-216.23 382.51,-209.59 371.91,-209.63 374.26,-216.23"/>
|
||||
</g>
|
||||
<!-- Node8->Node6 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node8->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M329.5,-200C340.53,-200 353.57,-200 365.88,-200"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="365.99,-203.5 375.99,-200 365.99,-196.5 365.99,-203.5"/>
|
||||
</g>
|
||||
<!-- Node9->Node6 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>Node9->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M227.08,-123.02C258.65,-123.56 303.83,-127.46 340,-143 361.13,-152.08 380.97,-169.6 394,-182.83"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="391.76,-185.56 401.18,-190.4 396.84,-180.74 391.76,-185.56"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><a xlink:href="../../dd/d1f/classdsu.html#a64d25c5986742f7c234ed449b2ff7303" target="_top" xlink:title="A utility function which check whether i and j belongs to same set or not.">
|
||||
<polygon fill="white" stroke="black" points="265.5,-152.5 265.5,-171.5 337.5,-171.5 337.5,-152.5 265.5,-152.5"/>
|
||||
<text text-anchor="middle" x="301.5" y="-159.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::isSame</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M216.76,-133.59C230.69,-138.31 247.68,-144.08 262.71,-149.18"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="261.65,-152.52 272.25,-152.41 263.9,-145.89 261.65,-152.52"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="274.5,-76.5 274.5,-95.5 328.5,-95.5 328.5,-76.5 274.5,-76.5"/>
|
||||
<text text-anchor="middle" x="301.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M216.76,-114.41C231.22,-109.51 248.98,-103.48 264.42,-98.24"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="265.82,-101.46 274.17,-94.93 263.58,-94.83 265.82,-101.46"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="275.5,-38.5 275.5,-57.5 327.5,-57.5 327.5,-38.5 275.5,-38.5"/>
|
||||
<text text-anchor="middle" x="301.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node12 -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>Node9->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M199.64,-114.43C213.81,-102.51 239.28,-81.9 263,-67 265.49,-65.43 268.13,-63.89 270.8,-62.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="272.69,-65.36 279.88,-57.59 269.41,-59.18 272.69,-65.36"/>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="node13" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_node13"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="272,-0.5 272,-19.5 331,-19.5 331,-0.5 272,-0.5"/>
|
||||
<text text-anchor="middle" x="301.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node13 -->
|
||||
<g id="edge18" class="edge">
|
||||
<title>Node9->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M194.13,-114.23C205.27,-95.63 231.73,-54.67 263,-29 264.79,-27.53 266.71,-26.14 268.7,-24.82"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="270.84,-27.62 277.7,-19.54 267.31,-21.58 270.84,-27.62"/>
|
||||
</g>
|
||||
<!-- Node10->Node6 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>Node10->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M329.5,-171.59C342.68,-176.27 358.73,-181.97 372.98,-187.03"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="371.91,-190.37 382.51,-190.41 374.26,-183.77 371.91,-190.37"/>
|
||||
</g>
|
||||
<!-- Node14->Node3 -->
|
||||
<g id="edge20" class="edge">
|
||||
<title>Node14->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M105.86,-228.69C116.44,-237 132.59,-248.87 148,-257 170.74,-268.99 238.15,-292.72 275.28,-305.45"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="274.29,-308.81 284.89,-308.73 276.55,-302.19 274.29,-308.81"/>
|
||||
</g>
|
||||
<!-- Node14->Node4 -->
|
||||
<g id="edge21" class="edge">
|
||||
<title>Node14->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M112.28,-222.75C123.44,-225.05 138.08,-228.05 151.4,-230.79"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="150.76,-234.23 161.26,-232.82 152.17,-227.38 150.76,-234.23"/>
|
||||
</g>
|
||||
<!-- Node14->Node9 -->
|
||||
<g id="edge22" class="edge">
|
||||
<title>Node14->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M103.55,-209.19C119.28,-193.04 150.82,-160.65 170.15,-140.79"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="172.67,-143.22 177.14,-133.61 167.66,-138.34 172.67,-143.22"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,14 @@
|
||||
<map id="test1" name="test1">
|
||||
<area shape="rect" id="node1" title="Self-test implementations, 1st test." alt="" coords="5,81,56,108"/>
|
||||
<area shape="rect" id="node2" href="$d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa" title=" " alt="" coords="287,5,331,32"/>
|
||||
<area shape="rect" id="node3" href="$dd/d1f/classdsu.html#a0ce2672c570f4235eafddb0c9a58115a" title="prints the minimum, maximum and size of the set to which i belongs to" alt="" coords="122,81,191,108"/>
|
||||
<area shape="rect" id="node8" href="$dd/d1f/classdsu.html#a6ac30c07abca2aaa3b291504c25c3559" title="Method that combines two disjoint sets to which i and j belongs to and make a single set having a com..." alt="" coords="104,284,209,311"/>
|
||||
<area shape="rect" id="node4" href="$dd/d1f/classdsu.html#a696141b8b092466767f4bfe1c5e46cde" title="A utility function that returns the max element of the set to which i belongs to." alt="" coords="257,56,360,83"/>
|
||||
<area shape="rect" id="node6" href="$dd/d1f/classdsu.html#ac713a5b496d0405c82e2808a85e58415" title="A utility function that returns the min element of the set to which i belongs to." alt="" coords="259,107,358,133"/>
|
||||
<area shape="rect" id="node7" href="$dd/d1f/classdsu.html#a1c24228b0f2f49220133fb8c3566a55c" title="A utility function that returns the size of the set to which i belongs to." alt="" coords="271,157,346,184"/>
|
||||
<area shape="rect" id="node5" href="$dd/d1f/classdsu.html#a16851f78fe390fc1430905c83d6a2f1c" title="Method to find the representative of the set to which i belongs to, T(n) = O(1)" alt="" coords="408,157,500,184"/>
|
||||
<area shape="rect" id="node9" href="$dd/d1f/classdsu.html#a64d25c5986742f7c234ed449b2ff7303" title="A utility function which check whether i and j belongs to same set or not." alt="" coords="261,259,357,285"/>
|
||||
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max.html#" title=" " alt="" coords="273,309,345,336"/>
|
||||
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min.html#" title=" " alt="" coords="274,360,343,387"/>
|
||||
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/swap.html#" title=" " alt="" coords="269,411,348,437"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
3bec5290d87010e3e3fc47c4fae30552
|
||||
@@ -0,0 +1,223 @@
|
||||
<?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.49.2 (20211016.1639)
|
||||
-->
|
||||
<!-- Title: test1 Pages: 1 -->
|
||||
<svg width="379pt" height="332pt"
|
||||
viewBox="0.00 0.00 379.00 332.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 328)">
|
||||
<title>test1</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-328 375,-328 375,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Self-test implementations, 1st test.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-247.5 0,-266.5 38,-266.5 38,-247.5 0,-247.5"/>
|
||||
<text text-anchor="middle" x="19" y="-254.5" font-family="Helvetica,sans-Serif" font-size="10.00">test1</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="211,-304.5 211,-323.5 244,-323.5 244,-304.5 211,-304.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-311.5" font-family="Helvetica,sans-Serif" font-size="10.00">ans</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.35,-263.94C48.74,-267.75 62.01,-272.4 74,-276 118.19,-289.25 170.52,-301.57 200.97,-308.41"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="200.26,-311.84 210.78,-310.6 201.78,-305.01 200.26,-311.84"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a xlink:href="../../dd/d1f/classdsu.html#a0ce2672c570f4235eafddb0c9a58115a" target="_top" xlink:title="prints the minimum, maximum and size of the set to which i belongs to">
|
||||
<polygon fill="white" stroke="black" points="87.5,-247.5 87.5,-266.5 139.5,-266.5 139.5,-247.5 87.5,-247.5"/>
|
||||
<text text-anchor="middle" x="113.5" y="-254.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::get</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.28,-257C49.33,-257 63.79,-257 77.01,-257"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="77.26,-260.5 87.26,-257 77.26,-253.5 77.26,-260.5"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a xlink:href="../../dd/d1f/classdsu.html#a6ac30c07abca2aaa3b291504c25c3559" target="_top" xlink:title="Method that combines two disjoint sets to which i and j belongs to and make a single set having a com...">
|
||||
<polygon fill="white" stroke="black" points="74,-95.5 74,-114.5 153,-114.5 153,-95.5 74,-95.5"/>
|
||||
<text text-anchor="middle" x="113.5" y="-102.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::UnionSet</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node8 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node1->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.79,-247.49C40.84,-222.75 81.43,-156.05 101.28,-123.44"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="104.51,-124.87 106.72,-114.5 98.53,-121.23 104.51,-124.87"/>
|
||||
</g>
|
||||
<!-- Node3->Node2 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node3->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M133.17,-266.54C148.23,-274.23 169.97,-285.33 189,-295 193.14,-297.1 197.53,-299.33 201.8,-301.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="200.3,-304.66 210.8,-306.06 203.47,-298.42 200.3,-304.66"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a xlink:href="../../dd/d1f/classdsu.html#a696141b8b092466767f4bfe1c5e46cde" target="_top" xlink:title="A utility function that returns the max element of the set to which i belongs to.">
|
||||
<polygon fill="white" stroke="black" points="189,-266.5 189,-285.5 266,-285.5 266,-266.5 189,-266.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-273.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::get_max</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M139.63,-261.26C151.15,-263.22 165.19,-265.6 178.6,-267.87"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="178.23,-271.36 188.68,-269.58 179.41,-264.46 178.23,-271.36"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a xlink:href="../../dd/d1f/classdsu.html#ac713a5b496d0405c82e2808a85e58415" target="_top" xlink:title="A utility function that returns the min element of the set to which i belongs to.">
|
||||
<polygon fill="white" stroke="black" points="190.5,-228.5 190.5,-247.5 264.5,-247.5 264.5,-228.5 190.5,-228.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-235.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::get_min</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node6 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node3->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M139.63,-252.74C151.68,-250.69 166.48,-248.18 180.44,-245.81"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="181.13,-249.25 190.4,-244.12 179.96,-242.35 181.13,-249.25"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a xlink:href="../../dd/d1f/classdsu.html#a1c24228b0f2f49220133fb8c3566a55c" target="_top" xlink:title="A utility function that returns the size of the set to which i belongs to.">
|
||||
<polygon fill="white" stroke="black" points="199.5,-190.5 199.5,-209.5 255.5,-209.5 255.5,-190.5 199.5,-190.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node7 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node3->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M133.17,-247.46C148.23,-239.77 169.97,-228.67 189,-219 191.99,-217.48 195.12,-215.89 198.24,-214.31"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="200.08,-217.3 207.42,-209.66 196.92,-211.06 200.08,-217.3"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a xlink:href="../../dd/d1f/classdsu.html#a16851f78fe390fc1430905c83d6a2f1c" target="_top" xlink:title="Method to find the representative of the set to which i belongs to, T(n) = O(1)">
|
||||
<polygon fill="white" stroke="black" points="302,-190.5 302,-209.5 371,-209.5 371,-190.5 302,-190.5"/>
|
||||
<text text-anchor="middle" x="336.5" y="-197.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::findSet</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M249.58,-266.33C255.06,-263.55 260.87,-260.35 266,-257 284.62,-244.86 304.03,-228.58 317.6,-216.53"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="320.14,-218.94 325.22,-209.65 315.45,-213.75 320.14,-218.94"/>
|
||||
</g>
|
||||
<!-- Node5->Node5 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node5->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M319.85,-209.76C311.76,-218.57 317.3,-228 336.5,-228 348.5,-228 355.16,-224.31 356.5,-219.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="359.74,-218.05 353.15,-209.76 353.12,-220.35 359.74,-218.05"/>
|
||||
</g>
|
||||
<!-- Node6->Node5 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node6->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M255.5,-228.41C268.68,-223.73 284.73,-218.03 298.98,-212.97"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="300.26,-216.23 308.51,-209.59 297.91,-209.63 300.26,-216.23"/>
|
||||
</g>
|
||||
<!-- Node7->Node5 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node7->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M255.5,-200C266.53,-200 279.57,-200 291.88,-200"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="291.99,-203.5 301.99,-200 291.99,-196.5 291.99,-203.5"/>
|
||||
</g>
|
||||
<!-- Node8->Node5 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node8->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M132.02,-114.57C146.96,-122.58 169.13,-134.09 189,-143 225.92,-159.55 269.21,-176.04 299.1,-187"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="298.11,-190.36 308.7,-190.49 300.5,-183.78 298.11,-190.36"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a xlink:href="../../dd/d1f/classdsu.html#a64d25c5986742f7c234ed449b2ff7303" target="_top" xlink:title="A utility function which check whether i and j belongs to same set or not.">
|
||||
<polygon fill="white" stroke="black" points="191.5,-114.5 191.5,-133.5 263.5,-133.5 263.5,-114.5 191.5,-114.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">dsu::isSame</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node9 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>Node8->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M153.04,-111.54C162.15,-113.08 171.94,-114.75 181.32,-116.33"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="180.82,-119.8 191.27,-118.02 182,-112.9 180.82,-119.8"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="200.5,-76.5 200.5,-95.5 254.5,-95.5 254.5,-76.5 200.5,-76.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node10 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>Node8->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M153.04,-98.46C165.08,-96.42 178.32,-94.17 190.2,-92.16"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="190.95,-95.58 200.23,-90.46 189.78,-88.68 190.95,-95.58"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="201.5,-38.5 201.5,-57.5 253.5,-57.5 253.5,-38.5 201.5,-38.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node11 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>Node8->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M133.17,-95.46C148.23,-87.77 169.97,-76.67 189,-67 191.99,-65.48 195.12,-63.89 198.24,-62.31"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="200.08,-65.3 207.42,-57.66 196.92,-59.06 200.08,-65.3"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/swap.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="198,-0.5 198,-19.5 257,-19.5 257,-0.5 198,-0.5"/>
|
||||
<text text-anchor="middle" x="227.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::swap</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node12 -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>Node8->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M122.36,-95.11C135.09,-79.56 161.57,-49.09 189,-29 191.06,-27.49 193.26,-26.04 195.52,-24.66"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="197.36,-27.64 204.38,-19.7 193.94,-21.53 197.36,-27.64"/>
|
||||
</g>
|
||||
<!-- Node9->Node5 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>Node9->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M243.99,-133.56C250.82,-137.86 258.88,-143.07 266,-148 282.67,-159.54 301.01,-173.32 314.66,-183.79"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="312.84,-186.8 322.89,-190.13 317.11,-181.25 312.84,-186.8"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user