mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-31 09:13:16 +08:00
Documentation for af90da7fb3
This commit is contained in:
@@ -91,8 +91,8 @@ $(document).ready(function(){initNavTree('df/d82/breadth__first__search_8cpp.htm
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> |
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#typedef-members">Typedefs</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">breadth_first_search.cpp File Reference</div> </div>
|
||||
@@ -106,36 +106,29 @@ $(document).ready(function(){initNavTree('df/d82/breadth__first__search_8cpp.htm
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <queue></code><br />
|
||||
<code>#include <vector></code><br />
|
||||
<code>#include <map></code><br />
|
||||
<code>#include <list></code><br />
|
||||
<code>#include <string></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for breadth_first_search.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/dec/breadth__first__search_8cpp__incl.svg" width="438" height="127"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/dec/breadth__first__search_8cpp__incl.svg" width="651" height="127"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
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="../../dc/d61/classgraph_1_1_graph.html">graph::Graph< T ></a></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 name="namespaces"></a>
|
||||
Namespaces</h2></td></tr>
|
||||
<tr class="memitem:df/dce/namespacegraph"><td class="memItemLeft" align="right" valign="top">  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html">graph</a></td></tr>
|
||||
<tr class="memdesc:df/dce/namespacegraph"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> algorithms. <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 name="typedef-members"></a>
|
||||
Typedefs</h2></td></tr>
|
||||
<tr class="memitem:ad9e7929c7542e1865501c808b4364ec9"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#ad9e7929c7542e1865501c808b4364ec9">graph::adjacency_list</a> = <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > ></td></tr>
|
||||
<tr class="memdesc:ad9e7929c7542e1865501c808b4364ec9"><td class="mdescLeft"> </td><td class="mdescRight">Representation of the graph as an adjacency list. <a href="../../df/dce/namespacegraph.html#ad9e7929c7542e1865501c808b4364ec9">More...</a><br /></td></tr>
|
||||
<tr class="separator:ad9e7929c7542e1865501c808b4364ec9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a1a13974bfe597e853bffe91aa2d3944d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">graph::add_directed_edge</a> (adjacency_list *graph, int u, int v)</td></tr>
|
||||
<tr class="memdesc:a1a13974bfe597e853bffe91aa2d3944d"><td class="mdescLeft"> </td><td class="mdescRight">Adds a directed edge from vertex u to vertex v. <a href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">More...</a><br /></td></tr>
|
||||
<tr class="separator:a1a13974bfe597e853bffe91aa2d3944d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8c7d0cbc90b3b921d02da35d58b63153"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a8c7d0cbc90b3b921d02da35d58b63153">graph::add_undirected_edge</a> (adjacency_list *graph, int u, int v)</td></tr>
|
||||
<tr class="memdesc:a8c7d0cbc90b3b921d02da35d58b63153"><td class="mdescLeft"> </td><td class="mdescRight">Adds an undirected edge from vertex u to vertex v. Essentially adds too directed edges to the adjacency list reprsentation of the graph. <a href="../../df/dce/namespacegraph.html#a8c7d0cbc90b3b921d02da35d58b63153">More...</a><br /></td></tr>
|
||||
<tr class="separator:a8c7d0cbc90b3b921d02da35d58b63153"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0e0d3bf6c8a63f8071395c53a3cd148d"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< bool > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d">graph::breadth_first_search</a> (const adjacency_list &graph, int start)</td></tr>
|
||||
<tr class="memdesc:a0e0d3bf6c8a63f8071395c53a3cd148d"><td class="mdescLeft"> </td><td class="mdescRight">Function performs the breadth first search algorithm over the graph. <a href="../../df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d">More...</a><br /></td></tr>
|
||||
<tr class="separator:a0e0d3bf6c8a63f8071395c53a3cd148d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a483bb8ccf42aaf7375a83e91490eda1e"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a> ()</td></tr>
|
||||
<tr class="separator:a483bb8ccf42aaf7375a83e91490eda1e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d82/breadth__first__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
@@ -143,7 +136,9 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p><a href="https://en.wikipedia.org/wiki/Breadth-first_search">Breadth First Search Algorithm (Breadth First Search)</a> </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="http://github.com/ayaankhan98">Ayaan Khan</a></dd></dl>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/ayaankhan98">Ayaan Khan</a> </dd>
|
||||
<dd>
|
||||
<a href="https://github.com/gpamangkp">Aman Kumar Pandey</a></dd></dl>
|
||||
<p>Breadth First Search also quoted as BFS is a <a class="el" href="../../da/d9a/class_graph.html">Graph</a> Traversal Algorithm. Time Complexity O(|V| + |E|) where V are the number of vertices and E are the number of edges in the graph.</p>
|
||||
<p>Applications of Breadth First Search are</p>
|
||||
<ol type="1">
|
||||
@@ -181,34 +176,29 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Main function </p>
|
||||
<div class="fragment"><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  {</div>
|
||||
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <a class="code" href="../../df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a>();</div>
|
||||
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  </div>
|
||||
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordtype">size_t</span> vertices = 0, edges = 0;</div>
|
||||
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter the number of vertices: "</span>;</div>
|
||||
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> vertices;</div>
|
||||
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter the number of edges: "</span>;</div>
|
||||
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> edges;</div>
|
||||
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  </div>
|
||||
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">graph::adjacency_list</a> <a class="code" href="../../df/dce/namespacegraph.html">graph</a>(vertices);</div>
|
||||
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  </div>
|
||||
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter space-separated pairs of vertices that form edges: "</span></div>
|
||||
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="keywordflow">while</span> (edges--) {</div>
|
||||
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="keywordtype">int</span> u = 0, v = 0;</div>
|
||||
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> u >> v;</div>
|
||||
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="comment">// Decrement the vertex index so that we can read more convenint</span></div>
|
||||
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="comment">// 1-based indexing from the user input.</span></div>
|
||||
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <a class="code" href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">graph::add_directed_edge</a>(&<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, u - 1, v - 1);</div>
|
||||
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  }</div>
|
||||
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  </div>
|
||||
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <a class="code" href="../../df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d">graph::breadth_first_search</a>(<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 0);</div>
|
||||
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span> }</div>
|
||||
<div class="fragment"><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  {</div>
|
||||
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <a class="code" href="../../df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a>();</div>
|
||||
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keywordtype">size_t</span> edges = 0;</div>
|
||||
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter the number of edges: "</span>;</div>
|
||||
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> edges;</div>
|
||||
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  </div>
|
||||
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <a class="code" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph<int></a> g;</div>
|
||||
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  </div>
|
||||
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter space-separated pairs of vertices that form edges: "</span></div>
|
||||
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">while</span> (edges--) {</div>
|
||||
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keywordtype">int</span> u = 0, v = 0;</div>
|
||||
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> u >> v;</div>
|
||||
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  g.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(u,v);</div>
|
||||
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  }</div>
|
||||
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  </div>
|
||||
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  g.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a6e3efabd5e401ef0f47c179866e7454e">breadth_first_search</a>(0);</div>
|
||||
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span> }</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="../../df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="612" height="458"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d82/breadth__first__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="544" height="190"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -240,48 +230,55 @@ Here is the call graph for this function:</div>
|
||||
<p>Test 1 Begin</p>
|
||||
<p>Test 2 Begin</p>
|
||||
<p>Test 3 Begins</p>
|
||||
<div class="fragment"><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  {<span class="comment"></span></div>
|
||||
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="comment"> /// Test 1 Begin</span></div>
|
||||
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> <span class="comment"></span> <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">graph::adjacency_list</a> <a class="code" href="../../df/dce/namespacegraph.html">graph</a>(4, <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a>());</div>
|
||||
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <a class="code" href="../../df/dce/namespacegraph.html#a8c7d0cbc90b3b921d02da35d58b63153">graph::add_undirected_edge</a>(&<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 0, 1);</div>
|
||||
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <a class="code" href="../../df/dce/namespacegraph.html#a8c7d0cbc90b3b921d02da35d58b63153">graph::add_undirected_edge</a>(&<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 1, 2);</div>
|
||||
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <a class="code" href="../../df/dce/namespacegraph.html#a8c7d0cbc90b3b921d02da35d58b63153">graph::add_undirected_edge</a>(&<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 2, 3);</div>
|
||||
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  </div>
|
||||
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a> returned_result = <a class="code" href="../../df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d">graph::breadth_first_search</a>(<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 2);</div>
|
||||
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a> correct_result = {<span class="keyword">true</span>, <span class="keyword">true</span>, <span class="keyword">true</span>, <span class="keyword">true</span>};</div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  </div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  assert(<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/equal.html">std::equal</a>(correct_result.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), correct_result.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>(),</div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  returned_result.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>()));</div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 1 Passed..."</span> << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> <span class="comment"></span> </div>
|
||||
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="comment"> /// Test 2 Begin</span></div>
|
||||
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="comment"></span> returned_result = <a class="code" href="../../df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d">graph::breadth_first_search</a>(<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 0);</div>
|
||||
<div class="fragment"><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  {<span class="comment"></span></div>
|
||||
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="comment"> /// Test 1 Begin</span></div>
|
||||
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span> <span class="comment"></span> <a class="code" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph<int></a> g;</div>
|
||||
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/map.html">std::map<int,bool></a> correct_result;</div>
|
||||
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  g.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(0,1);</div>
|
||||
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  g.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(1,2);</div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  g.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(2,3);</div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  correct_result[0]=<span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  correct_result[1]=<span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  correct_result[2]=<span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  correct_result[3]=<span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  </div>
|
||||
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/map.html">std::map<int,bool></a> returned_result = g.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a6e3efabd5e401ef0f47c179866e7454e">breadth_first_search</a>(2);</div>
|
||||
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  </div>
|
||||
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  assert(<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/equal.html">std::equal</a>(correct_result.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), correct_result.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>(),</div>
|
||||
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  returned_result.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>()));</div>
|
||||
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 2 Passed..."</span> << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="comment"></span> </div>
|
||||
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="comment"> /// Test 3 Begins</span></div>
|
||||
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="comment"></span> <a class="code" href="../../df/dce/namespacegraph.html">graph</a>.clear();</div>
|
||||
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <a class="code" href="../../df/dce/namespacegraph.html">graph</a>.resize(6);</div>
|
||||
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <a class="code" href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">graph::add_directed_edge</a>(&<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 0, 1);</div>
|
||||
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <a class="code" href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">graph::add_directed_edge</a>(&<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 0, 2);</div>
|
||||
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <a class="code" href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">graph::add_directed_edge</a>(&<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 1, 3);</div>
|
||||
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <a class="code" href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">graph::add_directed_edge</a>(&<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 2, 3);</div>
|
||||
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <a class="code" href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">graph::add_directed_edge</a>(&<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 1, 4);</div>
|
||||
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <a class="code" href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">graph::add_directed_edge</a>(&<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 3, 5);</div>
|
||||
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  </div>
|
||||
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  returned_result = <a class="code" href="../../df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d">graph::breadth_first_search</a>(<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, 2);</div>
|
||||
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  correct_result = {<span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">true</span>, <span class="keyword">true</span>, <span class="keyword">false</span>, <span class="keyword">true</span>};</div>
|
||||
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  </div>
|
||||
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  assert(<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/equal.html">std::equal</a>(correct_result.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), correct_result.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>(),</div>
|
||||
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  returned_result.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>()));</div>
|
||||
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 3 Passed..."</span> << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> }</div>
|
||||
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  assert(returned_result==correct_result);</div>
|
||||
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 1 Passed..."</span> << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="comment"></span> </div>
|
||||
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="comment"> /// Test 2 Begin</span></div>
|
||||
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="comment"></span> returned_result = g.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a6e3efabd5e401ef0f47c179866e7454e">breadth_first_search</a>(0);</div>
|
||||
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  </div>
|
||||
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  assert(returned_result==correct_result);</div>
|
||||
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 2 Passed..."</span> << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> <span class="comment"></span> </div>
|
||||
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span> <span class="comment"> /// Test 3 Begins</span></div>
|
||||
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span> <span class="comment"></span> <a class="code" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph<std::string></a> g2;</div>
|
||||
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  </div>
|
||||
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  g2.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">"Gorakhpur"</span>,<span class="stringliteral">"Lucknow"</span>,<span class="keyword">false</span>);</div>
|
||||
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  g2.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">"Gorakhpur"</span>,<span class="stringliteral">"Kanpur"</span>,<span class="keyword">false</span>);</div>
|
||||
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  g2.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">"Lucknow"</span>,<span class="stringliteral">"Agra"</span>,<span class="keyword">false</span>);</div>
|
||||
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  g2.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">"Kanpur"</span>,<span class="stringliteral">"Agra"</span>,<span class="keyword">false</span>);</div>
|
||||
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  g2.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">"Lucknow"</span>,<span class="stringliteral">"Prayagraj"</span>,<span class="keyword">false</span>);</div>
|
||||
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  g2.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">"Agra"</span>,<span class="stringliteral">"Noida"</span>,<span class="keyword">false</span>);</div>
|
||||
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  </div>
|
||||
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/map.html">std::map<std::string,bool></a> correct_res;</div>
|
||||
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/map.html">std::map<std::string,bool></a> returned_res=g2.<a class="code" href="../../dc/d61/classgraph_1_1_graph.html#a6e3efabd5e401ef0f47c179866e7454e">breadth_first_search</a>(<span class="stringliteral">"Kanpur"</span>);</div>
|
||||
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  correct_res[<span class="stringliteral">"Gorakhpur"</span>]=<span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  correct_res[<span class="stringliteral">"Lucknow"</span>]=<span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  correct_res[<span class="stringliteral">"Kanpur"</span>]=<span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  correct_res[<span class="stringliteral">"Agra"</span>]=<span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  correct_res[<span class="stringliteral">"Prayagraj"</span>]=<span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  correct_res[<span class="stringliteral">"Noida"</span>]=<span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  assert(correct_res==returned_res);</div>
|
||||
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 3 Passed..."</span> << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  </div>
|
||||
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> }</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="../../df/d82/breadth__first__search_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.svg" width="514" height="351"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/d82/breadth__first__search_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.svg" width="446" height="190"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -289,18 +286,14 @@ Here is the call graph for this function:</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aequal_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/equal.html">std::equal</a></div><div class="ttdeci">T equal(T... args)</div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector< std::vector< int > ></a></div></div>
|
||||
<div class="ttc" id="abreadth__first__search_8cpp_html_a483bb8ccf42aaf7375a83e91490eda1e"><div class="ttname"><a href="../../df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a></div><div class="ttdeci">static void tests()</div><div class="ttdef"><b>Definition:</b> breadth_first_search.cpp:134</div></div>
|
||||
<div class="ttc" id="anamespacegraph_html_a8c7d0cbc90b3b921d02da35d58b63153"><div class="ttname"><a href="../../df/dce/namespacegraph.html#a8c7d0cbc90b3b921d02da35d58b63153">graph::add_undirected_edge</a></div><div class="ttdeci">void add_undirected_edge(adjacency_list *graph, int u, int v)</div><div class="ttdoc">Adds an undirected edge from vertex u to vertex v. Essentially adds too directed edges to the adjacen...</div><div class="ttdef"><b>Definition:</b> breadth_first_search.cpp:92</div></div>
|
||||
<div class="ttc" id="abreadth__first__search_8cpp_html_a483bb8ccf42aaf7375a83e91490eda1e"><div class="ttname"><a href="../../df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a></div><div class="ttdeci">static void tests()</div><div class="ttdef"><b>Definition:</b> breadth_first_search.cpp:137</div></div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="anamespacegraph_html_a0e0d3bf6c8a63f8071395c53a3cd148d"><div class="ttname"><a href="../../df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d">graph::breadth_first_search</a></div><div class="ttdeci">std::vector< bool > breadth_first_search(const adjacency_list &graph, int start)</div><div class="ttdoc">Function performs the breadth first search algorithm over the graph.</div><div class="ttdef"><b>Definition:</b> breadth_first_search.cpp:107</div></div>
|
||||
<div class="ttc" id="amap_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/map.html">std::map</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_graph_html_a877b2cba40d8d46dde6fb4209effed19"><div class="ttname"><a href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">graph::Graph::add_edge</a></div><div class="ttdeci">void add_edge(T u, T v, bool bidir=true)</div><div class="ttdef"><b>Definition:</b> breadth_first_search.cpp:72</div></div>
|
||||
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
|
||||
<div class="ttc" id="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/begin.html">std::vector::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
|
||||
<div class="ttc" id="anamespacegraph_html"><div class="ttname"><a href="../../df/dce/namespacegraph.html">graph</a></div><div class="ttdoc">Graph algorithms.</div></div>
|
||||
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/end.html">std::vector::end</a></div><div class="ttdeci">T end(T... args)</div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_graph_html"><div class="ttname"><a href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph</a></div><div class="ttdef"><b>Definition:</b> breadth_first_search.cpp:64</div></div>
|
||||
<div class="ttc" id="abasic_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a></div></div>
|
||||
<div class="ttc" id="anamespacegraph_html_a1a13974bfe597e853bffe91aa2d3944d"><div class="ttname"><a href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">graph::add_directed_edge</a></div><div class="ttdeci">void add_directed_edge(adjacency_list *graph, int u, int v)</div><div class="ttdoc">Adds a directed edge from vertex u to vertex v.</div><div class="ttdef"><b>Definition:</b> breadth_first_search.cpp:77</div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_graph_html_a6e3efabd5e401ef0f47c179866e7454e"><div class="ttname"><a href="../../dc/d61/classgraph_1_1_graph.html#a6e3efabd5e401ef0f47c179866e7454e">graph::Graph::breadth_first_search</a></div><div class="ttdeci">std::map< T, bool > breadth_first_search(T src)</div><div class="ttdef"><b>Definition:</b> breadth_first_search.cpp:94</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
var breadth__first__search_8cpp =
|
||||
[
|
||||
[ "adjacency_list", "df/d82/breadth__first__search_8cpp.html#ad9e7929c7542e1865501c808b4364ec9", null ],
|
||||
[ "add_directed_edge", "df/d82/breadth__first__search_8cpp.html#a1a13974bfe597e853bffe91aa2d3944d", null ],
|
||||
[ "add_undirected_edge", "df/d82/breadth__first__search_8cpp.html#a8c7d0cbc90b3b921d02da35d58b63153", null ],
|
||||
[ "breadth_first_search", "df/d82/breadth__first__search_8cpp.html#a0e0d3bf6c8a63f8071395c53a3cd148d", null ],
|
||||
[ "Graph", "dc/d61/classgraph_1_1_graph.html", "dc/d61/classgraph_1_1_graph" ],
|
||||
[ "main", "df/d82/breadth__first__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "tests", "df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e", null ]
|
||||
];
|
||||
@@ -1,14 +1,10 @@
|
||||
<map id="tests" name="tests">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,159,56,185"/>
|
||||
<area shape="rect" id="node2" href="$df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d" title="Adds a directed edge from vertex u to vertex v." alt="" coords="337,25,508,52"/>
|
||||
<area shape="rect" id="node3" href="$df/dce/namespacegraph.html#a8c7d0cbc90b3b921d02da35d58b63153" title="Adds an undirected edge from vertex u to vertex v. Essentially adds too directed edges to the adjacen..." alt="" coords="104,49,289,76"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/begin.html#" title=" " alt="" coords="135,100,258,127"/>
|
||||
<area shape="rect" id="node5" href="$df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d" title="Function performs the breadth first search algorithm over the graph." alt="" coords="129,151,264,193"/>
|
||||
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end.html#" title=" " alt="" coords="140,217,253,244"/>
|
||||
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="161,268,233,295"/>
|
||||
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/equal.html#" title=" " alt="" coords="157,319,236,345"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/empty.html#" title=" " alt="" coords="359,80,486,107"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/front.html#" title=" " alt="" coords="364,131,481,157"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/pop.html#" title=" " alt="" coords="367,181,479,208"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/push.html#" title=" " alt="" coords="363,232,482,259"/>
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,81,56,108"/>
|
||||
<area shape="rect" id="node2" href="$dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19" title=" " alt="" coords="104,23,265,49"/>
|
||||
<area shape="rect" id="node3" href="$dc/d61/classgraph_1_1_graph.html#a6e3efabd5e401ef0f47c179866e7454e" title=" " alt="" coords="111,74,259,115"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="149,140,221,167"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/empty.html#" title=" " alt="" coords="313,5,440,32"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/front.html#" title=" " alt="" coords="318,56,435,83"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/pop.html#" title=" " alt="" coords="321,107,433,133"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/push.html#" title=" " alt="" coords="317,157,436,184"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
c284486385e4099badf447ed6e8225ef
|
||||
6c516152f5944745f49f7d421ce8dca8
|
||||
@@ -4,191 +4,125 @@
|
||||
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: tests Pages: 1 -->
|
||||
<svg width="385pt" height="263pt"
|
||||
viewBox="0.00 0.00 385.00 262.96" 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 258.96)">
|
||||
<svg width="334pt" height="142pt"
|
||||
viewBox="0.00 0.00 334.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>tests</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-258.96 381,-258.96 381,4 -4,4"/>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-138 330,-138 330,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,-120.5 0,-139.5 38,-139.5 38,-120.5 0,-120.5"/>
|
||||
<text text-anchor="middle" x="19" y="-127.5" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-57.5 0,-76.5 38,-76.5 38,-57.5 0,-57.5"/>
|
||||
<text text-anchor="middle" x="19" y="-64.5" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d" target="_top" xlink:title="Adds a directed edge from vertex u to vertex v.">
|
||||
<polygon fill="white" stroke="black" points="249,-220.5 249,-239.5 377,-239.5 377,-220.5 249,-220.5"/>
|
||||
<text text-anchor="middle" x="313" y="-227.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::add_directed_edge</text>
|
||||
<g id="a_node2"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-101.5 74,-120.5 195,-120.5 195,-101.5 74,-101.5"/>
|
||||
<text text-anchor="middle" x="134.5" y="-108.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M21.79,-139.77C26.26,-160.91 40.06,-210.66 74,-231 134.84,-267.46 221.11,-254.57 271.35,-242.12"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="272.39,-245.47 281.19,-239.57 270.64,-238.69 272.39,-245.47"/>
|
||||
<path fill="none" stroke="midnightblue" d="M38.25,-76.14C48.6,-81.15 61.87,-87.28 74,-92 79.57,-94.17 85.49,-96.28 91.37,-98.27"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="90.54,-101.68 101.13,-101.47 92.72,-95.03 90.54,-101.68"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a xlink:href="../../df/dce/namespacegraph.html#a8c7d0cbc90b3b921d02da35d58b63153" target="_top" xlink:title="Adds an undirected edge from vertex u to vertex v. Essentially adds too directed edges to the adjacen...">
|
||||
<polygon fill="white" stroke="black" points="74,-202.5 74,-221.5 213,-221.5 213,-202.5 74,-202.5"/>
|
||||
<text text-anchor="middle" x="143.5" y="-209.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::add_undirected_edge</text>
|
||||
<g id="a_node3"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html#a6e3efabd5e401ef0f47c179866e7454e" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="79,-52 79,-82 190,-82 190,-52 79,-52"/>
|
||||
<text text-anchor="start" x="87" y="-70" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph::breadth</text>
|
||||
<text text-anchor="middle" x="134.5" y="-59" font-family="Helvetica,sans-Serif" font-size="10.00">_first_search</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.67,-139.68C34.31,-153.59 52.12,-179.09 74,-193 77.3,-195.1 80.84,-196.97 84.5,-198.64"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="83.21,-201.89 93.8,-202.38 85.82,-195.4 83.21,-201.89"/>
|
||||
</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/vector/begin.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="97.5,-164.5 97.5,-183.5 189.5,-183.5 189.5,-164.5 97.5,-164.5"/>
|
||||
<text text-anchor="middle" x="143.5" y="-171.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::begin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.18,-139.32C48.51,-144.38 61.78,-150.51 74,-155 80.38,-157.34 87.19,-159.56 93.94,-161.59"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="93.17,-165.01 103.75,-164.44 95.12,-158.29 93.17,-165.01"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a xlink:href="../../df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d" target="_top" xlink:title="Function performs the breadth first search algorithm over the graph.">
|
||||
<polygon fill="white" stroke="black" points="93,-115 93,-145 194,-145 194,-115 93,-115"/>
|
||||
<text text-anchor="start" x="101" y="-133" font-family="Helvetica,sans-Serif" font-size="10.00">graph::breadth_first</text>
|
||||
<text text-anchor="middle" x="143.5" y="-122" font-family="Helvetica,sans-Serif" font-size="10.00">_search</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node5 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.08,-130C50.04,-130 66.46,-130 82.75,-130"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="82.83,-133.5 92.83,-130 82.83,-126.5 82.83,-133.5"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/end.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="101,-76.5 101,-95.5 186,-95.5 186,-76.5 101,-76.5"/>
|
||||
<text text-anchor="middle" x="143.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::end</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node10 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node1->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.18,-120.68C48.51,-115.62 61.78,-109.49 74,-105 80.38,-102.66 87.19,-100.44 93.94,-98.41"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="95.12,-101.71 103.75,-95.56 93.17,-94.99 95.12,-101.71"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="116.5,-38.5 116.5,-57.5 170.5,-57.5 170.5,-38.5 116.5,-38.5"/>
|
||||
<text text-anchor="middle" x="143.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node11 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node1->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.67,-120.32C34.31,-106.41 52.12,-80.91 74,-67 83.73,-60.81 95.48,-56.61 106.48,-53.77"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="107.32,-57.17 116.29,-51.53 105.76,-50.35 107.32,-57.17"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/equal.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="114,-0.5 114,-19.5 173,-19.5 173,-0.5 114,-0.5"/>
|
||||
<text text-anchor="middle" x="143.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::equal</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node12 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node1->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M22.41,-120.28C27.93,-100.1 43.42,-53.48 74,-29 82.54,-22.16 93.38,-17.78 103.91,-14.97"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="104.83,-18.35 113.81,-12.74 103.29,-11.53 104.83,-18.35"/>
|
||||
</g>
|
||||
<!-- Node3->Node2 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node3->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M213.11,-219.37C221.62,-220.29 230.34,-221.22 238.91,-222.15"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="238.56,-225.63 248.88,-223.22 239.31,-218.67 238.56,-225.63"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/empty.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="265.5,-179.5 265.5,-198.5 360.5,-198.5 360.5,-179.5 265.5,-179.5"/>
|
||||
<text text-anchor="middle" x="313" y="-186.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node6 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node5->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M186.63,-145.04C195.38,-148.26 204.51,-151.68 213,-155 229.15,-161.31 232.68,-164.16 249,-170 255.14,-172.2 261.68,-174.36 268.12,-176.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="267.53,-179.87 278.12,-179.47 269.59,-173.18 267.53,-179.87"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/front.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="269,-141.5 269,-160.5 357,-160.5 357,-141.5 269,-141.5"/>
|
||||
<text text-anchor="middle" x="313" y="-148.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node7 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node5->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M194.3,-136.24C214.6,-138.79 238.09,-141.73 258.73,-144.32"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="258.56,-147.83 268.91,-145.6 259.43,-140.88 258.56,-147.83"/>
|
||||
<path fill="none" stroke="midnightblue" d="M38.24,-67C46.68,-67 57.28,-67 68.31,-67"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="68.52,-70.5 78.52,-67 68.52,-63.5 68.52,-70.5"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/pop.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="271,-103.5 271,-122.5 355,-122.5 355,-103.5 271,-103.5"/>
|
||||
<text text-anchor="middle" x="313" y="-110.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="107.5,-13.5 107.5,-32.5 161.5,-32.5 161.5,-13.5 107.5,-13.5"/>
|
||||
<text text-anchor="middle" x="134.5" y="-20.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node8 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node5->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M194.3,-124.95C215.27,-122.82 239.65,-120.34 260.77,-118.2"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="261.25,-121.67 270.85,-117.18 260.54,-114.7 261.25,-121.67"/>
|
||||
<!-- Node1->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node1->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.25,-57.86C48.6,-52.85 61.87,-46.72 74,-42 81.6,-39.04 89.87,-36.18 97.77,-33.61"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="99.01,-36.89 107.48,-30.54 96.89,-30.22 99.01,-36.89"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/push.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="268.5,-65.5 268.5,-84.5 357.5,-84.5 357.5,-65.5 268.5,-65.5"/>
|
||||
<text text-anchor="middle" x="313" y="-72.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
|
||||
<!-- 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/empty.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="231,-114.5 231,-133.5 326,-133.5 326,-114.5 231,-114.5"/>
|
||||
<text text-anchor="middle" x="278.5" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node9 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node5->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M186.83,-115C205.79,-108.39 228.46,-100.63 249,-94 255.65,-91.85 262.71,-89.65 269.62,-87.54"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="271,-90.77 279.55,-84.52 268.97,-84.08 271,-90.77"/>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M173.18,-82.13C195.27,-90.99 222.92,-102.09 244.21,-110.64"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="242.91,-113.89 253.49,-114.36 245.52,-107.39 242.91,-113.89"/>
|
||||
</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/front.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="234.5,-76.5 234.5,-95.5 322.5,-95.5 322.5,-76.5 234.5,-76.5"/>
|
||||
<text text-anchor="middle" x="278.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node3->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.4,-74.35C201.51,-75.83 213.18,-77.39 224.24,-78.87"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="223.81,-82.35 234.19,-80.2 224.74,-75.41 223.81,-82.35"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/pop.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="236.5,-38.5 236.5,-57.5 320.5,-57.5 320.5,-38.5 236.5,-38.5"/>
|
||||
<text text-anchor="middle" x="278.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node3->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M190.4,-59.65C202.23,-58.07 214.69,-56.4 226.37,-54.84"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="226.95,-58.29 236.4,-53.5 226.03,-51.36 226.95,-58.29"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/push.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="234,-0.5 234,-19.5 323,-19.5 323,-0.5 234,-0.5"/>
|
||||
<text text-anchor="middle" x="278.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node3->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M173.18,-51.87C195.27,-43.01 222.92,-31.91 244.21,-23.36"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="245.52,-26.61 253.49,-19.64 242.91,-20.11 245.52,-26.61"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 6.2 KiB |
@@ -1,15 +1,11 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,317,56,344"/>
|
||||
<area shape="rect" id="node2" href="$df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d" title="Adds a directed edge from vertex u to vertex v." alt="" coords="436,292,607,319"/>
|
||||
<area shape="rect" id="node3" href="$df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d" title="Function performs the breadth first search algorithm over the graph." alt="" coords="228,74,363,115"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="259,393,331,420"/>
|
||||
<area shape="rect" id="node9" href="$df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" title=" " alt="" coords="104,267,155,293"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/empty.html#" title=" " alt="" coords="458,56,585,83"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/front.html#" title=" " alt="" coords="463,107,580,133"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/pop.html#" title=" " alt="" coords="465,157,577,184"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/push.html#" title=" " alt="" coords="462,5,581,32"/>
|
||||
<area shape="rect" id="node10" href="$df/dce/namespacegraph.html#a8c7d0cbc90b3b921d02da35d58b63153" title="Adds an undirected edge from vertex u to vertex v. Essentially adds too directed edges to the adjacen..." alt="" coords="203,292,388,319"/>
|
||||
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/begin.html#" title=" " alt="" coords="234,191,357,217"/>
|
||||
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end.html#" title=" " alt="" coords="239,241,352,268"/>
|
||||
<area shape="rect" id="node13" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/equal.html#" title=" " alt="" coords="256,343,335,369"/>
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,89,56,116"/>
|
||||
<area shape="rect" id="node2" href="$dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19" title=" " alt="" coords="203,19,364,45"/>
|
||||
<area shape="rect" id="node3" href="$dc/d61/classgraph_1_1_graph.html#a6e3efabd5e401ef0f47c179866e7454e" title=" " alt="" coords="209,74,357,115"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="247,148,319,175"/>
|
||||
<area shape="rect" id="node9" href="$df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" title=" " alt="" coords="104,64,155,91"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/empty.html#" title=" " alt="" coords="412,5,539,32"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/front.html#" title=" " alt="" coords="417,56,534,83"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/pop.html#" title=" " alt="" coords="419,107,531,133"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/push.html#" title=" " alt="" coords="416,157,535,184"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1b87e6dc6f0cdd35fc9d1d77979687f4
|
||||
ccd85dcd268dcb83cf4668fe3fdba54d
|
||||
@@ -4,224 +4,158 @@
|
||||
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="459pt" height="343pt"
|
||||
viewBox="0.00 0.00 459.00 343.20" 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 339.2)">
|
||||
<svg width="408pt" height="142pt"
|
||||
viewBox="0.00 0.00 408.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>main</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-339.2 455,-339.2 455,4 -4,4"/>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-138 404,-138 404,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,-81.7 0,-100.7 38,-100.7 38,-81.7 0,-81.7"/>
|
||||
<text text-anchor="middle" x="19" y="-88.7" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-51.5 0,-70.5 38,-70.5 38,-51.5 0,-51.5"/>
|
||||
<text text-anchor="middle" x="19" y="-58.5" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d" target="_top" xlink:title="Adds a directed edge from vertex u to vertex v.">
|
||||
<polygon fill="white" stroke="black" points="323,-100.7 323,-119.7 451,-119.7 451,-100.7 323,-100.7"/>
|
||||
<text text-anchor="middle" x="387" y="-107.7" font-family="Helvetica,sans-Serif" font-size="10.00">graph::add_directed_edge</text>
|
||||
<g id="a_node2"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="148,-104.5 148,-123.5 269,-123.5 269,-104.5 148,-104.5"/>
|
||||
<text text-anchor="middle" x="208.5" y="-111.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph::add_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M31.36,-81.51C52.58,-64.14 100.4,-28.26 148,-15.2 207.57,1.16 229.68,7.86 287,-15.2 325.46,-30.66 357.38,-69 373.88,-91.97"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="371.22,-94.27 379.8,-100.49 376.96,-90.28 371.22,-94.27"/>
|
||||
<path fill="none" stroke="midnightblue" d="M30.24,-70.62C40.46,-79.61 57.06,-92.58 74,-99 93.96,-106.57 116.71,-110.65 137.71,-112.76"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="137.58,-116.26 147.85,-113.64 138.19,-109.29 137.58,-116.26"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a xlink:href="../../df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d" target="_top" xlink:title="Function performs the breadth first search algorithm over the graph.">
|
||||
<polygon fill="white" stroke="black" points="167,-253.2 167,-283.2 268,-283.2 268,-253.2 167,-253.2"/>
|
||||
<text text-anchor="start" x="175" y="-271.2" font-family="Helvetica,sans-Serif" font-size="10.00">graph::breadth_first</text>
|
||||
<text text-anchor="middle" x="217.5" y="-260.2" font-family="Helvetica,sans-Serif" font-size="10.00">_search</text>
|
||||
<g id="a_node3"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html#a6e3efabd5e401ef0f47c179866e7454e" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="153,-52 153,-82 264,-82 264,-52 153,-52"/>
|
||||
<text text-anchor="start" x="161" y="-70" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph::breadth</text>
|
||||
<text text-anchor="middle" x="208.5" y="-59" font-family="Helvetica,sans-Serif" font-size="10.00">_first_search</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M27.28,-100.73C45.64,-124.36 96.11,-186.76 148,-228.2 156.98,-235.37 167.38,-242.11 177.33,-247.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="175.86,-251.14 186.28,-253.04 179.32,-245.06 175.86,-251.14"/>
|
||||
<path fill="none" stroke="midnightblue" d="M38.33,-60.66C56.91,-60.4 86.46,-60.2 112,-61 121.96,-61.31 132.5,-61.81 142.8,-62.38"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="142.8,-65.89 152.99,-62.98 143.21,-58.9 142.8,-65.89"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="190.5,-24.7 190.5,-43.7 244.5,-43.7 244.5,-24.7 190.5,-24.7"/>
|
||||
<text text-anchor="middle" x="217.5" y="-31.7" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
<polygon fill="white" stroke="black" points="181.5,-7.5 181.5,-26.5 235.5,-26.5 235.5,-7.5 181.5,-7.5"/>
|
||||
<text text-anchor="middle" x="208.5" y="-14.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node1->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.2,-85.68C62.99,-78.19 108.79,-64.45 148,-53.2 158.61,-50.15 170.16,-46.91 180.71,-43.99"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="181.74,-47.34 190.45,-41.3 179.88,-40.59 181.74,-47.34"/>
|
||||
<path fill="none" stroke="midnightblue" d="M38.32,-56.7C69.09,-49.48 131.69,-34.79 171.51,-25.45"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="172.42,-28.83 181.35,-23.14 170.82,-22.01 172.42,-28.83"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a xlink:href="../../df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-119.7 74,-138.7 112,-138.7 112,-119.7 74,-119.7"/>
|
||||
<text text-anchor="middle" x="93" y="-126.7" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
|
||||
<polygon fill="white" stroke="black" points="74,-70.5 74,-89.5 112,-89.5 112,-70.5 74,-70.5"/>
|
||||
<text text-anchor="middle" x="93" y="-77.5" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node9 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node1->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.17,-100.78C46.21,-105.03 55.83,-110.11 64.71,-114.79"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="63.11,-117.91 73.59,-119.48 66.38,-111.71 63.11,-117.91"/>
|
||||
<path fill="none" stroke="midnightblue" d="M38.17,-65.79C45.95,-67.85 55.23,-70.3 63.87,-72.58"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="63.02,-75.97 73.59,-75.14 64.81,-69.21 63.02,-75.97"/>
|
||||
</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/empty.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="339.5,-277.7 339.5,-296.7 434.5,-296.7 434.5,-277.7 339.5,-277.7"/>
|
||||
<text text-anchor="middle" x="387" y="-284.7" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
|
||||
<polygon fill="white" stroke="black" points="305,-114.5 305,-133.5 400,-133.5 400,-114.5 305,-114.5"/>
|
||||
<text text-anchor="middle" x="352.5" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M268.3,-273.84C287.44,-276.02 309.42,-278.51 329.16,-280.75"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="328.93,-284.24 339.26,-281.89 329.72,-277.29 328.93,-284.24"/>
|
||||
<path fill="none" stroke="midnightblue" d="M247.18,-82.13C269.27,-90.99 296.92,-102.09 318.21,-110.64"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="316.91,-113.89 327.49,-114.36 319.52,-107.39 316.91,-113.89"/>
|
||||
</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/front.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="343,-239.7 343,-258.7 431,-258.7 431,-239.7 343,-239.7"/>
|
||||
<text text-anchor="middle" x="387" y="-246.7" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
|
||||
<polygon fill="white" stroke="black" points="308.5,-76.5 308.5,-95.5 396.5,-95.5 396.5,-76.5 308.5,-76.5"/>
|
||||
<text text-anchor="middle" x="352.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node3->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M268.3,-262.55C288.6,-260.24 312.09,-257.58 332.73,-255.24"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="333.37,-258.69 342.91,-254.08 332.58,-251.73 333.37,-258.69"/>
|
||||
<path fill="none" stroke="midnightblue" d="M264.4,-74.35C275.51,-75.83 287.18,-77.39 298.24,-78.87"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="297.81,-82.35 308.19,-80.2 298.74,-75.41 297.81,-82.35"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/pop.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="345,-201.7 345,-220.7 429,-220.7 429,-201.7 345,-201.7"/>
|
||||
<text text-anchor="middle" x="387" y="-208.7" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
|
||||
<polygon fill="white" stroke="black" points="310.5,-38.5 310.5,-57.5 394.5,-57.5 394.5,-38.5 310.5,-38.5"/>
|
||||
<text text-anchor="middle" x="352.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node3->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M258.51,-253.05C277.9,-245.87 301.57,-237.32 323,-230.2 329.56,-228.02 336.53,-225.81 343.36,-223.7"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="344.64,-226.97 353.19,-220.71 342.61,-220.27 344.64,-226.97"/>
|
||||
<path fill="none" stroke="midnightblue" d="M264.4,-59.65C276.23,-58.07 288.69,-56.4 300.37,-54.84"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="300.95,-58.29 310.4,-53.5 300.03,-51.36 300.95,-58.29"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/push.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="342.5,-315.7 342.5,-334.7 431.5,-334.7 431.5,-315.7 342.5,-315.7"/>
|
||||
<text text-anchor="middle" x="387" y="-322.7" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
|
||||
<polygon fill="white" stroke="black" points="308,-0.5 308,-19.5 397,-19.5 397,-0.5 308,-0.5"/>
|
||||
<text text-anchor="middle" x="352.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node3->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M258.51,-283.34C277.9,-290.52 301.57,-299.07 323,-306.2 329.56,-308.37 336.53,-310.58 343.36,-312.69"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="342.61,-316.12 353.19,-315.68 344.64,-309.42 342.61,-316.12"/>
|
||||
<path fill="none" stroke="midnightblue" d="M247.18,-51.87C269.27,-43.01 296.92,-31.91 318.21,-23.36"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="319.52,-26.61 327.49,-19.64 316.91,-20.11 319.52,-26.61"/>
|
||||
</g>
|
||||
<!-- Node9->Node2 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node9->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M97.47,-138.93C104.16,-156.06 120.67,-191.09 148,-205.2 202.9,-233.53 229.68,-228.25 287,-205.2 325.46,-189.73 357.38,-151.39 373.88,-128.42"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="376.96,-130.11 379.8,-119.91 371.22,-126.12 376.96,-130.11"/>
|
||||
<path fill="none" stroke="midnightblue" d="M112.24,-85.46C126.68,-89.79 147.44,-96.01 165.89,-101.53"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="164.98,-104.92 175.56,-104.43 166.99,-98.21 164.98,-104.92"/>
|
||||
</g>
|
||||
<!-- Node9->Node3 -->
|
||||
<g id="edge13" class="edge">
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node9->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M96.4,-139C101.99,-159.91 117.74,-209.33 148,-238.2 151.93,-241.95 156.41,-245.28 161.16,-248.22"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="159.47,-251.29 169.91,-253.1 162.88,-245.17 159.47,-251.29"/>
|
||||
<path fill="none" stroke="midnightblue" d="M112.24,-77.91C120.68,-76.94 131.28,-75.73 142.31,-74.47"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="142.98,-77.91 152.52,-73.3 142.18,-70.96 142.98,-77.91"/>
|
||||
</g>
|
||||
<!-- Node9->Node8 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>Node9->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M98.13,-119.66C105.64,-103.47 123.09,-70.67 148,-53.2 157.51,-46.52 169.3,-42.19 180.39,-39.37"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="181.29,-42.76 190.31,-37.19 179.79,-35.92 181.29,-42.76"/>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><a xlink:href="../../df/dce/namespacegraph.html#a8c7d0cbc90b3b921d02da35d58b63153" target="_top" xlink:title="Adds an undirected edge from vertex u to vertex v. Essentially adds too directed edges to the adjacen...">
|
||||
<polygon fill="white" stroke="black" points="148,-100.7 148,-119.7 287,-119.7 287,-100.7 148,-100.7"/>
|
||||
<text text-anchor="middle" x="217.5" y="-107.7" font-family="Helvetica,sans-Serif" font-size="10.00">graph::add_undirected_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M112.08,-126.39C121.21,-124.97 132.96,-123.15 145.26,-121.25"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="145.85,-124.69 155.2,-119.7 144.78,-117.78 145.85,-124.69"/>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="node11" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/begin.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="171.5,-176.7 171.5,-195.7 263.5,-195.7 263.5,-176.7 171.5,-176.7"/>
|
||||
<text text-anchor="middle" x="217.5" y="-183.7" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::begin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node11 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Node9->Node11</title>
|
||||
<path fill="none" stroke="midnightblue" d="M105.29,-138.89C115.74,-147.43 132.04,-159.65 148,-167.2 152.95,-169.54 158.24,-171.64 163.61,-173.51"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="162.7,-176.9 173.29,-176.64 164.85,-170.24 162.7,-176.9"/>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="node12" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/end.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="175,-138.7 175,-157.7 260,-157.7 260,-138.7 175,-138.7"/>
|
||||
<text text-anchor="middle" x="217.5" y="-145.7" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::end</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node12 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>Node9->Node12</title>
|
||||
<path fill="none" stroke="midnightblue" d="M112.08,-132C126.01,-134.16 146.01,-137.26 164.78,-140.17"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="164.33,-143.65 174.75,-141.72 165.4,-136.73 164.33,-143.65"/>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="node13" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_node13"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/equal.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="188,-62.7 188,-81.7 247,-81.7 247,-62.7 188,-62.7"/>
|
||||
<text text-anchor="middle" x="217.5" y="-69.7" font-family="Helvetica,sans-Serif" font-size="10.00">std::equal</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node13 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>Node9->Node13</title>
|
||||
<path fill="none" stroke="midnightblue" d="M105.29,-119.5C115.74,-110.96 132.04,-98.75 148,-91.2 157.37,-86.76 167.97,-83.19 177.98,-80.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="178.93,-83.77 187.72,-77.86 177.16,-76.99 178.93,-83.77"/>
|
||||
</g>
|
||||
<!-- Node10->Node2 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Node10->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M287.11,-110.2C295.53,-110.2 304.15,-110.2 312.63,-110.2"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="312.88,-113.7 322.88,-110.2 312.88,-106.7 312.88,-113.7"/>
|
||||
<title>Node9->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M106.44,-70.47C117.11,-62.55 133.09,-51.27 148,-43 156.02,-38.55 164.96,-34.3 173.41,-30.58"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="174.86,-33.76 182.68,-26.61 172.11,-27.33 174.86,-33.76"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 7.9 KiB |
@@ -92,7 +92,6 @@ $(document).ready(function(){initNavTree('df/dce/namespacegraph.html','../../');
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> |
|
||||
<a href="#typedef-members">Typedefs</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">graph Namespace Reference</div> </div>
|
||||
@@ -114,23 +113,8 @@ 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="../../d0/d58/classgraph_1_1_rooted_tree.html">RootedTree</a></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 name="typedef-members"></a>
|
||||
Typedefs</h2></td></tr>
|
||||
<tr class="memitem:ad9e7929c7542e1865501c808b4364ec9"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#ad9e7929c7542e1865501c808b4364ec9">adjacency_list</a> = <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int > ></td></tr>
|
||||
<tr class="memdesc:ad9e7929c7542e1865501c808b4364ec9"><td class="mdescLeft"> </td><td class="mdescRight">Representation of the graph as an adjacency list. <a href="../../df/dce/namespacegraph.html#ad9e7929c7542e1865501c808b4364ec9">More...</a><br /></td></tr>
|
||||
<tr class="separator:ad9e7929c7542e1865501c808b4364ec9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a1a13974bfe597e853bffe91aa2d3944d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">add_directed_edge</a> (<a class="el" href="../../df/dce/namespacegraph.html#ad9e7929c7542e1865501c808b4364ec9">adjacency_list</a> *graph, int u, int v)</td></tr>
|
||||
<tr class="memdesc:a1a13974bfe597e853bffe91aa2d3944d"><td class="mdescLeft"> </td><td class="mdescRight">Adds a directed edge from vertex u to vertex v. <a href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">More...</a><br /></td></tr>
|
||||
<tr class="separator:a1a13974bfe597e853bffe91aa2d3944d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8c7d0cbc90b3b921d02da35d58b63153"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a8c7d0cbc90b3b921d02da35d58b63153">add_undirected_edge</a> (<a class="el" href="../../df/dce/namespacegraph.html#ad9e7929c7542e1865501c808b4364ec9">adjacency_list</a> *graph, int u, int v)</td></tr>
|
||||
<tr class="memdesc:a8c7d0cbc90b3b921d02da35d58b63153"><td class="mdescLeft"> </td><td class="mdescRight">Adds an undirected edge from vertex u to vertex v. Essentially adds too directed edges to the adjacency list reprsentation of the graph. <a href="../../df/dce/namespacegraph.html#a8c7d0cbc90b3b921d02da35d58b63153">More...</a><br /></td></tr>
|
||||
<tr class="separator:a8c7d0cbc90b3b921d02da35d58b63153"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0e0d3bf6c8a63f8071395c53a3cd148d"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< bool > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d">breadth_first_search</a> (const <a class="el" href="../../df/dce/namespacegraph.html#ad9e7929c7542e1865501c808b4364ec9">adjacency_list</a> &graph, int start)</td></tr>
|
||||
<tr class="memdesc:a0e0d3bf6c8a63f8071395c53a3cd148d"><td class="mdescLeft"> </td><td class="mdescRight">Function performs the breadth first search algorithm over the graph. <a href="../../df/dce/namespacegraph.html#a0e0d3bf6c8a63f8071395c53a3cd148d">More...</a><br /></td></tr>
|
||||
<tr class="separator:a0e0d3bf6c8a63f8071395c53a3cd148d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a372ff051a7bc6c91d34a7b58edf8dfce"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">addEdge</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< int >> *adj, int u, int v)</td></tr>
|
||||
<tr class="memdesc:a372ff051a7bc6c91d34a7b58edf8dfce"><td class="mdescLeft"> </td><td class="mdescRight">Function that add edge between two nodes or vertices of graph. <a href="../../df/dce/namespacegraph.html#a372ff051a7bc6c91d34a7b58edf8dfce">More...</a><br /></td></tr>
|
||||
<tr class="separator:a372ff051a7bc6c91d34a7b58edf8dfce"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -159,126 +143,7 @@ Functions</h2></td></tr>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> algorithms. </p>
|
||||
<p><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> Algorithms. </p>
|
||||
</div><h2 class="groupheader">Typedef Documentation</h2>
|
||||
<a id="ad9e7929c7542e1865501c808b4364ec9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ad9e7929c7542e1865501c808b4364ec9">◆ </a></span>adjacency_list</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">using <a class="el" href="../../df/dce/namespacegraph.html#ad9e7929c7542e1865501c808b4364ec9">graph::adjacency_list</a> = typedef <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a><<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a><int> ></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Representation of the graph as an adjacency list. </p>
|
||||
<p>For every vertex, there is a list of its neighbors in the order in which they were added to the graph. By default, the edges are directed, but an undirected graph can be represented simply by storing each each as two directed edges in both directions. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a1a13974bfe597e853bffe91aa2d3944d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1a13974bfe597e853bffe91aa2d3944d">◆ </a></span>add_directed_edge()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void graph::add_directed_edge </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../df/dce/namespacegraph.html#ad9e7929c7542e1865501c808b4364ec9">adjacency_list</a> * </td>
|
||||
<td class="paramname"><em>graph</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>u</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>v</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Adds a directed edge from vertex u to vertex v. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">graph</td><td>Adjacency list representation of graph </td></tr>
|
||||
<tr><td class="paramname">u</td><td>first vertex </td></tr>
|
||||
<tr><td class="paramname">v</td><td>second vertex </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  {</div>
|
||||
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  (*graph)[u].push_back(v);</div>
|
||||
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a8c7d0cbc90b3b921d02da35d58b63153"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a8c7d0cbc90b3b921d02da35d58b63153">◆ </a></span>add_undirected_edge()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void graph::add_undirected_edge </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../df/dce/namespacegraph.html#ad9e7929c7542e1865501c808b4364ec9">adjacency_list</a> * </td>
|
||||
<td class="paramname"><em>graph</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>u</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>v</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Adds an undirected edge from vertex u to vertex v. Essentially adds too directed edges to the adjacency list reprsentation of the graph. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">graph</td><td>Adjacency list representation of graph </td></tr>
|
||||
<tr><td class="paramname">u</td><td>first vertex </td></tr>
|
||||
<tr><td class="paramname">v</td><td>second vertex </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  {</div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <a class="code" href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">add_directed_edge</a>(<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, u, v);</div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <a class="code" href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">add_directed_edge</a>(<a class="code" href="../../df/dce/namespacegraph.html">graph</a>, v, u);</div>
|
||||
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> }</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="../../df/dce/namespacegraph_a8c7d0cbc90b3b921d02da35d58b63153_cgraph.svg" width="415" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a372ff051a7bc6c91d34a7b58edf8dfce"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a372ff051a7bc6c91d34a7b58edf8dfce">◆ </a></span>addEdge() <span class="overload">[1/3]</span></h2>
|
||||
|
||||
@@ -439,77 +304,6 @@ Here is the call graph for this function:</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a0e0d3bf6c8a63f8071395c53a3cd148d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a0e0d3bf6c8a63f8071395c53a3cd148d">◆ </a></span>breadth_first_search()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a><bool> graph::breadth_first_search </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const <a class="el" href="../../df/dce/namespacegraph.html#ad9e7929c7542e1865501c808b4364ec9">adjacency_list</a> & </td>
|
||||
<td class="paramname"><em>graph</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>start</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Function performs the breadth first search algorithm over the graph. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">graph</td><td>Adjacency list representation of graph </td></tr>
|
||||
<tr><td class="paramname">start</td><td>vertex from where traversing starts </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>a binary vector indicating which vertices were visited during the search. </dd></dl>
|
||||
<p>vector to keep track of visited vertices</p>
|
||||
<p>queue that stores vertices that need to be further explored</p>
|
||||
<p>mark the starting vertex as visited</p>
|
||||
<p>if the vertex is not visited then mark it as visited and push it to the queue</p>
|
||||
<div class="fragment"><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  {<span class="comment"></span></div>
|
||||
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment"> /// vector to keep track of visited vertices</span></div>
|
||||
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"></span> <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a> visited(<a class="code" href="../../df/dce/namespacegraph.html">graph</a>.size(), <span class="keyword">false</span>);<span class="comment"></span></div>
|
||||
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment"> /// queue that stores vertices that need to be further explored</span></div>
|
||||
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"></span> <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue<int></a> tracker;</div>
|
||||
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment"></span> </div>
|
||||
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> /// mark the starting vertex as visited</span></div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"></span> visited[start] = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  tracker.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/push.html">push</a>(start);</div>
|
||||
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">while</span> (!tracker.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/empty.html">empty</a>()) {</div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordtype">size_t</span> vertex = tracker.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/front.html">front</a>();</div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  tracker.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/pop.html">pop</a>();</div>
|
||||
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> x : <a class="code" href="../../df/dce/namespacegraph.html">graph</a>[vertex]) {<span class="comment"></span></div>
|
||||
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="comment"> /// if the vertex is not visited then mark it as visited</span></div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment"> /// and push it to the queue</span></div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="comment"></span> <span class="keywordflow">if</span> (!visited[x]) {</div>
|
||||
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  visited[x] = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  tracker.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/push.html">push</a>(x);</div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  }</div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  }</div>
|
||||
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  }</div>
|
||||
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordflow">return</span> visited;</div>
|
||||
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> }</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="../../df/dce/namespacegraph_a0e0d3bf6c8a63f8071395c53a3cd148d_cgraph.svg" width="320" 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="a2e6017a54d445819ede9adcf33240e1a"></a>
|
||||
@@ -827,20 +621,16 @@ Here is the call graph for this function:</div>
|
||||
<div class="ttc" id="apair_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair</a></div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector< bool ></a></div></div>
|
||||
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(T... args)</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="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="anamespacegraph_html_a48acac475cb48614279e7ea784c32fc3"><div class="ttname"><a href="../../df/dce/namespacegraph.html#a48acac475cb48614279e7ea784c32fc3">graph::explore</a></div><div class="ttdeci">void explore(const std::vector< std::vector< size_t >> &adj, size_t v, std::vector< bool > *visited)</div><div class="ttdoc">Explores the given vertex, exploring a vertex means traversing over all the vertices which are connec...</div><div class="ttdef"><b>Definition:</b> depth_first_search.cpp:80</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="apop_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/priority_queue/pop.html">std::priority_queue::pop</a></div><div class="ttdeci">T pop(T... args)</div></div>
|
||||
<div class="ttc" id="atop_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/priority_queue/top.html">std::priority_queue::top</a></div><div class="ttdeci">T top(T... args)</div></div>
|
||||
<div class="ttc" id="apriority_queue_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/priority_queue.html">std::priority_queue</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="agreater_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/functional/greater.html">std::greater</a></div></div>
|
||||
<div class="ttc" id="anamespacegraph_html"><div class="ttname"><a href="../../df/dce/namespacegraph.html">graph</a></div><div class="ttdoc">Graph algorithms.</div></div>
|
||||
<div class="ttc" id="anamespacegraph_html_a8e9885e0dd49fcf8262a9868124deac9"><div class="ttname"><a href="../../df/dce/namespacegraph.html#a8e9885e0dd49fcf8262a9868124deac9">graph::explore</a></div><div class="ttdeci">void explore(const std::vector< std::vector< int >> *adj, int u, std::vector< bool > *visited)</div><div class="ttdoc">Utility function for depth first seach algorithm this function explores the vertex which is passed in...</div><div class="ttdef"><b>Definition:</b> connected_components.cpp:59</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="apush_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue/push.html">std::queue::push</a></div><div class="ttdeci">T push(T... args)</div></div>
|
||||
<div class="ttc" id="aempty_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/priority_queue/empty.html">std::priority_queue::empty</a></div><div class="ttdeci">T empty(T... args)</div></div>
|
||||
<div class="ttc" id="apush_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/priority_queue/push.html">std::priority_queue::push</a></div><div class="ttdeci">T push(T... args)</div></div>
|
||||
<div class="ttc" id="amake_pair_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/pair/make_pair.html">std::make_pair</a></div><div class="ttdeci">T make_pair(T... args)</div></div>
|
||||
<div class="ttc" id="anamespacegraph_html_a1a13974bfe597e853bffe91aa2d3944d"><div class="ttname"><a href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d">graph::add_directed_edge</a></div><div class="ttdeci">void add_directed_edge(adjacency_list *graph, int u, int v)</div><div class="ttdoc">Adds a directed edge from vertex u to vertex v.</div><div class="ttdef"><b>Definition:</b> breadth_first_search.cpp:77</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<map id="graph::breadth_first_search" name="graph::breadth_first_search">
|
||||
<area shape="rect" id="node1" title="Function performs the breadth first search algorithm over the graph." alt="" coords="5,74,140,115"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/empty.html#" title=" " alt="" coords="188,5,315,32"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/front.html#" title=" " alt="" coords="193,56,310,83"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/pop.html#" title=" " alt="" coords="195,107,307,133"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/push.html#" title=" " alt="" coords="192,157,311,184"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
8d35e2a7e3be3a76448f79b4d4b3c8e5
|
||||
@@ -1,83 +0,0 @@
|
||||
<?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.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: graph::breadth_first_search Pages: 1 -->
|
||||
<svg width="240pt" height="142pt"
|
||||
viewBox="0.00 0.00 240.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>graph::breadth_first_search</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-138 236,-138 236,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Function performs the breadth first search algorithm over the graph.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-52 0,-82 101,-82 101,-52 0,-52"/>
|
||||
<text text-anchor="start" x="8" y="-70" font-family="Helvetica,sans-Serif" font-size="10.00">graph::breadth_first</text>
|
||||
<text text-anchor="middle" x="50.5" y="-59" font-family="Helvetica,sans-Serif" font-size="10.00">_search</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/empty.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="137,-114.5 137,-133.5 232,-133.5 232,-114.5 137,-114.5"/>
|
||||
<text text-anchor="middle" x="184.5" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M84.69,-82.03C100.49,-89.11 119.67,-97.61 137,-105 141.27,-106.82 145.77,-108.7 150.22,-110.55"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="149.21,-113.91 159.79,-114.47 151.87,-107.44 149.21,-113.91"/>
|
||||
</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/front.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="140.5,-76.5 140.5,-95.5 228.5,-95.5 228.5,-76.5 140.5,-76.5"/>
|
||||
<text text-anchor="middle" x="184.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M101.03,-74.13C110.58,-75.5 120.63,-76.95 130.3,-78.34"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="129.8,-81.81 140.2,-79.77 130.8,-74.88 129.8,-81.81"/>
|
||||
</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/pop.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="142.5,-38.5 142.5,-57.5 226.5,-57.5 226.5,-38.5 142.5,-38.5"/>
|
||||
<text text-anchor="middle" x="184.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M101.03,-59.87C111.23,-58.4 122,-56.85 132.26,-55.37"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="132.92,-58.82 142.32,-53.93 131.92,-51.89 132.92,-58.82"/>
|
||||
</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/push.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="140,-0.5 140,-19.5 229,-19.5 229,-0.5 140,-0.5"/>
|
||||
<text text-anchor="middle" x="184.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M84.69,-51.97C100.49,-44.89 119.67,-36.39 137,-29 141.27,-27.18 145.77,-25.3 150.22,-23.45"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="151.87,-26.56 159.79,-19.53 149.21,-20.09 151.87,-26.56"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -1,4 +0,0 @@
|
||||
<map id="graph::add_undirected_edge" name="graph::add_undirected_edge">
|
||||
<area shape="rect" id="node1" title="Adds an undirected edge from vertex u to vertex v. Essentially adds too directed edges to the adjacen..." alt="" coords="5,5,191,32"/>
|
||||
<area shape="rect" id="node2" href="$df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d" title="Adds a directed edge from vertex u to vertex v." alt="" coords="239,5,409,32"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
f6048f74de3c8ed97eaf4b7f12461595
|
||||
@@ -1,37 +0,0 @@
|
||||
<?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.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: graph::add_undirected_edge Pages: 1 -->
|
||||
<svg width="311pt" height="28pt"
|
||||
viewBox="0.00 0.00 311.00 28.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 24)">
|
||||
<title>graph::add_undirected_edge</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-24 307,-24 307,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Adds an undirected edge from vertex u to vertex v. Essentially adds too directed edges to the adjacen...">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-19.5 139,-19.5 139,-0.5 0,-0.5"/>
|
||||
<text text-anchor="middle" x="69.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::add_undirected_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../df/dce/namespacegraph.html#a1a13974bfe597e853bffe91aa2d3944d" target="_top" xlink:title="Adds a directed edge from vertex u to vertex v.">
|
||||
<polygon fill="white" stroke="black" points="175,-0.5 175,-19.5 303,-19.5 303,-0.5 175,-0.5"/>
|
||||
<text text-anchor="middle" x="239" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::add_directed_edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M139.11,-10C147.53,-10 156.15,-10 164.63,-10"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="164.88,-13.5 174.88,-10 164.88,-6.5 164.88,-13.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.8 KiB |
Reference in New Issue
Block a user