Documentation for aaa08b0150

This commit is contained in:
github-actions
2020-06-19 16:07:44 +00:00
parent 4c261744f6
commit 93021161c2
1714 changed files with 114526 additions and 0 deletions

View File

@@ -0,0 +1,397 @@
<!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">
<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.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: CycleCheck Class Reference</title>
<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>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<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>
<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>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<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');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('d3/dbb/class_cycle_check.html','../../'); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-types">Private Types</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="../../d8/d55/class_cycle_check-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">CycleCheck Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ad9a270ffba3a68539b92272c702e3474"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dbb/class_cycle_check.html#ad9a270ffba3a68539b92272c702e3474">isCyclicDFS</a> (<a class="el" href="../../da/d9a/class_graph.html">Graph</a> const &amp;<a class="el" href="../../dd/d9b/classgraph.html">graph</a>)</td></tr>
<tr class="separator:ad9a270ffba3a68539b92272c702e3474"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a399292a33edf87499daa52b51315aca5"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dbb/class_cycle_check.html#a399292a33edf87499daa52b51315aca5">isCyclicBFS</a> (<a class="el" href="../../da/d9a/class_graph.html">Graph</a> const &amp;<a class="el" href="../../dd/d9b/classgraph.html">graph</a>)</td></tr>
<tr class="separator:a399292a33edf87499daa52b51315aca5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-types"></a>
Private Types</h2></td></tr>
<tr class="memitem:ae68a1f08ee8c0b6323ab0f281862eadf"><td class="memItemLeft" align="right" valign="top"><a id="ae68a1f08ee8c0b6323ab0f281862eadf"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>nodeStates</b> : uint8_t { <b>not_visited</b> = 0,
<b>in_stack</b>,
<b>visited</b>
}</td></tr>
<tr class="separator:ae68a1f08ee8c0b6323ab0f281862eadf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:a2f4485c08b45e7a21a2e86f9c3f01d8b"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/dbb/class_cycle_check.html#a2f4485c08b45e7a21a2e86f9c3f01d8b">isCyclicDFSHelper</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">AdjList</a> const &amp;adjList, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; nodeStates &gt; *state, unsigned int <a class="el" href="../../d5/da1/structnode.html">node</a>)</td></tr>
<tr class="separator:a2f4485c08b45e7a21a2e86f9c3f01d8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a399292a33edf87499daa52b51315aca5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a399292a33edf87499daa52b51315aca5">&#9670;&nbsp;</a></span>isCyclicBFS()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool CycleCheck::isCyclicBFS </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../da/d9a/class_graph.html">Graph</a> const &amp;&#160;</td>
<td class="paramname"><em>graph</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if a graph has cycle or not.</p>
<p>This function uses BFS to check if a graph is cyclic or not.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">graph</td><td>which needs to be evaluated for the presence of cycle. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if a cycle is detected, else false. </dd></dl>
<div class="fragment"><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; {</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">AdjList</a> graphAjdList = <a class="code" href="../../dd/d9b/classgraph.html">graph</a>.getAdjList();</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; </div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;unsigned int&gt;</a> indegree(<a class="code" href="../../dd/d9b/classgraph.html">graph</a>.getVertices(), 0);</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="comment">// Calculate the indegree i.e. the number of incident edges to the node.</span></div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>&amp; [parent, children] : graphAjdList) {</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>&amp; child : children) {</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; indegree[child]++;</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; }</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; }</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; </div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue&lt;unsigned int&gt;</a> can_be_solved;</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> <a class="code" href="../../d5/da1/structnode.html">node</a> = 0; <a class="code" href="../../d5/da1/structnode.html">node</a> &lt; <a class="code" href="../../dd/d9b/classgraph.html">graph</a>.getVertices(); <a class="code" href="../../d5/da1/structnode.html">node</a>++) {</div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <span class="comment">// If a node doesn&#39;t have any input edges, then that node will</span></div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <span class="comment">// definately not result in a cycle and can be visited safely.</span></div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <span class="keywordflow">if</span> (!indegree[<a class="code" href="../../d5/da1/structnode.html">node</a>]) {</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; can_be_solved.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/emplace.html">emplace</a>(<a class="code" href="../../d5/da1/structnode.html">node</a>);</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; }</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; }</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; </div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; <span class="comment">// Vertices that need to be traversed.</span></div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <span class="keyword">auto</span> remain = <a class="code" href="../../dd/d9b/classgraph.html">graph</a>.getVertices();</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; <span class="comment">// While there are safe nodes that we can visit.</span></div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; <span class="keywordflow">while</span> (!can_be_solved.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/empty.html">empty</a>()) {</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <span class="keyword">auto</span> front = can_be_solved.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/front.html">front</a>();</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; <span class="comment">// Visit the node.</span></div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; can_be_solved.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/pop.html">pop</a>();</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; <span class="comment">// Decrease number of nodes that need to be traversed.</span></div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; remain--;</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; </div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; <span class="comment">// Visit all the children of the visited node.</span></div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; <span class="keywordflow">if</span> (<span class="keyword">auto</span> it = graphAjdList.find(front); it != graphAjdList.end()) {</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> child : it-&gt;second) {</div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <span class="comment">// Check if we can visited the node safely.</span></div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; <span class="keywordflow">if</span> (--indegree[child] == 0) {</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="comment">// if node can be visited safely, then add that node to</span></div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; <span class="comment">// the visit queue.</span></div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; can_be_solved.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/emplace.html">emplace</a>(child);</div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; }</div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; }</div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; }</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; }</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; </div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; <span class="comment">// If there are still nodes that we can&#39;t visit, then it means that</span></div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; <span class="comment">// there is a cycle and return true, else return false.</span></div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <span class="keywordflow">return</span> !(remain == 0);</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; }</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="../../d3/dbb/class_cycle_check_a399292a33edf87499daa52b51315aca5_cgraph.svg" width="374" height="190"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="ad9a270ffba3a68539b92272c702e3474"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9a270ffba3a68539b92272c702e3474">&#9670;&nbsp;</a></span>isCyclicDFS()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool CycleCheck::isCyclicDFS </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../da/d9a/class_graph.html">Graph</a> const &amp;&#160;</td>
<td class="paramname"><em>graph</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Driver function to check if a graph has a cycle.</p>
<p>This function uses DFS to check for cycle in the graph.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">graph</td><td>which needs to be evaluated for the presence of cycle. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if a cycle is detected, else false. </dd></dl>
<p>State of the node.</p>
<p>It is a vector of "nodeStates" which represents the state node is in. It can take only 3 values: "not_visited", "in_stack", and "visited".</p>
<p>Initially, all nodes are in "not_visited" state.</p>
<div class="fragment"><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; {<span class="comment"></span></div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160;<span class="comment"> /** State of the node.</span></div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;<span class="comment"> * It is a vector of &quot;nodeStates&quot; which represents the state node is in.</span></div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160;<span class="comment"> * It can take only 3 values: &quot;not_visited&quot;, &quot;in_stack&quot;, and &quot;visited&quot;.</span></div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160;<span class="comment"> * Initially, all nodes are in &quot;not_visited&quot; state.</span></div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;nodeStates&gt;</a> state(<a class="code" href="../../dd/d9b/classgraph.html">graph</a>.getVertices(), not_visited);</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; </div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <span class="comment">// Start visiting each node.</span></div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> <a class="code" href="../../d5/da1/structnode.html">node</a> = 0; <a class="code" href="../../d5/da1/structnode.html">node</a> &lt; <a class="code" href="../../dd/d9b/classgraph.html">graph</a>.getVertices(); <a class="code" href="../../d5/da1/structnode.html">node</a>++) {</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <span class="comment">// If a node is not visited, only then check for presence of cycle.</span></div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <span class="comment">// There is no need to check for presence of cycle for a visited</span></div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="comment">// node as it has already been checked for presence of cycle.</span></div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <span class="keywordflow">if</span> (state[<a class="code" href="../../d5/da1/structnode.html">node</a>] == not_visited) {</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <span class="comment">// Check for cycle.</span></div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="../../d3/dbb/class_cycle_check.html#a2f4485c08b45e7a21a2e86f9c3f01d8b">isCyclicDFSHelper</a>(<a class="code" href="../../dd/d9b/classgraph.html">graph</a>.getAdjList(), &amp;state, <a class="code" href="../../d5/da1/structnode.html">node</a>)) {</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; }</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; }</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; }</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; </div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; <span class="comment">// All nodes have been safely traversed, that means there is no cycle in</span></div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; <span class="comment">// the graph. Return false.</span></div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; }</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="../../d3/dbb/class_cycle_check_ad9a270ffba3a68539b92272c702e3474_cgraph.svg" width="664" height="104"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="a2f4485c08b45e7a21a2e86f9c3f01d8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f4485c08b45e7a21a2e86f9c3f01d8b">&#9670;&nbsp;</a></span>isCyclicDFSHelper()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool CycleCheck::isCyclicDFSHelper </td>
<td>(</td>
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">AdjList</a> const &amp;&#160;</td>
<td class="paramname"><em>adjList</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; nodeStates &gt; *&#160;</td>
<td class="paramname"><em>state</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>node</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Helper function of "isCyclicDFS".</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">adjList</td><td>is the adjacency list representation of some graph. </td></tr>
<tr><td class="paramname">state</td><td>is the state of the nodes of the graph. </td></tr>
<tr><td class="paramname">node</td><td>is the node being evaluated.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if graph has a cycle, else false. </dd></dl>
<div class="fragment"><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; {</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <span class="comment">// Add node &quot;in_stack&quot; state.</span></div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; (*state)[<a class="code" href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a>] = in_stack;</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; </div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="comment">// If the node has children, then recursively visit all children of the</span></div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="comment">// node.</span></div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="keywordflow">if</span> (<span class="keyword">auto</span> <span class="keyword">const</span>&amp; it = adjList.find(<a class="code" href="../../d5/da1/structnode.html">node</a>); it != adjList.end()) {</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> child : it-&gt;second) {</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="comment">// If state of child node is &quot;not_visited&quot;, evaluate that child</span></div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="comment">// for presence of cycle.</span></div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="keywordflow">if</span> (<span class="keyword">auto</span> state_of_child = (*state)[child];</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; state_of_child == not_visited) {</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="../../d3/dbb/class_cycle_check.html#a2f4485c08b45e7a21a2e86f9c3f01d8b">isCyclicDFSHelper</a>(adjList, state, child)) {</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; }</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (state_of_child == in_stack) {</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="comment">// If child node was &quot;in_stack&quot;, then that means that there</span></div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="comment">// is a cycle in the graph. Return true for presence of the</span></div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <span class="comment">// cycle.</span></div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; }</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; }</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; }</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <span class="comment">// Current node has been evaluated for the presence of cycle and had no</span></div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="comment">// cycle. Mark current node as &quot;visited&quot;.</span></div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; (*state)[<a class="code" href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a>] = visited;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="comment">// Return that current node didn&#39;t result in any cycles.</span></div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; }</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="../../d3/dbb/class_cycle_check_a2f4485c08b45e7a21a2e86f9c3f01d8b_cgraph.svg" width="440" height="104"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>graph/cycle_check_directed_graph.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclassgraph_html"><div class="ttname"><a href="../../dd/d9b/classgraph.html">graph</a></div><div class="ttdef"><b>Definition:</b> bfs.cpp:3</div></div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt; unsigned int &gt;</a></div></div>
<div class="ttc" id="aemplace_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue/emplace.html">std::queue::emplace</a></div><div class="ttdeci">T emplace(T... args)</div></div>
<div class="ttc" id="astructnode_html"><div class="ttname"><a href="../../d5/da1/structnode.html">node</a></div><div class="ttdef"><b>Definition:</b> avltree.cpp:13</div></div>
<div class="ttc" id="ahash__search_8cpp_html_a8ca8dcb494104d273679e219e53d0555"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a8ca8dcb494104d273679e219e53d0555">node</a></div><div class="ttdeci">struct list node</div></div>
<div class="ttc" id="aqueue_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue</a></div><div class="ttdoc">STL class.</div></div>
<div class="ttc" id="afront_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue/front.html">std::queue::front</a></div><div class="ttdeci">T front(T... args)</div></div>
<div class="ttc" id="aclass_cycle_check_html_a2f4485c08b45e7a21a2e86f9c3f01d8b"><div class="ttname"><a href="../../d3/dbb/class_cycle_check.html#a2f4485c08b45e7a21a2e86f9c3f01d8b">CycleCheck::isCyclicDFSHelper</a></div><div class="ttdeci">static bool isCyclicDFSHelper(AdjList const &amp;adjList, std::vector&lt; nodeStates &gt; *state, unsigned int node)</div><div class="ttdef"><b>Definition:</b> cycle_check_directed_graph.cpp:165</div></div>
<div class="ttc" id="apop_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue/pop.html">std::queue::pop</a></div><div class="ttdeci">T pop(T... args)</div></div>
<div class="ttc" id="aempty_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue/empty.html">std::queue::empty</a></div><div class="ttdeci">T empty(T... args)</div></div>
<div class="ttc" id="aunordered_map_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/unordered_map.html">std::unordered_map&lt; unsigned int, std::vector&lt; unsigned int &gt; &gt;</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="../../d3/dbb/class_cycle_check.html">CycleCheck</a></li>
<li class="footer">Generated on Fri Jun 19 2020 16:06:45 for Algorithms_in_C++ by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
</ul>
</div>
</body>
</html>

11
d3/dbb/class_cycle_check.js vendored Normal file
View File

@@ -0,0 +1,11 @@
var class_cycle_check =
[
[ "nodeStates", "d3/dbb/class_cycle_check.html#ae68a1f08ee8c0b6323ab0f281862eadf", [
[ "not_visited", "d3/dbb/class_cycle_check.html#ae68a1f08ee8c0b6323ab0f281862eadfa0d6bede6610396cc93dae3c1c7dea757", null ],
[ "in_stack", "d3/dbb/class_cycle_check.html#ae68a1f08ee8c0b6323ab0f281862eadfaf79bb27ce88c169c6039c6a3e2938fa0", null ],
[ "visited", "d3/dbb/class_cycle_check.html#ae68a1f08ee8c0b6323ab0f281862eadfa81d65ae802bc0dd049a92f218008e01f", null ]
] ],
[ "isCyclicBFS", "d3/dbb/class_cycle_check.html#a399292a33edf87499daa52b51315aca5", null ],
[ "isCyclicDFS", "d3/dbb/class_cycle_check.html#ad9a270ffba3a68539b92272c702e3474", null ],
[ "isCyclicDFSHelper", "d3/dbb/class_cycle_check.html#a2f4485c08b45e7a21a2e86f9c3f01d8b", null ]
];

View File

@@ -0,0 +1,5 @@
<map id="CycleCheck::isCyclicDFSHelper" name="CycleCheck::isCyclicDFSHelper">
<area shape="rect" id="node1" title=" " alt="" coords="5,35,220,61"/>
<area shape="rect" id="node2" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/end.html#" title=" " alt="" coords="268,5,435,32"/>
<area shape="rect" id="node3" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/find.html#" title=" " alt="" coords="283,57,420,98"/>
</map>

View File

@@ -0,0 +1 @@
5c7e163c03f4879f132c8debafc6f730

View File

@@ -0,0 +1,53 @@
<?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 2.44.0 (20200408.0750)
-->
<!-- Title: CycleCheck::isCyclicDFSHelper Pages: 1 -->
<svg width="330pt" height="78pt"
viewBox="0.00 0.00 330.00 77.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 73.5)">
<title>CycleCheck::isCyclicDFSHelper</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-73.5 326,-73.5 326,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title=" ">
<polygon fill="#bfbfbf" stroke="black" points="0,-28 0,-47 161,-47 161,-28 0,-28"/>
<text text-anchor="middle" x="80.5" y="-35" font-family="Helvetica,sans-Serif" font-size="10.00">CycleCheck::isCyclicDFSHelper</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/end.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="197,-50 197,-69 322,-69 322,-50 197,-50"/>
<text text-anchor="middle" x="259.5" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map::end</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M158.11,-47.02C167.64,-48.21 177.37,-49.42 186.83,-50.59"/>
<polygon fill="midnightblue" stroke="midnightblue" points="186.61,-54.09 196.96,-51.85 187.47,-47.14 186.61,-54.09"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/find.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="208,-0.5 208,-30.5 311,-30.5 311,-0.5 208,-0.5"/>
<text text-anchor="start" x="216" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="259.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::find</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M158.11,-27.98C171.38,-26.33 185.01,-24.63 197.78,-23.05"/>
<polygon fill="midnightblue" stroke="midnightblue" points="198.33,-26.51 207.82,-21.8 197.46,-19.56 198.33,-26.51"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,7 @@
<map id="CycleCheck::isCyclicBFS" name="CycleCheck::isCyclicBFS">
<area shape="rect" id="node1" title=" " alt="" coords="5,81,180,108"/>
<area shape="rect" id="node2" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/emplace.html#" title=" " alt="" coords="228,5,368,32"/>
<area shape="rect" id="node3" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/empty.html#" title=" " alt="" coords="235,56,361,83"/>
<area shape="rect" id="node4" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/front.html#" title=" " alt="" coords="239,107,357,133"/>
<area shape="rect" id="node5" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/pop.html#" title=" " alt="" coords="242,157,354,184"/>
</map>

View File

@@ -0,0 +1 @@
e06ebf0c8f4bd11ec03b5a55588c1ae2

View File

@@ -0,0 +1,82 @@
<?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 2.44.0 (20200408.0750)
-->
<!-- Title: CycleCheck::isCyclicBFS Pages: 1 -->
<svg width="280pt" height="142pt"
viewBox="0.00 0.00 280.00 142.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 138)">
<title>CycleCheck::isCyclicBFS</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-138 276,-138 276,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title=" ">
<polygon fill="#bfbfbf" stroke="black" points="0,-57.5 0,-76.5 131,-76.5 131,-57.5 0,-57.5"/>
<text text-anchor="middle" x="65.5" y="-64.5" font-family="Helvetica,sans-Serif" font-size="10.00">CycleCheck::isCyclicBFS</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/emplace.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="167,-114.5 167,-133.5 272,-133.5 272,-114.5 167,-114.5"/>
<text text-anchor="middle" x="219.5" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::emplace</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M91.67,-76.58C111.99,-84.3 141.31,-95.41 167,-105 172.19,-106.94 177.68,-108.98 183.06,-110.97"/>
<polygon fill="midnightblue" stroke="midnightblue" points="181.96,-114.29 192.55,-114.47 184.38,-107.72 181.96,-114.29"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/empty.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="172,-76.5 172,-95.5 267,-95.5 267,-76.5 172,-76.5"/>
<text text-anchor="middle" x="219.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M131.4,-75.11C141.46,-76.37 151.79,-77.66 161.66,-78.89"/>
<polygon fill="midnightblue" stroke="midnightblue" points="161.38,-82.39 171.74,-80.15 162.25,-75.44 161.38,-82.39"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/front.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="175.5,-38.5 175.5,-57.5 263.5,-57.5 263.5,-38.5 175.5,-38.5"/>
<text text-anchor="middle" x="219.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M131.4,-58.89C142.65,-57.48 154.24,-56.03 165.14,-54.67"/>
<polygon fill="midnightblue" stroke="midnightblue" points="165.85,-58.11 175.34,-53.39 164.99,-51.16 165.85,-58.11"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/pop.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="177.5,-0.5 177.5,-19.5 261.5,-19.5 261.5,-0.5 177.5,-0.5"/>
<text text-anchor="middle" x="219.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node1&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M91.67,-57.42C111.99,-49.7 141.31,-38.59 167,-29 172.19,-27.06 177.68,-25.02 183.06,-23.03"/>
<polygon fill="midnightblue" stroke="midnightblue" points="184.38,-26.28 192.55,-19.53 181.96,-19.71 184.38,-26.28"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -0,0 +1,6 @@
<map id="CycleCheck::isCyclicDFS" name="CycleCheck::isCyclicDFS">
<area shape="rect" id="node1" title=" " alt="" coords="5,35,181,61"/>
<area shape="rect" id="node2" href="$d3/dbb/class_cycle_check.html#a2f4485c08b45e7a21a2e86f9c3f01d8b" title=" " alt="" coords="229,35,444,61"/>
<area shape="rect" id="node3" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/end.html#" title=" " alt="" coords="492,5,659,32"/>
<area shape="rect" id="node4" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/find.html#" title=" " alt="" coords="507,57,644,98"/>
</map>

View File

@@ -0,0 +1 @@
c0ea8464055e7e62352b54ce9171307c

View File

@@ -0,0 +1,68 @@
<?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 2.44.0 (20200408.0750)
-->
<!-- Title: CycleCheck::isCyclicDFS Pages: 1 -->
<svg width="498pt" height="78pt"
viewBox="0.00 0.00 498.00 77.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 73.5)">
<title>CycleCheck::isCyclicDFS</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-73.5 494,-73.5 494,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title=" ">
<polygon fill="#bfbfbf" stroke="black" points="0,-28 0,-47 132,-47 132,-28 0,-28"/>
<text text-anchor="middle" x="66" y="-35" font-family="Helvetica,sans-Serif" font-size="10.00">CycleCheck::isCyclicDFS</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d3/dbb/class_cycle_check.html#a2f4485c08b45e7a21a2e86f9c3f01d8b" target="_top" xlink:title=" ">
<polygon fill="white" stroke="black" points="168,-28 168,-47 329,-47 329,-28 168,-28"/>
<text text-anchor="middle" x="248.5" y="-35" font-family="Helvetica,sans-Serif" font-size="10.00">CycleCheck::isCyclicDFSHelper</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M132.16,-37.5C140.51,-37.5 149.17,-37.5 157.82,-37.5"/>
<polygon fill="midnightblue" stroke="midnightblue" points="157.95,-41 167.95,-37.5 157.95,-34 157.95,-41"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/end.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="365,-50 365,-69 490,-69 490,-50 365,-50"/>
<text text-anchor="middle" x="427.5" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map::end</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M326.11,-47.02C335.64,-48.21 345.37,-49.42 354.83,-50.59"/>
<polygon fill="midnightblue" stroke="midnightblue" points="354.61,-54.09 364.96,-51.85 355.47,-47.14 354.61,-54.09"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/find.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="376,-0.5 376,-30.5 479,-30.5 479,-0.5 376,-0.5"/>
<text text-anchor="start" x="384" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="427.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::find</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node2&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M326.11,-27.98C339.38,-26.33 353.01,-24.63 365.78,-23.05"/>
<polygon fill="midnightblue" stroke="midnightblue" points="366.33,-26.51 375.82,-21.8 365.46,-19.56 366.33,-26.51"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB