Documentation for 582cdc7cc4

This commit is contained in:
github-actions
2022-12-21 16:49:13 +00:00
parent 8634a89f05
commit 7b0b042940
3228 changed files with 8908 additions and 8871 deletions

View File

@@ -144,22 +144,22 @@ Functions</h2></td></tr>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Implementation of <a href="https://en.wikipedia.org/wiki/Hopcroft%E2%80%93Karp_algorithm" target="_blank">HopcroftKarp</a> algorithm. </p>
<p >The HopcroftKarp algorithm is an algorithm that takes as input a bipartite graph and produces as output a maximum cardinality matching, it runs in O(E√V) time in worst case.</p>
<h3><a class="anchor" id="autotoc_md75"></a>
<h3><a class="anchor" id="autotoc_md76"></a>
Bipartite graph</h3>
<p >A bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint and independent sets U and V such that every edge connects a vertex in U to one in V. Vertex sets U and V are usually called the parts of the graph. Equivalently, a bipartite graph is a graph that does not contain any odd-length cycles.</p>
<h3><a class="anchor" id="autotoc_md76"></a>
<h3><a class="anchor" id="autotoc_md77"></a>
Matching and Not-Matching edges</h3>
<p >Given a matching M, edges that are part of matching are called Matching edges and edges that are not part of M (or connect free nodes) are called Not-Matching edges.</p>
<h3><a class="anchor" id="autotoc_md77"></a>
<h3><a class="anchor" id="autotoc_md78"></a>
Maximum cardinality matching</h3>
<p >Given a bipartite graphs G = ( V = ( X , Y ) , E ) whose partition has the parts X and Y, with E denoting the edges of the graph, the goal is to find a matching with as many edges as possible. Equivalently, a matching that covers as many vertices as possible.</p>
<h3><a class="anchor" id="autotoc_md78"></a>
<h3><a class="anchor" id="autotoc_md79"></a>
Augmenting paths</h3>
<p >Given a matching M, an augmenting path is an alternating path that starts from and ends on free vertices. All single edge paths that start and end with free vertices are augmenting paths.</p>
<h3><a class="anchor" id="autotoc_md79"></a>
<h3><a class="anchor" id="autotoc_md80"></a>
Concept</h3>
<p >A matching M is not maximum if there exists an augmenting path. It is also true other way, i.e, a matching is maximum if no augmenting path exists.</p>
<h3><a class="anchor" id="autotoc_md80"></a>
<h3><a class="anchor" id="autotoc_md81"></a>
Algorithm</h3>
<p >1) Initialize the Maximal Matching M as empty. 2) While there exists an Augmenting Path P Remove matching edges of P from M and add not-matching edges of P to M (This increases size of M by 1 as P starts and ends with a free vertex i.e. a node that is not part of matching.) 3) Return M.</p>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Krishnapal4050" target="_blank">Krishna Pal Deora</a> </dd></dl>

View File

@@ -1,9 +1,9 @@
<map id="tests" name="tests">
<area shape="rect" id="node1" title=" " coords="5,35,56,60"/>
<area shape="rect" id="node2" href="$d8/d69/classgraph_1_1_h_k_graph.html#a3b49011c09cf90a116ab53bef61cd95a" title="function to add edge from u to v" coords="104,5,279,31"/>
<area shape="rect" id="node4" href="$d8/d69/classgraph_1_1_h_k_graph.html#a9dbda80d02bdc26c3e8ff7330c9be75d" title="This function counts the number of augmenting paths between left and right sides of the Bipartite gra..." coords="106,55,277,95"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " coords="327,5,481,31"/>
<area shape="rect" id="node5" href="$d8/d69/classgraph_1_1_h_k_graph.html#a7491add14d9fc04f679114ca6d6f0f93" title="This function checks for the possibility of augmented path availability." coords="333,59,475,84"/>
<area shape="rect" id="node7" href="$d8/d69/classgraph_1_1_h_k_graph.html#ae794950cb3407b6b47d3dc986cf714c0" title="This functions checks whether an augmenting path is available exists beginning with free vertex u." coords="333,132,475,157"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end.html#" title=" " coords="529,96,643,121"/>
<area shape="rect" id="node1" title=" " alt="" coords="5,35,56,60"/>
<area shape="rect" id="node2" href="$d8/d69/classgraph_1_1_h_k_graph.html#a3b49011c09cf90a116ab53bef61cd95a" title="function to add edge from u to v" alt="" coords="104,5,279,31"/>
<area shape="rect" id="node4" href="$d8/d69/classgraph_1_1_h_k_graph.html#a9dbda80d02bdc26c3e8ff7330c9be75d" title="This function counts the number of augmenting paths between left and right sides of the Bipartite gra..." alt="" coords="106,55,277,95"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="327,5,481,31"/>
<area shape="rect" id="node5" href="$d8/d69/classgraph_1_1_h_k_graph.html#a7491add14d9fc04f679114ca6d6f0f93" title="This function checks for the possibility of augmented path availability." alt="" coords="333,59,475,84"/>
<area shape="rect" id="node7" href="$d8/d69/classgraph_1_1_h_k_graph.html#ae794950cb3407b6b47d3dc986cf714c0" title="This functions checks whether an augmenting path is available exists beginning with free vertex u." alt="" coords="333,132,475,157"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end.html#" title=" " alt="" coords="529,96,643,121"/>
</map>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 7.0.2 (20221119.0110)
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
-->
<!-- Title: tests Pages: 1 -->
<svg width="486pt" height="122pt"

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -1,10 +1,10 @@
<map id="main" name="main">
<area shape="rect" id="node1" title="Main function." coords="5,35,56,60"/>
<area shape="rect" id="node2" href="$d1/d9a/hopcroft__karp_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9" title=" " coords="104,35,155,60"/>
<area shape="rect" id="node3" href="$d8/d69/classgraph_1_1_h_k_graph.html#a3b49011c09cf90a116ab53bef61cd95a" title="function to add edge from u to v" coords="203,5,377,31"/>
<area shape="rect" id="node5" href="$d8/d69/classgraph_1_1_h_k_graph.html#a9dbda80d02bdc26c3e8ff7330c9be75d" title="This function counts the number of augmenting paths between left and right sides of the Bipartite gra..." coords="205,55,375,95"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " coords="425,5,580,31"/>
<area shape="rect" id="node6" href="$d8/d69/classgraph_1_1_h_k_graph.html#a7491add14d9fc04f679114ca6d6f0f93" title="This function checks for the possibility of augmented path availability." coords="431,59,574,84"/>
<area shape="rect" id="node8" href="$d8/d69/classgraph_1_1_h_k_graph.html#ae794950cb3407b6b47d3dc986cf714c0" title="This functions checks whether an augmenting path is available exists beginning with free vertex u." coords="431,132,574,157"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end.html#" title=" " coords="628,96,741,121"/>
<area shape="rect" id="node1" title="Main function." alt="" coords="5,35,56,60"/>
<area shape="rect" id="node2" href="$d1/d9a/hopcroft__karp_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9" title=" " alt="" coords="104,35,155,60"/>
<area shape="rect" id="node3" href="$d8/d69/classgraph_1_1_h_k_graph.html#a3b49011c09cf90a116ab53bef61cd95a" title="function to add edge from u to v" alt="" coords="203,5,377,31"/>
<area shape="rect" id="node5" href="$d8/d69/classgraph_1_1_h_k_graph.html#a9dbda80d02bdc26c3e8ff7330c9be75d" title="This function counts the number of augmenting paths between left and right sides of the Bipartite gra..." alt="" coords="205,55,375,95"/>
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="425,5,580,31"/>
<area shape="rect" id="node6" href="$d8/d69/classgraph_1_1_h_k_graph.html#a7491add14d9fc04f679114ca6d6f0f93" title="This function checks for the possibility of augmented path availability." alt="" coords="431,59,574,84"/>
<area shape="rect" id="node8" href="$d8/d69/classgraph_1_1_h_k_graph.html#ae794950cb3407b6b47d3dc986cf714c0" title="This functions checks whether an augmenting path is available exists beginning with free vertex u." alt="" coords="431,132,574,157"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end.html#" title=" " alt="" coords="628,96,741,121"/>
</map>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 7.0.2 (20221119.0110)
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
-->
<!-- Title: main Pages: 1 -->
<!--zoomable 122 -->

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 7.0.2 (20221119.0110)
<!-- Generated by graphviz version 7.0.4 (20221203.1631)
-->
<!-- Title: main Pages: 1 -->
<svg width="560pt" height="122pt"

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB