Documentation for 8b1eab204b

This commit is contained in:
realstealthninja
2024-11-04 12:43:05 +00:00
parent 4fb6e622e9
commit a7bccf7d01
6732 changed files with 153919 additions and 365711 deletions

View File

@@ -1,3 +1,4 @@
<!-- HTML header for doxygen 1.12.0-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
@@ -5,10 +6,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: graph/breadth_first_search.cpp File Reference</title>
<title>TheAlgorithms/C++: graph/breadth_first_search.cpp File Reference</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../navtreedata.js"></script>
@@ -18,14 +24,24 @@
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
<script type="text/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
@@ -33,10 +49,11 @@ MathJax.Hub.Config({
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
@@ -127,7 +144,9 @@ 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="642" height="126"><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">
</div>
<p><a href="../../df/d82/breadth__first__search_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt; T &gt;</a></td></tr>
@@ -171,6 +190,8 @@ Functions</h2></td></tr>
</ol>
</li>
</ol>
<p class="definition">Definition in file <a class="el" href="../../df/d82/breadth__first__search_8cpp_source.html">breadth_first_search.cpp</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&#160;</a></span>main()</h2>
@@ -187,37 +208,31 @@ Functions</h2></td></tr>
</table>
</div><div class="memdoc">
<p>Main function </p>
<p class="definition">Definition at line <a class="el" href="../../df/d82/breadth__first__search_8cpp_source.html#l00186">186</a> of file <a class="el" href="../../df/d82/breadth__first__search_8cpp_source.html">breadth_first_search.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 186</span> {</div>
<div class="line"><span class="lineno"> 187</span> <a class="code hl_function" href="#a483bb8ccf42aaf7375a83e91490eda1e">tests</a>();</div>
<div class="line"><span class="lineno"> 188</span> <span class="keywordtype">size_t</span> edges = 0;</div>
<div class="line"><span class="lineno"> 189</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Enter the number of edges: &quot;</span>;</div>
<div class="line"><span class="lineno"> 190</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; edges;</div>
<div class="line"><span class="lineno"> 189</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Enter the number of edges: &quot;</span>;</div>
<div class="line"><span class="lineno"> 190</span> std::cin &gt;&gt; edges;</div>
<div class="line"><span class="lineno"> 191</span> </div>
<div class="line"><span class="lineno"> 192</span> <a class="code hl_class" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt;int&gt;</a> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>;</div>
<div class="line"><span class="lineno"> 193</span> </div>
<div class="line"><span class="lineno"> 194</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Enter space-separated pairs of vertices that form edges: &quot;</span></div>
<div class="line"><span class="lineno"> 195</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 194</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Enter space-separated pairs of vertices that form edges: &quot;</span></div>
<div class="line"><span class="lineno"> 195</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 196</span> <span class="keywordflow">while</span> (edges--) {</div>
<div class="line"><span class="lineno"> 197</span> <span class="keywordtype">int</span> u = 0, v = 0;</div>
<div class="line"><span class="lineno"> 198</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; u &gt;&gt; v;</div>
<div class="line"><span class="lineno"> 198</span> std::cin &gt;&gt; u &gt;&gt; v;</div>
<div class="line"><span class="lineno"> 199</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>.add_edge(u, v);</div>
<div class="line"><span class="lineno"> 200</span> }</div>
<div class="line"><span class="lineno"> 201</span> </div>
<div class="line"><span class="lineno"> 202</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>.breadth_first_search(0);</div>
<div class="line"><span class="lineno"> 203</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 204</span>}</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="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="abreadth__first__search_8cpp_html_a483bb8ccf42aaf7375a83e91490eda1e"><div class="ttname"><a href="#a483bb8ccf42aaf7375a83e91490eda1e">tests</a></div><div class="ttdeci">static void tests()</div><div class="ttdef"><b>Definition</b> breadth_first_search.cpp:139</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> lowest_common_ancestor.cpp:53</div></div>
<div class="ttc" id="acomposite__simpson__rule_8cpp_html_a2f67508d5f392b0321772169342c98ad"><div class="ttname"><a href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">numerical_methods::simpson_method::g</a></div><div class="ttdeci">double g(double x)</div><div class="ttdoc">Another test function.</div><div class="ttdef"><b>Definition</b> composite_simpson_rule.cpp:115</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><!-- 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="542" height="216"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="abreadth__first__search_8cpp_html_a483bb8ccf42aaf7375a83e91490eda1e"><div class="ttname"><a href="#a483bb8ccf42aaf7375a83e91490eda1e">tests</a></div><div class="ttdeci">static void tests()</div><div class="ttdef"><b>Definition</b> <a href="../../df/d82/breadth__first__search_8cpp_source.html#l00139">breadth_first_search.cpp:139</a></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> <a href="../../de/dde/lowest__common__ancestor_8cpp_source.html#l00053">lowest_common_ancestor.cpp:53</a></div></div>
<div class="ttc" id="acomposite__simpson__rule_8cpp_html_a2f67508d5f392b0321772169342c98ad"><div class="ttname"><a href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">numerical_methods::simpson_method::g</a></div><div class="ttdeci">double g(double x)</div><div class="ttdoc">Another test function.</div><div class="ttdef"><b>Definition</b> <a href="../../d4/d18/composite__simpson__rule_8cpp_source.html#l00115">composite_simpson_rule.cpp:115</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a483bb8ccf42aaf7375a83e91490eda1e" name="a483bb8ccf42aaf7375a83e91490eda1e"></a>
@@ -246,10 +261,11 @@ 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"><span class="lineno"> 139</span> {<span class="comment"></span></div>
<div class="line"><span class="lineno"> 140</span><span class="comment"> /// Test 1 Begin</span></div>
<div class="line"><span class="lineno"> 141</span><span class="comment"></span> <a class="code hl_class" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt;int&gt;</a> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>;</div>
<div class="line"><span class="lineno"> 142</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/map.html">std::map&lt;int, bool&gt;</a> correct_result;</div>
<p class="definition">Definition at line <a class="el" href="../../df/d82/breadth__first__search_8cpp_source.html#l00139">139</a> of file <a class="el" href="../../df/d82/breadth__first__search_8cpp_source.html">breadth_first_search.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 139</span> {</div>
<div class="line"><span class="lineno"> 141</span> <a class="code hl_class" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt;int&gt;</a> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>;</div>
<div class="line"><span class="lineno"> 142</span> std::map&lt;int, bool&gt; correct_result;</div>
<div class="line"><span class="lineno"> 143</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>.add_edge(0, 1);</div>
<div class="line"><span class="lineno"> 144</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>.add_edge(1, 2);</div>
<div class="line"><span class="lineno"> 145</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>.add_edge(2, 3);</div>
@@ -258,19 +274,17 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 148</span> correct_result[2] = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 149</span> correct_result[3] = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 150</span> </div>
<div class="line"><span class="lineno"> 151</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/map.html">std::map&lt;int, bool&gt;</a> returned_result = <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>.breadth_first_search(2);</div>
<div class="line"><span class="lineno"> 151</span> std::map&lt;int, bool&gt; returned_result = <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>.breadth_first_search(2);</div>
<div class="line"><span class="lineno"> 152</span> </div>
<div class="line"><span class="lineno"> 153</span> assert(returned_result == correct_result);</div>
<div class="line"><span class="lineno"> 154</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 1 Passed...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 155</span><span class="comment"></span> </div>
<div class="line"><span class="lineno"> 156</span><span class="comment"> /// Test 2 Begin</span></div>
<div class="line"><span class="lineno"> 157</span><span class="comment"></span> returned_result = <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>.breadth_first_search(0);</div>
<div class="line"><span class="lineno"> 154</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Test 1 Passed...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 155</span> </div>
<div class="line"><span class="lineno"> 157</span> returned_result = <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a2f67508d5f392b0321772169342c98ad">g</a>.breadth_first_search(0);</div>
<div class="line"><span class="lineno"> 158</span> </div>
<div class="line"><span class="lineno"> 159</span> assert(returned_result == correct_result);</div>
<div class="line"><span class="lineno"> 160</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 2 Passed...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 161</span><span class="comment"></span> </div>
<div class="line"><span class="lineno"> 162</span><span class="comment"> /// Test 3 Begins</span></div>
<div class="line"><span class="lineno"> 163</span><span class="comment"></span> <a class="code hl_class" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt;std::string&gt;</a> g2;</div>
<div class="line"><span class="lineno"> 160</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Test 2 Passed...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 161</span> </div>
<div class="line"><span class="lineno"> 163</span> <a class="code hl_class" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt;std::string&gt;</a> g2;</div>
<div class="line"><span class="lineno"> 164</span> </div>
<div class="line"><span class="lineno"> 165</span> g2.<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">&quot;Gorakhpur&quot;</span>, <span class="stringliteral">&quot;Lucknow&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><span class="lineno"> 166</span> g2.<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">&quot;Gorakhpur&quot;</span>, <span class="stringliteral">&quot;Kanpur&quot;</span>, <span class="keyword">false</span>);</div>
@@ -279,8 +293,8 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 169</span> g2.<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">&quot;Lucknow&quot;</span>, <span class="stringliteral">&quot;Prayagraj&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><span class="lineno"> 170</span> g2.<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">&quot;Agra&quot;</span>, <span class="stringliteral">&quot;Noida&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><span class="lineno"> 171</span> </div>
<div class="line"><span class="lineno"> 172</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/map.html">std::map&lt;std::string, bool&gt;</a> correct_res;</div>
<div class="line"><span class="lineno"> 173</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/map.html">std::map&lt;std::string, bool&gt;</a> returned_res =</div>
<div class="line"><span class="lineno"> 172</span> std::map&lt;std::string, bool&gt; correct_res;</div>
<div class="line"><span class="lineno"> 173</span> std::map&lt;std::string, bool&gt; returned_res =</div>
<div class="line"><span class="lineno"> 174</span> g2.<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981">breadth_first_search</a>(<span class="stringliteral">&quot;Kanpur&quot;</span>);</div>
<div class="line"><span class="lineno"> 175</span> correct_res[<span class="stringliteral">&quot;Gorakhpur&quot;</span>] = <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 176</span> correct_res[<span class="stringliteral">&quot;Lucknow&quot;</span>] = <span class="keyword">false</span>;</div>
@@ -289,17 +303,11 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 179</span> correct_res[<span class="stringliteral">&quot;Prayagraj&quot;</span>] = <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 180</span> correct_res[<span class="stringliteral">&quot;Noida&quot;</span>] = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 181</span> assert(correct_res == returned_res);</div>
<div class="line"><span class="lineno"> 182</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Test 3 Passed...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 182</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Test 3 Passed...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 183</span>}</div>
<div class="ttc" id="aclassgraph_1_1_graph_html_a3755ec9e6a842238c7f4aac10b661981"><div class="ttname"><a href="../../dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981">graph::Graph::breadth_first_search</a></div><div class="ttdeci">std::map&lt; T, bool &gt; breadth_first_search(T src)</div><div class="ttdef"><b>Definition</b> breadth_first_search.cpp:96</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:74</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>
</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="444" height="184"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclassgraph_1_1_graph_html_a3755ec9e6a842238c7f4aac10b661981"><div class="ttname"><a href="../../dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981">graph::Graph::breadth_first_search</a></div><div class="ttdeci">std::map&lt; T, bool &gt; breadth_first_search(T src)</div><div class="ttdef"><b>Definition</b> <a href="../../df/d82/breadth__first__search_8cpp_source.html#l00096">breadth_first_search.cpp:96</a></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> <a href="../../df/d82/breadth__first__search_8cpp_source.html#l00074">breadth_first_search.cpp:74</a></div></div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->

View File

@@ -1,17 +0,0 @@
<map id="tests" name="tests">
<area shape="rect" id="Node000001" title=" " alt="" coords="5,80,56,106"/>
<area shape="rect" id="Node000002" href="$dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19" title=" " alt="" coords="104,23,264,48"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,79,103,58,123,51,124,56,105,63,57,84"/>
<area shape="rect" id="Node000003" href="$dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981" title=" " alt="" coords="110,72,258,113"/>
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="56,90,94,90,94,96,56,96"/>
<area shape="rect" id="Node000008" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="148,137,220,163"/>
<area shape="poly" id="edge7_Node000001_Node000008" title=" " alt="" coords="57,102,105,122,134,133,132,138,103,127,55,107"/>
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/empty.html#" title=" " alt="" coords="312,5,438,31"/>
<area shape="poly" id="edge3_Node000003_Node000004" title=" " alt="" coords="236,70,311,40,324,35,326,40,313,45,238,74"/>
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/front.html#" title=" " alt="" coords="317,55,433,80"/>
<area shape="poly" id="edge4_Node000003_Node000005" title=" " alt="" coords="258,80,301,75,302,80,258,86"/>
<area shape="rect" id="Node000006" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/pop.html#" title=" " alt="" coords="320,104,431,130"/>
<area shape="poly" id="edge5_Node000003_Node000006" title=" " alt="" coords="258,99,304,105,304,111,258,105"/>
<area shape="rect" id="Node000007" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/push.html#" title=" " alt="" coords="316,153,434,179"/>
<area shape="poly" id="edge6_Node000003_Node000007" title=" " alt="" coords="240,111,313,140,326,145,324,150,311,145,238,116"/>
</map>

View File

@@ -1 +0,0 @@
d7ff6d50be7b254f8fe3c66dc1acbeac

View File

@@ -1,174 +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 12.1.2 (20240928.0832)
-->
<!-- Title: tests Pages: 1 -->
<svg width="333pt" height="138pt"
viewBox="0.00 0.00 332.75 138.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 134.25)">
<title>tests</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="37.75,-74.25 0,-74.25 0,-55 37.75,-55 37.75,-74.25"/>
<text text-anchor="middle" x="18.88" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="194,-117.25 73.75,-117.25 73.75,-98 194,-98 194,-117.25"/>
<text text-anchor="middle" x="133.88" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph::add_edge</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M38.12,-73.34C48.46,-78.13 61.7,-84.02 73.75,-88.62 78.52,-90.45 83.56,-92.25 88.59,-93.97"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="87.48,-97.29 98.07,-97.12 89.68,-90.65 87.48,-97.29"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="189.12,-79.88 78.62,-79.88 78.62,-49.38 189.12,-49.38 189.12,-79.88"/>
<text text-anchor="start" x="86.62" y="-66.38" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph::breadth</text>
<text text-anchor="middle" x="133.88" y="-55.12" font-family="Helvetica,sans-Serif" font-size="10.00">_first_search</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M38.03,-64.62C46.09,-64.62 56.13,-64.62 66.63,-64.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="66.62,-68.13 76.62,-64.63 66.62,-61.13 66.62,-68.13"/>
</a>
</g>
</g>
<!-- Node8 -->
<g id="Node000008" class="node">
<title>Node8</title>
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="160.62,-31.25 107.12,-31.25 107.12,-12 160.62,-12 160.62,-31.25"/>
<text text-anchor="middle" x="133.88" y="-17.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node8 -->
<g id="edge7_Node000001_Node000008" class="edge">
<title>Node1&#45;&gt;Node8</title>
<g id="a_edge7_Node000001_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M38.12,-55.91C48.46,-51.12 61.7,-45.23 73.75,-40.62 80.84,-37.92 88.5,-35.26 95.88,-32.83"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="96.86,-36.19 105.32,-29.81 94.73,-29.53 96.86,-36.19"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/empty.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="324.75,-130.25 230,-130.25 230,-111 324.75,-111 324.75,-130.25"/>
<text text-anchor="middle" x="277.38" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M173.72,-80.24C190.94,-87.14 211.47,-95.33 230,-102.62 233.19,-103.88 236.51,-105.18 239.84,-106.48"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="238.36,-109.66 248.95,-110.03 240.9,-103.14 238.36,-109.66"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/front.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="321,-93.25 233.75,-93.25 233.75,-74 321,-74 321,-93.25"/>
<text text-anchor="middle" x="277.38" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node5 -->
<g id="edge4_Node000003_Node000005" class="edge">
<title>Node3&#45;&gt;Node5</title>
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M189.58,-71.97C200.32,-73.41 211.58,-74.92 222.29,-76.36"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="221.78,-79.83 232.16,-77.69 222.71,-72.89 221.78,-79.83"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/pop.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="319.12,-56.25 235.62,-56.25 235.62,-37 319.12,-37 319.12,-56.25"/>
<text text-anchor="middle" x="277.38" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node6 -->
<g id="edge5_Node000003_Node000006" class="edge">
<title>Node3&#45;&gt;Node6</title>
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M189.58,-57.67C200.9,-56.23 212.79,-54.71 224.01,-53.29"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="224.44,-56.76 233.92,-52.03 223.56,-49.82 224.44,-56.76"/>
</a>
</g>
</g>
<!-- Node7 -->
<g id="Node000007" class="node">
<title>Node7</title>
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/push.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="321.75,-19.25 233,-19.25 233,0 321.75,0 321.75,-19.25"/>
<text text-anchor="middle" x="277.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node7 -->
<g id="edge6_Node000003_Node000007" class="edge">
<title>Node3&#45;&gt;Node7</title>
<g id="a_edge6_Node000003_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M175.14,-48.96C192.08,-42.37 212,-34.62 230,-27.62 233.2,-26.38 236.52,-25.09 239.85,-23.8"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="240.91,-27.14 248.96,-20.26 238.37,-20.62 240.91,-27.14"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 7.6 KiB

View File

@@ -1,148 +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 12.1.2 (20240928.0832)
-->
<!-- Title: tests Pages: 1 -->
<svg width="333pt" height="138pt"
viewBox="0.00 0.00 332.75 138.25" 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 134.25)">
<title>tests</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="37.75,-74.25 0,-74.25 0,-55 37.75,-55 37.75,-74.25"/>
<text text-anchor="middle" x="18.88" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="194,-117.25 73.75,-117.25 73.75,-98 194,-98 194,-117.25"/>
<text text-anchor="middle" x="133.88" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph::add_edge</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M38.12,-73.34C48.46,-78.13 61.7,-84.02 73.75,-88.62 78.52,-90.45 83.56,-92.25 88.59,-93.97"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="87.48,-97.29 98.07,-97.12 89.68,-90.65 87.48,-97.29"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="189.12,-79.88 78.62,-79.88 78.62,-49.38 189.12,-49.38 189.12,-79.88"/>
<text text-anchor="start" x="86.62" y="-66.38" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph::breadth</text>
<text text-anchor="middle" x="133.88" y="-55.12" font-family="Helvetica,sans-Serif" font-size="10.00">_first_search</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M38.03,-64.62C46.09,-64.62 56.13,-64.62 66.63,-64.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="66.62,-68.13 76.62,-64.63 66.62,-61.13 66.62,-68.13"/>
</a>
</g>
</g>
<!-- Node8 -->
<g id="Node000008" class="node">
<title>Node8</title>
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="160.62,-31.25 107.12,-31.25 107.12,-12 160.62,-12 160.62,-31.25"/>
<text text-anchor="middle" x="133.88" y="-17.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node8 -->
<g id="edge7_Node000001_Node000008" class="edge">
<title>Node1&#45;&gt;Node8</title>
<g id="a_edge7_Node000001_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M38.12,-55.91C48.46,-51.12 61.7,-45.23 73.75,-40.62 80.84,-37.92 88.5,-35.26 95.88,-32.83"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="96.86,-36.19 105.32,-29.81 94.73,-29.53 96.86,-36.19"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/empty.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="324.75,-130.25 230,-130.25 230,-111 324.75,-111 324.75,-130.25"/>
<text text-anchor="middle" x="277.38" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M173.72,-80.24C190.94,-87.14 211.47,-95.33 230,-102.62 233.19,-103.88 236.51,-105.18 239.84,-106.48"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="238.36,-109.66 248.95,-110.03 240.9,-103.14 238.36,-109.66"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/front.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="321,-93.25 233.75,-93.25 233.75,-74 321,-74 321,-93.25"/>
<text text-anchor="middle" x="277.38" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node5 -->
<g id="edge4_Node000003_Node000005" class="edge">
<title>Node3&#45;&gt;Node5</title>
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M189.58,-71.97C200.32,-73.41 211.58,-74.92 222.29,-76.36"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="221.78,-79.83 232.16,-77.69 222.71,-72.89 221.78,-79.83"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/pop.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="319.12,-56.25 235.62,-56.25 235.62,-37 319.12,-37 319.12,-56.25"/>
<text text-anchor="middle" x="277.38" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node6 -->
<g id="edge5_Node000003_Node000006" class="edge">
<title>Node3&#45;&gt;Node6</title>
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M189.58,-57.67C200.9,-56.23 212.79,-54.71 224.01,-53.29"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="224.44,-56.76 233.92,-52.03 223.56,-49.82 224.44,-56.76"/>
</a>
</g>
</g>
<!-- Node7 -->
<g id="Node000007" class="node">
<title>Node7</title>
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/push.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="321.75,-19.25 233,-19.25 233,0 321.75,0 321.75,-19.25"/>
<text text-anchor="middle" x="277.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node7 -->
<g id="edge6_Node000003_Node000007" class="edge">
<title>Node3&#45;&gt;Node7</title>
<g id="a_edge6_Node000003_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M175.14,-48.96C192.08,-42.37 212,-34.62 230,-27.62 233.2,-26.38 236.52,-25.09 239.85,-23.8"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="240.91,-27.14 248.96,-20.26 238.37,-20.62 240.91,-27.14"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.9 KiB

View File

@@ -1,20 +0,0 @@
<map id="main" name="main">
<area shape="rect" id="Node000001" title=" " alt="" coords="5,31,55,56"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="246,5,317,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,38,230,21,230,26,55,44"/>
<area shape="rect" id="Node000003" href="$df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" title=" " alt="" coords="103,56,153,82"/>
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="56,47,89,56,87,61,54,52"/>
<area shape="poly" id="edge9_Node000003_Node000002" title=" " alt="" coords="153,57,200,40,230,30,231,35,202,45,155,62"/>
<area shape="rect" id="Node000004" href="$dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19" title=" " alt="" coords="201,55,361,80"/>
<area shape="poly" id="edge3_Node000003_Node000004" title=" " alt="" coords="153,66,186,66,186,71,153,71"/>
<area shape="rect" id="Node000005" href="$dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981" title=" " alt="" coords="208,104,355,145"/>
<area shape="poly" id="edge4_Node000003_Node000005" title=" " alt="" coords="154,75,211,96,209,101,152,80"/>
<area shape="rect" id="Node000006" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/empty.html#" title=" " alt="" coords="409,37,536,63"/>
<area shape="poly" id="edge5_Node000005_Node000006" title=" " alt="" coords="333,102,408,72,421,67,423,72,410,77,335,106"/>
<area shape="rect" id="Node000007" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/front.html#" title=" " alt="" coords="414,87,531,112"/>
<area shape="poly" id="edge6_Node000005_Node000007" title=" " alt="" coords="355,112,399,107,399,112,356,118"/>
<area shape="rect" id="Node000008" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/pop.html#" title=" " alt="" coords="417,136,528,162"/>
<area shape="poly" id="edge7_Node000005_Node000008" title=" " alt="" coords="356,131,402,137,401,143,355,137"/>
<area shape="rect" id="Node000009" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/push.html#" title=" " alt="" coords="413,185,532,211"/>
<area shape="poly" id="edge8_Node000005_Node000009" title=" " alt="" coords="337,143,410,172,423,177,422,182,408,177,335,148"/>
</map>

View File

@@ -1 +0,0 @@
b66224793e870e3d84b373cf4241f8f8

View File

@@ -1,201 +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 12.1.2 (20240928.0832)
-->
<!-- Title: main Pages: 1 -->
<svg width="406pt" height="162pt"
viewBox="0.00 0.00 405.75 162.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 158.25)">
<title>main</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="37,-135.25 0,-135.25 0,-116 37,-116 37,-135.25"/>
<text text-anchor="middle" x="18.5" y="-121.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="233.62,-154.25 180.12,-154.25 180.12,-135 233.62,-135 233.62,-154.25"/>
<text text-anchor="middle" x="206.88" y="-140.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.37,-127.45C67.41,-130.51 128.63,-136.75 168.42,-140.81"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="167.96,-144.28 178.27,-141.81 168.67,-137.31 167.96,-144.28"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="110.75,-116.25 73,-116.25 73,-97 110.75,-97 110.75,-116.25"/>
<text text-anchor="middle" x="91.88" y="-102.75" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.14,-120.93C44.64,-118.93 53.57,-116.56 61.98,-114.32"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="62.71,-117.74 71.48,-111.79 60.91,-110.98 62.71,-117.74"/>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node2 -->
<g id="edge9_Node000003_Node000002" class="edge">
<title>Node3&#45;&gt;Node2</title>
<g id="a_edge9_Node000003_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M111.23,-113.75C121.6,-117.7 134.84,-122.61 146.75,-126.62 153.91,-129.04 161.6,-131.49 168.99,-133.77"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="167.83,-137.07 178.42,-136.63 169.87,-130.38 167.83,-137.07"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="267,-117.25 146.75,-117.25 146.75,-98 267,-98 267,-117.25"/>
<text text-anchor="middle" x="206.88" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph::add_edge</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M111.03,-106.79C117.96,-106.85 126.35,-106.92 135.24,-107"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="135.14,-110.5 145.18,-107.09 135.21,-103.5 135.14,-110.5"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="262.12,-79.88 151.62,-79.88 151.62,-49.38 262.12,-49.38 262.12,-79.88"/>
<text text-anchor="start" x="159.62" y="-66.38" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph::breadth</text>
<text text-anchor="middle" x="206.88" y="-55.12" font-family="Helvetica,sans-Serif" font-size="10.00">_first_search</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node5 -->
<g id="edge4_Node000003_Node000005" class="edge">
<title>Node3&#45;&gt;Node5</title>
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M111.03,-99.88C122.59,-95.58 138.2,-89.78 153.42,-84.12"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="154.26,-87.54 162.41,-80.78 151.82,-80.98 154.26,-87.54"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/empty.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="397.75,-130.25 303,-130.25 303,-111 397.75,-111 397.75,-130.25"/>
<text text-anchor="middle" x="350.38" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge5_Node000005_Node000006" class="edge">
<title>Node5&#45;&gt;Node6</title>
<g id="a_edge5_Node000005_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M246.72,-80.24C263.94,-87.14 284.47,-95.33 303,-102.62 306.19,-103.88 309.51,-105.18 312.84,-106.48"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="311.36,-109.66 321.95,-110.03 313.9,-103.14 311.36,-109.66"/>
</a>
</g>
</g>
<!-- Node7 -->
<g id="Node000007" class="node">
<title>Node7</title>
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/front.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="394,-93.25 306.75,-93.25 306.75,-74 394,-74 394,-93.25"/>
<text text-anchor="middle" x="350.38" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node7 -->
<g id="edge6_Node000005_Node000007" class="edge">
<title>Node5&#45;&gt;Node7</title>
<g id="a_edge6_Node000005_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M262.58,-71.97C273.32,-73.41 284.58,-74.92 295.29,-76.36"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="294.78,-79.83 305.16,-77.69 295.71,-72.89 294.78,-79.83"/>
</a>
</g>
</g>
<!-- Node8 -->
<g id="Node000008" class="node">
<title>Node8</title>
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/pop.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="392.12,-56.25 308.62,-56.25 308.62,-37 392.12,-37 392.12,-56.25"/>
<text text-anchor="middle" x="350.38" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node8 -->
<g id="edge7_Node000005_Node000008" class="edge">
<title>Node5&#45;&gt;Node8</title>
<g id="a_edge7_Node000005_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M262.58,-57.67C273.9,-56.23 285.79,-54.71 297.01,-53.29"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="297.44,-56.76 306.92,-52.03 296.56,-49.82 297.44,-56.76"/>
</a>
</g>
</g>
<!-- Node9 -->
<g id="Node000009" class="node">
<title>Node9</title>
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/push.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="394.75,-19.25 306,-19.25 306,0 394.75,0 394.75,-19.25"/>
<text text-anchor="middle" x="350.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node9 -->
<g id="edge8_Node000005_Node000009" class="edge">
<title>Node5&#45;&gt;Node9</title>
<g id="a_edge8_Node000005_Node000009"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M248.14,-48.96C265.08,-42.37 285,-34.62 303,-27.62 306.2,-26.38 309.52,-25.09 312.85,-23.8"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="313.91,-27.14 321.96,-20.26 311.37,-20.62 313.91,-27.14"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -1,175 +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 12.1.2 (20240928.0832)
-->
<!-- Title: main Pages: 1 -->
<svg width="406pt" height="162pt"
viewBox="0.00 0.00 405.75 162.25" 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 158.25)">
<title>main</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="37,-135.25 0,-135.25 0,-116 37,-116 37,-135.25"/>
<text text-anchor="middle" x="18.5" y="-121.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="233.62,-154.25 180.12,-154.25 180.12,-135 233.62,-135 233.62,-154.25"/>
<text text-anchor="middle" x="206.88" y="-140.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.37,-127.45C67.41,-130.51 128.63,-136.75 168.42,-140.81"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="167.96,-144.28 178.27,-141.81 168.67,-137.31 167.96,-144.28"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="110.75,-116.25 73,-116.25 73,-97 110.75,-97 110.75,-116.25"/>
<text text-anchor="middle" x="91.88" y="-102.75" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.14,-120.93C44.64,-118.93 53.57,-116.56 61.98,-114.32"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="62.71,-117.74 71.48,-111.79 60.91,-110.98 62.71,-117.74"/>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node2 -->
<g id="edge9_Node000003_Node000002" class="edge">
<title>Node3&#45;&gt;Node2</title>
<g id="a_edge9_Node000003_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M111.23,-113.75C121.6,-117.7 134.84,-122.61 146.75,-126.62 153.91,-129.04 161.6,-131.49 168.99,-133.77"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="167.83,-137.07 178.42,-136.63 169.87,-130.38 167.83,-137.07"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="267,-117.25 146.75,-117.25 146.75,-98 267,-98 267,-117.25"/>
<text text-anchor="middle" x="206.88" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph::add_edge</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M111.03,-106.79C117.96,-106.85 126.35,-106.92 135.24,-107"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="135.14,-110.5 145.18,-107.09 135.21,-103.5 135.14,-110.5"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="262.12,-79.88 151.62,-79.88 151.62,-49.38 262.12,-49.38 262.12,-79.88"/>
<text text-anchor="start" x="159.62" y="-66.38" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph::breadth</text>
<text text-anchor="middle" x="206.88" y="-55.12" font-family="Helvetica,sans-Serif" font-size="10.00">_first_search</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node5 -->
<g id="edge4_Node000003_Node000005" class="edge">
<title>Node3&#45;&gt;Node5</title>
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M111.03,-99.88C122.59,-95.58 138.2,-89.78 153.42,-84.12"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="154.26,-87.54 162.41,-80.78 151.82,-80.98 154.26,-87.54"/>
</a>
</g>
</g>
<!-- Node6 -->
<g id="Node000006" class="node">
<title>Node6</title>
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/empty.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="397.75,-130.25 303,-130.25 303,-111 397.75,-111 397.75,-130.25"/>
<text text-anchor="middle" x="350.38" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge5_Node000005_Node000006" class="edge">
<title>Node5&#45;&gt;Node6</title>
<g id="a_edge5_Node000005_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M246.72,-80.24C263.94,-87.14 284.47,-95.33 303,-102.62 306.19,-103.88 309.51,-105.18 312.84,-106.48"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="311.36,-109.66 321.95,-110.03 313.9,-103.14 311.36,-109.66"/>
</a>
</g>
</g>
<!-- Node7 -->
<g id="Node000007" class="node">
<title>Node7</title>
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/front.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="394,-93.25 306.75,-93.25 306.75,-74 394,-74 394,-93.25"/>
<text text-anchor="middle" x="350.38" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node7 -->
<g id="edge6_Node000005_Node000007" class="edge">
<title>Node5&#45;&gt;Node7</title>
<g id="a_edge6_Node000005_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M262.58,-71.97C273.32,-73.41 284.58,-74.92 295.29,-76.36"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="294.78,-79.83 305.16,-77.69 295.71,-72.89 294.78,-79.83"/>
</a>
</g>
</g>
<!-- Node8 -->
<g id="Node000008" class="node">
<title>Node8</title>
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/pop.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="392.12,-56.25 308.62,-56.25 308.62,-37 392.12,-37 392.12,-56.25"/>
<text text-anchor="middle" x="350.38" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node8 -->
<g id="edge7_Node000005_Node000008" class="edge">
<title>Node5&#45;&gt;Node8</title>
<g id="a_edge7_Node000005_Node000008"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M262.58,-57.67C273.9,-56.23 285.79,-54.71 297.01,-53.29"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="297.44,-56.76 306.92,-52.03 296.56,-49.82 297.44,-56.76"/>
</a>
</g>
</g>
<!-- Node9 -->
<g id="Node000009" class="node">
<title>Node9</title>
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/push.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="394.75,-19.25 306,-19.25 306,0 394.75,0 394.75,-19.25"/>
<text text-anchor="middle" x="350.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node9 -->
<g id="edge8_Node000005_Node000009" class="edge">
<title>Node5&#45;&gt;Node9</title>
<g id="a_edge8_Node000005_Node000009"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M248.14,-48.96C265.08,-42.37 285,-34.62 303,-27.62 306.2,-26.38 309.52,-25.09 312.85,-23.8"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="313.91,-27.14 321.96,-20.26 311.37,-20.62 313.91,-27.14"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -0,0 +1,273 @@
<!-- HTML header for doxygen 1.12.0-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TheAlgorithms/C++: graph/breadth_first_search.cpp Source File</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</script>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('df/d82/breadth__first__search_8cpp_source.html','../../'); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">breadth_first_search.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../df/d82/breadth__first__search_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="preprocessor">#include &lt;algorithm&gt;</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="preprocessor">#include &lt;cassert&gt;</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="preprocessor">#include &lt;list&gt;</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="preprocessor">#include &lt;map&gt;</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="preprocessor">#include &lt;queue&gt;</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a> {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="comment">/* Class Graph definition */</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="keyword">class </span><a class="code hl_class" href="../../da/d9a/class_graph.html">Graph</a> {</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="../../dc/d61/classgraph_1_1_graph.html#acebf0505d625b043bb9c8c27c7a8def0"> 69</a></span> std::map&lt;T, std::list&lt;T&gt; &gt; <a class="code hl_variable" href="../../dc/d61/classgraph_1_1_graph.html#acebf0505d625b043bb9c8c27c7a8def0">adjacency_list</a>;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <a class="code hl_class" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> ;</div>
<div class="foldopen" id="foldopen00074" data-start="{" data-end="}">
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19"> 74</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(T u, T v, <span class="keywordtype">bool</span> bidir = <span class="keyword">true</span>) {</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_variable" href="../../dc/d61/classgraph_1_1_graph.html#acebf0505d625b043bb9c8c27c7a8def0">adjacency_list</a>[u].push_back(v); <span class="comment">// u--&gt;v edge added</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">if</span> (bidir == <span class="keyword">true</span>) {</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="comment">// if graph is bidirectional</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <a class="code hl_variable" href="../../dc/d61/classgraph_1_1_graph.html#acebf0505d625b043bb9c8c27c7a8def0">adjacency_list</a>[v].push_back(u); <span class="comment">// v--&gt;u edge added</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> }</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> }</div>
</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
<div class="foldopen" id="foldopen00096" data-start="{" data-end="}">
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="../../dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981"> 96</a></span> std::map&lt;T, bool&gt; <a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981">breadth_first_search</a>(T src) {</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> std::map&lt;T, bool&gt; visited;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span> &amp;adjlist : <a class="code hl_variable" href="../../dc/d61/classgraph_1_1_graph.html#acebf0505d625b043bb9c8c27c7a8def0">adjacency_list</a>) {</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> visited[adjlist.first] = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span> &amp;<a class="code hl_class" href="../../d5/da1/structnode.html">node</a> : <a class="code hl_variable" href="../../dc/d61/classgraph_1_1_graph.html#acebf0505d625b043bb9c8c27c7a8def0">adjacency_list</a>[adjlist.first]) {</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> visited[<a class="code hl_typedef" href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a>] = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> }</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> std::queue&lt;T&gt; tracker;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> tracker.push(src);</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> visited[src] = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">while</span> (!tracker.empty()) {</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> T <a class="code hl_class" href="../../d5/da1/structnode.html">node</a> = tracker.front();</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> tracker.pop();</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordflow">for</span> (T <span class="keyword">const</span> &amp;neighbour : <a class="code hl_variable" href="../../dc/d61/classgraph_1_1_graph.html#acebf0505d625b043bb9c8c27c7a8def0">adjacency_list</a>[<a class="code hl_class" href="../../d5/da1/structnode.html">node</a>]) {</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">if</span> (!visited[neighbour]) {</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> tracker.push(neighbour);</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> visited[neighbour] = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> }</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> }</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> }</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">return</span> visited;</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> }</div>
</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span>};</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span><span class="comment">/* Class definition ends */</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span>} <span class="comment">// namespace graph</span></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> </div>
<div class="foldopen" id="foldopen00139" data-start="{" data-end="}">
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"><a class="line" href="../../df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e"> 139</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a>() {</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <a class="code hl_class" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt;int&gt;</a> g;</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> std::map&lt;int, bool&gt; correct_result;</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> g.add_edge(0, 1);</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> g.add_edge(1, 2);</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> g.add_edge(2, 3);</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> correct_result[0] = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> correct_result[1] = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> correct_result[2] = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> correct_result[3] = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> std::map&lt;int, bool&gt; returned_result = g.breadth_first_search(2);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> </div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> assert(returned_result == correct_result);</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Test 1 Passed...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> </div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> returned_result = g.breadth_first_search(0);</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> </div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> assert(returned_result == correct_result);</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Test 2 Passed...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <a class="code hl_class" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt;std::string&gt;</a> g2;</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> g2.<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">&quot;Gorakhpur&quot;</span>, <span class="stringliteral">&quot;Lucknow&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> g2.<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">&quot;Gorakhpur&quot;</span>, <span class="stringliteral">&quot;Kanpur&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> g2.<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">&quot;Lucknow&quot;</span>, <span class="stringliteral">&quot;Agra&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> g2.<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">&quot;Kanpur&quot;</span>, <span class="stringliteral">&quot;Agra&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> g2.<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">&quot;Lucknow&quot;</span>, <span class="stringliteral">&quot;Prayagraj&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> g2.<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a877b2cba40d8d46dde6fb4209effed19">add_edge</a>(<span class="stringliteral">&quot;Agra&quot;</span>, <span class="stringliteral">&quot;Noida&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> std::map&lt;std::string, bool&gt; correct_res;</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> std::map&lt;std::string, bool&gt; returned_res =</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> g2.<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981">breadth_first_search</a>(<span class="stringliteral">&quot;Kanpur&quot;</span>);</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> correct_res[<span class="stringliteral">&quot;Gorakhpur&quot;</span>] = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> correct_res[<span class="stringliteral">&quot;Lucknow&quot;</span>] = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> correct_res[<span class="stringliteral">&quot;Kanpur&quot;</span>] = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> correct_res[<span class="stringliteral">&quot;Agra&quot;</span>] = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> correct_res[<span class="stringliteral">&quot;Prayagraj&quot;</span>] = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> correct_res[<span class="stringliteral">&quot;Noida&quot;</span>] = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> assert(correct_res == returned_res);</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Test 3 Passed...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span>}</div>
</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> </div>
<div class="foldopen" id="foldopen00186" data-start="{" data-end="}">
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"><a class="line" href="../../df/d82/breadth__first__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 186</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../df/d82/breadth__first__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <a class="code hl_function" href="../../df/d82/breadth__first__search_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a>();</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="keywordtype">size_t</span> edges = 0;</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Enter the number of edges: &quot;</span>;</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> std::cin &gt;&gt; edges;</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <a class="code hl_class" href="../../dc/d61/classgraph_1_1_graph.html">graph::Graph&lt;int&gt;</a> g;</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> </div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Enter space-separated pairs of vertices that form edges: &quot;</span></div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="keywordflow">while</span> (edges--) {</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="keywordtype">int</span> u = 0, v = 0;</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> std::cin &gt;&gt; u &gt;&gt; v;</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> g.add_edge(u, v);</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> }</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> g.breadth_first_search(0);</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span>}</div>
</div>
<div class="ttc" id="aavltree_8cpp_html_a74f0cf18a0e5b832d9994e2f2d022287"><div class="ttname"><a href="../../d8/dee/avltree_8cpp.html#a74f0cf18a0e5b832d9994e2f2d022287">node</a></div><div class="ttdeci">struct node { int data; int height; struct node *left; struct node *right;} node</div><div class="ttdoc">for std::queue</div><div class="ttdef"><b>Definition</b> <a href="../../d8/dee/avltree_8cpp_source.html#l00013">avltree.cpp:13</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> <a href="#l00139">breadth_first_search.cpp:139</a></div></div>
<div class="ttc" id="abreadth__first__search_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../df/d82/breadth__first__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition</b> <a href="#l00186">breadth_first_search.cpp:186</a></div></div>
<div class="ttc" id="aclass_graph_html"><div class="ttname"><a href="../../da/d9a/class_graph.html">Graph</a></div><div class="ttdef"><b>Definition</b> <a href="../../df/d14/bellman__ford_8cpp_source.html#l00014">bellman_ford.cpp:14</a></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> <a href="../../de/dde/lowest__common__ancestor_8cpp_source.html#l00053">lowest_common_ancestor.cpp:53</a></div></div>
<div class="ttc" id="aclassgraph_1_1_graph_html_a3755ec9e6a842238c7f4aac10b661981"><div class="ttname"><a href="../../dc/d61/classgraph_1_1_graph.html#a3755ec9e6a842238c7f4aac10b661981">graph::Graph::breadth_first_search</a></div><div class="ttdeci">std::map&lt; T, bool &gt; breadth_first_search(T src)</div><div class="ttdef"><b>Definition</b> <a href="#l00096">breadth_first_search.cpp:96</a></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> <a href="#l00074">breadth_first_search.cpp:74</a></div></div>
<div class="ttc" id="aclassgraph_1_1_graph_html_acebf0505d625b043bb9c8c27c7a8def0"><div class="ttname"><a href="../../dc/d61/classgraph_1_1_graph.html#acebf0505d625b043bb9c8c27c7a8def0">graph::Graph::adjacency_list</a></div><div class="ttdeci">std::map&lt; T, std::list&lt; T &gt; &gt; adjacency_list</div><div class="ttdef"><b>Definition</b> <a href="#l00069">breadth_first_search.cpp:69</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="astructnode_html"><div class="ttname"><a href="../../d5/da1/structnode.html">node</a></div><div class="ttdef"><b>Definition</b> <a href="../../d3/d26/binary__search__tree_8cpp_source.html#l00011">binary_search_tree.cpp:11</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_12552d7fa429bf94a2e32e5cf39f7e69.html">graph</a></li><li class="navelem"><a class="el" href="../../df/d82/breadth__first__search_8cpp.html">breadth_first_search.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li>
</ul>
</div>
</body>
</html>

View File

@@ -1,9 +1,9 @@
<map id="graph::HKGraph" name="graph::HKGraph">
<area shape="rect" id="Node000001" title="Represents Bipartite graph for Hopcroft Karp implementation." alt="" coords="93,228,208,253"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="5,94,144,135"/>
<area shape="rect" id="Node000002" title=" " alt="" coords="5,94,144,135"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="97,147,145,226,141,228,92,149"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list.html" title=" " alt="" coords="23,5,126,31"/>
<area shape="rect" id="Node000003" title=" " alt="" coords="23,5,126,31"/>
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="77,46,77,93,72,93,72,46"/>
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="167,102,288,127"/>
<area shape="rect" id="Node000004" title=" " alt="" coords="167,102,288,127"/>
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="215,142,160,229,156,226,210,139"/>
</map>

View File

@@ -1 +1 @@
356ddd95dc9cd91243361fbffa1ee341
26a16adfc8d3efa9111432be5e0888b6

View File

@@ -31,7 +31,7 @@
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<g id="a_Node000002"><a xlink:title=" ">
<polygon fill="white" stroke="#666666" points="103.75,-119.5 0,-119.5 0,-89 103.75,-89 103.75,-119.5"/>
<text text-anchor="start" x="8" y="-106" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; std::list</text>
<text text-anchor="middle" x="51.88" y="-94.75" font-family="Helvetica,sans-Serif" font-size="10.00">&lt; int &gt; &gt;</text>
@@ -51,7 +51,7 @@
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list.html" xlink:title=" ">
<g id="a_Node000003"><a xlink:title=" ">
<polygon fill="white" stroke="#666666" points="90.25,-186 13.5,-186 13.5,-166.75 90.25,-166.75 90.25,-186"/>
<text text-anchor="middle" x="51.88" y="-172.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list&lt; int &gt;</text>
</a>
@@ -70,7 +70,7 @@
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<g id="a_Node000004"><a xlink:title=" ">
<polygon fill="white" stroke="#666666" points="212.38,-113.88 121.38,-113.88 121.38,-94.62 212.38,-94.62 212.38,-113.88"/>
<text text-anchor="middle" x="166.88" y="-100.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; int &gt;</text>
</a>

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -20,7 +20,7 @@
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<g id="a_Node000002"><a xlink:title=" ">
<polygon fill="white" stroke="#666666" points="103.75,-119.5 0,-119.5 0,-89 103.75,-89 103.75,-119.5"/>
<text text-anchor="start" x="8" y="-106" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; std::list</text>
<text text-anchor="middle" x="51.88" y="-94.75" font-family="Helvetica,sans-Serif" font-size="10.00">&lt; int &gt; &gt;</text>
@@ -40,7 +40,7 @@
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list.html" xlink:title=" ">
<g id="a_Node000003"><a xlink:title=" ">
<polygon fill="white" stroke="#666666" points="90.25,-186 13.5,-186 13.5,-166.75 90.25,-166.75 90.25,-186"/>
<text text-anchor="middle" x="51.88" y="-172.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list&lt; int &gt;</text>
</a>
@@ -59,7 +59,7 @@
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
<g id="a_Node000004"><a xlink:title=" ">
<polygon fill="white" stroke="#666666" points="212.38,-113.88 121.38,-113.88 121.38,-94.62 212.38,-94.62 212.38,-113.88"/>
<text text-anchor="middle" x="166.88" y="-100.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector&lt; int &gt;</text>
</a>

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB