Documentation for f4403718ef

This commit is contained in:
github-actions
2021-01-15 16:44:30 +00:00
parent 15ef0745d8
commit 5780d2cb95
1583 changed files with 24124 additions and 25495 deletions

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: graph/connected_components.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -42,10 +42,10 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
@@ -98,7 +98,7 @@ $(document).ready(function(){initNavTree('df/ddd/connected__components_8cpp.html
</div><!--header-->
<div class="contents">
<p><a href="https://en.wikipedia.org/wiki/Component_(graph_theory)">Graph Connected Components (Connected Components)</a>
<p>&lt;a href="https://en.wikipedia.org/wiki/Component_(graph_theory)"
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;algorithm&gt;</code><br />
<code>#include &lt;cassert&gt;</code><br />
@@ -134,13 +134,18 @@ Functions</h2></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 href="https://en.wikipedia.org/wiki/Component_(graph_theory)">Graph Connected Components (Connected Components)</a> </p>
<div class="textblock"><p>&lt;a href="https://en.wikipedia.org/wiki/Component_(graph_theory)" </p>
<p>&gt;<a class="el" href="../../da/d9a/class_graph.html">Graph</a> Connected Components (Connected Components)</p>
<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> 1 4 5 8
Example - Here is graph with 3 connected components
1 4 5 8
/ \ / / \ / \
2---3 6 7 9 10</pre><pre> first second third
2---3 6 7 9 10
first second third
component component component
</pre> </div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
@@ -182,6 +187,13 @@ Example - Here is graph with 3 connected components</pre><pre> 1 4
<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 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="../../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="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="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="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">
@@ -249,18 +261,11 @@ 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_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>
<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="http://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>