mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-07-17 03:51:27 +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/hopcroft_karp.cpp File Reference</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');
|
||||
@@ -151,6 +151,9 @@ Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d69/classgraph_1_1_h_k_graph.html">graph::HKGraph</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Represents Bipartite graph for Hopcroft Karp implementation. <a href="../../d8/d69/classgraph_1_1_h_k_graph.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dee/class_h_k_graph.html">HKGraph</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Represents Bipartite graph for Hopcroft Karp implementation. <a href="../../df/dee/class_h_k_graph.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
||||
Namespaces</h2></td></tr>
|
||||
@@ -307,7 +310,7 @@ Algorithm</h3>
|
||||
<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="../../d1/d9a/hopcroft__karp_8cpp.html">hopcroft_karp.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>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
var hopcroft__karp_8cpp =
|
||||
[
|
||||
[ "graph::HKGraph", "d8/d69/classgraph_1_1_h_k_graph.html", "d8/d69/classgraph_1_1_h_k_graph" ],
|
||||
[ "HKGraph", "df/dee/class_h_k_graph.html", "df/dee/class_h_k_graph" ],
|
||||
[ "main", "d1/d9a/hopcroft__karp_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "tests", "d1/d9a/hopcroft__karp_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9", null ]
|
||||
];
|
||||
@@ -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/hopcroft_karp.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,7 +124,9 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../'); ini
|
||||
<div class="headertitle"><div class="title">hopcroft_karp.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../d1/d9a/hopcroft__karp_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="../../d1/d9a/hopcroft__karp_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="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="preprocessor">#include <iostream></span></div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="preprocessor">#include <cstdlib></span> </div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="preprocessor">#include <queue></span></div>
|
||||
@@ -132,16 +134,16 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../'); ini
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="preprocessor">#include <climits></span></div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="preprocessor">#include <memory></span></div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="preprocessor">#include <cassert></span></div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span></div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keyword">namespace </span><a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a> { </div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span></div>
|
||||
<div class="foldopen" id="foldopen00066" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html"> 66</a></span><span class="keyword">class </span><a class="code hl_class" href="../../d8/d69/classgraph_1_1_h_k_graph.html">HKGraph</a></div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html"> 66</a></span><span class="keyword">class </span><a class="code hl_function" href="../../d8/d69/classgraph_1_1_h_k_graph.html#af02b0c83911070ac6d95fc9905e58aa9">HKGraph</a></div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span>{</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a3d9101e3b4598159005fd028b9b0ff74"> 68</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a3d9101e3b4598159005fd028b9b0ff74">m</a>{}; </div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a6f5a9fdbb83ef731d739ba6707e21c3c"> 69</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a6f5a9fdbb83ef731d739ba6707e21c3c">n</a>{}; </div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keyword">const</span> <span class="keywordtype">int</span> NIL{0};</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">const</span> <span class="keywordtype">int</span> INF{INT_MAX};</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d7/d07/bidirectional__dijkstra_8cpp.html#a330a2b0a904f01802ada1f8f3b28e76c">INF</a>{INT_MAX};</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"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a35893def7a1c5cd60907b4893117796f"> 73</a></span> std::vector<std::list<int> ><a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a35893def7a1c5cd60907b4893117796f">adj</a>; </div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
|
||||
@@ -150,7 +152,7 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../'); ini
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a6a0228bbba3818447fcf6b56128b552a"> 77</a></span> std::vector<int> <a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a6a0228bbba3818447fcf6b56128b552a">dist</a>; </div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span><span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html#af02b0c83911070ac6d95fc9905e58aa9"> 80</a></span> <a class="code hl_function" href="../../d8/d69/classgraph_1_1_h_k_graph.html#af02b0c83911070ac6d95fc9905e58aa9">HKGraph</a>(); <span class="comment">// Default Constructor</span></div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html#af02b0c83911070ac6d95fc9905e58aa9"> 80</a></span> <a class="code hl_function" href="../../d8/d69/classgraph_1_1_h_k_graph.html#af02b0c83911070ac6d95fc9905e58aa9">HKGraph</a>(); <span class="comment">// Default Constructor</span></div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <a class="code hl_function" href="../../d8/d69/classgraph_1_1_h_k_graph.html#af02b0c83911070ac6d95fc9905e58aa9">HKGraph</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a3d9101e3b4598159005fd028b9b0ff74">m</a>, <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a6f5a9fdbb83ef731d739ba6707e21c3c">n</a>); <span class="comment">// Constructor</span></div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a3b49011c09cf90a116ab53bef61cd95a">addEdge</a>(<span class="keywordtype">int</span> u, <span class="keywordtype">int</span> v); <span class="comment">// To add edge</span></div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
|
||||
@@ -161,7 +163,7 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../'); ini
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span></div>
|
||||
<div class="foldopen" id="foldopen00095" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a9dbda80d02bdc26c3e8ff7330c9be75d"> 95</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a9dbda80d02bdc26c3e8ff7330c9be75d">HKGraph::hopcroftKarpAlgorithm</a>()</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span>{</div>
|
||||
@@ -196,7 +198,7 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../'); ini
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> </div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span></div>
|
||||
<div class="foldopen" id="foldopen00133" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a7491add14d9fc04f679114ca6d6f0f93"> 133</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a7491add14d9fc04f679114ca6d6f0f93">HKGraph::bfs</a>()</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span>{</div>
|
||||
@@ -250,7 +252,7 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../'); ini
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="keywordflow">return</span> (<a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a6a0228bbba3818447fcf6b56128b552a">dist</a>[NIL] != INF); <span class="comment">// If we could come back to NIL using alternating path of distinct vertices then there is an augmenting path available</span></div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> </div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span></div>
|
||||
<div class="foldopen" id="foldopen00191" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html#ae794950cb3407b6b47d3dc986cf714c0"> 191</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="../../d8/d69/classgraph_1_1_h_k_graph.html#ae794950cb3407b6b47d3dc986cf714c0">HKGraph::dfs</a>(<span class="keywordtype">int</span> u)</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span>{</div>
|
||||
@@ -282,17 +284,17 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../'); ini
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> </div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span></div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span><a class="code hl_function" href="../../d8/d69/classgraph_1_1_h_k_graph.html#af02b0c83911070ac6d95fc9905e58aa9">HKGraph::HKGraph</a>() = <span class="keywordflow">default</span>;</div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> </div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span></div>
|
||||
<div class="foldopen" id="foldopen00231" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a0da5aa674d3b3e54a38251ee60d7cd64"> 231</a></span><a class="code hl_function" href="../../d8/d69/classgraph_1_1_h_k_graph.html#af02b0c83911070ac6d95fc9905e58aa9">HKGraph::HKGraph</a>(<span class="keywordtype">int</span> m, <span class="keywordtype">int</span> n) {</div>
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a0da5aa674d3b3e54a38251ee60d7cd64"> 231</a></span><a class="code hl_function" href="../../d8/d69/classgraph_1_1_h_k_graph.html#af02b0c83911070ac6d95fc9905e58aa9">HKGraph::HKGraph</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a3d9101e3b4598159005fd028b9b0ff74">m</a>, <span class="keywordtype">int</span> <a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a6f5a9fdbb83ef731d739ba6707e21c3c">n</a>) {</div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> this->m = <a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a3d9101e3b4598159005fd028b9b0ff74">m</a>;</div>
|
||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> this->n = <a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a6f5a9fdbb83ef731d739ba6707e21c3c">n</a>;</div>
|
||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> <a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a35893def7a1c5cd60907b4893117796f">adj</a> = std::vector<std::list<int> >(<a class="code hl_variable" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a3d9101e3b4598159005fd028b9b0ff74">m</a> + 1);</div>
|
||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> </div>
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span></div>
|
||||
<div class="foldopen" id="foldopen00242" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"><a class="line" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a3b49011c09cf90a116ab53bef61cd95a"> 242</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d8/d69/classgraph_1_1_h_k_graph.html#a3b49011c09cf90a116ab53bef61cd95a">HKGraph::addEdge</a>(<span class="keywordtype">int</span> u, <span class="keywordtype">int</span> v)</div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span>{</div>
|
||||
@@ -303,7 +305,7 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../'); ini
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span>} <span class="comment">// namespace graph</span></div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> </div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span><span class="keyword">using </span><a class="code hl_class" href="../../d8/d69/classgraph_1_1_h_k_graph.html">graph::HKGraph</a>;</div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> </div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span></div>
|
||||
<div class="foldopen" id="foldopen00255" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"><a class="line" href="../../d1/d9a/hopcroft__karp_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9"> 255</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d1/d9a/hopcroft__karp_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a>(){</div>
|
||||
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> <span class="comment">// Sample test case 1</span></div>
|
||||
@@ -352,7 +354,7 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../'); ini
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> </div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> </div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span></div>
|
||||
<div class="foldopen" id="foldopen00306" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"><a class="line" href="../../d1/d9a/hopcroft__karp_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 306</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../d1/d9a/hopcroft__karp_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>()</div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span>{</div>
|
||||
@@ -375,15 +377,16 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../'); ini
|
||||
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> </div>
|
||||
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span>}</div>
|
||||
</div>
|
||||
<div class="ttc" id="abidirectional__dijkstra_8cpp_html_a330a2b0a904f01802ada1f8f3b28e76c"><div class="ttname"><a href="../../d7/d07/bidirectional__dijkstra_8cpp.html#a330a2b0a904f01802ada1f8f3b28e76c">INF</a></div><div class="ttdeci">constexpr int64_t INF</div><div class="ttdoc">for assert</div><div class="ttdef"><b>Definition</b> <a href="../../d7/d07/bidirectional__dijkstra_8cpp_source.html#l00024">bidirectional_dijkstra.cpp:24</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html">graph::HKGraph</a></div><div class="ttdoc">Represents Bipartite graph for Hopcroft Karp implementation.</div><div class="ttdef"><b>Definition</b> <a href="#l00066">hopcroft_karp.cpp:67</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_a35893def7a1c5cd60907b4893117796f"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#a35893def7a1c5cd60907b4893117796f">graph::HKGraph::adj</a></div><div class="ttdeci">std::vector< std::list< int > > adj</div><div class="ttdoc">adj[u] stores adjacents of left side and 0 is used for dummy vertex</div><div class="ttdef"><b>Definition</b> <a href="#l00073">hopcroft_karp.cpp:73</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_a3b49011c09cf90a116ab53bef61cd95a"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#a3b49011c09cf90a116ab53bef61cd95a">graph::HKGraph::addEdge</a></div><div class="ttdeci">void addEdge(int u, int v)</div><div class="ttdoc">function to add edge from u to v</div><div class="ttdef"><b>Definition</b> <a href="#l00242">hopcroft_karp.cpp:242</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_a3d9101e3b4598159005fd028b9b0ff74"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#a3d9101e3b4598159005fd028b9b0ff74">graph::HKGraph::m</a></div><div class="ttdeci">int m</div><div class="ttdoc">m is the number of vertices on left side of Bipartite Graph</div><div class="ttdef"><b>Definition</b> <a href="#l00068">hopcroft_karp.cpp:68</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_a6a0228bbba3818447fcf6b56128b552a"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#a6a0228bbba3818447fcf6b56128b552a">graph::HKGraph::dist</a></div><div class="ttdeci">std::vector< int > dist</div><div class="ttdoc">dist represents the distance between vertex 'u' and vertex 'v'</div><div class="ttdef"><b>Definition</b> <a href="#l00077">hopcroft_karp.cpp:77</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_a6a0228bbba3818447fcf6b56128b552a"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#a6a0228bbba3818447fcf6b56128b552a">graph::HKGraph::dist</a></div><div class="ttdeci">std::vector< int > dist</div><div class="ttdoc">dist represents the distance between vertex 'u' and vertex 'v'</div><div class="ttdef"><b>Definition</b> <a href="#l00077">hopcroft_karp.cpp:77</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_a6f5a9fdbb83ef731d739ba6707e21c3c"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#a6f5a9fdbb83ef731d739ba6707e21c3c">graph::HKGraph::n</a></div><div class="ttdeci">int n</div><div class="ttdoc">n is the number of vertices on right side of Bipartite Graph</div><div class="ttdef"><b>Definition</b> <a href="#l00069">hopcroft_karp.cpp:69</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_a7491add14d9fc04f679114ca6d6f0f93"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#a7491add14d9fc04f679114ca6d6f0f93">graph::HKGraph::bfs</a></div><div class="ttdeci">bool bfs()</div><div class="ttdoc">This function checks for the possibility of augmented path availability.</div><div class="ttdef"><b>Definition</b> <a href="#l00133">hopcroft_karp.cpp:133</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_a86ebff8a70cbfedd05281993d5d1987b"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#a86ebff8a70cbfedd05281993d5d1987b">graph::HKGraph::pair_u</a></div><div class="ttdeci">std::vector< int > pair_u</div><div class="ttdoc">value of vertex 'u' ranges from 1 to m</div><div class="ttdef"><b>Definition</b> <a href="#l00075">hopcroft_karp.cpp:75</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_a976ee239402cc2726a280e781c706d77"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#a976ee239402cc2726a280e781c706d77">graph::HKGraph::pair_v</a></div><div class="ttdeci">std::vector< int > pair_v</div><div class="ttdoc">value of vertex 'v' ranges from 1 to n</div><div class="ttdef"><b>Definition</b> <a href="#l00076">hopcroft_karp.cpp:76</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_a86ebff8a70cbfedd05281993d5d1987b"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#a86ebff8a70cbfedd05281993d5d1987b">graph::HKGraph::pair_u</a></div><div class="ttdeci">std::vector< int > pair_u</div><div class="ttdoc">value of vertex 'u' ranges from 1 to m</div><div class="ttdef"><b>Definition</b> <a href="#l00075">hopcroft_karp.cpp:75</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_a976ee239402cc2726a280e781c706d77"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#a976ee239402cc2726a280e781c706d77">graph::HKGraph::pair_v</a></div><div class="ttdeci">std::vector< int > pair_v</div><div class="ttdoc">value of vertex 'v' ranges from 1 to n</div><div class="ttdef"><b>Definition</b> <a href="#l00076">hopcroft_karp.cpp:76</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_a9dbda80d02bdc26c3e8ff7330c9be75d"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#a9dbda80d02bdc26c3e8ff7330c9be75d">graph::HKGraph::hopcroftKarpAlgorithm</a></div><div class="ttdeci">int hopcroftKarpAlgorithm()</div><div class="ttdoc">This function counts the number of augmenting paths between left and right sides of the Bipartite gra...</div><div class="ttdef"><b>Definition</b> <a href="#l00095">hopcroft_karp.cpp:95</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_ae794950cb3407b6b47d3dc986cf714c0"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#ae794950cb3407b6b47d3dc986cf714c0">graph::HKGraph::dfs</a></div><div class="ttdeci">bool dfs(int u)</div><div class="ttdoc">This functions checks whether an augmenting path is available exists beginning with free vertex u.</div><div class="ttdef"><b>Definition</b> <a href="#l00191">hopcroft_karp.cpp:191</a></div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_h_k_graph_html_af02b0c83911070ac6d95fc9905e58aa9"><div class="ttname"><a href="../../d8/d69/classgraph_1_1_h_k_graph.html#af02b0c83911070ac6d95fc9905e58aa9">graph::HKGraph::HKGraph</a></div><div class="ttdeci">HKGraph()</div><div class="ttdoc">Default Constructor for initialization.</div></div>
|
||||
@@ -396,7 +399,7 @@ $(function(){initNavTree('d1/d9a/hopcroft__karp_8cpp_source.html','../../'); ini
|
||||
<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="../../d1/d9a/hopcroft__karp_8cpp.html">hopcroft_karp.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