Documentation for 5aa074c88b

This commit is contained in:
github-actions
2020-08-16 18:56:18 +00:00
parent 49e28d42dd
commit 87763db40a
315 changed files with 5393 additions and 5867 deletions

View File

@@ -91,7 +91,7 @@ $(document).ready(function(){initNavTree('df/ddd/connected__components_8cpp.html
<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">connected_components.cpp File Reference</div> </div>
@@ -101,22 +101,35 @@ $(document).ready(function(){initNavTree('df/ddd/connected__components_8cpp.html
<p><a href="https://en.wikipedia.org/wiki/Component_(graph_theory)">Graph Connected Components (Connected Components)</a>
<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;iostream&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for connected_components.cpp:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d77/connected__components_8cpp__incl.svg" width="264" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d77/connected__components_8cpp__incl.svg" width="355" height="112"><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 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="../../dd/d9b/classgraph.html">graph</a></td></tr>
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:df/dce/namespacegraph"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html">graph</a></td></tr>
<tr class="memdesc:df/dce/namespacegraph"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> algorithms. <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:a372ff051a7bc6c91d34a7b58edf8dfce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</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; *adj, int u, int v)</td></tr>
<tr class="memdesc:a372ff051a7bc6c91d34a7b58edf8dfce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that add edge between two nodes or vertices of graph. <a href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">More...</a><br /></td></tr>
<tr class="separator:a372ff051a7bc6c91d34a7b58edf8dfce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e9885e0dd49fcf8262a9868124deac9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a8e9885e0dd49fcf8262a9868124deac9">graph::explore</a> (const <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; *adj, int u, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; bool &gt; *visited)</td></tr>
<tr class="memdesc:a8e9885e0dd49fcf8262a9868124deac9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility function for depth first seach algorithm this function explores the vertex which is passed into. <a href="../../df/dce/namespacegraph.html#a8e9885e0dd49fcf8262a9868124deac9">More...</a><br /></td></tr>
<tr class="separator:a8e9885e0dd49fcf8262a9868124deac9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fc2ded2807582edf398e6d7c7114914"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a9fc2ded2807582edf398e6d7c7114914">graph::getConnectedComponents</a> (const <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; *adj)</td></tr>
<tr class="memdesc:a9fc2ded2807582edf398e6d7c7114914"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that perfoms depth first search algorithm on graph and calculated the number of connected components. <a href="../../df/dce/namespacegraph.html#a9fc2ded2807582edf398e6d7c7114914">More...</a><br /></td></tr>
<tr class="separator:a9fc2ded2807582edf398e6d7c7114914"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88ec9ad42717780d6caaff9d3d6977f9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/ddd/connected__components_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a> ()</td></tr>
<tr class="separator:a88ec9ad42717780d6caaff9d3d6977f9"><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="../../df/ddd/connected__components_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
@@ -125,9 +138,9 @@ Functions</h2></td></tr>
<dl class="section author"><dt>Author</dt><dd><a href="http://github.com/ayaankhan98">Ayaan Khan</a></dd></dl>
<p>A graph is a collection of nodes also called vertices and these vertices are connected by edges. A connected component in a graph refers to a set of vertices which are reachable form one another.</p>
<pre>
Example - Here is graph with 3 connected components</pre><pre> 3 9 6 8
Example - Here is graph with 3 connected components</pre><pre> 1 4 5 8
/ \ / / \ / \
2---4 2 7 3 7</pre><pre> first second third
2---3 6 7 9 10</pre><pre> first second third
component component component
</pre> </div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
@@ -145,25 +158,89 @@ Example - Here is graph with 3 connected components</pre><pre> 3 9
</table>
</div><div class="memdoc">
<p>Main function </p>
<p>creating a graph with 4 vertex</p>
<p>Adding edges between vertices</p>
<p>printing the connected components</p>
<div class="fragment"><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; {<span class="comment"></span></div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;<span class="comment"> /// creating a graph with 4 vertex</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;<span class="comment"></span> <a class="code" href="../../df/dce/namespacegraph.html">graph</a> g(4);</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;<span class="comment"> /// Adding edges between vertices</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;<span class="comment"></span> g.addEdge(1, 2);</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; g.addEdge(3, 2);</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;<span class="comment"> /// printing the connected components</span></div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;<span class="comment"></span> <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; g.getConnectedComponents();</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;}</div>
<p>running predefined tests</p>
<div class="fragment"><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; {<span class="comment"></span></div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="comment"> /// running predefined tests</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="comment"></span> <a class="code" href="../../df/ddd/connected__components_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a>();</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; <span class="keywordtype">int</span> vertices = int(), edges = int();</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</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;Enter the number of vertices : &quot;</span>;</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; vertices;</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</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;Enter the number of edges : &quot;</span>;</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; edges;</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</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; adj(vertices, <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a>());</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="keywordtype">int</span> u = int(), v = int();</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="keywordflow">while</span> (edges--) {</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; u &gt;&gt; v;</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj, u, v);</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; }</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; </div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="keywordtype">int</span> cc = <a class="code" href="../../df/dce/namespacegraph.html#a9fc2ded2807582edf398e6d7c7114914">graph::getConnectedComponents</a>(&amp;adj);</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; cc &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</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="../../df/ddd/connected__components_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="100%" height="391"><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="../../df/ddd/connected__components_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="590" height="188"><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="a88ec9ad42717780d6caaff9d3d6977f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88ec9ad42717780d6caaff9d3d6977f9">&#9670;&nbsp;</a></span>tests()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void tests </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Function to test the algorithm </p>
<div class="fragment"><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; {</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</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;Running predefined tests...&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</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;Initiating Test 1...&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</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; adj1(9, <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a>());</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj1, 1, 2);</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj1, 1, 3);</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj1, 3, 4);</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj1, 5, 7);</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj1, 5, 6);</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj1, 8, 9);</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; assert(<a class="code" href="../../df/dce/namespacegraph.html#a9fc2ded2807582edf398e6d7c7114914">graph::getConnectedComponents</a>(&amp;adj1) == 3);</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</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 Passed...&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</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; <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;Innitiating Test 2...&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</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; adj2(10, <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a>());</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj2, 1, 2);</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj2, 1, 3);</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj2, 1, 4);</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj2, 2, 3);</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj2, 3, 4);</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj2, 4, 8);</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj2, 4, 10);</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj2, 8, 10);</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj2, 8, 9);</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj2, 5, 7);</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj2, 5, 6);</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <a class="code" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a>(&amp;adj2, 6, 7);</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; assert(<a class="code" href="../../df/dce/namespacegraph.html#a9fc2ded2807582edf398e6d7c7114914">graph::getConnectedComponents</a>(&amp;adj2) == 2);</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</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 Passed...&quot;</span> &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</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="../../df/ddd/connected__components_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.svg" width="491" height="164"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
@@ -171,8 +248,13 @@ Here is the call graph for this function:</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<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="anamespacegraph_html_a9fc2ded2807582edf398e6d7c7114914"><div class="ttname"><a href="../../df/dce/namespacegraph.html#a9fc2ded2807582edf398e6d7c7114914">graph::getConnectedComponents</a></div><div class="ttdeci">int getConnectedComponents(const std::vector&lt; std::vector&lt; int &gt;&gt; *adj)</div><div class="ttdoc">Function that perfoms depth first search algorithm on graph and calculated the number of connected co...</div><div class="ttdef"><b>Definition:</b> connected_components.cpp:77</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="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="anamespacegraph_html_a372ff051a7bc6c91d34a7b58edf8dfce"><div class="ttname"><a href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">graph::addEdge</a></div><div class="ttdeci">void addEdge(std::vector&lt; std::vector&lt; int &gt;&gt; *adj, int u, int v)</div><div class="ttdoc">Function that add edge between two nodes or vertices of graph.</div><div class="ttdef"><b>Definition:</b> connected_components.cpp:46</div></div>
<div class="ttc" id="aconnected__components_8cpp_html_a88ec9ad42717780d6caaff9d3d6977f9"><div class="ttname"><a href="../../df/ddd/connected__components_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a></div><div class="ttdeci">void tests()</div><div class="ttdef"><b>Definition:</b> connected_components.cpp:93</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="abasic_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>

View File

@@ -1,5 +1,8 @@
var connected__components_8cpp =
[
[ "graph", "dd/d9b/classgraph.html", "dd/d9b/classgraph" ],
[ "main", "df/ddd/connected__components_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ]
[ "addEdge", "df/ddd/connected__components_8cpp.html#a372ff051a7bc6c91d34a7b58edf8dfce", null ],
[ "explore", "df/ddd/connected__components_8cpp.html#a8e9885e0dd49fcf8262a9868124deac9", null ],
[ "getConnectedComponents", "df/ddd/connected__components_8cpp.html#a9fc2ded2807582edf398e6d7c7114914", null ],
[ "main", "df/ddd/connected__components_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
[ "tests", "df/ddd/connected__components_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9", null ]
];

View File

@@ -0,0 +1,8 @@
<map id="tests" name="tests">
<area shape="rect" id="node1" title=" " alt="" coords="5,56,56,83"/>
<area shape="rect" id="node2" href="$df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce" title="Function that add edge between two nodes or vertices of graph." alt="" coords="156,5,269,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="177,56,249,83"/>
<area shape="rect" id="node4" href="$df/dce/namespacegraph.html#a9fc2ded2807582edf398e6d7c7114914" title="Function that perfoms depth first search algorithm on graph and calculated the number of connected co..." alt="" coords="104,107,321,133"/>
<area shape="rect" id="node5" href="$df/dce/namespacegraph.html#a8e9885e0dd49fcf8262a9868124deac9" title="Utility function for depth first seach algorithm this function explores the vertex which is passed in..." alt="" coords="375,81,479,108"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="369,132,485,159"/>
</map>

View File

@@ -0,0 +1 @@
d936b6b61dac4ee481c7513f99d170d6

View File

@@ -0,0 +1,97 @@
<?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: tests Pages: 1 -->
<svg width="368pt" height="123pt"
viewBox="0.00 0.00 368.00 123.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 119)">
<title>tests</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-119 364,-119 364,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,-57.5 0,-76.5 38,-76.5 38,-57.5 0,-57.5"/>
<text text-anchor="middle" x="19" y="-64.5" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce" target="_top" xlink:title="Function that add edge between two nodes or vertices of graph.">
<polygon fill="white" stroke="black" points="113,-95.5 113,-114.5 198,-114.5 198,-95.5 113,-95.5"/>
<text text-anchor="middle" x="155.5" y="-102.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::addEdge</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="M38.34,-74C48.71,-77.82 61.98,-82.48 74,-86 83.31,-88.73 93.31,-91.34 102.98,-93.7"/>
<polygon fill="midnightblue" stroke="midnightblue" points="102.37,-97.16 112.91,-96.08 104,-90.35 102.37,-97.16"/>
</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/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="128.5,-57.5 128.5,-76.5 182.5,-76.5 182.5,-57.5 128.5,-57.5"/>
<text text-anchor="middle" x="155.5" y="-64.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</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="M38.14,-67C58.56,-67 92.26,-67 118.15,-67"/>
<polygon fill="midnightblue" stroke="midnightblue" points="118.35,-70.5 128.35,-67 118.35,-63.5 118.35,-70.5"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../df/dce/namespacegraph.html#a9fc2ded2807582edf398e6d7c7114914" target="_top" xlink:title="Function that perfoms depth first search algorithm on graph and calculated the number of connected co...">
<polygon fill="white" stroke="black" points="74,-19.5 74,-38.5 237,-38.5 237,-19.5 74,-19.5"/>
<text text-anchor="middle" x="155.5" y="-26.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::getConnectedComponents</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="M38.34,-60C48.71,-56.18 61.98,-51.52 74,-48 82.51,-45.51 91.6,-43.11 100.49,-40.91"/>
<polygon fill="midnightblue" stroke="midnightblue" points="101.51,-44.26 110.41,-38.51 99.87,-37.46 101.51,-44.26"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:href="../../df/dce/namespacegraph.html#a8e9885e0dd49fcf8262a9868124deac9" target="_top" xlink:title="Utility function for depth first seach algorithm this function explores the vertex which is passed in...">
<polygon fill="white" stroke="black" points="277.5,-38.5 277.5,-57.5 355.5,-57.5 355.5,-38.5 277.5,-38.5"/>
<text text-anchor="middle" x="316.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::explore</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="M236.47,-38.56C246.92,-39.8 257.35,-41.05 267.06,-42.21"/>
<polygon fill="midnightblue" stroke="midnightblue" points="266.93,-45.72 277.27,-43.43 267.76,-38.77 266.93,-45.72"/>
</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/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="273,-0.5 273,-19.5 360,-19.5 360,-0.5 273,-0.5"/>
<text text-anchor="middle" x="316.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</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="M236.47,-19.44C245.37,-18.38 254.27,-17.32 262.71,-16.31"/>
<polygon fill="midnightblue" stroke="midnightblue" points="263.24,-19.77 272.76,-15.11 262.41,-12.82 263.24,-19.77"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -1,9 +1,9 @@
<map id="main" name="main">
<area shape="rect" id="node1" title=" " alt="" coords="5,35,56,61"/>
<area shape="rect" id="node2" href="$dd/d9b/classgraph.html#a35c12fba596d8bb48b1877b128c4ba6d" title="Function that add edge between two nodes or vertices of graph." alt="" coords="156,8,269,35"/>
<area shape="rect" id="node4" href="$dd/d9b/classgraph.html#af9b34bbae0f618e2128c501b69339bb0" title="Function the calculates the connected compoents in the graph by performing the depth first search on ..." alt="" coords="104,60,321,87"/>
<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="369,5,524,32"/>
<area shape="rect" id="node5" href="$dd/d9b/classgraph.html#a135921a59082b669678b029b301b8a1c" title="Function that perfoms depth first search algorithm on graph." alt="" coords="385,57,508,98"/>
<area shape="rect" id="node6" href="$dd/d9b/classgraph.html#a6398e513b9574e029fbee07c6ac6e028" title="Utility function for depth first seach algorithm this function explores the vertex which is passed in..." alt="" coords="578,39,682,65"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="572,89,688,116"/>
<area shape="rect" id="node1" title=" " alt="" coords="5,68,56,95"/>
<area shape="rect" id="node2" href="$df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce" title="Function that add edge between two nodes or vertices of graph." alt="" coords="255,5,368,32"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="275,68,347,95"/>
<area shape="rect" id="node4" href="$df/dce/namespacegraph.html#a9fc2ded2807582edf398e6d7c7114914" title="Function that perfoms depth first search algorithm on graph and calculated the number of connected co..." alt="" coords="203,131,420,157"/>
<area shape="rect" id="node7" href="$df/ddd/connected__components_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9" title=" " alt="" coords="104,43,155,69"/>
<area shape="rect" id="node5" href="$df/dce/namespacegraph.html#a8e9885e0dd49fcf8262a9868124deac9" title="Utility function for depth first seach algorithm this function explores the vertex which is passed in..." alt="" coords="474,105,578,132"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="468,156,584,183"/>
</map>

View File

@@ -1 +1 @@
e9ab27bb2078e3c7ef2dd297ff04fcd8
e6a4a8c7e811f36f24dc9cc06d09400e

View File

@@ -4,198 +4,127 @@
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
-->
<!-- Title: main Pages: 1 -->
<!--zoomable 91 -->
<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 = 520;
var viewHeight = 91;
var sectionId = 'dynsection-1';
</script>
<script xlink:href="../../svgpan.js"/>
<svg id="graph" class="graph">
<g id="viewport">
<svg width="442pt" height="141pt"
viewBox="0.00 0.00 442.00 141.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 137)">
<title>main</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-87 516,-87 516,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-137 438,-137 438,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,-41.5 0,-60.5 38,-60.5 38,-41.5 0,-41.5"/>
<text text-anchor="middle" x="19" y="-48.5" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
<polygon fill="#bfbfbf" stroke="black" points="0,-66.5 0,-85.5 38,-85.5 38,-66.5 0,-66.5"/>
<text text-anchor="middle" x="19" y="-73.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="../../dd/d9b/classgraph.html#a35c12fba596d8bb48b1877b128c4ba6d" target="_top" xlink:title="Function that add edge between two nodes or vertices of graph.">
<polygon fill="white" stroke="black" points="113,-61.5 113,-80.5 198,-80.5 198,-61.5 113,-61.5"/>
<text text-anchor="middle" x="155.5" y="-68.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::addEdge</text>
<g id="a_node2"><a xlink:href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce" target="_top" xlink:title="Function that add edge between two nodes or vertices of graph.">
<polygon fill="white" stroke="black" points="187,-113.5 187,-132.5 272,-132.5 272,-113.5 187,-113.5"/>
<text text-anchor="middle" x="229.5" y="-120.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::addEdge</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="M38.14,-53.7C54.75,-56.17 80.16,-59.95 103,-63.34"/>
<polygon fill="midnightblue" stroke="midnightblue" points="102.53,-66.81 112.94,-64.82 103.56,-59.89 102.53,-66.81"/>
<path fill="none" stroke="midnightblue" d="M30.16,-85.82C40.34,-94.96 56.9,-108.03 74,-114 106.93,-125.49 146.2,-127.64 176.9,-126.97"/>
<polygon fill="midnightblue" stroke="midnightblue" points="177.09,-130.47 186.97,-126.64 176.86,-123.47 177.09,-130.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/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="202.5,-66.5 202.5,-85.5 256.5,-85.5 256.5,-66.5 202.5,-66.5"/>
<text text-anchor="middle" x="229.5" y="-73.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</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="M38.14,-76C72.35,-76 147.01,-76 191.99,-76"/>
<polygon fill="midnightblue" stroke="midnightblue" points="192.2,-79.5 202.2,-76 192.2,-72.5 192.2,-79.5"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../dd/d9b/classgraph.html#af9b34bbae0f618e2128c501b69339bb0" target="_top" xlink:title="Function the calculates the connected compoents in the graph by performing the depth first search on ...">
<polygon fill="white" stroke="black" points="74,-22.5 74,-41.5 237,-41.5 237,-22.5 74,-22.5"/>
<text text-anchor="middle" x="155.5" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::getConnectedComponents</text>
<g id="a_node4"><a xlink:href="../../df/dce/namespacegraph.html#a9fc2ded2807582edf398e6d7c7114914" target="_top" xlink:title="Function that perfoms depth first search algorithm on graph and calculated the number of connected co...">
<polygon fill="white" stroke="black" points="148,-19.5 148,-38.5 311,-38.5 311,-19.5 148,-19.5"/>
<text text-anchor="middle" x="229.5" y="-26.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::getConnectedComponents</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="M38.14,-48.44C48.57,-46.96 62.46,-45 77.01,-42.95"/>
<polygon fill="midnightblue" stroke="midnightblue" points="77.74,-46.38 87.15,-41.51 76.76,-39.45 77.74,-46.38"/>
<path fill="none" stroke="midnightblue" d="M38.14,-71.91C68.63,-65.04 131.23,-50.93 176.33,-40.76"/>
<polygon fill="midnightblue" stroke="midnightblue" points="177.26,-44.14 186.25,-38.53 175.72,-37.31 177.26,-44.14"/>
</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="273,-63.5 273,-82.5 389,-82.5 389,-63.5 273,-63.5"/>
<text text-anchor="middle" x="331" y="-70.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a xlink:href="../../df/ddd/connected__components_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="74,-85.5 74,-104.5 112,-104.5 112,-85.5 74,-85.5"/>
<text text-anchor="middle" x="93" y="-92.5" font-family="Helvetica,sans-Serif" font-size="10.00">tests</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="M198.06,-71.48C217.36,-71.7 240.8,-71.97 262.53,-72.22"/>
<polygon fill="midnightblue" stroke="midnightblue" points="262.67,-75.72 272.71,-72.34 262.75,-68.72 262.67,-75.72"/>
<!-- Node1&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node1&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M38.17,-80.79C45.95,-82.85 55.23,-85.3 63.87,-87.58"/>
<polygon fill="midnightblue" stroke="midnightblue" points="63.02,-90.97 73.59,-90.14 64.81,-84.21 63.02,-90.97"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:href="../../dd/d9b/classgraph.html#a135921a59082b669678b029b301b8a1c" target="_top" xlink:title="Function that perfoms depth first search algorithm on graph.">
<polygon fill="white" stroke="black" points="285,-14 285,-44 377,-44 377,-14 285,-14"/>
<text text-anchor="start" x="293" y="-32" font-family="Helvetica,sans-Serif" font-size="10.00">graph::depth_first</text>
<text text-anchor="middle" x="331" y="-21" font-family="Helvetica,sans-Serif" font-size="10.00">_search</text>
<g id="a_node5"><a xlink:href="../../df/dce/namespacegraph.html#a8e9885e0dd49fcf8262a9868124deac9" target="_top" xlink:title="Utility function for depth first seach algorithm this function explores the vertex which is passed in...">
<polygon fill="white" stroke="black" points="351.5,-38.5 351.5,-57.5 429.5,-57.5 429.5,-38.5 351.5,-38.5"/>
<text text-anchor="middle" x="390.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::explore</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="M237.15,-30.61C249.75,-30.39 262.51,-30.17 274.38,-29.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="274.62,-33.46 284.56,-29.79 274.5,-26.46 274.62,-33.46"/>
<path fill="none" stroke="midnightblue" d="M310.47,-38.56C320.92,-39.8 331.35,-41.05 341.06,-42.21"/>
<polygon fill="midnightblue" stroke="midnightblue" points="340.93,-45.72 351.27,-43.43 341.76,-38.77 340.93,-45.72"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a xlink:href="../../dd/d9b/classgraph.html#a6398e513b9574e029fbee07c6ac6e028" target="_top" xlink:title="Utility function for depth first seach algorithm this function explores the vertex which is passed in...">
<polygon fill="white" stroke="black" points="429.5,-38.5 429.5,-57.5 507.5,-57.5 507.5,-38.5 429.5,-38.5"/>
<text text-anchor="middle" x="468.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::explore</text>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="347,-0.5 347,-19.5 434,-19.5 434,-0.5 347,-0.5"/>
<text text-anchor="middle" x="390.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<!-- Node4&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node5&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M377.12,-35.33C390.62,-37.22 405.47,-39.3 419.16,-41.22"/>
<polygon fill="midnightblue" stroke="midnightblue" points="418.98,-44.73 429.37,-42.65 419.95,-37.8 418.98,-44.73"/>
<title>Node4&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M310.47,-19.44C319.37,-18.38 328.27,-17.32 336.71,-16.31"/>
<polygon fill="midnightblue" stroke="midnightblue" points="337.24,-19.77 346.76,-15.11 336.41,-12.82 337.24,-19.77"/>
</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/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="425,-0.5 425,-19.5 512,-19.5 512,-0.5 425,-0.5"/>
<text text-anchor="middle" x="468.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
<!-- Node7&#45;&gt;Node2 -->
<g id="edge7" class="edge">
<title>Node7&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M112.14,-98.78C128.75,-102.24 154.16,-107.52 177,-112.28"/>
<polygon fill="midnightblue" stroke="midnightblue" points="176.43,-115.74 186.94,-114.35 177.86,-108.88 176.43,-115.74"/>
</g>
<!-- Node7&#45;&gt;Node3 -->
<g id="edge8" class="edge">
<title>Node7&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M112.14,-92.44C132.56,-89.55 166.26,-84.79 192.15,-81.13"/>
<polygon fill="midnightblue" stroke="midnightblue" points="192.94,-84.56 202.35,-79.69 191.96,-77.63 192.94,-84.56"/>
</g>
<!-- Node5&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node5&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M377.12,-22.67C389.15,-20.99 402.25,-19.15 414.66,-17.41"/>
<polygon fill="midnightblue" stroke="midnightblue" points="415.45,-20.83 424.87,-15.98 414.48,-13.9 415.45,-20.83"/>
<!-- Node7&#45;&gt;Node4 -->
<g id="edge9" class="edge">
<title>Node7&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M105.82,-85.22C116.37,-76.86 132.5,-64.95 148,-57 159.53,-51.08 172.6,-45.94 184.79,-41.73"/>
<polygon fill="midnightblue" stroke="midnightblue" points="185.96,-45.03 194.34,-38.56 183.75,-38.39 185.96,-45.03"/>
</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="connected__components_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>

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@@ -1,113 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
-->
<!-- Title: main Pages: 1 -->
<svg width="520pt" height="91pt"
viewBox="0.00 0.00 520.00 91.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 87)">
<title>main</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-87 516,-87 516,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,-41.5 0,-60.5 38,-60.5 38,-41.5 0,-41.5"/>
<text text-anchor="middle" x="19" y="-48.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="../../dd/d9b/classgraph.html#a35c12fba596d8bb48b1877b128c4ba6d" target="_top" xlink:title="Function that add edge between two nodes or vertices of graph.">
<polygon fill="white" stroke="black" points="113,-61.5 113,-80.5 198,-80.5 198,-61.5 113,-61.5"/>
<text text-anchor="middle" x="155.5" y="-68.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::addEdge</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="M38.14,-53.7C54.75,-56.17 80.16,-59.95 103,-63.34"/>
<polygon fill="midnightblue" stroke="midnightblue" points="102.53,-66.81 112.94,-64.82 103.56,-59.89 102.53,-66.81"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../dd/d9b/classgraph.html#af9b34bbae0f618e2128c501b69339bb0" target="_top" xlink:title="Function the calculates the connected compoents in the graph by performing the depth first search on ...">
<polygon fill="white" stroke="black" points="74,-22.5 74,-41.5 237,-41.5 237,-22.5 74,-22.5"/>
<text text-anchor="middle" x="155.5" y="-29.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::getConnectedComponents</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="M38.14,-48.44C48.57,-46.96 62.46,-45 77.01,-42.95"/>
<polygon fill="midnightblue" stroke="midnightblue" points="77.74,-46.38 87.15,-41.51 76.76,-39.45 77.74,-46.38"/>
</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="273,-63.5 273,-82.5 389,-82.5 389,-63.5 273,-63.5"/>
<text text-anchor="middle" x="331" y="-70.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</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="M198.06,-71.48C217.36,-71.7 240.8,-71.97 262.53,-72.22"/>
<polygon fill="midnightblue" stroke="midnightblue" points="262.67,-75.72 272.71,-72.34 262.75,-68.72 262.67,-75.72"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:href="../../dd/d9b/classgraph.html#a135921a59082b669678b029b301b8a1c" target="_top" xlink:title="Function that perfoms depth first search algorithm on graph.">
<polygon fill="white" stroke="black" points="285,-14 285,-44 377,-44 377,-14 285,-14"/>
<text text-anchor="start" x="293" y="-32" font-family="Helvetica,sans-Serif" font-size="10.00">graph::depth_first</text>
<text text-anchor="middle" x="331" y="-21" font-family="Helvetica,sans-Serif" font-size="10.00">_search</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="M237.15,-30.61C249.75,-30.39 262.51,-30.17 274.38,-29.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="274.62,-33.46 284.56,-29.79 274.5,-26.46 274.62,-33.46"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a xlink:href="../../dd/d9b/classgraph.html#a6398e513b9574e029fbee07c6ac6e028" target="_top" xlink:title="Utility function for depth first seach algorithm this function explores the vertex which is passed in...">
<polygon fill="white" stroke="black" points="429.5,-38.5 429.5,-57.5 507.5,-57.5 507.5,-38.5 429.5,-38.5"/>
<text text-anchor="middle" x="468.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::explore</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="M377.12,-35.33C390.62,-37.22 405.47,-39.3 419.16,-41.22"/>
<polygon fill="midnightblue" stroke="midnightblue" points="418.98,-44.73 429.37,-42.65 419.95,-37.8 418.98,-44.73"/>
</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/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="425,-0.5 425,-19.5 512,-19.5 512,-0.5 425,-0.5"/>
<text text-anchor="middle" x="468.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</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="M377.12,-22.67C389.15,-20.99 402.25,-19.15 414.66,-17.41"/>
<polygon fill="midnightblue" stroke="midnightblue" points="415.45,-20.83 424.87,-15.98 414.48,-13.9 415.45,-20.83"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.7 KiB