Files
C-Plus-Plus/df/ddd/connected__components_8cpp.html
2024-11-04 12:43:05 +00:00

291 lines
22 KiB
HTML

<!-- HTML header for doxygen 1.12.0-->
<!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" lang="en-US">
<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.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TheAlgorithms/C++: graph/connected_components.cpp File Reference</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<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>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.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/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</script>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.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 id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @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&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search',true);
$(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&amp;dn=expat.txt MIT */
$(function(){initNavTree('df/ddd/connected__components_8cpp.html','../../'); initResizable(true); });
/* @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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<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>
</div><!--header-->
<div class="contents">
<p>[<a class="el" href="../../da/d9a/class_graph.html">Graph</a> Connected Components (Connected Components)] (<a href="https://en.wikipedia.org/wiki/Component_(graph_theory)">https://en.wikipedia.org/wiki/Component_(graph_theory)</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="350" height="111"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
<p><a href="../../df/ddd/connected__components_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace &#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 id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a9125ceb66bfbec3093bba64c2c1e99e2" id="r_a9125ceb66bfbec3093bba64c2c1e99e2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a> (std::vector&lt; std::vector&lt; int &gt; &gt; *adj, int u, int v)</td></tr>
<tr class="memdesc:a9125ceb66bfbec3093bba64c2c1e99e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that add edge between two nodes or vertices of graph. <br /></td></tr>
<tr class="separator:a9125ceb66bfbec3093bba64c2c1e99e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ae80bc4c6a79d041b4f3a6589eb7fb8" id="r_a3ae80bc4c6a79d041b4f3a6589eb7fb8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a3ae80bc4c6a79d041b4f3a6589eb7fb8">graph::explore</a> (const std::vector&lt; std::vector&lt; int &gt; &gt; *adj, int u, std::vector&lt; bool &gt; *visited)</td></tr>
<tr class="memdesc:a3ae80bc4c6a79d041b4f3a6589eb7fb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility function for depth first seach algorithm this function explores the vertex which is passed into. <br /></td></tr>
<tr class="separator:a3ae80bc4c6a79d041b4f3a6589eb7fb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83ab16e96cec644109a58dfc9329bc2b" id="r_a83ab16e96cec644109a58dfc9329bc2b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a83ab16e96cec644109a58dfc9329bc2b">graph::getConnectedComponents</a> (const std::vector&lt; std::vector&lt; int &gt; &gt; *adj)</td></tr>
<tr class="memdesc:a83ab16e96cec644109a58dfc9329bc2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that perfoms depth first search algorithm on graph and calculated the number of connected components. <br /></td></tr>
<tr class="separator:a83ab16e96cec644109a58dfc9329bc2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88ec9ad42717780d6caaff9d3d6977f9" id="r_a88ec9ad42717780d6caaff9d3d6977f9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a88ec9ad42717780d6caaff9d3d6977f9">tests</a> ()</td></tr>
<tr class="separator:a88ec9ad42717780d6caaff9d3d6977f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4" id="r_ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>[<a class="el" href="../../da/d9a/class_graph.html">Graph</a> Connected Components (Connected Components)] (<a href="https://en.wikipedia.org/wiki/Component_(graph_theory)">https://en.wikipedia.org/wiki/Component_(graph_theory)</a>) </p>
<dl class="section author"><dt>Author</dt><dd><a href="http://github.com/ayaankhan98" target="_blank">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
1 4 5 8
/ \ / / \ / \
2---3 6 7 9 10
first second third
component component component
</pre>
<p class="definition">Definition in file <a class="el" href="../../df/ddd/connected__components_8cpp_source.html">connected_components.cpp</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&#160;</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"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Main function </p>
<p>running predefined tests</p>
<p class="definition">Definition at line <a class="el" href="../../df/ddd/connected__components_8cpp_source.html#l00127">127</a> of file <a class="el" href="../../df/ddd/connected__components_8cpp_source.html">connected_components.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 127</span> {</div>
<div class="line"><span class="lineno"> 129</span> <a class="code hl_function" href="#a88ec9ad42717780d6caaff9d3d6977f9">tests</a>();</div>
<div class="line"><span class="lineno"> 130</span> </div>
<div class="line"><span class="lineno"> 131</span> <span class="keywordtype">int</span> vertices = int(), edges = int();</div>
<div class="line"><span class="lineno"> 132</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Enter the number of vertices : &quot;</span>;</div>
<div class="line"><span class="lineno"> 133</span> std::cin &gt;&gt; vertices;</div>
<div class="line"><span class="lineno"> 134</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Enter the number of edges : &quot;</span>;</div>
<div class="line"><span class="lineno"> 135</span> std::cin &gt;&gt; edges;</div>
<div class="line"><span class="lineno"> 136</span> </div>
<div class="line"><span class="lineno"> 137</span> std::vector&lt;std::vector&lt;int&gt;&gt; adj(vertices, std::vector&lt;int&gt;());</div>
<div class="line"><span class="lineno"> 138</span> </div>
<div class="line"><span class="lineno"> 139</span> <span class="keywordtype">int</span> u = int(), v = int();</div>
<div class="line"><span class="lineno"> 140</span> <span class="keywordflow">while</span> (edges--) {</div>
<div class="line"><span class="lineno"> 141</span> std::cin &gt;&gt; u &gt;&gt; v;</div>
<div class="line"><span class="lineno"> 142</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj, u, v);</div>
<div class="line"><span class="lineno"> 143</span> }</div>
<div class="line"><span class="lineno"> 144</span> </div>
<div class="line"><span class="lineno"> 145</span> <span class="keywordtype">int</span> cc = <a class="code hl_function" href="../../df/dce/namespacegraph.html#a83ab16e96cec644109a58dfc9329bc2b">graph::getConnectedComponents</a>(&amp;adj);</div>
<div class="line"><span class="lineno"> 146</span> std::cout &lt;&lt; cc &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 147</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 148</span>}</div>
<div class="ttc" id="aconnected__components_8cpp_html_a88ec9ad42717780d6caaff9d3d6977f9"><div class="ttname"><a href="#a88ec9ad42717780d6caaff9d3d6977f9">tests</a></div><div class="ttdeci">void tests()</div><div class="ttdef"><b>Definition</b> <a href="../../df/ddd/connected__components_8cpp_source.html#l00093">connected_components.cpp:93</a></div></div>
<div class="ttc" id="anamespacegraph_html_a83ab16e96cec644109a58dfc9329bc2b"><div class="ttname"><a href="../../df/dce/namespacegraph.html#a83ab16e96cec644109a58dfc9329bc2b">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> <a href="../../df/ddd/connected__components_8cpp_source.html#l00077">connected_components.cpp:77</a></div></div>
<div class="ttc" id="anamespacegraph_html_a9125ceb66bfbec3093bba64c2c1e99e2"><div class="ttname"><a href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">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> <a href="../../df/ddd/connected__components_8cpp_source.html#l00046">connected_components.cpp:46</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a88ec9ad42717780d6caaff9d3d6977f9" name="a88ec9ad42717780d6caaff9d3d6977f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88ec9ad42717780d6caaff9d3d6977f9">&#9670;&#160;</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"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Function to test the algorithm </p>
<p class="definition">Definition at line <a class="el" href="../../df/ddd/connected__components_8cpp_source.html#l00093">93</a> of file <a class="el" href="../../df/ddd/connected__components_8cpp_source.html">connected_components.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 93</span> {</div>
<div class="line"><span class="lineno"> 94</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Running predefined tests...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 95</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Initiating Test 1...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 96</span> std::vector&lt;std::vector&lt;int&gt;&gt; adj1(9, std::vector&lt;int&gt;());</div>
<div class="line"><span class="lineno"> 97</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj1, 1, 2);</div>
<div class="line"><span class="lineno"> 98</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj1, 1, 3);</div>
<div class="line"><span class="lineno"> 99</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj1, 3, 4);</div>
<div class="line"><span class="lineno"> 100</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj1, 5, 7);</div>
<div class="line"><span class="lineno"> 101</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj1, 5, 6);</div>
<div class="line"><span class="lineno"> 102</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj1, 8, 9);</div>
<div class="line"><span class="lineno"> 103</span> </div>
<div class="line"><span class="lineno"> 104</span> assert(<a class="code hl_function" href="../../df/dce/namespacegraph.html#a83ab16e96cec644109a58dfc9329bc2b">graph::getConnectedComponents</a>(&amp;adj1) == 3);</div>
<div class="line"><span class="lineno"> 105</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Test 1 Passed...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 106</span> </div>
<div class="line"><span class="lineno"> 107</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Innitiating Test 2...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 108</span> std::vector&lt;std::vector&lt;int&gt;&gt; adj2(10, std::vector&lt;int&gt;());</div>
<div class="line"><span class="lineno"> 109</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj2, 1, 2);</div>
<div class="line"><span class="lineno"> 110</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj2, 1, 3);</div>
<div class="line"><span class="lineno"> 111</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj2, 1, 4);</div>
<div class="line"><span class="lineno"> 112</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj2, 2, 3);</div>
<div class="line"><span class="lineno"> 113</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj2, 3, 4);</div>
<div class="line"><span class="lineno"> 114</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj2, 4, 8);</div>
<div class="line"><span class="lineno"> 115</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj2, 4, 10);</div>
<div class="line"><span class="lineno"> 116</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj2, 8, 10);</div>
<div class="line"><span class="lineno"> 117</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj2, 8, 9);</div>
<div class="line"><span class="lineno"> 118</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj2, 5, 7);</div>
<div class="line"><span class="lineno"> 119</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj2, 5, 6);</div>
<div class="line"><span class="lineno"> 120</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;adj2, 6, 7);</div>
<div class="line"><span class="lineno"> 121</span> </div>
<div class="line"><span class="lineno"> 122</span> assert(<a class="code hl_function" href="../../df/dce/namespacegraph.html#a83ab16e96cec644109a58dfc9329bc2b">graph::getConnectedComponents</a>(&amp;adj2) == 2);</div>
<div class="line"><span class="lineno"> 123</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Test 2 Passed...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 124</span>}</div>
</div><!-- fragment -->
</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_12552d7fa429bf94a2e32e5cf39f7e69.html">graph</a></li><li class="navelem"><a class="el" href="../../df/ddd/connected__components_8cpp.html">connected_components.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.12.0 </li>
</ul>
</div>
</body>
</html>