Documentation for 8b1eab204b

This commit is contained in:
realstealthninja
2024-11-04 12:43:05 +00:00
parent 4fb6e622e9
commit a7bccf7d01
6732 changed files with 153919 additions and 365711 deletions

View File

@@ -1,3 +1,4 @@
<!-- 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>
@@ -5,10 +6,15 @@
<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>Algorithms_in_C++: graph/connected_components.cpp File Reference</title>
<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>
@@ -18,14 +24,24 @@
<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 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" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></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! -->
@@ -33,10 +49,11 @@ MathJax.Hub.Config({
<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">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
@@ -122,7 +139,9 @@ 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><table class="memberdecls">
</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>
@@ -131,13 +150,13 @@ Namespaces</h2></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> (<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="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 <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="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 <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="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>
@@ -158,7 +177,9 @@ Example - Here is graph with 3 connected components
first second third
component component component
</pre> </div><h2 class="groupheader">Function Documentation</h2>
</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>
@@ -175,41 +196,33 @@ Example - Here is graph with 3 connected components
</div><div class="memdoc">
<p>Main function </p>
<p>running predefined tests</p>
<div class="fragment"><div class="line"><span class="lineno"> 127</span> {<span class="comment"></span></div>
<div class="line"><span class="lineno"> 128</span><span class="comment"> /// running predefined tests</span></div>
<div class="line"><span class="lineno"> 129</span><span class="comment"></span> <a class="code hl_function" href="#a88ec9ad42717780d6caaff9d3d6977f9">tests</a>();</div>
<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> <a class="code hl_classRef" 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"><span class="lineno"> 133</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; vertices;</div>
<div class="line"><span class="lineno"> 134</span> <a class="code hl_classRef" 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"><span class="lineno"> 135</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; edges;</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> <a class="code hl_classRef" 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="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a>());</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> <a class="code hl_classRef" 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"><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> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; cc &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</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="abasic_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a></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="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> 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="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> connected_components.cpp:77</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> connected_components.cpp:46</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="../../df/ddd/connected__components_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="587" height="186"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</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>
@@ -227,10 +240,12 @@ Here is the call graph for this function:</div>
</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> <a class="code hl_classRef" 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="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 95</span> <a class="code hl_classRef" 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="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 96</span> <a class="code hl_classRef" 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="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a>());</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>
@@ -239,10 +254,10 @@ Here is the call graph for this function:</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> <a class="code hl_classRef" 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="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</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> <a class="code hl_classRef" 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="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 108</span> <a class="code hl_classRef" 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="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int&gt;</a>());</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>
@@ -257,14 +272,9 @@ Here is the call graph for this function:</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> <a class="code hl_classRef" 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="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</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 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="490" height="159"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->