Documentation for 0d766b0f8a
@@ -1,292 +0,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>Algorithms_in_C++: graph/dijkstra.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<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/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&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&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&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d7/d1e/graph_2dijkstra_8cpp.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="summary">
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#func-members">Functions</a> |
|
||||
<a href="#var-members">Variables</a> </div>
|
||||
<div class="headertitle"><div class="title">dijkstra.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>[<a class="el" href="../../da/d9a/class_graph.html">Graph</a> Dijkstras Shortest Path Algorithm (Dijkstra's Shortest Path)] (<a href="https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm">https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm</a>)
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <cassert></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <limits></code><br />
|
||||
<code>#include <memory></code><br />
|
||||
<code>#include <queue></code><br />
|
||||
<code>#include <utility></code><br />
|
||||
<code>#include <vector></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for dijkstra.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/db7/graph_2dijkstra_8cpp__incl.svg" width="578" height="111"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
||||
Namespaces</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html">graph</a></td></tr>
|
||||
<tr class="memdesc:df/dce/namespacegraph"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="../../dc/d61/classgraph_1_1_graph.html">Graph</a> Algorithms. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a0e30e0dca68cb6e4f671440819b35b6a" id="r_a0e30e0dca68cb6e4f671440819b35b6a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#a0e30e0dca68cb6e4f671440819b35b6a">graph::addEdge</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair</a>< int, int > > > *adj, int u, int v, int w)</td></tr>
|
||||
<tr class="memdesc:a0e30e0dca68cb6e4f671440819b35b6a"><td class="mdescLeft"> </td><td class="mdescRight">Function that add edge between two nodes or vertices of graph. <br /></td></tr>
|
||||
<tr class="separator:a0e30e0dca68cb6e4f671440819b35b6a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:adc68cbc8ba09eb1142265935c0d45b84" id="r_adc68cbc8ba09eb1142265935c0d45b84"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84">graph::dijkstra</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair</a>< int, int > > > *adj, int s, int t)</td></tr>
|
||||
<tr class="memdesc:adc68cbc8ba09eb1142265935c0d45b84"><td class="mdescLeft"> </td><td class="mdescRight">Function runs the dijkstra algorithm for some source vertex and target vertex in the graph and returns the shortest distance of target from the source. <br /></td></tr>
|
||||
<tr class="separator:adc68cbc8ba09eb1142265935c0d45b84"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a88ec9ad42717780d6caaff9d3d6977f9" id="r_a88ec9ad42717780d6caaff9d3d6977f9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a88ec9ad42717780d6caaff9d3d6977f9">tests</a> ()</td></tr>
|
||||
<tr class="separator:a88ec9ad42717780d6caaff9d3d6977f9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4" id="r_ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
|
||||
Variables</h2></td></tr>
|
||||
<tr class="memitem:a330a2b0a904f01802ada1f8f3b28e76c" id="r_a330a2b0a904f01802ada1f8f3b28e76c"><td class="memItemLeft" align="right" valign="top"><a id="a330a2b0a904f01802ada1f8f3b28e76c" name="a330a2b0a904f01802ada1f8f3b28e76c"></a>
|
||||
constexpr int64_t </td><td class="memItemRight" valign="bottom"><b>INF</b> = <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/numeric_limits.html">std::numeric_limits</a><int64_t>::max()</td></tr>
|
||||
<tr class="separator:a330a2b0a904f01802ada1f8f3b28e76c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>[<a class="el" href="../../da/d9a/class_graph.html">Graph</a> Dijkstras Shortest Path Algorithm (Dijkstra's Shortest Path)] (<a href="https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm">https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm</a>) </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="http://github.com/ayaankhan98" target="_blank">Ayaan Khan</a></dd></dl>
|
||||
<p>Dijkstra's Algorithm is used to find the shortest path from a source vertex to all other reachable vertex in the graph. The algorithm initially assumes all the nodes are unreachable from the given source vertex so we mark the distances of all vertices as INF (infinity) from source vertex (INF / infinity denotes unable to reach).</p>
|
||||
<p>in similar fashion with BFS we assume the distance of source vertex as 0 and pushes the vertex in a priority queue with it's distance. we maintain the priority queue as a min heap so that we can get the minimum element at the top of heap</p>
|
||||
<p>Basically what we do in this algorithm is that we try to minimize the distances of all the reachable vertices from the current vertex, look at the code below to understand in better way. </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int main </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void</td> <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Main function </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 152</span> {</div>
|
||||
<div class="line"><span class="lineno"> 153</span> <span class="comment">// running predefined tests</span></div>
|
||||
<div class="line"><span class="lineno"> 154</span> <a class="code hl_function" href="#a88ec9ad42717780d6caaff9d3d6977f9">tests</a>();</div>
|
||||
<div class="line"><span class="lineno"> 155</span> </div>
|
||||
<div class="line"><span class="lineno"> 156</span> <span class="keywordtype">int</span> vertices = int(), edges = int();</div>
|
||||
<div class="line"><span class="lineno"> 157</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter the number of vertices : "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 158</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> vertices;</div>
|
||||
<div class="line"><span class="lineno"> 159</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter the number of edges : "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 160</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> edges;</div>
|
||||
<div class="line"><span class="lineno"> 161</span> </div>
|
||||
<div class="line"><span class="lineno"> 162</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<std::pair<int, int></a>>> adj(</div>
|
||||
<div class="line"><span class="lineno"> 163</span> vertices, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a><<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair<int, int></a>>());</div>
|
||||
<div class="line"><span class="lineno"> 164</span> </div>
|
||||
<div class="line"><span class="lineno"> 165</span> <span class="keywordtype">int</span> u = int(), v = int(), w = int();</div>
|
||||
<div class="line"><span class="lineno"> 166</span> <span class="keywordflow">while</span> (edges--) {</div>
|
||||
<div class="line"><span class="lineno"> 167</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> u >> v >> w;</div>
|
||||
<div class="line"><span class="lineno"> 168</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj, u, v, w);</div>
|
||||
<div class="line"><span class="lineno"> 169</span> }</div>
|
||||
<div class="line"><span class="lineno"> 170</span> </div>
|
||||
<div class="line"><span class="lineno"> 171</span> <span class="keywordtype">int</span> s = int(), t = int();</div>
|
||||
<div class="line"><span class="lineno"> 172</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> s >> t;</div>
|
||||
<div class="line"><span class="lineno"> 173</span> <span class="keywordtype">int</span> dist = <a class="code hl_function" href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84">graph::dijkstra</a>(&adj, s - 1, t - 1);</div>
|
||||
<div class="line"><span class="lineno"> 174</span> <span class="keywordflow">if</span> (dist == -1) {</div>
|
||||
<div class="line"><span class="lineno"> 175</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Target not reachable from source"</span> << <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"> 176</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 177</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Shortest Path Distance : "</span> << dist << <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"> 178</span> }</div>
|
||||
<div class="line"><span class="lineno"> 179</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 180</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="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
|
||||
<div class="ttc" id="agraph_2dijkstra_8cpp_html_a88ec9ad42717780d6caaff9d3d6977f9"><div class="ttname"><a href="#a88ec9ad42717780d6caaff9d3d6977f9">tests</a></div><div class="ttdeci">void tests()</div><div class="ttdef"><b>Definition</b> dijkstra.cpp:113</div></div>
|
||||
<div class="ttc" id="anamespacegraph_html_a9125ceb66bfbec3093bba64c2c1e99e2"><div class="ttname"><a href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a></div><div class="ttdeci">void addEdge(std::vector< std::vector< int > > *adj, int u, int v)</div><div class="ttdoc">Function that add edge between two nodes or vertices of graph.</div><div class="ttdef"><b>Definition</b> connected_components.cpp:46</div></div>
|
||||
<div class="ttc" id="anamespacegraph_html_adc68cbc8ba09eb1142265935c0d45b84"><div class="ttname"><a href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84">graph::dijkstra</a></div><div class="ttdeci">int dijkstra(std::vector< std::vector< std::pair< int, int > > > *adj, int s, int t)</div><div class="ttdoc">Function runs the dijkstra algorithm for some source vertex and target vertex in the graph and return...</div><div class="ttdef"><b>Definition</b> dijkstra.cpp:66</div></div>
|
||||
<div class="ttc" id="apair_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair</a></div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</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="../../d7/d1e/graph_2dijkstra_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="524" height="315"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a88ec9ad42717780d6caaff9d3d6977f9" name="a88ec9ad42717780d6caaff9d3d6977f9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a88ec9ad42717780d6caaff9d3d6977f9">◆ </a></span>tests()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void tests </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Function to test the Algorithm </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 113</span> {</div>
|
||||
<div class="line"><span class="lineno"> 114</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Initiatinig Predefined Tests..."</span> << <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"> 115</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Initiating Test 1..."</span> << <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"> 116</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<std::pair<int, int></a>>> adj1(</div>
|
||||
<div class="line"><span class="lineno"> 117</span> 4, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a><<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair<int, int></a>>());</div>
|
||||
<div class="line"><span class="lineno"> 118</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj1, 1, 2, 1);</div>
|
||||
<div class="line"><span class="lineno"> 119</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj1, 4, 1, 2);</div>
|
||||
<div class="line"><span class="lineno"> 120</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj1, 2, 3, 2);</div>
|
||||
<div class="line"><span class="lineno"> 121</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj1, 1, 3, 5);</div>
|
||||
<div class="line"><span class="lineno"> 122</span> </div>
|
||||
<div class="line"><span class="lineno"> 123</span> <span class="keywordtype">int</span> s = 1, t = 3;</div>
|
||||
<div class="line"><span class="lineno"> 124</span> assert(<a class="code hl_function" href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84">graph::dijkstra</a>(&adj1, s - 1, t - 1) == 3);</div>
|
||||
<div class="line"><span class="lineno"> 125</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 1 Passed..."</span> << <a class="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"> 126</span> </div>
|
||||
<div class="line"><span class="lineno"> 127</span> s = 4, t = 3;</div>
|
||||
<div class="line"><span class="lineno"> 128</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Initiating Test 2..."</span> << <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"> 129</span> assert(<a class="code hl_function" href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84">graph::dijkstra</a>(&adj1, s - 1, t - 1) == 5);</div>
|
||||
<div class="line"><span class="lineno"> 130</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 2 Passed..."</span> << <a class="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"> 131</span> </div>
|
||||
<div class="line"><span class="lineno"> 132</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<std::pair<int, int></a>>> adj2(</div>
|
||||
<div class="line"><span class="lineno"> 133</span> 5, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a><<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair<int, int></a>>());</div>
|
||||
<div class="line"><span class="lineno"> 134</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj2, 1, 2, 4);</div>
|
||||
<div class="line"><span class="lineno"> 135</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj2, 1, 3, 2);</div>
|
||||
<div class="line"><span class="lineno"> 136</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj2, 2, 3, 2);</div>
|
||||
<div class="line"><span class="lineno"> 137</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj2, 3, 2, 1);</div>
|
||||
<div class="line"><span class="lineno"> 138</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj2, 2, 4, 2);</div>
|
||||
<div class="line"><span class="lineno"> 139</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj2, 3, 5, 4);</div>
|
||||
<div class="line"><span class="lineno"> 140</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj2, 5, 4, 1);</div>
|
||||
<div class="line"><span class="lineno"> 141</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj2, 2, 5, 3);</div>
|
||||
<div class="line"><span class="lineno"> 142</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&adj2, 3, 4, 4);</div>
|
||||
<div class="line"><span class="lineno"> 143</span> </div>
|
||||
<div class="line"><span class="lineno"> 144</span> s = 1, t = 5;</div>
|
||||
<div class="line"><span class="lineno"> 145</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Initiating Test 3..."</span> << <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"> 146</span> assert(<a class="code hl_function" href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84">graph::dijkstra</a>(&adj2, s - 1, t - 1) == 6);</div>
|
||||
<div class="line"><span class="lineno"> 147</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Test 3 Passed..."</span> << <a class="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"> 148</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"All Test Passed..."</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a> << <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"> 149</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d7/d1e/graph_2dijkstra_8cpp_a88ec9ad42717780d6caaff9d3d6977f9_cgraph.svg" width="427" height="315"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- 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="../../d7/d1e/graph_2dijkstra_8cpp.html">dijkstra.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>
|
||||
@@ -1,7 +0,0 @@
|
||||
var graph_2dijkstra_8cpp =
|
||||
[
|
||||
[ "addEdge", "d7/d1e/graph_2dijkstra_8cpp.html#a0e30e0dca68cb6e4f671440819b35b6a", null ],
|
||||
[ "dijkstra", "d7/d1e/graph_2dijkstra_8cpp.html#adc68cbc8ba09eb1142265935c0d45b84", null ],
|
||||
[ "main", "d7/d1e/graph_2dijkstra_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "tests", "d7/d1e/graph_2dijkstra_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9", null ]
|
||||
];
|
||||
@@ -1,21 +0,0 @@
|
||||
<map id="tests" name="tests">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,149,56,174"/>
|
||||
<area shape="rect" id="Node000002" href="$df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2" title="Function that add edge between two nodes or vertices of graph." alt="" coords="104,100,216,125"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,150,109,129,111,134,57,155"/>
|
||||
<area shape="rect" id="Node000003" href="$df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84" title="Function runs the dijkstra algorithm for some source vertex and target vertex in the graph and return..." alt="" coords="108,149,212,174"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="56,159,93,159,93,164,56,164"/>
|
||||
<area shape="rect" id="Node000010" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="124,198,196,224"/>
|
||||
<area shape="poly" id="edge9_Node000001_Node000010" title=" " alt="" coords="57,169,111,190,109,195,55,174"/>
|
||||
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/priority_queue/empty.html#" title=" " alt="" coords="278,5,407,46"/>
|
||||
<area shape="poly" id="edge3_Node000003_Node000004" title=" " alt="" coords="199,146,214,136,230,116,237,97,245,76,262,56,266,53,269,57,266,60,250,79,242,99,235,119,218,140,202,150"/>
|
||||
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/pair/make_pair.html#" title=" " alt="" coords="289,70,396,96"/>
|
||||
<area shape="poly" id="edge4_Node000003_Node000005" title=" " alt="" coords="193,146,215,135,238,120,263,105,276,99,278,104,265,109,241,124,217,140,195,151"/>
|
||||
<area shape="rect" id="Node000006" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/priority_queue/pop.html#" title=" " alt="" coords="264,120,421,145"/>
|
||||
<area shape="poly" id="edge5_Node000003_Node000006" title=" " alt="" coords="211,151,248,145,249,150,212,156"/>
|
||||
<area shape="rect" id="Node000007" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/priority_queue/push.html#" title=" " alt="" coords="278,169,407,210"/>
|
||||
<area shape="poly" id="edge6_Node000003_Node000007" title=" " alt="" coords="212,167,264,175,263,180,211,172"/>
|
||||
<area shape="rect" id="Node000008" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="285,234,400,260"/>
|
||||
<area shape="poly" id="edge7_Node000003_Node000008" title=" " alt="" coords="196,173,217,183,241,202,265,219,279,226,277,230,263,224,238,206,215,188,194,177"/>
|
||||
<area shape="rect" id="Node000009" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/priority_queue/top.html#" title=" " alt="" coords="266,284,420,309"/>
|
||||
<area shape="poly" id="edge8_Node000003_Node000009" title=" " alt="" coords="202,173,218,184,235,207,242,229,249,250,266,270,270,274,267,278,262,274,244,253,237,231,230,209,214,188,199,177"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
2221263dd126629f7dc03bda250a317e
|
||||
@@ -1,211 +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="320pt" height="236pt"
|
||||
viewBox="0.00 0.00 320.00 235.88" 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 231.88)">
|
||||
<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,-120.25 0,-120.25 0,-101 37.75,-101 37.75,-120.25"/>
|
||||
<text text-anchor="middle" x="18.88" y="-106.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="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2" target="_top" xlink:title="Function that add edge between two nodes or vertices of graph.">
|
||||
<polygon fill="white" stroke="#666666" points="158,-157.25 73.75,-157.25 73.75,-138 158,-138 158,-157.25"/>
|
||||
<text text-anchor="middle" x="115.88" y="-143.75" font-family="Helvetica,sans-Serif" font-size="10.00">graph::addEdge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M38.19,-117.76C49.59,-122.2 64.66,-128.07 78.42,-133.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="77.07,-136.66 87.66,-137.03 79.61,-130.14 77.07,-136.66"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84" target="_top" xlink:title="Function runs the dijkstra algorithm for some source vertex and target vertex in the graph and return...">
|
||||
<polygon fill="white" stroke="#666666" points="154.62,-120.25 77.12,-120.25 77.12,-101 154.62,-101 154.62,-120.25"/>
|
||||
<text text-anchor="middle" x="115.88" y="-106.75" font-family="Helvetica,sans-Serif" font-size="10.00">graph::dijkstra</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M38.19,-110.62C46.1,-110.62 55.76,-110.62 65.53,-110.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="65.44,-114.13 75.44,-110.63 65.44,-107.13 65.44,-114.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="142.62,-83.25 89.12,-83.25 89.12,-64 142.62,-64 142.62,-83.25"/>
|
||||
<text text-anchor="middle" x="115.88" y="-69.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node10 -->
|
||||
<g id="edge9_Node000001_Node000010" class="edge">
|
||||
<title>Node1->Node10</title>
|
||||
<g id="a_edge9_Node000001_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M38.19,-103.49C49.59,-99.05 64.66,-93.18 78.42,-87.83"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="79.61,-91.11 87.66,-84.22 77.07,-84.59 79.61,-91.11"/>
|
||||
</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/priority_queue/empty.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="301.12,-227.88 204.88,-227.88 204.88,-197.38 301.12,-197.38 301.12,-227.88"/>
|
||||
<text text-anchor="start" x="212.88" y="-214.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue</text>
|
||||
<text text-anchor="middle" x="253" y="-203.12" font-family="Helvetica,sans-Serif" font-size="10.00">::empty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3_Node000003_Node000004" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M146.11,-120.69C150.36,-122.91 154.49,-125.54 158,-128.62 181.35,-149.17 170.44,-168.32 194,-188.62 194.79,-189.31 195.61,-189.98 196.45,-190.63"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="194.49,-193.53 204.76,-196.11 198.34,-187.68 194.49,-193.53"/>
|
||||
</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/utility/pair/make_pair.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="293.25,-179.25 212.75,-179.25 212.75,-160 293.25,-160 293.25,-179.25"/>
|
||||
<text text-anchor="middle" x="253" y="-165.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_pair</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node5 -->
|
||||
<g id="edge4_Node000003_Node000005" class="edge">
|
||||
<title>Node3->Node5</title>
|
||||
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M141.53,-120.67C147.03,-123.11 152.78,-125.83 158,-128.62 174.75,-137.57 176.78,-143.63 194,-151.62 197.1,-153.07 200.35,-154.43 203.66,-155.72"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="202.3,-158.95 212.89,-159.03 204.66,-152.36 202.3,-158.95"/>
|
||||
</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/priority_queue/pop.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="312,-142.25 194,-142.25 194,-123 312,-123 312,-142.25"/>
|
||||
<text text-anchor="middle" x="253" y="-128.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node6 -->
|
||||
<g id="edge5_Node000003_Node000006" class="edge">
|
||||
<title>Node3->Node6</title>
|
||||
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M154.87,-116.81C163.51,-118.22 172.96,-119.76 182.45,-121.3"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="181.65,-124.72 192.09,-122.87 182.78,-117.81 181.65,-124.72"/>
|
||||
</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/priority_queue/push.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="301.12,-104.88 204.88,-104.88 204.88,-74.38 301.12,-74.38 301.12,-104.88"/>
|
||||
<text text-anchor="start" x="212.88" y="-91.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue</text>
|
||||
<text text-anchor="middle" x="253" y="-80.12" font-family="Helvetica,sans-Serif" font-size="10.00">::push</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node7 -->
|
||||
<g id="edge6_Node000003_Node000007" class="edge">
|
||||
<title>Node3->Node7</title>
|
||||
<g id="a_edge6_Node000003_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M154.87,-104.72C166.83,-102.86 180.32,-100.76 193.36,-98.74"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="193.82,-102.21 203.16,-97.22 192.74,-95.29 193.82,-102.21"/>
|
||||
</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/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="296.25,-56.25 209.75,-56.25 209.75,-37 296.25,-37 296.25,-56.25"/>
|
||||
<text text-anchor="middle" x="253" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node8 -->
|
||||
<g id="edge7_Node000003_Node000008" class="edge">
|
||||
<title>Node3->Node8</title>
|
||||
<g id="a_edge7_Node000003_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M142.12,-100.67C147.48,-98.26 153.02,-95.53 158,-92.62 175.28,-82.55 176.26,-74.86 194,-65.62 197.29,-63.91 200.76,-62.31 204.31,-60.83"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="205.55,-64.1 213.64,-57.26 203.05,-57.56 205.55,-64.1"/>
|
||||
</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/priority_queue/top.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="310.88,-19.25 195.12,-19.25 195.12,0 310.88,0 310.88,-19.25"/>
|
||||
<text text-anchor="middle" x="253" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue::top</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node9 -->
|
||||
<g id="edge8_Node000003_Node000009" class="edge">
|
||||
<title>Node3->Node9</title>
|
||||
<g id="a_edge8_Node000003_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M146.2,-100.67C150.45,-98.44 154.54,-95.77 158,-92.62 182.41,-70.39 168.38,-48.47 194,-27.62 195.1,-26.73 196.25,-25.87 197.44,-25.06"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="198.79,-28.32 205.81,-20.38 195.37,-22.21 198.79,-28.32"/>
|
||||
</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: 9.8 KiB |
@@ -1,185 +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="320pt" height="236pt"
|
||||
viewBox="0.00 0.00 320.00 235.88" 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 231.88)">
|
||||
<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,-120.25 0,-120.25 0,-101 37.75,-101 37.75,-120.25"/>
|
||||
<text text-anchor="middle" x="18.88" y="-106.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="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2" target="_top" xlink:title="Function that add edge between two nodes or vertices of graph.">
|
||||
<polygon fill="white" stroke="#666666" points="158,-157.25 73.75,-157.25 73.75,-138 158,-138 158,-157.25"/>
|
||||
<text text-anchor="middle" x="115.88" y="-143.75" font-family="Helvetica,sans-Serif" font-size="10.00">graph::addEdge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M38.19,-117.76C49.59,-122.2 64.66,-128.07 78.42,-133.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="77.07,-136.66 87.66,-137.03 79.61,-130.14 77.07,-136.66"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84" target="_top" xlink:title="Function runs the dijkstra algorithm for some source vertex and target vertex in the graph and return...">
|
||||
<polygon fill="white" stroke="#666666" points="154.62,-120.25 77.12,-120.25 77.12,-101 154.62,-101 154.62,-120.25"/>
|
||||
<text text-anchor="middle" x="115.88" y="-106.75" font-family="Helvetica,sans-Serif" font-size="10.00">graph::dijkstra</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M38.19,-110.62C46.1,-110.62 55.76,-110.62 65.53,-110.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="65.44,-114.13 75.44,-110.63 65.44,-107.13 65.44,-114.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="142.62,-83.25 89.12,-83.25 89.12,-64 142.62,-64 142.62,-83.25"/>
|
||||
<text text-anchor="middle" x="115.88" y="-69.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node10 -->
|
||||
<g id="edge9_Node000001_Node000010" class="edge">
|
||||
<title>Node1->Node10</title>
|
||||
<g id="a_edge9_Node000001_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M38.19,-103.49C49.59,-99.05 64.66,-93.18 78.42,-87.83"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="79.61,-91.11 87.66,-84.22 77.07,-84.59 79.61,-91.11"/>
|
||||
</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/priority_queue/empty.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="301.12,-227.88 204.88,-227.88 204.88,-197.38 301.12,-197.38 301.12,-227.88"/>
|
||||
<text text-anchor="start" x="212.88" y="-214.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue</text>
|
||||
<text text-anchor="middle" x="253" y="-203.12" font-family="Helvetica,sans-Serif" font-size="10.00">::empty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3_Node000003_Node000004" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M146.11,-120.69C150.36,-122.91 154.49,-125.54 158,-128.62 181.35,-149.17 170.44,-168.32 194,-188.62 194.79,-189.31 195.61,-189.98 196.45,-190.63"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="194.49,-193.53 204.76,-196.11 198.34,-187.68 194.49,-193.53"/>
|
||||
</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/utility/pair/make_pair.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="293.25,-179.25 212.75,-179.25 212.75,-160 293.25,-160 293.25,-179.25"/>
|
||||
<text text-anchor="middle" x="253" y="-165.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_pair</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node5 -->
|
||||
<g id="edge4_Node000003_Node000005" class="edge">
|
||||
<title>Node3->Node5</title>
|
||||
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M141.53,-120.67C147.03,-123.11 152.78,-125.83 158,-128.62 174.75,-137.57 176.78,-143.63 194,-151.62 197.1,-153.07 200.35,-154.43 203.66,-155.72"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="202.3,-158.95 212.89,-159.03 204.66,-152.36 202.3,-158.95"/>
|
||||
</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/priority_queue/pop.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="312,-142.25 194,-142.25 194,-123 312,-123 312,-142.25"/>
|
||||
<text text-anchor="middle" x="253" y="-128.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node6 -->
|
||||
<g id="edge5_Node000003_Node000006" class="edge">
|
||||
<title>Node3->Node6</title>
|
||||
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M154.87,-116.81C163.51,-118.22 172.96,-119.76 182.45,-121.3"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="181.65,-124.72 192.09,-122.87 182.78,-117.81 181.65,-124.72"/>
|
||||
</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/priority_queue/push.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="301.12,-104.88 204.88,-104.88 204.88,-74.38 301.12,-74.38 301.12,-104.88"/>
|
||||
<text text-anchor="start" x="212.88" y="-91.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue</text>
|
||||
<text text-anchor="middle" x="253" y="-80.12" font-family="Helvetica,sans-Serif" font-size="10.00">::push</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node7 -->
|
||||
<g id="edge6_Node000003_Node000007" class="edge">
|
||||
<title>Node3->Node7</title>
|
||||
<g id="a_edge6_Node000003_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M154.87,-104.72C166.83,-102.86 180.32,-100.76 193.36,-98.74"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="193.82,-102.21 203.16,-97.22 192.74,-95.29 193.82,-102.21"/>
|
||||
</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/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="296.25,-56.25 209.75,-56.25 209.75,-37 296.25,-37 296.25,-56.25"/>
|
||||
<text text-anchor="middle" x="253" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node8 -->
|
||||
<g id="edge7_Node000003_Node000008" class="edge">
|
||||
<title>Node3->Node8</title>
|
||||
<g id="a_edge7_Node000003_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M142.12,-100.67C147.48,-98.26 153.02,-95.53 158,-92.62 175.28,-82.55 176.26,-74.86 194,-65.62 197.29,-63.91 200.76,-62.31 204.31,-60.83"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="205.55,-64.1 213.64,-57.26 203.05,-57.56 205.55,-64.1"/>
|
||||
</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/priority_queue/top.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="310.88,-19.25 195.12,-19.25 195.12,0 310.88,0 310.88,-19.25"/>
|
||||
<text text-anchor="middle" x="253" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue::top</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node9 -->
|
||||
<g id="edge8_Node000003_Node000009" class="edge">
|
||||
<title>Node3->Node9</title>
|
||||
<g id="a_edge8_Node000003_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M146.2,-100.67C150.45,-98.44 154.54,-95.77 158,-92.62 182.41,-70.39 168.38,-48.47 194,-27.62 195.1,-26.73 196.25,-25.87 197.44,-25.06"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="198.79,-28.32 205.81,-20.38 195.37,-22.21 198.79,-28.32"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 9.0 KiB |
@@ -1,26 +0,0 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,124,55,149"/>
|
||||
<area shape="rect" id="Node000002" href="$df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2" title="Function that add edge between two nodes or vertices of graph." alt="" coords="201,73,313,98"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="43,121,69,100,102,83,144,75,185,74,185,79,144,80,104,88,72,105,46,125"/>
|
||||
<area shape="rect" id="Node000003" href="$df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84" title="Function runs the dijkstra algorithm for some source vertex and target vertex in the graph and return..." alt="" coords="206,149,309,174"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="55,136,191,152,190,157,55,142"/>
|
||||
<area shape="rect" id="Node000010" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="222,198,293,224"/>
|
||||
<area shape="poly" id="edge9_Node000001_Node000010" title=" " alt="" coords="56,142,207,192,206,197,54,147"/>
|
||||
<area shape="rect" id="Node000011" href="$d7/d1e/graph_2dijkstra_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9" title=" " alt="" coords="103,98,153,124"/>
|
||||
<area shape="poly" id="edge10_Node000001_Node000011" title=" " alt="" coords="54,127,87,119,89,124,56,133"/>
|
||||
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/priority_queue/empty.html#" title=" " alt="" coords="376,5,504,46"/>
|
||||
<area shape="poly" id="edge3_Node000003_Node000004" title=" " alt="" coords="272,146,311,109,334,81,360,56,365,52,368,56,363,60,338,85,315,113,276,150"/>
|
||||
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/pair/make_pair.html#" title=" " alt="" coords="386,70,494,96"/>
|
||||
<area shape="poly" id="edge4_Node000003_Node000005" title=" " alt="" coords="280,146,360,105,375,99,377,104,362,109,282,151"/>
|
||||
<area shape="rect" id="Node000006" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/priority_queue/pop.html#" title=" " alt="" coords="361,120,519,145"/>
|
||||
<area shape="poly" id="edge5_Node000003_Node000006" title=" " alt="" coords="309,151,346,145,346,150,310,156"/>
|
||||
<area shape="rect" id="Node000007" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/priority_queue/push.html#" title=" " alt="" coords="376,169,504,210"/>
|
||||
<area shape="poly" id="edge6_Node000003_Node000007" title=" " alt="" coords="310,167,361,175,360,180,309,172"/>
|
||||
<area shape="rect" id="Node000008" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="382,234,498,260"/>
|
||||
<area shape="poly" id="edge7_Node000003_Node000008" title=" " alt="" coords="293,173,315,183,339,202,363,219,376,226,374,230,360,224,336,206,312,188,291,177"/>
|
||||
<area shape="rect" id="Node000009" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/priority_queue/top.html#" title=" " alt="" coords="363,284,517,309"/>
|
||||
<area shape="poly" id="edge8_Node000003_Node000009" title=" " alt="" coords="299,173,315,184,332,207,339,229,346,250,363,270,368,274,364,278,359,274,342,253,334,231,327,209,311,188,296,177"/>
|
||||
<area shape="poly" id="edge11_Node000011_Node000002" title=" " alt="" coords="153,104,185,97,186,102,154,109"/>
|
||||
<area shape="poly" id="edge12_Node000011_Node000003" title=" " alt="" coords="155,118,210,140,208,145,153,123"/>
|
||||
<area shape="poly" id="edge13_Node000011_Node000010" title=" " alt="" coords="141,123,167,153,203,185,209,189,206,193,199,189,163,157,137,126"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
6e34c783557a2008eb99d9a45eab826e
|
||||
@@ -1,256 +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="393pt" height="236pt"
|
||||
viewBox="0.00 0.00 393.00 235.88" 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 231.88)">
|
||||
<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,-139.25 0,-139.25 0,-120 37,-120 37,-139.25"/>
|
||||
<text text-anchor="middle" x="18.5" y="-125.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 xlink:href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2" target="_top" xlink:title="Function that add edge between two nodes or vertices of graph.">
|
||||
<polygon fill="white" stroke="#666666" points="231,-177.25 146.75,-177.25 146.75,-158 231,-158 231,-177.25"/>
|
||||
<text text-anchor="middle" x="188.88" y="-163.75" font-family="Helvetica,sans-Serif" font-size="10.00">graph::addEdge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M29.48,-139.66C39.49,-148.96 55.85,-162.15 73,-167.62 92.62,-173.88 115.09,-175.09 134.93,-174.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.98,-177.81 144.76,-173.73 134.57,-170.82 134.98,-177.81"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84" target="_top" xlink:title="Function runs the dijkstra algorithm for some source vertex and target vertex in the graph and return...">
|
||||
<polygon fill="white" stroke="#666666" points="227.62,-120.25 150.12,-120.25 150.12,-101 227.62,-101 227.62,-120.25"/>
|
||||
<text text-anchor="middle" x="188.88" y="-106.75" font-family="Helvetica,sans-Serif" font-size="10.00">graph::dijkstra</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.2,-127.63C61.1,-124.93 104.61,-120.02 138.76,-116.17"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="138.88,-119.68 148.43,-115.08 138.1,-112.72 138.88,-119.68"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="215.62,-83.25 162.12,-83.25 162.12,-64 215.62,-64 215.62,-83.25"/>
|
||||
<text text-anchor="middle" x="188.88" y="-69.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node10 -->
|
||||
<g id="edge9_Node000001_Node000010" class="edge">
|
||||
<title>Node1->Node10</title>
|
||||
<g id="a_edge9_Node000001_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.2,-123.74C64.02,-114.82 115.55,-97.68 150.81,-85.95"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="151.82,-89.31 160.2,-82.83 149.61,-82.66 151.82,-89.31"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><a xlink:href="../../d7/d1e/graph_2dijkstra_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="110.75,-158.25 73,-158.25 73,-139 110.75,-139 110.75,-158.25"/>
|
||||
<text text-anchor="middle" x="91.88" y="-144.75" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node11 -->
|
||||
<g id="edge10_Node000001_Node000011" class="edge">
|
||||
<title>Node1->Node11</title>
|
||||
<g id="a_edge10_Node000001_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.14,-134.32C44.64,-136.32 53.57,-138.69 61.98,-140.93"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="60.91,-144.27 71.48,-143.46 62.71,-137.51 60.91,-144.27"/>
|
||||
</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/priority_queue/empty.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="374.12,-227.88 277.88,-227.88 277.88,-197.38 374.12,-197.38 374.12,-227.88"/>
|
||||
<text text-anchor="start" x="285.88" y="-214.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue</text>
|
||||
<text text-anchor="middle" x="326" y="-203.12" font-family="Helvetica,sans-Serif" font-size="10.00">::empty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3_Node000003_Node000004" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M201.31,-120.68C209.71,-128.18 221.3,-138.8 231,-148.62 247.8,-165.65 247.47,-174.82 267,-188.62 268.36,-189.59 269.77,-190.52 271.21,-191.43"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="269.36,-194.4 279.79,-196.23 272.78,-188.29 269.36,-194.4"/>
|
||||
</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/utility/pair/make_pair.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="366.25,-179.25 285.75,-179.25 285.75,-160 366.25,-160 366.25,-179.25"/>
|
||||
<text text-anchor="middle" x="326" y="-165.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_pair</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node5 -->
|
||||
<g id="edge4_Node000003_Node000005" class="edge">
|
||||
<title>Node3->Node5</title>
|
||||
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M206.58,-120.69C221.91,-129.63 245.44,-142.64 267,-151.62 270.56,-153.11 274.29,-154.54 278.07,-155.89"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="276.71,-159.13 287.3,-159.03 278.96,-152.5 276.71,-159.13"/>
|
||||
</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/priority_queue/pop.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="385,-142.25 267,-142.25 267,-123 385,-123 385,-142.25"/>
|
||||
<text text-anchor="middle" x="326" y="-128.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node6 -->
|
||||
<g id="edge5_Node000003_Node000006" class="edge">
|
||||
<title>Node3->Node6</title>
|
||||
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M227.87,-116.81C236.51,-118.22 245.96,-119.76 255.45,-121.3"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="254.65,-124.72 265.09,-122.87 255.78,-117.81 254.65,-124.72"/>
|
||||
</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/priority_queue/push.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="374.12,-104.88 277.88,-104.88 277.88,-74.38 374.12,-74.38 374.12,-104.88"/>
|
||||
<text text-anchor="start" x="285.88" y="-91.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue</text>
|
||||
<text text-anchor="middle" x="326" y="-80.12" font-family="Helvetica,sans-Serif" font-size="10.00">::push</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node7 -->
|
||||
<g id="edge6_Node000003_Node000007" class="edge">
|
||||
<title>Node3->Node7</title>
|
||||
<g id="a_edge6_Node000003_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M227.87,-104.72C239.83,-102.86 253.32,-100.76 266.36,-98.74"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="266.82,-102.21 276.16,-97.22 265.74,-95.29 266.82,-102.21"/>
|
||||
</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/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="369.25,-56.25 282.75,-56.25 282.75,-37 369.25,-37 369.25,-56.25"/>
|
||||
<text text-anchor="middle" x="326" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node8 -->
|
||||
<g id="edge7_Node000003_Node000008" class="edge">
|
||||
<title>Node3->Node8</title>
|
||||
<g id="a_edge7_Node000003_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M215.12,-100.67C220.48,-98.26 226.02,-95.53 231,-92.62 248.28,-82.55 249.26,-74.86 267,-65.62 270.29,-63.91 273.76,-62.31 277.31,-60.83"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="278.55,-64.1 286.64,-57.26 276.05,-57.56 278.55,-64.1"/>
|
||||
</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/priority_queue/top.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="383.88,-19.25 268.12,-19.25 268.12,0 383.88,0 383.88,-19.25"/>
|
||||
<text text-anchor="middle" x="326" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue::top</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node9 -->
|
||||
<g id="edge8_Node000003_Node000009" class="edge">
|
||||
<title>Node3->Node9</title>
|
||||
<g id="a_edge8_Node000003_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M219.2,-100.67C223.45,-98.44 227.54,-95.77 231,-92.62 255.41,-70.39 241.38,-48.47 267,-27.62 268.1,-26.73 269.25,-25.87 270.44,-25.06"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="271.79,-28.32 278.81,-20.38 268.37,-22.21 271.79,-28.32"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node2 -->
|
||||
<g id="edge11_Node000011_Node000002" class="edge">
|
||||
<title>Node11->Node2</title>
|
||||
<g id="a_edge11_Node000011_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M111.19,-152.29C118.24,-153.7 126.7,-155.39 135.37,-157.12"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.42,-160.5 144.91,-159.03 135.79,-153.64 134.42,-160.5"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node3 -->
|
||||
<g id="edge12_Node000011_Node000003" class="edge">
|
||||
<title>Node11->Node3</title>
|
||||
<g id="a_edge12_Node000011_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M111.19,-141.3C122.88,-136.62 138.41,-130.41 152.44,-124.8"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="153.4,-128.18 161.39,-121.22 150.8,-121.69 153.4,-128.18"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node10 -->
|
||||
<g id="edge13_Node000011_Node000010" class="edge">
|
||||
<title>Node11->Node10</title>
|
||||
<g id="a_edge13_Node000011_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M100.28,-138.59C109.86,-126.2 127.59,-105.1 146.75,-91.62 148.33,-90.52 149.98,-89.45 151.69,-88.44"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="153.21,-91.59 160.45,-83.85 149.97,-85.39 153.21,-91.59"/>
|
||||
</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: 12 KiB |
@@ -1,230 +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="393pt" height="236pt"
|
||||
viewBox="0.00 0.00 393.00 235.88" 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 231.88)">
|
||||
<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,-139.25 0,-139.25 0,-120 37,-120 37,-139.25"/>
|
||||
<text text-anchor="middle" x="18.5" y="-125.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 xlink:href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2" target="_top" xlink:title="Function that add edge between two nodes or vertices of graph.">
|
||||
<polygon fill="white" stroke="#666666" points="231,-177.25 146.75,-177.25 146.75,-158 231,-158 231,-177.25"/>
|
||||
<text text-anchor="middle" x="188.88" y="-163.75" font-family="Helvetica,sans-Serif" font-size="10.00">graph::addEdge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M29.48,-139.66C39.49,-148.96 55.85,-162.15 73,-167.62 92.62,-173.88 115.09,-175.09 134.93,-174.31"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.98,-177.81 144.76,-173.73 134.57,-170.82 134.98,-177.81"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84" target="_top" xlink:title="Function runs the dijkstra algorithm for some source vertex and target vertex in the graph and return...">
|
||||
<polygon fill="white" stroke="#666666" points="227.62,-120.25 150.12,-120.25 150.12,-101 227.62,-101 227.62,-120.25"/>
|
||||
<text text-anchor="middle" x="188.88" y="-106.75" font-family="Helvetica,sans-Serif" font-size="10.00">graph::dijkstra</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.2,-127.63C61.1,-124.93 104.61,-120.02 138.76,-116.17"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="138.88,-119.68 148.43,-115.08 138.1,-112.72 138.88,-119.68"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="215.62,-83.25 162.12,-83.25 162.12,-64 215.62,-64 215.62,-83.25"/>
|
||||
<text text-anchor="middle" x="188.88" y="-69.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node10 -->
|
||||
<g id="edge9_Node000001_Node000010" class="edge">
|
||||
<title>Node1->Node10</title>
|
||||
<g id="a_edge9_Node000001_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.2,-123.74C64.02,-114.82 115.55,-97.68 150.81,-85.95"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="151.82,-89.31 160.2,-82.83 149.61,-82.66 151.82,-89.31"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><a xlink:href="../../d7/d1e/graph_2dijkstra_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="110.75,-158.25 73,-158.25 73,-139 110.75,-139 110.75,-158.25"/>
|
||||
<text text-anchor="middle" x="91.88" y="-144.75" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node11 -->
|
||||
<g id="edge10_Node000001_Node000011" class="edge">
|
||||
<title>Node1->Node11</title>
|
||||
<g id="a_edge10_Node000001_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.14,-134.32C44.64,-136.32 53.57,-138.69 61.98,-140.93"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="60.91,-144.27 71.48,-143.46 62.71,-137.51 60.91,-144.27"/>
|
||||
</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/priority_queue/empty.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="374.12,-227.88 277.88,-227.88 277.88,-197.38 374.12,-197.38 374.12,-227.88"/>
|
||||
<text text-anchor="start" x="285.88" y="-214.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue</text>
|
||||
<text text-anchor="middle" x="326" y="-203.12" font-family="Helvetica,sans-Serif" font-size="10.00">::empty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3_Node000003_Node000004" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M201.31,-120.68C209.71,-128.18 221.3,-138.8 231,-148.62 247.8,-165.65 247.47,-174.82 267,-188.62 268.36,-189.59 269.77,-190.52 271.21,-191.43"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="269.36,-194.4 279.79,-196.23 272.78,-188.29 269.36,-194.4"/>
|
||||
</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/utility/pair/make_pair.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="366.25,-179.25 285.75,-179.25 285.75,-160 366.25,-160 366.25,-179.25"/>
|
||||
<text text-anchor="middle" x="326" y="-165.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_pair</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node5 -->
|
||||
<g id="edge4_Node000003_Node000005" class="edge">
|
||||
<title>Node3->Node5</title>
|
||||
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M206.58,-120.69C221.91,-129.63 245.44,-142.64 267,-151.62 270.56,-153.11 274.29,-154.54 278.07,-155.89"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="276.71,-159.13 287.3,-159.03 278.96,-152.5 276.71,-159.13"/>
|
||||
</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/priority_queue/pop.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="385,-142.25 267,-142.25 267,-123 385,-123 385,-142.25"/>
|
||||
<text text-anchor="middle" x="326" y="-128.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node6 -->
|
||||
<g id="edge5_Node000003_Node000006" class="edge">
|
||||
<title>Node3->Node6</title>
|
||||
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M227.87,-116.81C236.51,-118.22 245.96,-119.76 255.45,-121.3"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="254.65,-124.72 265.09,-122.87 255.78,-117.81 254.65,-124.72"/>
|
||||
</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/priority_queue/push.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="374.12,-104.88 277.88,-104.88 277.88,-74.38 374.12,-74.38 374.12,-104.88"/>
|
||||
<text text-anchor="start" x="285.88" y="-91.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue</text>
|
||||
<text text-anchor="middle" x="326" y="-80.12" font-family="Helvetica,sans-Serif" font-size="10.00">::push</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node7 -->
|
||||
<g id="edge6_Node000003_Node000007" class="edge">
|
||||
<title>Node3->Node7</title>
|
||||
<g id="a_edge6_Node000003_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M227.87,-104.72C239.83,-102.86 253.32,-100.76 266.36,-98.74"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="266.82,-102.21 276.16,-97.22 265.74,-95.29 266.82,-102.21"/>
|
||||
</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/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="369.25,-56.25 282.75,-56.25 282.75,-37 369.25,-37 369.25,-56.25"/>
|
||||
<text text-anchor="middle" x="326" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node8 -->
|
||||
<g id="edge7_Node000003_Node000008" class="edge">
|
||||
<title>Node3->Node8</title>
|
||||
<g id="a_edge7_Node000003_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M215.12,-100.67C220.48,-98.26 226.02,-95.53 231,-92.62 248.28,-82.55 249.26,-74.86 267,-65.62 270.29,-63.91 273.76,-62.31 277.31,-60.83"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="278.55,-64.1 286.64,-57.26 276.05,-57.56 278.55,-64.1"/>
|
||||
</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/priority_queue/top.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="383.88,-19.25 268.12,-19.25 268.12,0 383.88,0 383.88,-19.25"/>
|
||||
<text text-anchor="middle" x="326" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::priority_queue::top</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node9 -->
|
||||
<g id="edge8_Node000003_Node000009" class="edge">
|
||||
<title>Node3->Node9</title>
|
||||
<g id="a_edge8_Node000003_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M219.2,-100.67C223.45,-98.44 227.54,-95.77 231,-92.62 255.41,-70.39 241.38,-48.47 267,-27.62 268.1,-26.73 269.25,-25.87 270.44,-25.06"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="271.79,-28.32 278.81,-20.38 268.37,-22.21 271.79,-28.32"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node2 -->
|
||||
<g id="edge11_Node000011_Node000002" class="edge">
|
||||
<title>Node11->Node2</title>
|
||||
<g id="a_edge11_Node000011_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M111.19,-152.29C118.24,-153.7 126.7,-155.39 135.37,-157.12"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.42,-160.5 144.91,-159.03 135.79,-153.64 134.42,-160.5"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node3 -->
|
||||
<g id="edge12_Node000011_Node000003" class="edge">
|
||||
<title>Node11->Node3</title>
|
||||
<g id="a_edge12_Node000011_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M111.19,-141.3C122.88,-136.62 138.41,-130.41 152.44,-124.8"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="153.4,-128.18 161.39,-121.22 150.8,-121.69 153.4,-128.18"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node10 -->
|
||||
<g id="edge13_Node000011_Node000010" class="edge">
|
||||
<title>Node11->Node10</title>
|
||||
<g id="a_edge13_Node000011_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M100.28,-138.59C109.86,-126.2 127.59,-105.1 146.75,-91.62 148.33,-90.52 149.98,-89.45 151.69,-88.44"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="153.21,-91.59 160.45,-83.85 149.97,-85.39 153.21,-91.59"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 11 KiB |
9
d7/d53/kadane_8cpp__incl.map
Normal file
@@ -0,0 +1,9 @@
|
||||
<map id="dynamic_programming/kadane.cpp" name="dynamic_programming/kadane.cpp">
|
||||
<area shape="rect" id="Node000001" title="Implementation of Kadane Algorithm" alt="" coords="33,5,185,46"/>
|
||||
<area shape="rect" id="Node000002" title=" " alt="" coords="5,94,56,120"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="92,48,55,85,51,81,88,45"/>
|
||||
<area shape="rect" id="Node000003" title=" " alt="" coords="80,94,139,120"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="112,46,112,78,106,78,106,46"/>
|
||||
<area shape="rect" id="Node000004" title=" " alt="" coords="163,94,234,120"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="133,44,175,82,172,86,129,48"/>
|
||||
</map>
|
||||
1
d7/d53/kadane_8cpp__incl.md5
Normal file
@@ -0,0 +1 @@
|
||||
c991bbe55c37bc23cef9110420868f70
|
||||
102
d7/d53/kadane_8cpp__incl.svg
Normal file
@@ -0,0 +1,102 @@
|
||||
<?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: dynamic_programming/kadane.cpp Pages: 1 -->
|
||||
<svg width="180pt" height="94pt"
|
||||
viewBox="0.00 0.00 179.62 93.75" 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 89.75)">
|
||||
<title>dynamic_programming/kadane.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Implementation of Kadane Algorithm">
|
||||
<polygon fill="#999999" stroke="#666666" points="135,-85.75 20.75,-85.75 20.75,-55.25 135,-55.25 135,-85.75"/>
|
||||
<text text-anchor="start" x="28.75" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="77.88" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/kadane.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="37.75,-19.25 0,-19.25 0,0 37.75,0 37.75,-19.25"/>
|
||||
<text text-anchor="middle" x="18.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">array</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M63.29,-54.95C55,-46.67 44.57,-36.27 35.91,-27.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="38.59,-25.36 29.04,-20.77 33.65,-30.31 38.59,-25.36"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="100.12,-19.25 55.62,-19.25 55.62,0 100.12,0 100.12,-19.25"/>
|
||||
<text text-anchor="middle" x="77.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">climits</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M77.88,-54.95C77.88,-47.71 77.88,-38.84 77.88,-30.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="81.38,-31.21 77.88,-21.21 74.38,-31.21 81.38,-31.21"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="171.62,-19.25 118.12,-19.25 118.12,0 171.62,0 171.62,-19.25"/>
|
||||
<text text-anchor="middle" x="144.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M94.44,-54.95C104.05,-46.5 116.19,-35.83 126.15,-27.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="128.21,-29.93 133.41,-20.7 123.59,-24.67 128.21,-29.93"/>
|
||||
</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>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
76
d7/d53/kadane_8cpp__incl_org.svg
Normal file
@@ -0,0 +1,76 @@
|
||||
<?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: dynamic_programming/kadane.cpp Pages: 1 -->
|
||||
<svg width="180pt" height="94pt"
|
||||
viewBox="0.00 0.00 179.62 93.75" 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 89.75)">
|
||||
<title>dynamic_programming/kadane.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Implementation of Kadane Algorithm">
|
||||
<polygon fill="#999999" stroke="#666666" points="135,-85.75 20.75,-85.75 20.75,-55.25 135,-55.25 135,-85.75"/>
|
||||
<text text-anchor="start" x="28.75" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="77.88" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/kadane.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="37.75,-19.25 0,-19.25 0,0 37.75,0 37.75,-19.25"/>
|
||||
<text text-anchor="middle" x="18.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">array</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M63.29,-54.95C55,-46.67 44.57,-36.27 35.91,-27.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="38.59,-25.36 29.04,-20.77 33.65,-30.31 38.59,-25.36"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="100.12,-19.25 55.62,-19.25 55.62,0 100.12,0 100.12,-19.25"/>
|
||||
<text text-anchor="middle" x="77.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">climits</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M77.88,-54.95C77.88,-47.71 77.88,-38.84 77.88,-30.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="81.38,-31.21 77.88,-21.21 74.38,-31.21 81.38,-31.21"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="171.62,-19.25 118.12,-19.25 118.12,0 171.62,0 171.62,-19.25"/>
|
||||
<text text-anchor="middle" x="144.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M94.44,-54.95C104.05,-46.5 116.19,-35.83 126.15,-27.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="128.21,-29.93 133.41,-20.7 123.59,-24.67 128.21,-29.93"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
@@ -115,12 +115,13 @@ $(function(){initNavTree('d7/d57/longest__increasing__subsequence_8cpp.html','..
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <cassert></code><br />
|
||||
<code>#include <climits></code><br />
|
||||
<code>#include <cstdint></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <vector></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for longest_increasing_subsequence.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d40/longest__increasing__subsequence_8cpp__incl.svg" width="335" height="140"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d40/longest__increasing__subsequence_8cpp__incl.svg" width="419" height="140"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
||||
@@ -176,30 +177,30 @@ Functions</h2></td></tr>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 80</span> {</div>
|
||||
<div class="line"><span class="lineno"> 81</span> uint32_t n = 0;</div>
|
||||
<div class="line"><span class="lineno"> 82</span> </div>
|
||||
<div class="line"><span class="lineno"> 83</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter size of array: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 84</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> n;</div>
|
||||
<div class="line"><span class="lineno"> 85</span> </div>
|
||||
<div class="line"><span class="lineno"> 86</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<uint64_t></a> a(n);</div>
|
||||
<div class="line"><span class="lineno"> 87</span> </div>
|
||||
<div class="line"><span class="lineno"> 88</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter array elements: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 89</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n; ++i) {</div>
|
||||
<div class="line"><span class="lineno"> 90</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> a[i];</div>
|
||||
<div class="line"><span class="lineno"> 91</span> }</div>
|
||||
<div class="line"><span class="lineno"> 92</span> </div>
|
||||
<div class="line"><span class="lineno"> 93</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\nThe result is: "</span> << <a class="code hl_function" href="../../dd/d24/namespacedynamic__programming.html#a0a2215194e58786c34db1ccaf8031079">dynamic_programming::LIS</a>(a, n)</div>
|
||||
<div class="line"><span class="lineno"> 94</span> << <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"> 95</span> <a class="code hl_function" href="#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><span class="lineno"> 96</span> </div>
|
||||
<div class="line"><span class="lineno"> 97</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 98</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 81</span> {</div>
|
||||
<div class="line"><span class="lineno"> 82</span> uint32_t n = 0;</div>
|
||||
<div class="line"><span class="lineno"> 83</span> </div>
|
||||
<div class="line"><span class="lineno"> 84</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter size of array: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 85</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> n;</div>
|
||||
<div class="line"><span class="lineno"> 86</span> </div>
|
||||
<div class="line"><span class="lineno"> 87</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<uint64_t></a> a(n);</div>
|
||||
<div class="line"><span class="lineno"> 88</span> </div>
|
||||
<div class="line"><span class="lineno"> 89</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter array elements: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 90</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < n; ++i) {</div>
|
||||
<div class="line"><span class="lineno"> 91</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> a[i];</div>
|
||||
<div class="line"><span class="lineno"> 92</span> }</div>
|
||||
<div class="line"><span class="lineno"> 93</span> </div>
|
||||
<div class="line"><span class="lineno"> 94</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\nThe result is: "</span> << <a class="code hl_function" href="../../dd/d24/namespacedynamic__programming.html#a0a2215194e58786c34db1ccaf8031079">dynamic_programming::LIS</a>(a, n)</div>
|
||||
<div class="line"><span class="lineno"> 95</span> << <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"> 96</span> <a class="code hl_function" href="#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><span class="lineno"> 97</span> </div>
|
||||
<div class="line"><span class="lineno"> 98</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 99</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="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
|
||||
<div class="ttc" id="alongest__increasing__subsequence_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> longest_increasing_subsequence.cpp:63</div></div>
|
||||
<div class="ttc" id="anamespacedynamic__programming_html_a0a2215194e58786c34db1ccaf8031079"><div class="ttname"><a href="../../dd/d24/namespacedynamic__programming.html#a0a2215194e58786c34db1ccaf8031079">dynamic_programming::LIS</a></div><div class="ttdeci">uint64_t LIS(const std::vector< uint64_t > &a, const uint32_t &n)</div><div class="ttdoc">Calculate the longest increasing subsequence for the specified numbers.</div><div class="ttdef"><b>Definition</b> longest_increasing_subsequence.cpp:39</div></div>
|
||||
<div class="ttc" id="alongest__increasing__subsequence_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> longest_increasing_subsequence.cpp:64</div></div>
|
||||
<div class="ttc" id="anamespacedynamic__programming_html_a0a2215194e58786c34db1ccaf8031079"><div class="ttname"><a href="../../dd/d24/namespacedynamic__programming.html#a0a2215194e58786c34db1ccaf8031079">dynamic_programming::LIS</a></div><div class="ttdeci">uint64_t LIS(const std::vector< uint64_t > &a, const uint32_t &n)</div><div class="ttdoc">Calculate the longest increasing subsequence for the specified numbers.</div><div class="ttdef"><b>Definition</b> longest_increasing_subsequence.cpp:40</div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -235,16 +236,16 @@ Here is the call graph for this function:</div>
|
||||
<p>Self-test implementations. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<p>< The longest increasing subsequence is <code>{2,3,4,5,8}</code></p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 63</span> {</div>
|
||||
<div class="line"><span class="lineno"> 64</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<uint64_t></a> a = {15, 21, 2, 3, 4, 5, 8, 4, 1, 1};</div>
|
||||
<div class="line"><span class="lineno"> 65</span> uint32_t n = a.size();</div>
|
||||
<div class="line"><span class="lineno"> 66</span> </div>
|
||||
<div class="line"><span class="lineno"> 67</span> uint32_t <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <a class="code hl_function" href="../../dd/d24/namespacedynamic__programming.html#a0a2215194e58786c34db1ccaf8031079">dynamic_programming::LIS</a>(a, n);</div>
|
||||
<div class="line"><span class="lineno"> 68</span> assert(result ==</div>
|
||||
<div class="line"><span class="lineno"> 69</span> 5); <span class="comment">///< The longest increasing subsequence is `{2,3,4,5,8}`</span></div>
|
||||
<div class="line"><span class="lineno"> 70</span> </div>
|
||||
<div class="line"><span class="lineno"> 71</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Self-test implementations passed!"</span> << <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"> 72</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 64</span> {</div>
|
||||
<div class="line"><span class="lineno"> 65</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<uint64_t></a> a = {15, 21, 2, 3, 4, 5, 8, 4, 1, 1};</div>
|
||||
<div class="line"><span class="lineno"> 66</span> uint32_t n = a.size();</div>
|
||||
<div class="line"><span class="lineno"> 67</span> </div>
|
||||
<div class="line"><span class="lineno"> 68</span> uint32_t <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <a class="code hl_function" href="../../dd/d24/namespacedynamic__programming.html#a0a2215194e58786c34db1ccaf8031079">dynamic_programming::LIS</a>(a, n);</div>
|
||||
<div class="line"><span class="lineno"> 69</span> assert(result ==</div>
|
||||
<div class="line"><span class="lineno"> 70</span> 5); <span class="comment">///< The longest increasing subsequence is `{2,3,4,5,8}`</span></div>
|
||||
<div class="line"><span class="lineno"> 71</span> </div>
|
||||
<div class="line"><span class="lineno"> 72</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Self-test implementations passed!"</span> << <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"> 73</span>}</div>
|
||||
<div class="ttc" id="afibonacci__sum_8cpp_html_aadb40ac4c74a7efc0680b83eeee138aa"><div class="ttname"><a href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">math::fibonacci_sum::result</a></div><div class="ttdeci">uint64_t result(uint64_t n)</div><div class="ttdef"><b>Definition</b> fibonacci_sum.cpp:77</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
|
||||
@@ -114,13 +114,14 @@ $(function(){initNavTree('d7/d73/abbreviation_8cpp.html','../../'); initResizabl
|
||||
<p>Implementation of <a href="https://www.hackerrank.com/challenges/abbr/problem" target="_blank">Abbrievation</a>
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <cassert></code><br />
|
||||
<code>#include <cstdint></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <string></code><br />
|
||||
<code>#include <vector></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for abbreviation.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../da/d76/abbreviation_8cpp__incl.svg" width="331" height="126"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../da/d76/abbreviation_8cpp__incl.svg" width="415" 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">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
||||
@@ -192,33 +193,33 @@ Algorithm</h3>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>false</code> if string <code>str</code> cannot be converted to <code>result</code> </dd>
|
||||
<dd>
|
||||
<code>true</code> if string <code>str</code> can be converted to <code>result</code> </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 118</span> {</div>
|
||||
<div class="line"><span class="lineno"> 119</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<bool></a>> memo(</div>
|
||||
<div class="line"><span class="lineno"> 120</span> str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(<a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.size() + 1, <span class="keyword">false</span>));</div>
|
||||
<div class="line"><span class="lineno"> 121</span> </div>
|
||||
<div class="line"><span class="lineno"> 122</span> <span class="keywordflow">for</span> (uint32_t i = 0; i <= str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>(); ++i) {</div>
|
||||
<div class="line"><span class="lineno"> 123</span> memo[i][0] = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 124</span> }</div>
|
||||
<div class="line"><span class="lineno"> 125</span> <span class="keywordflow">for</span> (uint32_t i = 1; i <= <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.size(); ++i) {</div>
|
||||
<div class="line"><span class="lineno"> 126</span> memo[0][i] = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 127</span> }</div>
|
||||
<div class="line"><span class="lineno"> 128</span> <span class="keywordflow">for</span> (uint32_t i = 1; i <= str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>(); ++i) {</div>
|
||||
<div class="line"><span class="lineno"> 129</span> <span class="keywordflow">for</span> (uint32_t j = 1; j <= <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.size(); ++j) {</div>
|
||||
<div class="line"><span class="lineno"> 130</span> <span class="keywordflow">if</span> (str[i - 1] == result[j - 1]) {</div>
|
||||
<div class="line"><span class="lineno"> 131</span> memo[i][j] = memo[i - 1][j - 1];</div>
|
||||
<div class="line"><span class="lineno"> 132</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (str[i - 1] - 32 == result[j - 1]) {</div>
|
||||
<div class="line"><span class="lineno"> 133</span> memo[i][j] = (memo[i - 1][j - 1] || memo[i - 1][j]);</div>
|
||||
<div class="line"><span class="lineno"> 134</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 135</span> <span class="keywordflow">if</span> (str[i - 1] >= <span class="charliteral">'A'</span> && str[i - 1] <= <span class="charliteral">'Z'</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 136</span> memo[i][j] = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 137</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 138</span> memo[i][j] = memo[i - 1][j];</div>
|
||||
<div class="line"><span class="lineno"> 139</span> }</div>
|
||||
<div class="line"><span class="lineno"> 140</span> }</div>
|
||||
<div class="line"><span class="lineno"> 141</span> }</div>
|
||||
<div class="line"><span class="lineno"> 142</span> }</div>
|
||||
<div class="line"><span class="lineno"> 143</span> <span class="keywordflow">return</span> memo.back().back();</div>
|
||||
<div class="line"><span class="lineno"> 144</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 119</span> {</div>
|
||||
<div class="line"><span class="lineno"> 120</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<bool></a>> memo(</div>
|
||||
<div class="line"><span class="lineno"> 121</span> str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(<a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.size() + 1, <span class="keyword">false</span>));</div>
|
||||
<div class="line"><span class="lineno"> 122</span> </div>
|
||||
<div class="line"><span class="lineno"> 123</span> <span class="keywordflow">for</span> (uint32_t i = 0; i <= str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>(); ++i) {</div>
|
||||
<div class="line"><span class="lineno"> 124</span> memo[i][0] = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 125</span> }</div>
|
||||
<div class="line"><span class="lineno"> 126</span> <span class="keywordflow">for</span> (uint32_t i = 1; i <= <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.size(); ++i) {</div>
|
||||
<div class="line"><span class="lineno"> 127</span> memo[0][i] = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 128</span> }</div>
|
||||
<div class="line"><span class="lineno"> 129</span> <span class="keywordflow">for</span> (uint32_t i = 1; i <= str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>(); ++i) {</div>
|
||||
<div class="line"><span class="lineno"> 130</span> <span class="keywordflow">for</span> (uint32_t j = 1; j <= <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.size(); ++j) {</div>
|
||||
<div class="line"><span class="lineno"> 131</span> <span class="keywordflow">if</span> (str[i - 1] == result[j - 1]) {</div>
|
||||
<div class="line"><span class="lineno"> 132</span> memo[i][j] = memo[i - 1][j - 1];</div>
|
||||
<div class="line"><span class="lineno"> 133</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (str[i - 1] - 32 == result[j - 1]) {</div>
|
||||
<div class="line"><span class="lineno"> 134</span> memo[i][j] = (memo[i - 1][j - 1] || memo[i - 1][j]);</div>
|
||||
<div class="line"><span class="lineno"> 135</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 136</span> <span class="keywordflow">if</span> (str[i - 1] >= <span class="charliteral">'A'</span> && str[i - 1] <= <span class="charliteral">'Z'</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 137</span> memo[i][j] = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 138</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 139</span> memo[i][j] = memo[i - 1][j];</div>
|
||||
<div class="line"><span class="lineno"> 140</span> }</div>
|
||||
<div class="line"><span class="lineno"> 141</span> }</div>
|
||||
<div class="line"><span class="lineno"> 142</span> }</div>
|
||||
<div class="line"><span class="lineno"> 143</span> }</div>
|
||||
<div class="line"><span class="lineno"> 144</span> <span class="keywordflow">return</span> memo.back().back();</div>
|
||||
<div class="line"><span class="lineno"> 145</span>}</div>
|
||||
<div class="ttc" id="afibonacci__sum_8cpp_html_aadb40ac4c74a7efc0680b83eeee138aa"><div class="ttname"><a href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">math::fibonacci_sum::result</a></div><div class="ttdeci">uint64_t result(uint64_t n)</div><div class="ttdef"><b>Definition</b> fibonacci_sum.cpp:77</div></div>
|
||||
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">std::string::size</a></div><div class="ttdeci">T size(T... args)</div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
|
||||
@@ -288,51 +289,51 @@ Here is the call graph for this function:</div>
|
||||
<li>convert it to capitalized letter and move both to next pointer <code>(i + 1, j + 1)</code></li>
|
||||
<li>Discard the character <code>(str[i])</code> and move to next char <code>(i + 1, j)</code></li>
|
||||
</ol>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 61</span> {</div>
|
||||
<div class="line"><span class="lineno"> 62</span> <span class="keywordtype">bool</span> ans = memo-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/at.html">at</a>(str_idx).at(result_idx);</div>
|
||||
<div class="line"><span class="lineno"> 63</span> <span class="keywordflow">if</span> (str_idx == str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() && result_idx == <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.size()) {</div>
|
||||
<div class="line"><span class="lineno"> 64</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 65</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (str_idx == str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() && result_idx != <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.size()) {</div>
|
||||
<div class="line"><span class="lineno"> 66</span> <span class="comment">// result `t` is not converted, return false</span></div>
|
||||
<div class="line"><span class="lineno"> 67</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 68</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!visited-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/at.html">at</a>(str_idx).at(result_idx)) {<span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 69</span><span class="comment"> /**</span></div>
|
||||
<div class="line"><span class="lineno"> 70</span><span class="comment"> * `(str[i] == result[j])`: if str char at position i is equal to</span></div>
|
||||
<div class="line"><span class="lineno"> 71</span><span class="comment"> * `result` char at position j, then s character is a capitalized one,</span></div>
|
||||
<div class="line"><span class="lineno"> 72</span><span class="comment"> * move on to next character `str[i] - 32 == result[j]`:</span></div>
|
||||
<div class="line"><span class="lineno"> 73</span><span class="comment"> * if `str[i]` character is lowercase of `result[j]` then explore two</span></div>
|
||||
<div class="line"><span class="lineno"> 74</span><span class="comment"> * possibilites:</span></div>
|
||||
<div class="line"><span class="lineno"> 75</span><span class="comment"> * 1. convert it to capitalized letter and move both to next pointer</span></div>
|
||||
<div class="line"><span class="lineno"> 76</span><span class="comment"> * `(i + 1, j + 1)`</span></div>
|
||||
<div class="line"><span class="lineno"> 77</span><span class="comment"> * 2. Discard the character `(str[i])` and move to next char `(i + 1,</span></div>
|
||||
<div class="line"><span class="lineno"> 78</span><span class="comment"> * j)`</span></div>
|
||||
<div class="line"><span class="lineno"> 79</span><span class="comment"> */</span></div>
|
||||
<div class="line"><span class="lineno"> 80</span> <span class="keywordflow">if</span> (str[str_idx] == result[result_idx]) {</div>
|
||||
<div class="line"><span class="lineno"> 81</span> ans = <a class="code hl_function" href="#add60b8858720bf217df22d992d0fefaa">abbreviation_recursion</a>(memo, visited, str, result,</div>
|
||||
<div class="line"><span class="lineno"> 82</span> str_idx + 1, result_idx + 1);</div>
|
||||
<div class="line"><span class="lineno"> 83</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (str[str_idx] - 32 == result[result_idx]) {</div>
|
||||
<div class="line"><span class="lineno"> 84</span> ans = <a class="code hl_function" href="#add60b8858720bf217df22d992d0fefaa">abbreviation_recursion</a>(memo, visited, str, result,</div>
|
||||
<div class="line"><span class="lineno"> 85</span> str_idx + 1, result_idx + 1) ||</div>
|
||||
<div class="line"><span class="lineno"> 86</span> <a class="code hl_function" href="#add60b8858720bf217df22d992d0fefaa">abbreviation_recursion</a>(memo, visited, str, result,</div>
|
||||
<div class="line"><span class="lineno"> 87</span> str_idx + 1, result_idx);</div>
|
||||
<div class="line"><span class="lineno"> 88</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 89</span> <span class="comment">// if `str[i]` is uppercase, then cannot be converted, return</span></div>
|
||||
<div class="line"><span class="lineno"> 90</span> <span class="comment">// `false`</span></div>
|
||||
<div class="line"><span class="lineno"> 91</span> <span class="comment">// else `str[i]` is lowercase, only option is to discard this</span></div>
|
||||
<div class="line"><span class="lineno"> 92</span> <span class="comment">// character</span></div>
|
||||
<div class="line"><span class="lineno"> 93</span> <span class="keywordflow">if</span> (str[str_idx] >= <span class="charliteral">'A'</span> && str[str_idx] <= <span class="charliteral">'Z'</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 94</span> ans = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 95</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 96</span> ans = <a class="code hl_function" href="#add60b8858720bf217df22d992d0fefaa">abbreviation_recursion</a>(memo, visited, str, result,</div>
|
||||
<div class="line"><span class="lineno"> 97</span> str_idx + 1, result_idx);</div>
|
||||
<div class="line"><span class="lineno"> 98</span> }</div>
|
||||
<div class="line"><span class="lineno"> 99</span> }</div>
|
||||
<div class="line"><span class="lineno"> 100</span> }</div>
|
||||
<div class="line"><span class="lineno"> 101</span> (*memo)[str_idx][result_idx] = ans;</div>
|
||||
<div class="line"><span class="lineno"> 102</span> (*visited)[str_idx][result_idx] = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 103</span> <span class="keywordflow">return</span> (*memo)[str_idx][result_idx];</div>
|
||||
<div class="line"><span class="lineno"> 104</span>}</div>
|
||||
<div class="ttc" id="aabbreviation_8cpp_html_add60b8858720bf217df22d992d0fefaa"><div class="ttname"><a href="#add60b8858720bf217df22d992d0fefaa">dynamic_programming::abbreviation::abbreviation_recursion</a></div><div class="ttdeci">bool abbreviation_recursion(std::vector< std::vector< bool > > *memo, std::vector< std::vector< bool > > *visited, const std::string &str, const std::string &result, uint32_t str_idx=0, uint32_t result_idx=0)</div><div class="ttdoc">Recursive Dynamic Programming function.</div><div class="ttdef"><b>Definition</b> abbreviation.cpp:58</div></div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 62</span> {</div>
|
||||
<div class="line"><span class="lineno"> 63</span> <span class="keywordtype">bool</span> ans = memo-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/at.html">at</a>(str_idx).at(result_idx);</div>
|
||||
<div class="line"><span class="lineno"> 64</span> <span class="keywordflow">if</span> (str_idx == str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() && result_idx == <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.size()) {</div>
|
||||
<div class="line"><span class="lineno"> 65</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 66</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (str_idx == str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() && result_idx != <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.size()) {</div>
|
||||
<div class="line"><span class="lineno"> 67</span> <span class="comment">// result `t` is not converted, return false</span></div>
|
||||
<div class="line"><span class="lineno"> 68</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 69</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!visited-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/at.html">at</a>(str_idx).at(result_idx)) {<span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 70</span><span class="comment"> /**</span></div>
|
||||
<div class="line"><span class="lineno"> 71</span><span class="comment"> * `(str[i] == result[j])`: if str char at position i is equal to</span></div>
|
||||
<div class="line"><span class="lineno"> 72</span><span class="comment"> * `result` char at position j, then s character is a capitalized one,</span></div>
|
||||
<div class="line"><span class="lineno"> 73</span><span class="comment"> * move on to next character `str[i] - 32 == result[j]`:</span></div>
|
||||
<div class="line"><span class="lineno"> 74</span><span class="comment"> * if `str[i]` character is lowercase of `result[j]` then explore two</span></div>
|
||||
<div class="line"><span class="lineno"> 75</span><span class="comment"> * possibilites:</span></div>
|
||||
<div class="line"><span class="lineno"> 76</span><span class="comment"> * 1. convert it to capitalized letter and move both to next pointer</span></div>
|
||||
<div class="line"><span class="lineno"> 77</span><span class="comment"> * `(i + 1, j + 1)`</span></div>
|
||||
<div class="line"><span class="lineno"> 78</span><span class="comment"> * 2. Discard the character `(str[i])` and move to next char `(i + 1,</span></div>
|
||||
<div class="line"><span class="lineno"> 79</span><span class="comment"> * j)`</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">if</span> (str[str_idx] == result[result_idx]) {</div>
|
||||
<div class="line"><span class="lineno"> 82</span> ans = <a class="code hl_function" href="#add60b8858720bf217df22d992d0fefaa">abbreviation_recursion</a>(memo, visited, str, result,</div>
|
||||
<div class="line"><span class="lineno"> 83</span> str_idx + 1, result_idx + 1);</div>
|
||||
<div class="line"><span class="lineno"> 84</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (str[str_idx] - 32 == result[result_idx]) {</div>
|
||||
<div class="line"><span class="lineno"> 85</span> ans = <a class="code hl_function" href="#add60b8858720bf217df22d992d0fefaa">abbreviation_recursion</a>(memo, visited, str, result,</div>
|
||||
<div class="line"><span class="lineno"> 86</span> str_idx + 1, result_idx + 1) ||</div>
|
||||
<div class="line"><span class="lineno"> 87</span> <a class="code hl_function" href="#add60b8858720bf217df22d992d0fefaa">abbreviation_recursion</a>(memo, visited, str, result,</div>
|
||||
<div class="line"><span class="lineno"> 88</span> str_idx + 1, result_idx);</div>
|
||||
<div class="line"><span class="lineno"> 89</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 90</span> <span class="comment">// if `str[i]` is uppercase, then cannot be converted, return</span></div>
|
||||
<div class="line"><span class="lineno"> 91</span> <span class="comment">// `false`</span></div>
|
||||
<div class="line"><span class="lineno"> 92</span> <span class="comment">// else `str[i]` is lowercase, only option is to discard this</span></div>
|
||||
<div class="line"><span class="lineno"> 93</span> <span class="comment">// character</span></div>
|
||||
<div class="line"><span class="lineno"> 94</span> <span class="keywordflow">if</span> (str[str_idx] >= <span class="charliteral">'A'</span> && str[str_idx] <= <span class="charliteral">'Z'</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 95</span> ans = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 96</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 97</span> ans = <a class="code hl_function" href="#add60b8858720bf217df22d992d0fefaa">abbreviation_recursion</a>(memo, visited, str, result,</div>
|
||||
<div class="line"><span class="lineno"> 98</span> str_idx + 1, result_idx);</div>
|
||||
<div class="line"><span class="lineno"> 99</span> }</div>
|
||||
<div class="line"><span class="lineno"> 100</span> }</div>
|
||||
<div class="line"><span class="lineno"> 101</span> }</div>
|
||||
<div class="line"><span class="lineno"> 102</span> (*memo)[str_idx][result_idx] = ans;</div>
|
||||
<div class="line"><span class="lineno"> 103</span> (*visited)[str_idx][result_idx] = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 104</span> <span class="keywordflow">return</span> (*memo)[str_idx][result_idx];</div>
|
||||
<div class="line"><span class="lineno"> 105</span>}</div>
|
||||
<div class="ttc" id="aabbreviation_8cpp_html_add60b8858720bf217df22d992d0fefaa"><div class="ttname"><a href="#add60b8858720bf217df22d992d0fefaa">dynamic_programming::abbreviation::abbreviation_recursion</a></div><div class="ttdeci">bool abbreviation_recursion(std::vector< std::vector< bool > > *memo, std::vector< std::vector< bool > > *visited, const std::string &str, const std::string &result, uint32_t str_idx=0, uint32_t result_idx=0)</div><div class="ttdoc">Recursive Dynamic Programming function.</div><div class="ttdef"><b>Definition</b> abbreviation.cpp:59</div></div>
|
||||
<div class="ttc" id="aat_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/at.html">std::vector::at</a></div><div class="ttdeci">T at(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -359,11 +360,11 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Main function. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 191</span> {</div>
|
||||
<div class="line"><span class="lineno"> 192</span> <a class="code hl_function" href="#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><span class="lineno"> 193</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 194</span>}</div>
|
||||
<div class="ttc" id="aabbreviation_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self test-implementations.</div><div class="ttdef"><b>Definition</b> abbreviation.cpp:152</div></div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 192</span> {</div>
|
||||
<div class="line"><span class="lineno"> 193</span> <a class="code hl_function" href="#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><span class="lineno"> 194</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 195</span>}</div>
|
||||
<div class="ttc" id="aabbreviation_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self test-implementations.</div><div class="ttdef"><b>Definition</b> abbreviation.cpp:153</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -397,40 +398,40 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Self test-implementations. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 152</span> {</div>
|
||||
<div class="line"><span class="lineno"> 153</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> s = <span class="stringliteral">"daBcd"</span>, t = <span class="stringliteral">"ABC"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 154</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<bool></a>> memo(s.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1,</div>
|
||||
<div class="line"><span class="lineno"> 155</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(t.size() + 1, <span class="keyword">false</span>)),</div>
|
||||
<div class="line"><span class="lineno"> 156</span> visited(s.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(t.size() + 1, <span class="keyword">false</span>));</div>
|
||||
<div class="line"><span class="lineno"> 157</span> </div>
|
||||
<div class="line"><span class="lineno"> 158</span> assert(dynamic_programming::abbreviation::abbreviation_recursion(</div>
|
||||
<div class="line"><span class="lineno"> 159</span> &memo, &visited, s, t) == <span class="keyword">true</span>);</div>
|
||||
<div class="line"><span class="lineno"> 160</span> assert(dynamic_programming::abbreviation::abbreviation(s, t) == <span class="keyword">true</span>);</div>
|
||||
<div class="line"><span class="lineno"> 161</span> s = <span class="stringliteral">"XXVVnDEFYgYeMXzWINQYHAQKKOZEYgSRCzLZAmUYGUGILjMDET"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 162</span> t = <span class="stringliteral">"XXVVDEFYYMXWINQYHAQKKOZEYSRCLZAUYGUGILMDETQVWU"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 163</span> memo = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<bool></a>>(</div>
|
||||
<div class="line"><span class="lineno"> 164</span> s.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(t.size() + 1, <span class="keyword">false</span>));</div>
|
||||
<div class="line"><span class="lineno"> 165</span> </div>
|
||||
<div class="line"><span class="lineno"> 166</span> visited = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<bool></a>>(</div>
|
||||
<div class="line"><span class="lineno"> 167</span> s.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(t.size() + 1, <span class="keyword">false</span>));</div>
|
||||
<div class="line"><span class="lineno"> 168</span> </div>
|
||||
<div class="line"><span class="lineno"> 169</span> assert(dynamic_programming::abbreviation::abbreviation_recursion(</div>
|
||||
<div class="line"><span class="lineno"> 170</span> &memo, &visited, s, t) == <span class="keyword">false</span>);</div>
|
||||
<div class="line"><span class="lineno"> 171</span> assert(dynamic_programming::abbreviation::abbreviation(s, t) == <span class="keyword">false</span>);</div>
|
||||
<div class="line"><span class="lineno"> 172</span> </div>
|
||||
<div class="line"><span class="lineno"> 173</span> s = <span class="stringliteral">"DRFNLZZVHLPZWIupjwdmqafmgkg"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 174</span> t = <span class="stringliteral">"DRFNLZZVHLPZWI"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 175</span> </div>
|
||||
<div class="line"><span class="lineno"> 176</span> memo = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<bool></a>>(</div>
|
||||
<div class="line"><span class="lineno"> 177</span> s.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(t.size() + 1, <span class="keyword">false</span>));</div>
|
||||
<div class="line"><span class="lineno"> 178</span> </div>
|
||||
<div class="line"><span class="lineno"> 179</span> visited = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<bool></a>>(</div>
|
||||
<div class="line"><span class="lineno"> 180</span> s.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(t.size() + 1, <span class="keyword">false</span>));</div>
|
||||
<div class="line"><span class="lineno"> 181</span> </div>
|
||||
<div class="line"><span class="lineno"> 182</span> assert(dynamic_programming::abbreviation::abbreviation_recursion(</div>
|
||||
<div class="line"><span class="lineno"> 183</span> &memo, &visited, s, t) == <span class="keyword">true</span>);</div>
|
||||
<div class="line"><span class="lineno"> 184</span> assert(dynamic_programming::abbreviation::abbreviation(s, t) == <span class="keyword">true</span>);</div>
|
||||
<div class="line"><span class="lineno"> 185</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 153</span> {</div>
|
||||
<div class="line"><span class="lineno"> 154</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> s = <span class="stringliteral">"daBcd"</span>, t = <span class="stringliteral">"ABC"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 155</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<bool></a>> memo(s.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1,</div>
|
||||
<div class="line"><span class="lineno"> 156</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(t.size() + 1, <span class="keyword">false</span>)),</div>
|
||||
<div class="line"><span class="lineno"> 157</span> visited(s.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(t.size() + 1, <span class="keyword">false</span>));</div>
|
||||
<div class="line"><span class="lineno"> 158</span> </div>
|
||||
<div class="line"><span class="lineno"> 159</span> assert(dynamic_programming::abbreviation::abbreviation_recursion(</div>
|
||||
<div class="line"><span class="lineno"> 160</span> &memo, &visited, s, t) == <span class="keyword">true</span>);</div>
|
||||
<div class="line"><span class="lineno"> 161</span> assert(dynamic_programming::abbreviation::abbreviation(s, t) == <span class="keyword">true</span>);</div>
|
||||
<div class="line"><span class="lineno"> 162</span> s = <span class="stringliteral">"XXVVnDEFYgYeMXzWINQYHAQKKOZEYgSRCzLZAmUYGUGILjMDET"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 163</span> t = <span class="stringliteral">"XXVVDEFYYMXWINQYHAQKKOZEYSRCLZAUYGUGILMDETQVWU"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 164</span> memo = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<bool></a>>(</div>
|
||||
<div class="line"><span class="lineno"> 165</span> s.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(t.size() + 1, <span class="keyword">false</span>));</div>
|
||||
<div class="line"><span class="lineno"> 166</span> </div>
|
||||
<div class="line"><span class="lineno"> 167</span> visited = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<bool></a>>(</div>
|
||||
<div class="line"><span class="lineno"> 168</span> s.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(t.size() + 1, <span class="keyword">false</span>));</div>
|
||||
<div class="line"><span class="lineno"> 169</span> </div>
|
||||
<div class="line"><span class="lineno"> 170</span> assert(dynamic_programming::abbreviation::abbreviation_recursion(</div>
|
||||
<div class="line"><span class="lineno"> 171</span> &memo, &visited, s, t) == <span class="keyword">false</span>);</div>
|
||||
<div class="line"><span class="lineno"> 172</span> assert(dynamic_programming::abbreviation::abbreviation(s, t) == <span class="keyword">false</span>);</div>
|
||||
<div class="line"><span class="lineno"> 173</span> </div>
|
||||
<div class="line"><span class="lineno"> 174</span> s = <span class="stringliteral">"DRFNLZZVHLPZWIupjwdmqafmgkg"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 175</span> t = <span class="stringliteral">"DRFNLZZVHLPZWI"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 176</span> </div>
|
||||
<div class="line"><span class="lineno"> 177</span> memo = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<bool></a>>(</div>
|
||||
<div class="line"><span class="lineno"> 178</span> s.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(t.size() + 1, <span class="keyword">false</span>));</div>
|
||||
<div class="line"><span class="lineno"> 179</span> </div>
|
||||
<div class="line"><span class="lineno"> 180</span> visited = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::vector<bool></a>>(</div>
|
||||
<div class="line"><span class="lineno"> 181</span> s.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<bool></a>(t.size() + 1, <span class="keyword">false</span>));</div>
|
||||
<div class="line"><span class="lineno"> 182</span> </div>
|
||||
<div class="line"><span class="lineno"> 183</span> assert(dynamic_programming::abbreviation::abbreviation_recursion(</div>
|
||||
<div class="line"><span class="lineno"> 184</span> &memo, &visited, s, t) == <span class="keyword">true</span>);</div>
|
||||
<div class="line"><span class="lineno"> 185</span> assert(dynamic_programming::abbreviation::abbreviation(s, t) == <span class="keyword">true</span>);</div>
|
||||
<div class="line"><span class="lineno"> 186</span>}</div>
|
||||
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<map id="dynamic_programming/cut_rod.cpp" name="dynamic_programming/cut_rod.cpp">
|
||||
<area shape="rect" id="Node000001" title="Implementation of cutting a rod problem." alt="" coords="78,5,231,46"/>
|
||||
<area shape="rect" id="Node000001" title="Implementation of cutting a rod problem." alt="" coords="121,5,273,46"/>
|
||||
<area shape="rect" id="Node000002" title=" " alt="" coords="5,94,56,120"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="125,49,64,88,61,83,122,44"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="157,49,71,89,69,85,154,44"/>
|
||||
<area shape="rect" id="Node000003" title=" " alt="" coords="80,94,144,120"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="146,48,128,81,123,79,142,45"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="178,48,138,85,134,81,174,44"/>
|
||||
<area shape="rect" id="Node000004" title=" " alt="" coords="168,94,227,120"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="167,45,186,79,181,81,163,48"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="251,94,322,120"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="189,44,255,83,252,88,186,49"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="200,46,200,78,194,78,194,46"/>
|
||||
<area shape="rect" id="Node000005" title=" " alt="" coords="251,94,311,120"/>
|
||||
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="220,44,259,81,255,85,216,48"/>
|
||||
<area shape="rect" id="Node000006" title=" " alt="" coords="335,94,406,120"/>
|
||||
<area shape="poly" id="edge5_Node000001_Node000006" title=" " alt="" coords="242,44,331,85,329,90,239,49"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1138f689e74b6333ceb41d92cbbb02c6
|
||||
5e80252aa16c394e8186119591f8616d
|
||||
@@ -4,8 +4,8 @@
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/cut_rod.cpp Pages: 1 -->
|
||||
<svg width="246pt" height="94pt"
|
||||
viewBox="0.00 0.00 245.62 93.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="309pt" height="94pt"
|
||||
viewBox="0.00 0.00 308.62 93.75" 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">
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Implementation of cutting a rod problem.">
|
||||
<polygon fill="#999999" stroke="#666666" points="169,-85.75 54.75,-85.75 54.75,-55.25 169,-55.25 169,-85.75"/>
|
||||
<text text-anchor="start" x="62.75" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="111.88" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/cut_rod.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="201,-85.75 86.75,-85.75 86.75,-55.25 201,-55.25 201,-85.75"/>
|
||||
<text text-anchor="start" x="94.75" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="143.88" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/cut_rod.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -42,8 +42,8 @@
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M88.89,-54.95C74.86,-46.07 56.97,-34.74 42.78,-25.76"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="44.81,-22.9 34.49,-20.51 41.07,-28.82 44.81,-22.9"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M112.65,-54.8C92.98,-45.53 67.73,-33.63 48.39,-24.52"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="49.95,-21.39 39.41,-20.3 46.97,-27.73 49.95,-21.39"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -60,8 +60,8 @@
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M103.96,-54.95C99.84,-47.36 94.75,-37.99 90.31,-29.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="93.38,-28.15 85.53,-21.03 87.23,-31.49 93.38,-28.15"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M128.05,-54.95C118.97,-46.59 107.51,-36.05 98.06,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="100.58,-24.92 90.86,-20.73 95.85,-30.07 100.58,-24.92"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -78,8 +78,8 @@
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M119.79,-54.95C123.91,-47.36 129,-37.99 133.44,-29.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="136.52,-31.49 138.22,-21.03 130.37,-28.15 136.52,-31.49"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M143.88,-54.95C143.88,-47.71 143.88,-38.84 143.88,-30.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="147.38,-31.21 143.88,-21.21 140.38,-31.21 147.38,-31.21"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -87,8 +87,8 @@
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="237.62,-19.25 184.12,-19.25 184.12,0 237.62,0 237.62,-19.25"/>
|
||||
<text text-anchor="middle" x="210.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="229.5,-19.25 184.25,-19.25 184.25,0 229.5,0 229.5,-19.25"/>
|
||||
<text text-anchor="middle" x="206.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstdint</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -96,8 +96,26 @@
|
||||
<g id="edge4_Node000001_Node000005" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M136.6,-54.8C151.68,-45.83 170.89,-34.41 185.99,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="187.59,-28.55 194.39,-20.43 184.01,-22.53 187.59,-28.55"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M159.45,-54.95C168.39,-46.59 179.67,-36.05 188.98,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="191.14,-30.12 196.06,-20.73 186.36,-25.01 191.14,-30.12"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="300.62,-19.25 247.12,-19.25 247.12,0 300.62,0 300.62,-19.25"/>
|
||||
<text text-anchor="middle" x="273.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node6 -->
|
||||
<g id="edge5_Node000001_Node000006" class="edge">
|
||||
<title>Node1->Node6</title>
|
||||
<g id="a_edge5_Node000001_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M176.34,-54.8C196.9,-45.48 223.31,-33.52 243.46,-24.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="244.89,-27.59 252.56,-20.28 242.01,-21.22 244.89,-27.59"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 5.4 KiB |
@@ -4,17 +4,17 @@
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: dynamic_programming/cut_rod.cpp Pages: 1 -->
|
||||
<svg width="246pt" height="94pt"
|
||||
viewBox="0.00 0.00 245.62 93.75" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="309pt" height="94pt"
|
||||
viewBox="0.00 0.00 308.62 93.75" 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 89.75)">
|
||||
<title>dynamic_programming/cut_rod.cpp</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Implementation of cutting a rod problem.">
|
||||
<polygon fill="#999999" stroke="#666666" points="169,-85.75 54.75,-85.75 54.75,-55.25 169,-55.25 169,-85.75"/>
|
||||
<text text-anchor="start" x="62.75" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="111.88" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/cut_rod.cpp</text>
|
||||
<polygon fill="#999999" stroke="#666666" points="201,-85.75 86.75,-85.75 86.75,-55.25 201,-55.25 201,-85.75"/>
|
||||
<text text-anchor="start" x="94.75" y="-72.25" font-family="Helvetica,sans-Serif" font-size="10.00">dynamic_programming</text>
|
||||
<text text-anchor="middle" x="143.88" y="-61" font-family="Helvetica,sans-Serif" font-size="10.00">/cut_rod.cpp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -31,8 +31,8 @@
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M88.89,-54.95C74.86,-46.07 56.97,-34.74 42.78,-25.76"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="44.81,-22.9 34.49,-20.51 41.07,-28.82 44.81,-22.9"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M112.65,-54.8C92.98,-45.53 67.73,-33.63 48.39,-24.52"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="49.95,-21.39 39.41,-20.3 46.97,-27.73 49.95,-21.39"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -49,8 +49,8 @@
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M103.96,-54.95C99.84,-47.36 94.75,-37.99 90.31,-29.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="93.38,-28.15 85.53,-21.03 87.23,-31.49 93.38,-28.15"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M128.05,-54.95C118.97,-46.59 107.51,-36.05 98.06,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="100.58,-24.92 90.86,-20.73 95.85,-30.07 100.58,-24.92"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -67,8 +67,8 @@
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M119.79,-54.95C123.91,-47.36 129,-37.99 133.44,-29.82"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="136.52,-31.49 138.22,-21.03 130.37,-28.15 136.52,-31.49"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M143.88,-54.95C143.88,-47.71 143.88,-38.84 143.88,-30.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="147.38,-31.21 143.88,-21.21 140.38,-31.21 147.38,-31.21"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -76,8 +76,8 @@
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="237.62,-19.25 184.12,-19.25 184.12,0 237.62,0 237.62,-19.25"/>
|
||||
<text text-anchor="middle" x="210.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="229.5,-19.25 184.25,-19.25 184.25,0 229.5,0 229.5,-19.25"/>
|
||||
<text text-anchor="middle" x="206.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">cstdint</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -85,8 +85,26 @@
|
||||
<g id="edge4_Node000001_Node000005" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M136.6,-54.8C151.68,-45.83 170.89,-34.41 185.99,-25.42"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="187.59,-28.55 194.39,-20.43 184.01,-22.53 187.59,-28.55"/>
|
||||
<path fill="none" stroke="#63b8ff" d="M159.45,-54.95C168.39,-46.59 179.67,-36.05 188.98,-27.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="191.14,-30.12 196.06,-20.73 186.36,-25.01 191.14,-30.12"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a xlink:title=" ">
|
||||
<polygon fill="#e0e0e0" stroke="#999999" points="300.62,-19.25 247.12,-19.25 247.12,0 300.62,0 300.62,-19.25"/>
|
||||
<text text-anchor="middle" x="273.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">iostream</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node6 -->
|
||||
<g id="edge5_Node000001_Node000006" class="edge">
|
||||
<title>Node1->Node6</title>
|
||||
<g id="a_edge5_Node000001_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M176.34,-54.8C196.9,-45.48 223.31,-33.52 243.46,-24.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="244.89,-27.59 252.56,-20.28 242.01,-21.22 244.89,-27.59"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.7 KiB |
@@ -117,13 +117,14 @@ $(function(){initNavTree('d7/def/trie__multiple__search_8cpp.html','../../'); in
|
||||
<div class="textblock"><code>#include <algorithm></code><br />
|
||||
<code>#include <cassert></code><br />
|
||||
<code>#include <cctype></code><br />
|
||||
<code>#include <cstdint></code><br />
|
||||
<code>#include <cstring></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <queue></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for trie_multiple_search.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d4/df4/trie__multiple__search_8cpp__incl.svg" width="518" height="126"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d4/df4/trie__multiple__search_8cpp__incl.svg" width="602" 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">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
||||
@@ -182,11 +183,11 @@ Functions</h2></td></tr>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 463</span> {</div>
|
||||
<div class="line"><span class="lineno"> 464</span> <a class="code hl_function" href="#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><span class="lineno"> 465</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 466</span>}</div>
|
||||
<div class="ttc" id="atrie__multiple__search_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Function to test a simple search before and after deleting an entry. And to test out the multiple var...</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:422</div></div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 466</span> {</div>
|
||||
<div class="line"><span class="lineno"> 467</span> <a class="code hl_function" href="#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><span class="lineno"> 468</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 469</span>}</div>
|
||||
<div class="ttc" id="atrie__multiple__search_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Function to test a simple search before and after deleting an entry. And to test out the multiple var...</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:425</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -219,42 +220,42 @@ Here is the call graph for this function:</div>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Function to test a simple search before and after deleting an entry. And to test out the multiple variants of search. </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 422</span> {</div>
|
||||
<div class="line"><span class="lineno"> 423</span> <span class="keyword">auto</span> root = <span class="keyword">new</span> <a class="code hl_class" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html">operations_on_datastructures::trie_operations::Tnode</a>();</div>
|
||||
<div class="line"><span class="lineno"> 424</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> inputs = {</div>
|
||||
<div class="line"><span class="lineno"> 425</span> <span class="stringliteral">"abcde"</span>, <span class="stringliteral">"sss"</span>, <span class="stringliteral">"ssss"</span>, <span class="stringliteral">"ssst"</span>, <span class="stringliteral">"sssu"</span>, <span class="stringliteral">"sssv"</span>,</div>
|
||||
<div class="line"><span class="lineno"> 426</span> <span class="stringliteral">"sst"</span>, <span class="stringliteral">"ssts"</span>, <span class="stringliteral">"sstt"</span>, <span class="stringliteral">"sstu"</span>, <span class="stringliteral">"tutu"</span>, <span class="stringliteral">"tutuv"</span>,</div>
|
||||
<div class="line"><span class="lineno"> 427</span> <span class="stringliteral">"tutuu"</span>, <span class="stringliteral">"tutuvs"</span>, <span class="stringliteral">"tutus"</span>, <span class="stringliteral">"tvst"</span>, <span class="stringliteral">"tvsu"</span>, <span class="stringliteral">"vvvv"</span>};</div>
|
||||
<div class="line"><span class="lineno"> 428</span> </div>
|
||||
<div class="line"><span class="lineno"> 429</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : inputs) {</div>
|
||||
<div class="line"><span class="lineno"> 430</span> root->Insert(i);</div>
|
||||
<div class="line"><span class="lineno"> 431</span> }</div>
|
||||
<div class="line"><span class="lineno"> 432</span> <span class="comment">// Search an existing entry</span></div>
|
||||
<div class="line"><span class="lineno"> 433</span> assert(root->SearchPresence(<span class="stringliteral">"vvvv"</span>));</div>
|
||||
<div class="line"><span class="lineno"> 434</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << root->SearchPresence(<span class="stringliteral">"vvvv"</span>) << <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"> 435</span> <span class="comment">// Delete it</span></div>
|
||||
<div class="line"><span class="lineno"> 436</span> root->Delete(<span class="stringliteral">"vvvv"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 437</span> <span class="comment">// Search for the entry again</span></div>
|
||||
<div class="line"><span class="lineno"> 438</span> assert(!root->SearchPresence(<span class="stringliteral">"vvvv"</span>));</div>
|
||||
<div class="line"><span class="lineno"> 439</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << root->SearchPresence(<span class="stringliteral">"vvvv"</span>) << <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"> 440</span> </div>
|
||||
<div class="line"><span class="lineno"> 441</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << root->SearchPresence(<span class="stringliteral">"tutu"</span>) << <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"> 442</span> root->SearchSuggestions(<span class="stringliteral">"tutu"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 443</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << root->SearchPresence(<span class="stringliteral">"tutu"</span>) << <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"> 444</span> </div>
|
||||
<div class="line"><span class="lineno"> 445</span> root->SearchSuggestions(<span class="stringliteral">"tutuv"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 446</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << root->SearchPresence(<span class="stringliteral">"tutuv"</span>) << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 425</span> {</div>
|
||||
<div class="line"><span class="lineno"> 426</span> <span class="keyword">auto</span> root = <span class="keyword">new</span> <a class="code hl_class" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html">operations_on_datastructures::trie_operations::Tnode</a>();</div>
|
||||
<div class="line"><span class="lineno"> 427</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> inputs = {</div>
|
||||
<div class="line"><span class="lineno"> 428</span> <span class="stringliteral">"abcde"</span>, <span class="stringliteral">"sss"</span>, <span class="stringliteral">"ssss"</span>, <span class="stringliteral">"ssst"</span>, <span class="stringliteral">"sssu"</span>, <span class="stringliteral">"sssv"</span>,</div>
|
||||
<div class="line"><span class="lineno"> 429</span> <span class="stringliteral">"sst"</span>, <span class="stringliteral">"ssts"</span>, <span class="stringliteral">"sstt"</span>, <span class="stringliteral">"sstu"</span>, <span class="stringliteral">"tutu"</span>, <span class="stringliteral">"tutuv"</span>,</div>
|
||||
<div class="line"><span class="lineno"> 430</span> <span class="stringliteral">"tutuu"</span>, <span class="stringliteral">"tutuvs"</span>, <span class="stringliteral">"tutus"</span>, <span class="stringliteral">"tvst"</span>, <span class="stringliteral">"tvsu"</span>, <span class="stringliteral">"vvvv"</span>};</div>
|
||||
<div class="line"><span class="lineno"> 431</span> </div>
|
||||
<div class="line"><span class="lineno"> 432</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : inputs) {</div>
|
||||
<div class="line"><span class="lineno"> 433</span> root->Insert(i);</div>
|
||||
<div class="line"><span class="lineno"> 434</span> }</div>
|
||||
<div class="line"><span class="lineno"> 435</span> <span class="comment">// Search an existing entry</span></div>
|
||||
<div class="line"><span class="lineno"> 436</span> assert(root->SearchPresence(<span class="stringliteral">"vvvv"</span>));</div>
|
||||
<div class="line"><span class="lineno"> 437</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << root->SearchPresence(<span class="stringliteral">"vvvv"</span>) << <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"> 438</span> <span class="comment">// Delete it</span></div>
|
||||
<div class="line"><span class="lineno"> 439</span> root->Delete(<span class="stringliteral">"vvvv"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 440</span> <span class="comment">// Search for the entry again</span></div>
|
||||
<div class="line"><span class="lineno"> 441</span> assert(!root->SearchPresence(<span class="stringliteral">"vvvv"</span>));</div>
|
||||
<div class="line"><span class="lineno"> 442</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << root->SearchPresence(<span class="stringliteral">"vvvv"</span>) << <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"> 443</span> </div>
|
||||
<div class="line"><span class="lineno"> 444</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << root->SearchPresence(<span class="stringliteral">"tutu"</span>) << <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"> 445</span> root->SearchSuggestions(<span class="stringliteral">"tutu"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 446</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << root->SearchPresence(<span class="stringliteral">"tutu"</span>) << <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"> 447</span> </div>
|
||||
<div class="line"><span class="lineno"> 448</span> root->SearchSuggestions(<span class="stringliteral">"tutuvs"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 449</span> </div>
|
||||
<div class="line"><span class="lineno"> 450</span> root->SearchFreqSuggestions(</div>
|
||||
<div class="line"><span class="lineno"> 451</span> <span class="stringliteral">"tu"</span>); <span class="comment">// The top 3 frequent entries with prefix tu are tutu, tutuv &</span></div>
|
||||
<div class="line"><span class="lineno"> 452</span> <span class="comment">// tutuvs respectively</span></div>
|
||||
<div class="line"><span class="lineno"> 453</span> root->SearchSuggestions(</div>
|
||||
<div class="line"><span class="lineno"> 454</span> <span class="stringliteral">""</span>); <span class="comment">// Empty search to list all the entries in the trie</span></div>
|
||||
<div class="line"><span class="lineno"> 455</span>}</div>
|
||||
<div class="line"><span class="lineno"> 448</span> root->SearchSuggestions(<span class="stringliteral">"tutuv"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 449</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << root->SearchPresence(<span class="stringliteral">"tutuv"</span>) << <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"> 450</span> </div>
|
||||
<div class="line"><span class="lineno"> 451</span> root->SearchSuggestions(<span class="stringliteral">"tutuvs"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 452</span> </div>
|
||||
<div class="line"><span class="lineno"> 453</span> root->SearchFreqSuggestions(</div>
|
||||
<div class="line"><span class="lineno"> 454</span> <span class="stringliteral">"tu"</span>); <span class="comment">// The top 3 frequent entries with prefix tu are tutu, tutuv &</span></div>
|
||||
<div class="line"><span class="lineno"> 455</span> <span class="comment">// tutuvs respectively</span></div>
|
||||
<div class="line"><span class="lineno"> 456</span> root->SearchSuggestions(</div>
|
||||
<div class="line"><span class="lineno"> 457</span> <span class="stringliteral">""</span>); <span class="comment">// Empty search to list all the entries in the trie</span></div>
|
||||
<div class="line"><span class="lineno"> 458</span>}</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="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html"><div class="ttname"><a href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html">operations_on_datastructures::trie_operations::Tnode</a></div><div class="ttdoc">Class defining the structure of trie node and containing the methods to perform operations on them.</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:34</div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html"><div class="ttname"><a href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html">operations_on_datastructures::trie_operations::Tnode</a></div><div class="ttdoc">Class defining the structure of trie node and containing the methods to perform operations on them.</div><div class="ttdef"><b>Definition</b> trie_multiple_search.cpp:37</div></div>
|
||||
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
|
||||