mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-12-01 00:36:26 +08:00
Documentation for c26eea874d
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<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="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: graph/is_graph_bipartite.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,15 +124,15 @@ $(function(){initNavTree('d6/dd8/is__graph__bipartite_8cpp_source.html','../../'
|
||||
<div class="headertitle"><div class="title">is_graph_bipartite.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../d6/dd8/is__graph__bipartite_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../d6/dd8/is__graph__bipartite_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include <iostream></span></div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#include <queue></span></div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#include <vector></span></div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span></div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a> {</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../de/d83/namespaceis__graph__bipartite.html">is_graph_bipartite</a> {</div>
|
||||
<div class="foldopen" id="foldopen00051" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html"> 51</a></span><span class="keyword">class </span><a class="code hl_class" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html">Graph</a> {</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html"> 51</a></span><span class="keyword">class </span><a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a6aef65b40347c4606662cad4dd2e14d3">Graph</a> {</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"><a class="line" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef"> 53</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">n</a>; </div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
|
||||
@@ -150,22 +150,22 @@ $(function(){initNavTree('d6/dd8/is__graph__bipartite_8cpp_source.html','../../'
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a816cda7e563198f778fd32e03992763b">addEdge</a>(<span class="keywordtype">int</span> u, <span class="keywordtype">int</span> v); </div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c">addEdge</a>(<span class="keywordtype">int</span> u, <span class="keywordtype">int</span> v); </div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordtype">bool</span></div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad475f8b838693812f7569a490729f373">is_bipartite</a>(); </div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9b0c6400693a5cfff971f768dd5ca5ca">is_bipartite</a>(); </div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span></div>
|
||||
<div class="foldopen" id="foldopen00083" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a816cda7e563198f778fd32e03992763b"> 83</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a816cda7e563198f778fd32e03992763b">Graph::addEdge</a>(<span class="keywordtype">int</span> u, <span class="keywordtype">int</span> v) {</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c"> 83</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c">Graph::addEdge</a>(<span class="keywordtype">int</span> u, <span class="keywordtype">int</span> v) {</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f">adj</a>[u - 1].push_back(v - 1);</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f">adj</a>[v - 1].push_back(u - 1);</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span></div>
|
||||
<div class="foldopen" id="foldopen00106" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"><a class="line" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad475f8b838693812f7569a490729f373"> 106</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad475f8b838693812f7569a490729f373">Graph::is_bipartite</a>() {</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"><a class="line" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9b0c6400693a5cfff971f768dd5ca5ca"> 106</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9b0c6400693a5cfff971f768dd5ca5ca">Graph::is_bipartite</a>() {</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordtype">bool</span> check = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> std::queue<int> q;</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> current_edge = 0; current_edge < <a class="code hl_variable" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">n</a>; ++current_edge) {</div>
|
||||
@@ -191,35 +191,35 @@ $(function(){initNavTree('d6/dd8/is__graph__bipartite_8cpp_source.html','../../'
|
||||
</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span>} <span class="comment">// namespace is_graph_bipartite</span></div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span>} <span class="comment">// namespace graph</span></div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span></div>
|
||||
<div class="foldopen" id="foldopen00136" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"><a class="line" href="../../d6/dd8/is__graph__bipartite_8cpp.html#aa8dca7b867074164d5f45b0f3851269d"> 136</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d6/dd8/is__graph__bipartite_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>() {</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <a class="code hl_class" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html">graph::is_graph_bipartite::Graph</a> G1(</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> 5); </div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> G1.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a816cda7e563198f778fd32e03992763b">addEdge</a>(1, 2);</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> G1.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a816cda7e563198f778fd32e03992763b">addEdge</a>(1, 3);</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> G1.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a816cda7e563198f778fd32e03992763b">addEdge</a>(3, 4);</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> G1.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a816cda7e563198f778fd32e03992763b">addEdge</a>(4, 5);</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> G1.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c">addEdge</a>(1, 2);</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> G1.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c">addEdge</a>(1, 3);</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> G1.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c">addEdge</a>(3, 4);</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> G1.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c">addEdge</a>(4, 5);</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> </div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <a class="code hl_class" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html">graph::is_graph_bipartite::Graph</a> G2(</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> 3); </div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> G2.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a816cda7e563198f778fd32e03992763b">addEdge</a>(1, 2);</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> G2.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a816cda7e563198f778fd32e03992763b">addEdge</a>(1, 3);</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> G2.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a816cda7e563198f778fd32e03992763b">addEdge</a>(2, 3);</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> </div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">if</span> (G1.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad475f8b838693812f7569a490729f373">is_bipartite</a>()) {</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> G2.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c">addEdge</a>(1, 2);</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> G2.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c">addEdge</a>(1, 3);</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> G2.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c">addEdge</a>(2, 3);</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span></div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">if</span> (G1.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9b0c6400693a5cfff971f768dd5ca5ca">is_bipartite</a>()) {</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> std::cout << <span class="stringliteral">"The given graph G1 is a bipartite graph\n"</span>;</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> std::cout << <span class="stringliteral">"The given graph G1 is not a bipartite graph\n"</span>;</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> }</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">if</span> (G2.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad475f8b838693812f7569a490729f373">is_bipartite</a>()) {</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">if</span> (G2.<a class="code hl_function" href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9b0c6400693a5cfff971f768dd5ca5ca">is_bipartite</a>()) {</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> std::cout << <span class="stringliteral">"The given graph G2 is a bipartite graph\n"</span>;</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> std::cout << <span class="stringliteral">"The given graph G2 is not a bipartite graph\n"</span>;</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> }</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span></div>
|
||||
<div class="foldopen" id="foldopen00168" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"><a class="line" href="../../d6/dd8/is__graph__bipartite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 168</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../d6/dd8/is__graph__bipartite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <a class="code hl_function" href="../../d6/dd8/is__graph__bipartite_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); </div>
|
||||
@@ -228,10 +228,10 @@ $(function(){initNavTree('d6/dd8/is__graph__bipartite_8cpp_source.html','../../'
|
||||
</div>
|
||||
<div class="ttc" id="aclassgraph_1_1is__graph__bipartite_1_1_graph_html"><div class="ttname"><a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html">graph::is_graph_bipartite::Graph</a></div><div class="ttdoc">Class for representing graph as an adjacency list.</div><div class="ttdef"><b>Definition</b> <a href="#l00051">is_graph_bipartite.cpp:51</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1is__graph__bipartite_1_1_graph_html_a6aef65b40347c4606662cad4dd2e14d3"><div class="ttname"><a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a6aef65b40347c4606662cad4dd2e14d3">graph::is_graph_bipartite::Graph::Graph</a></div><div class="ttdeci">Graph(int size)</div><div class="ttdoc">Constructor that initializes the graph on creation.</div><div class="ttdef"><b>Definition</b> <a href="#l00065">is_graph_bipartite.cpp:65</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1is__graph__bipartite_1_1_graph_html_a816cda7e563198f778fd32e03992763b"><div class="ttname"><a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a816cda7e563198f778fd32e03992763b">graph::is_graph_bipartite::Graph::addEdge</a></div><div class="ttdeci">void addEdge(int u, int v)</div><div class="ttdoc">Function that add an edge between two nodes or vertices of graph.</div><div class="ttdef"><b>Definition</b> <a href="#l00083">is_graph_bipartite.cpp:83</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1is__graph__bipartite_1_1_graph_html_a9b0c6400693a5cfff971f768dd5ca5ca"><div class="ttname"><a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9b0c6400693a5cfff971f768dd5ca5ca">graph::is_graph_bipartite::Graph::is_bipartite</a></div><div class="ttdeci">bool is_bipartite()</div><div class="ttdoc">function to add edges to our graph</div><div class="ttdef"><b>Definition</b> <a href="#l00106">is_graph_bipartite.cpp:106</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1is__graph__bipartite_1_1_graph_html_a9d10768f927baa8a4d4a5ffce295b6b6"><div class="ttname"><a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#a9d10768f927baa8a4d4a5ffce295b6b6">graph::is_graph_bipartite::Graph::side</a></div><div class="ttdeci">std::vector< int > side</div><div class="ttdoc">stores the side of the vertex</div><div class="ttdef"><b>Definition</b> <a href="#l00058">is_graph_bipartite.cpp:58</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1is__graph__bipartite_1_1_graph_html_ab0efcfa04fff8616aff0062522d1483f"><div class="ttname"><a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ab0efcfa04fff8616aff0062522d1483f">graph::is_graph_bipartite::Graph::adj</a></div><div class="ttdeci">std::vector< std::vector< int > > adj</div><div class="ttdoc">adj stores the graph as an adjacency list</div><div class="ttdef"><b>Definition</b> <a href="#l00056">is_graph_bipartite.cpp:56</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1is__graph__bipartite_1_1_graph_html_ad475f8b838693812f7569a490729f373"><div class="ttname"><a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad475f8b838693812f7569a490729f373">graph::is_graph_bipartite::Graph::is_bipartite</a></div><div class="ttdeci">bool is_bipartite()</div><div class="ttdoc">function to add edges to our graph</div><div class="ttdef"><b>Definition</b> <a href="#l00106">is_graph_bipartite.cpp:106</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1is__graph__bipartite_1_1_graph_html_ad8c10df34357b2cd865c81e0c4f0bd8c"><div class="ttname"><a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#ad8c10df34357b2cd865c81e0c4f0bd8c">graph::is_graph_bipartite::Graph::addEdge</a></div><div class="ttdeci">void addEdge(int u, int v)</div><div class="ttdoc">Function that add an edge between two nodes or vertices of graph.</div><div class="ttdef"><b>Definition</b> <a href="#l00083">is_graph_bipartite.cpp:83</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1is__graph__bipartite_1_1_graph_html_aefea7ee87a708298c486d5a38ac628ef"><div class="ttname"><a href="../../de/d00/classgraph_1_1is__graph__bipartite_1_1_graph.html#aefea7ee87a708298c486d5a38ac628ef">graph::is_graph_bipartite::Graph::n</a></div><div class="ttdeci">int n</div><div class="ttdoc">size of the graph</div><div class="ttdef"><b>Definition</b> <a href="#l00053">is_graph_bipartite.cpp:53</a></div></div>
|
||||
<div class="ttc" id="ais__graph__bipartite_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../d6/dd8/is__graph__bipartite_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdef"><b>Definition</b> <a href="#l00136">is_graph_bipartite.cpp:136</a></div></div>
|
||||
<div class="ttc" id="ais__graph__bipartite_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d6/dd8/is__graph__bipartite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition</b> <a href="#l00168">is_graph_bipartite.cpp:168</a></div></div>
|
||||
@@ -243,7 +243,7 @@ $(function(){initNavTree('d6/dd8/is__graph__bipartite_8cpp_source.html','../../'
|
||||
<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="../../d6/dd8/is__graph__bipartite_8cpp.html">is_graph_bipartite.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>
|
||||
<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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user