Documentation for c6af943508

This commit is contained in:
realstealthninja
2024-11-04 12:10:37 +00:00
parent e97327bf4f
commit fb1d00ead7
518 changed files with 13882 additions and 10974 deletions

View File

@@ -164,6 +164,7 @@ Functions</h2></td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> Algorithms. </p>
<p>for assert</p>
<p>Check whether a given graph is bipartite or not.</p>
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></p>
<p><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> algorithms.</p>
@@ -172,7 +173,8 @@ Functions</h2></td></tr>
<p>A bipartite graph is the one whose nodes can be divided into two disjoint sets in such a way that the nodes in a set are not connected to each other at all, i.e. no intra-set connections. The only connections that exist are that of inter-set, i.e. the nodes from one set are connected to a subset of nodes in the other set. In this implementation, using a graph in the form of adjacency list, check whether the given graph is a bipartite or not.</p>
<p>References used: <a href="https://www.geeksforgeeks.org/bipartite-graph/" target="_blank">GeeksForGeeks</a> </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/tushar2407" target="_blank">tushar2407</a> for assert for IO operations for queue data structure for vector data structure</dd></dl>
<p>Graphical algorithms</p>
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a> for assert for IO operations for limits of integral types for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> </p>
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a> for IO operations for limits of integral types for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></p>
<p><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> Algorithms </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a9125ceb66bfbec3093bba64c2c1e99e2" name="a9125ceb66bfbec3093bba64c2c1e99e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9125ceb66bfbec3093bba64c2c1e99e2">&#9670;&#160;</a></span>addEdge() <span class="overload">[1/3]</span></h2>
@@ -354,38 +356,38 @@ Here is the call graph for this function:</div>
<p>insert the neighbouring node into the queue</p>
<p>if both the current node and its neighbour has the same state then it is not a bipartite graph</p>
<p>return true when all the connected nodes of the current nodes are travelled and satisify all the above conditions</p>
<div class="fragment"><div class="line"><span class="lineno"> 37</span> {</div>
<div class="line"><span class="lineno"> 38</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue&lt;int64_t&gt;</a> q; <span class="comment">///&lt; stores the neighbouring node indexes in squence</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 39</span><span class="comment"> /// of being reached</span></div>
<div class="line"><span class="lineno"> 40</span><span class="comment"></span> q.push(index); <span class="comment">/// insert the current node into the queue</span></div>
<div class="line"><span class="lineno"> 41</span> (*visited)[index] = 1; <span class="comment">/// mark the current node as travelled</span></div>
<div class="line"><span class="lineno"> 42</span> <span class="keywordflow">while</span> (q.size()) {</div>
<div class="line"><span class="lineno"> 43</span> int64_t u = q.front();</div>
<div class="line"><span class="lineno"> 44</span> q.pop();</div>
<div class="line"><span class="lineno"> 45</span> <span class="keywordflow">for</span> (uint64_t i = 0; i &lt; <a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a>[u].size(); i++) {</div>
<div class="line"><span class="lineno"> 46</span> int64_t v =</div>
<div class="line"><span class="lineno"> 47</span> <a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a>[u][i]; <span class="comment">///&lt; stores the neighbour of the current node</span></div>
<div class="line"><span class="lineno"> 48</span> <span class="keywordflow">if</span> (!(*visited)[v]) <span class="comment">/// check whether the neighbour node is</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 49</span><span class="comment"> /// travelled already or not</span></div>
<div class="line"><span class="lineno"> 50</span><span class="comment"></span> {</div>
<div class="line"><span class="lineno"> 51</span> (*visited)[v] =</div>
<div class="line"><span class="lineno"> 52</span> ((*visited)[u] == 1)</div>
<div class="line"><span class="lineno"> 53</span> ? -1</div>
<div class="line"><span class="lineno"> 54</span> : 1; <span class="comment">/// colour the neighbouring node with</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 55</span><span class="comment"> /// different colour than the current node</span></div>
<div class="line"><span class="lineno"> 56</span><span class="comment"></span> q.push(v); <span class="comment">/// insert the neighbouring node into the queue</span></div>
<div class="line"><span class="lineno"> 57</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((*visited)[v] ==</div>
<div class="line"><span class="lineno"> 58</span> (*visited)[u]) <span class="comment">/// if both the current node and its</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 59</span><span class="comment"> /// neighbour has the same state then it</span></div>
<div class="line"><span class="lineno"> 60</span><span class="comment"> /// is not a bipartite graph</span></div>
<div class="line"><span class="lineno"> 61</span><span class="comment"></span> {</div>
<div class="line"><span class="lineno"> 62</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 63</span> }</div>
<div class="line"><span class="lineno"> 64</span> }</div>
<div class="line"><span class="lineno"> 65</span> }</div>
<div class="line"><span class="lineno"> 66</span> <span class="keywordflow">return</span> <span class="keyword">true</span>; <span class="comment">/// return true when all the connected nodes of the current</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 67</span><span class="comment"> /// nodes are travelled and satisify all the above conditions</span></div>
<div class="line"><span class="lineno"> 68</span><span class="comment"></span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 38</span> {</div>
<div class="line"><span class="lineno"> 39</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue&lt;int64_t&gt;</a> q; <span class="comment">///&lt; stores the neighbouring node indexes in squence</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 40</span><span class="comment"> /// of being reached</span></div>
<div class="line"><span class="lineno"> 41</span><span class="comment"></span> q.push(index); <span class="comment">/// insert the current node into the queue</span></div>
<div class="line"><span class="lineno"> 42</span> (*visited)[index] = 1; <span class="comment">/// mark the current node as travelled</span></div>
<div class="line"><span class="lineno"> 43</span> <span class="keywordflow">while</span> (q.size()) {</div>
<div class="line"><span class="lineno"> 44</span> int64_t u = q.front();</div>
<div class="line"><span class="lineno"> 45</span> q.pop();</div>
<div class="line"><span class="lineno"> 46</span> <span class="keywordflow">for</span> (uint64_t i = 0; i &lt; <a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a>[u].size(); i++) {</div>
<div class="line"><span class="lineno"> 47</span> int64_t v =</div>
<div class="line"><span class="lineno"> 48</span> <a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a>[u][i]; <span class="comment">///&lt; stores the neighbour of the current node</span></div>
<div class="line"><span class="lineno"> 49</span> <span class="keywordflow">if</span> (!(*visited)[v]) <span class="comment">/// check whether the neighbour node is</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 50</span><span class="comment"> /// travelled already or not</span></div>
<div class="line"><span class="lineno"> 51</span><span class="comment"></span> {</div>
<div class="line"><span class="lineno"> 52</span> (*visited)[v] =</div>
<div class="line"><span class="lineno"> 53</span> ((*visited)[u] == 1)</div>
<div class="line"><span class="lineno"> 54</span> ? -1</div>
<div class="line"><span class="lineno"> 55</span> : 1; <span class="comment">/// colour the neighbouring node with</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 56</span><span class="comment"> /// different colour than the current node</span></div>
<div class="line"><span class="lineno"> 57</span><span class="comment"></span> q.push(v); <span class="comment">/// insert the neighbouring node into the queue</span></div>
<div class="line"><span class="lineno"> 58</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((*visited)[v] ==</div>
<div class="line"><span class="lineno"> 59</span> (*visited)[u]) <span class="comment">/// if both the current node and its</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 60</span><span class="comment"> /// neighbour has the same state then it</span></div>
<div class="line"><span class="lineno"> 61</span><span class="comment"> /// is not a bipartite graph</span></div>
<div class="line"><span class="lineno"> 62</span><span class="comment"></span> {</div>
<div class="line"><span class="lineno"> 63</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 64</span> }</div>
<div class="line"><span class="lineno"> 65</span> }</div>
<div class="line"><span class="lineno"> 66</span> }</div>
<div class="line"><span class="lineno"> 67</span> <span class="keywordflow">return</span> <span class="keyword">true</span>; <span class="comment">/// return true when all the connected nodes of the current</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 68</span><span class="comment"> /// nodes are travelled and satisify all the above conditions</span></div>
<div class="line"><span class="lineno"> 69</span><span class="comment"></span>}</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="aqueue_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue</a></div></div>
</div><!-- fragment -->
@@ -706,25 +708,25 @@ Here is the call graph for this function:</div>
<dl class="section return"><dt>Returns</dt><dd>booleans </dd></dl>
<p>&lt; stores boolean values which signify whether that node had been visited or not</p>
<p>if the current node is not visited then check whether the sub-graph of that node is a bipartite or not</p>
<div class="fragment"><div class="line"><span class="lineno"> 75</span> {</div>
<div class="line"><span class="lineno"> 76</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int64_t&gt;</a> visited(</div>
<div class="line"><span class="lineno"> 77</span> <a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a>.size()); <span class="comment">///&lt; stores boolean values</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 78</span><span class="comment"> /// which signify whether that node had been visited or</span></div>
<div class="line"><span class="lineno"> 79</span><span class="comment"> /// not</span></div>
<div class="line"><span class="lineno"> 80</span><span class="comment"></span> </div>
<div class="line"><span class="lineno"> 81</span> <span class="keywordflow">for</span> (uint64_t i = 0; i &lt; <a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a>.size(); i++) {</div>
<div class="line"><span class="lineno"> 82</span> <span class="keywordflow">if</span> (!visited[i]) <span class="comment">/// if the current node is not visited then check</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 83</span><span class="comment"> /// whether the sub-graph of that node is a bipartite</span></div>
<div class="line"><span class="lineno"> 84</span><span class="comment"> /// or not</span></div>
<div class="line"><span class="lineno"> 85</span><span class="comment"></span> {</div>
<div class="line"><span class="lineno"> 86</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="#a8e1b547cd407c0774e63f0dc95cda9e7">checkBipartite</a>(<a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a>, i, &amp;visited)) {</div>
<div class="line"><span class="lineno"> 87</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 88</span> }</div>
<div class="line"><span class="lineno"> 89</span> }</div>
<div class="line"><span class="lineno"> 90</span> }</div>
<div class="line"><span class="lineno"> 91</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 92</span>}</div>
<div class="ttc" id="anamespacegraph_html_a8e1b547cd407c0774e63f0dc95cda9e7"><div class="ttname"><a href="#a8e1b547cd407c0774e63f0dc95cda9e7">graph::checkBipartite</a></div><div class="ttdeci">bool checkBipartite(const std::vector&lt; std::vector&lt; int64_t &gt; &gt; &amp;graph, int64_t index, std::vector&lt; int64_t &gt; *visited)</div><div class="ttdoc">function to check whether the passed graph is bipartite or not</div><div class="ttdef"><b>Definition</b> is_graph_bipartite2.cpp:36</div></div>
<div class="fragment"><div class="line"><span class="lineno"> 76</span> {</div>
<div class="line"><span class="lineno"> 77</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;int64_t&gt;</a> visited(</div>
<div class="line"><span class="lineno"> 78</span> <a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a>.size()); <span class="comment">///&lt; stores boolean values</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 79</span><span class="comment"> /// which signify whether that node had been visited or</span></div>
<div class="line"><span class="lineno"> 80</span><span class="comment"> /// not</span></div>
<div class="line"><span class="lineno"> 81</span><span class="comment"></span> </div>
<div class="line"><span class="lineno"> 82</span> <span class="keywordflow">for</span> (uint64_t i = 0; i &lt; <a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a>.size(); i++) {</div>
<div class="line"><span class="lineno"> 83</span> <span class="keywordflow">if</span> (!visited[i]) <span class="comment">/// if the current node is not visited then check</span><span class="comment"></span></div>
<div class="line"><span class="lineno"> 84</span><span class="comment"> /// whether the sub-graph of that node is a bipartite</span></div>
<div class="line"><span class="lineno"> 85</span><span class="comment"> /// or not</span></div>
<div class="line"><span class="lineno"> 86</span><span class="comment"></span> {</div>
<div class="line"><span class="lineno"> 87</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="#a8e1b547cd407c0774e63f0dc95cda9e7">checkBipartite</a>(<a class="code hl_namespace" href="../../df/dce/namespacegraph.html">graph</a>, i, &amp;visited)) {</div>
<div class="line"><span class="lineno"> 88</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 89</span> }</div>
<div class="line"><span class="lineno"> 90</span> }</div>
<div class="line"><span class="lineno"> 91</span> }</div>
<div class="line"><span class="lineno"> 92</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 93</span>}</div>
<div class="ttc" id="anamespacegraph_html_a8e1b547cd407c0774e63f0dc95cda9e7"><div class="ttname"><a href="#a8e1b547cd407c0774e63f0dc95cda9e7">graph::checkBipartite</a></div><div class="ttdeci">bool checkBipartite(const std::vector&lt; std::vector&lt; int64_t &gt; &gt; &amp;graph, int64_t index, std::vector&lt; int64_t &gt; *visited)</div><div class="ttdoc">function to check whether the passed graph is bipartite or not</div><div class="ttdef"><b>Definition</b> is_graph_bipartite2.cpp:37</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -766,36 +768,36 @@ Here is the call graph for this function:</div>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><span class="lineno"> 41</span> {<span class="comment"></span></div>
<div class="line"><span class="lineno"> 42</span><span class="comment"> //// vtx stores the vertexs of the graph</span></div>
<div class="line"><span class="lineno"> 43</span><span class="comment"></span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> vtx;</div>
<div class="line"><span class="lineno"> 44</span> <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; V; i++) {</div>
<div class="line"><span class="lineno"> 45</span> <span class="keywordflow">if</span> (i != src) {</div>
<div class="line"><span class="lineno"> 46</span> vtx.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(i);</div>
<div class="line"><span class="lineno"> 47</span> }</div>
<div class="line"><span class="lineno"> 48</span> }</div>
<div class="line"><span class="lineno"> 49</span><span class="comment"></span> </div>
<div class="line"><span class="lineno"> 50</span><span class="comment"> //// store minimum weight Hamiltonian Cycle.</span></div>
<div class="line"><span class="lineno"> 51</span><span class="comment"></span> int32_t min_path = 2147483647;</div>
<div class="line"><span class="lineno"> 52</span> <span class="keywordflow">do</span> {<span class="comment"></span></div>
<div class="line"><span class="lineno"> 53</span><span class="comment"> //// store current Path weight(cost)</span></div>
<div class="line"><span class="lineno"> 54</span><span class="comment"></span> int32_t curr_weight = 0;</div>
<div class="line"><span class="lineno"> 55</span><span class="comment"></span> </div>
<div class="line"><span class="lineno"> 56</span><span class="comment"> //// compute current path weight</span></div>
<div class="line"><span class="lineno"> 57</span><span class="comment"></span> <span class="keywordtype">int</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> = src;</div>
<div class="line"><span class="lineno"> 58</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i : vtx) {</div>
<div class="line"><span class="lineno"> 59</span> curr_weight += (*cities)[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>][i];</div>
<div class="line"><span class="lineno"> 60</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> = i;</div>
<div class="line"><span class="lineno"> 61</span> }</div>
<div class="line"><span class="lineno"> 62</span> curr_weight += (*cities)[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>][src];</div>
<div class="line"><span class="lineno"> 63</span><span class="comment"></span> </div>
<div class="line"><span class="lineno"> 64</span><span class="comment"> //// update minimum</span></div>
<div class="line"><span class="lineno"> 65</span><span class="comment"></span> min_path = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(min_path, curr_weight);</div>
<div class="line"><span class="lineno"> 66</span> </div>
<div class="line"><span class="lineno"> 67</span> } <span class="keywordflow">while</span> (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/next_permutation.html">next_permutation</a>(vtx.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), vtx.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>()));</div>
<div class="line"><span class="lineno"> 68</span> </div>
<div class="line"><span class="lineno"> 69</span> <span class="keywordflow">return</span> min_path;</div>
<div class="line"><span class="lineno"> 70</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 42</span> {<span class="comment"></span></div>
<div class="line"><span class="lineno"> 43</span><span class="comment"> //// vtx stores the vertexs of the graph</span></div>
<div class="line"><span class="lineno"> 44</span><span class="comment"></span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;uint32_t&gt;</a> vtx;</div>
<div class="line"><span class="lineno"> 45</span> <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; V; i++) {</div>
<div class="line"><span class="lineno"> 46</span> <span class="keywordflow">if</span> (i != src) {</div>
<div class="line"><span class="lineno"> 47</span> vtx.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(i);</div>
<div class="line"><span class="lineno"> 48</span> }</div>
<div class="line"><span class="lineno"> 49</span> }</div>
<div class="line"><span class="lineno"> 50</span><span class="comment"></span> </div>
<div class="line"><span class="lineno"> 51</span><span class="comment"> //// store minimum weight Hamiltonian Cycle.</span></div>
<div class="line"><span class="lineno"> 52</span><span class="comment"></span> int32_t min_path = 2147483647;</div>
<div class="line"><span class="lineno"> 53</span> <span class="keywordflow">do</span> {<span class="comment"></span></div>
<div class="line"><span class="lineno"> 54</span><span class="comment"> //// store current Path weight(cost)</span></div>
<div class="line"><span class="lineno"> 55</span><span class="comment"></span> int32_t curr_weight = 0;</div>
<div class="line"><span class="lineno"> 56</span><span class="comment"></span> </div>
<div class="line"><span class="lineno"> 57</span><span class="comment"> //// compute current path weight</span></div>
<div class="line"><span class="lineno"> 58</span><span class="comment"></span> <span class="keywordtype">int</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> = src;</div>
<div class="line"><span class="lineno"> 59</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i : vtx) {</div>
<div class="line"><span class="lineno"> 60</span> curr_weight += (*cities)[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>][i];</div>
<div class="line"><span class="lineno"> 61</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> = i;</div>
<div class="line"><span class="lineno"> 62</span> }</div>
<div class="line"><span class="lineno"> 63</span> curr_weight += (*cities)[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>][src];</div>
<div class="line"><span class="lineno"> 64</span><span class="comment"></span> </div>
<div class="line"><span class="lineno"> 65</span><span class="comment"> //// update minimum</span></div>
<div class="line"><span class="lineno"> 66</span><span class="comment"></span> min_path = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(min_path, curr_weight);</div>
<div class="line"><span class="lineno"> 67</span> </div>
<div class="line"><span class="lineno"> 68</span> } <span class="keywordflow">while</span> (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/next_permutation.html">next_permutation</a>(vtx.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/begin.html">begin</a>(), vtx.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/end.html">end</a>()));</div>
<div class="line"><span class="lineno"> 69</span> </div>
<div class="line"><span class="lineno"> 70</span> <span class="keywordflow">return</span> min_path;</div>
<div class="line"><span class="lineno"> 71</span>}</div>
<div class="ttc" id="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/begin.html">std::vector::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
<div class="ttc" id="acomposite__simpson__rule_8cpp_html_a1b74d828b33760094906797042b89442"><div class="ttname"><a href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">numerical_methods::simpson_method::k</a></div><div class="ttdeci">double k(double x)</div><div class="ttdoc">Another test function.</div><div class="ttdef"><b>Definition</b> composite_simpson_rule.cpp:117</div></div>
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/end.html">std::vector::end</a></div><div class="ttdeci">T end(T... args)</div></div>