Documentation for 0d766b0f8a

This commit is contained in:
realstealthninja
2024-11-04 12:32:06 +00:00
parent fb1d00ead7
commit 4fb6e622e9
280 changed files with 2978 additions and 4001 deletions

View File

@@ -1,9 +0,0 @@
<map id="dynamic_programming/kadane2.cpp" name="dynamic_programming/kadane2.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>

View File

@@ -1 +0,0 @@
cf5765a4a64f6bc9c723667fe5ea80d3

View File

@@ -1,102 +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: dynamic_programming/kadane2.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/kadane2.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">/kadane2.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&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node4 -->
<g id="edge3_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;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>

Before

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -1,76 +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: dynamic_programming/kadane2.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/kadane2.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">/kadane2.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&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node4 -->
<g id="edge3_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;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>

Before

Width:  |  Height:  |  Size: 3.2 KiB

292
d8/d68/dijkstra_8cpp.html Normal file
View File

@@ -0,0 +1,292 @@
<!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">&#160;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&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('d8/d68/dijkstra_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> &#124;
<a href="#func-members">Functions</a> &#124;
<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 &lt;cassert&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;limits&gt;</code><br />
<code>#include &lt;memory&gt;</code><br />
<code>#include &lt;queue&gt;</code><br />
<code>#include &lt;utility&gt;</code><br />
<code>#include &lt;vector&gt;</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="../../d9/d5f/dijkstra_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 &#160;</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">&#160;</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">&#160;</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&#160;</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>&lt; <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair</a>&lt; int, int &gt; &gt; &gt; *adj, int u, int v, int w)</td></tr>
<tr class="memdesc:a0e30e0dca68cb6e4f671440819b35b6a"><td class="mdescLeft">&#160;</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">&#160;</td></tr>
<tr class="memitem:adc68cbc8ba09eb1142265935c0d45b84" id="r_adc68cbc8ba09eb1142265935c0d45b84"><td class="memItemLeft" align="right" valign="top">int&#160;</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>&lt; <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair</a>&lt; int, int &gt; &gt; &gt; *adj, int s, int t)</td></tr>
<tr class="memdesc:adc68cbc8ba09eb1142265935c0d45b84"><td class="mdescLeft">&#160;</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">&#160;</td></tr>
<tr class="memitem:a88ec9ad42717780d6caaff9d3d6977f9" id="r_a88ec9ad42717780d6caaff9d3d6977f9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a88ec9ad42717780d6caaff9d3d6977f9">tests</a> ()</td></tr>
<tr class="separator:a88ec9ad42717780d6caaff9d3d6977f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4" id="r_ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</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&#160;</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>&lt;int64_t&gt;::max()</td></tr>
<tr class="separator:a330a2b0a904f01802ada1f8f3b28e76c"><td class="memSeparator" colspan="2">&#160;</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">&#9670;&#160;</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> &lt;&lt; <span class="stringliteral">&quot;Enter the number of vertices : &quot;</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> &gt;&gt; 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> &lt;&lt; <span class="stringliteral">&quot;Enter the number of edges : &quot;</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> &gt;&gt; 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&lt;std::vector&lt;std::pair&lt;int, int&gt;</a>&gt;&gt; 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>&lt;<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair&lt;int, int&gt;</a>&gt;());</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> &gt;&gt; u &gt;&gt; v &gt;&gt; w;</div>
<div class="line"><span class="lineno"> 168</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;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> &gt;&gt; s &gt;&gt; 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>(&amp;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> &lt;&lt; <span class="stringliteral">&quot;Target not reachable from source&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 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> &lt;&lt; <span class="stringliteral">&quot;Shortest Path Distance : &quot;</span> &lt;&lt; dist &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 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="adijkstra_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="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="anamespacegraph_html_a9125ceb66bfbec3093bba64c2c1e99e2"><div class="ttname"><a href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a></div><div class="ttdeci">void addEdge(std::vector&lt; std::vector&lt; int &gt; &gt; *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&lt; std::vector&lt; std::pair&lt; int, int &gt; &gt; &gt; *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="../../d8/d68/dijkstra_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">&#9670;&#160;</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> &lt;&lt; <span class="stringliteral">&quot;Initiatinig Predefined Tests...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 115</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Initiating Test 1...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 116</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;std::vector&lt;std::pair&lt;int, int&gt;</a>&gt;&gt; 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>&lt;<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair&lt;int, int&gt;</a>&gt;());</div>
<div class="line"><span class="lineno"> 118</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;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>(&amp;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>(&amp;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>(&amp;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>(&amp;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> &lt;&lt; <span class="stringliteral">&quot;Test 1 Passed...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 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> &lt;&lt; <span class="stringliteral">&quot;Initiating Test 2...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 129</span> assert(<a class="code hl_function" href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84">graph::dijkstra</a>(&amp;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> &lt;&lt; <span class="stringliteral">&quot;Test 2 Passed...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 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&lt;std::vector&lt;std::pair&lt;int, int&gt;</a>&gt;&gt; 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>&lt;<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair.html">std::pair&lt;int, int&gt;</a>&gt;());</div>
<div class="line"><span class="lineno"> 134</span> <a class="code hl_function" href="../../df/dce/namespacegraph.html#a9125ceb66bfbec3093bba64c2c1e99e2">graph::addEdge</a>(&amp;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>(&amp;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>(&amp;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>(&amp;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>(&amp;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>(&amp;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>(&amp;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>(&amp;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>(&amp;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> &lt;&lt; <span class="stringliteral">&quot;Initiating Test 3...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 146</span> assert(<a class="code hl_function" href="../../df/dce/namespacegraph.html#adc68cbc8ba09eb1142265935c0d45b84">graph::dijkstra</a>(&amp;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> &lt;&lt; <span class="stringliteral">&quot;Test 3 Passed...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 148</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;All Test Passed...&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 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="../../d8/d68/dijkstra_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="../../d8/d68/dijkstra_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>

7
d8/d68/dijkstra_8cpp.js Normal file
View File

@@ -0,0 +1,7 @@
var dijkstra_8cpp =
[
[ "addEdge", "d8/d68/dijkstra_8cpp.html#a0e30e0dca68cb6e4f671440819b35b6a", null ],
[ "dijkstra", "d8/d68/dijkstra_8cpp.html#adc68cbc8ba09eb1142265935c0d45b84", null ],
[ "main", "d8/d68/dijkstra_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
[ "tests", "d8/d68/dijkstra_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9", null ]
];

View File

@@ -0,0 +1,21 @@
<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>

View File

@@ -0,0 +1 @@
2221263dd126629f7dc03bda250a317e

View File

@@ -0,0 +1,211 @@
<?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&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M38.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&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M38.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&#45;&gt;Node10 -->
<g id="edge9_Node000001_Node000010" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node5 -->
<g id="edge4_Node000003_Node000005" class="edge">
<title>Node3&#45;&gt;Node5</title>
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node6 -->
<g id="edge5_Node000003_Node000006" class="edge">
<title>Node3&#45;&gt;Node6</title>
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node7 -->
<g id="edge6_Node000003_Node000007" class="edge">
<title>Node3&#45;&gt;Node7</title>
<g id="a_edge6_Node000003_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node8 -->
<g id="edge7_Node000003_Node000008" class="edge">
<title>Node3&#45;&gt;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&#45;&gt;Node9 -->
<g id="edge8_Node000003_Node000009" class="edge">
<title>Node3&#45;&gt;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>

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@@ -0,0 +1,185 @@
<?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&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M38.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&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M38.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&#45;&gt;Node10 -->
<g id="edge9_Node000001_Node000010" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node5 -->
<g id="edge4_Node000003_Node000005" class="edge">
<title>Node3&#45;&gt;Node5</title>
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node6 -->
<g id="edge5_Node000003_Node000006" class="edge">
<title>Node3&#45;&gt;Node6</title>
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node7 -->
<g id="edge6_Node000003_Node000007" class="edge">
<title>Node3&#45;&gt;Node7</title>
<g id="a_edge6_Node000003_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node8 -->
<g id="edge7_Node000003_Node000008" class="edge">
<title>Node3&#45;&gt;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&#45;&gt;Node9 -->
<g id="edge8_Node000003_Node000009" class="edge">
<title>Node3&#45;&gt;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>

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

@@ -0,0 +1,26 @@
<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="$d8/d68/dijkstra_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>

View File

@@ -0,0 +1 @@
c5330016e17cc7e92c44fc51975fad8f

View File

@@ -0,0 +1,256 @@
<?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&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.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&#45;&gt;Node10 -->
<g id="edge9_Node000001_Node000010" class="edge">
<title>Node1&#45;&gt;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="../../d8/d68/dijkstra_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&#45;&gt;Node11 -->
<g id="edge10_Node000001_Node000011" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node5 -->
<g id="edge4_Node000003_Node000005" class="edge">
<title>Node3&#45;&gt;Node5</title>
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node6 -->
<g id="edge5_Node000003_Node000006" class="edge">
<title>Node3&#45;&gt;Node6</title>
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node7 -->
<g id="edge6_Node000003_Node000007" class="edge">
<title>Node3&#45;&gt;Node7</title>
<g id="a_edge6_Node000003_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node8 -->
<g id="edge7_Node000003_Node000008" class="edge">
<title>Node3&#45;&gt;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&#45;&gt;Node9 -->
<g id="edge8_Node000003_Node000009" class="edge">
<title>Node3&#45;&gt;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&#45;&gt;Node2 -->
<g id="edge11_Node000011_Node000002" class="edge">
<title>Node11&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge12_Node000011_Node000003" class="edge">
<title>Node11&#45;&gt;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&#45;&gt;Node10 -->
<g id="edge13_Node000011_Node000010" class="edge">
<title>Node11&#45;&gt;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>

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,230 @@
<?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&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.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&#45;&gt;Node10 -->
<g id="edge9_Node000001_Node000010" class="edge">
<title>Node1&#45;&gt;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="../../d8/d68/dijkstra_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&#45;&gt;Node11 -->
<g id="edge10_Node000001_Node000011" class="edge">
<title>Node1&#45;&gt;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&#45;&gt;Node4 -->
<g id="edge3_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node5 -->
<g id="edge4_Node000003_Node000005" class="edge">
<title>Node3&#45;&gt;Node5</title>
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node6 -->
<g id="edge5_Node000003_Node000006" class="edge">
<title>Node3&#45;&gt;Node6</title>
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node7 -->
<g id="edge6_Node000003_Node000007" class="edge">
<title>Node3&#45;&gt;Node7</title>
<g id="a_edge6_Node000003_Node000007"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="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&#45;&gt;Node8 -->
<g id="edge7_Node000003_Node000008" class="edge">
<title>Node3&#45;&gt;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&#45;&gt;Node9 -->
<g id="edge8_Node000003_Node000009" class="edge">
<title>Node3&#45;&gt;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&#45;&gt;Node2 -->
<g id="edge11_Node000011_Node000002" class="edge">
<title>Node11&#45;&gt;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&#45;&gt;Node3 -->
<g id="edge12_Node000011_Node000003" class="edge">
<title>Node11&#45;&gt;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&#45;&gt;Node10 -->
<g id="edge13_Node000011_Node000010" class="edge">
<title>Node11&#45;&gt;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>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,331 @@
<!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++: data_structures/sparse_table.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">&#160;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&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('d8/dab/sparse__table_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="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">sparse_table.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Implementation of <a href="https://brilliant.org/wiki/sparse-table/" target="_blank">Sparse Table</a> for <code>min()</code> function.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;array&gt;</code><br />
<code>#include &lt;cassert&gt;</code><br />
<code>#include &lt;cstdint&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for sparse_table.cpp:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../de/d24/sparse__table_8cpp__incl.svg" width="330" 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>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html">data_structures::sparse_table::Sparse_table</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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 &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d3c/namespacedata__structures.html">data_structures</a></td></tr>
<tr class="memdesc:d5/d3c/namespacedata__structures"><td class="mdescLeft">&#160;</td><td class="mdescRight">for IO operations <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d55/namespacesparse__table.html">sparse_table</a></td></tr>
<tr class="memdesc:d9/d55/namespacesparse__table"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions for Implementation of <a href="https://brilliant.org/wiki/sparse-table/" target="_blank">Sparse Table</a> <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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:aa8dca7b867074164d5f45b0f3851269d" id="r_aa8dca7b867074164d5f45b0f3851269d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa8dca7b867074164d5f45b0f3851269d">test</a> ()</td></tr>
<tr class="memdesc:aa8dca7b867074164d5f45b0f3851269d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Self-test implementations. <br /></td></tr>
<tr class="separator:aa8dca7b867074164d5f45b0f3851269d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ddf1224851353fc92bfbff6f499fa97" id="r_a0ddf1224851353fc92bfbff6f499fa97"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr>
<tr class="memdesc:a0ddf1224851353fc92bfbff6f499fa97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function. <br /></td></tr>
<tr class="separator:a0ddf1224851353fc92bfbff6f499fa97"><td class="memSeparator" colspan="2">&#160;</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:a10f3ffb3f6f7e1b83d556b9c8de89a5d" id="r_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><td class="memItemLeft" align="right" valign="top">constexpr uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a> = 12345</td></tr>
<tr class="memdesc:a10f3ffb3f6f7e1b83d556b9c8de89a5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">A struct to represent sparse table for <code>min()</code> as their invariant function, for the given array <code>A</code>. The answer to queries are stored in the array ST. <br /></td></tr>
<tr class="separator:a10f3ffb3f6f7e1b83d556b9c8de89a5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7db62f21983565c64d5d42d2a49888e" id="r_af7db62f21983565c64d5d42d2a49888e"><td class="memItemLeft" align="right" valign="top"><a id="af7db62f21983565c64d5d42d2a49888e" name="af7db62f21983565c64d5d42d2a49888e"></a>
constexpr uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>data_structures::sparse_table::M</b> = 14</td></tr>
<tr class="memdesc:af7db62f21983565c64d5d42d2a49888e"><td class="mdescLeft">&#160;</td><td class="mdescRight">ceil(log2(N)). <br /></td></tr>
<tr class="separator:af7db62f21983565c64d5d42d2a49888e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Implementation of <a href="https://brilliant.org/wiki/sparse-table/" target="_blank">Sparse Table</a> for <code>min()</code> function. </p>
<p>Implementation of <a href="https://en.wikipedia.org/wiki/Range_minimum_query" target="_blank">Sparse Table</a> data structure.</p>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/manncodes" target="_blank">Mann Patel</a></dd></dl>
<p>Sparse Table is a data structure, that allows answering range queries. It can answer most range queries in O(logn), but its true power is answering range minimum queries (or equivalent range maximum queries). For those queries it can compute the answer in O(1) time. The only drawback of this data structure is, that it can only be used on immutable arrays. This means, that the array cannot be changed between two queries.</p>
<p>If any element in the array changes, the complete data structure has to be recomputed.</p>
<dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000004">Todo</a></b></dt><dd>make stress tests.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>This sparse table is made for <code>min(a1,a2,...an)</code> duplicate invariant function. This implementation can be changed to other functions like <code><a class="el" href="../../d4/da0/gcd__iterative__euclidean_8cpp.html#ae48807fa2b7000afae599e67f327545e">gcd()</a></code>, <code><a class="el" href="../../d4/d21/least__common__multiple_8cpp.html#aa8d0e241db517813725e721a152e3a25">lcm()</a></code>, and <code>max()</code> by changing a few lines of code.</dd></dl>
<p>Sparse Table is a data structure, that allows answering range queries. It can answer most range queries in O(logn), but its true power is answering range minimum queries or equivalent range maximum queries). For those queries it can compute the answer in O(1) time.</p>
<ul>
<li>Running Time Complexity <br />
</li>
<li>Build : O(NlogN) <br />
</li>
<li>Range Query : O(1) <br />
</li>
</ul>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a0ddf1224851353fc92bfbff6f499fa97" name="a0ddf1224851353fc92bfbff6f499fa97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ddf1224851353fc92bfbff6f499fa97">&#9670;&#160;</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">int</td> <td class="paramname"><span class="paramname"><em>argc</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char *</td> <td class="paramname"><span class="paramname"><em>argv</em></span>[]&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Main function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">argc</td><td>commandline argument count (ignored) </td></tr>
<tr><td class="paramname">argv</td><td>commandline array of arguments (ignored) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 162</span> {</div>
<div class="line"><span class="lineno"> 163</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"> 164</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 165</span>}</div>
<div class="ttc" id="asparse__table_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> sparse_table.cpp:129</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="../../d8/dab/sparse__table_8cpp_a0ddf1224851353fc92bfbff6f499fa97_cgraph.svg" width="278" height="184"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8dca7b867074164d5f45b0f3851269d">&#9670;&#160;</a></span>test()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void test </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Self-test implementations. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<p>&lt; array on which RMQ will be performed.</p>
<p>&lt; size of self test's array</p>
<p>&lt; declaring sparse tree</p>
<p>&lt; copying array to the struct</p>
<p>&lt; passing the array's size to the struct</p>
<p>&lt; precomputing sparse tree</p>
<p>&lt; as 1 is smallest from 1..9</p>
<p>&lt; as 2 is smallest from 2..6</p>
<p>&lt; as 3 is smallest from 3..8</p>
<div class="fragment"><div class="line"><span class="lineno"> 129</span> {</div>
<div class="line"><span class="lineno"> 130</span> <span class="comment">/* We take an array as an input on which we need to perform the ranged</span></div>
<div class="line"><span class="lineno"> 131</span><span class="comment"> * minimum queries[RMQ](https://en.wikipedia.org/wiki/Range_minimum_query).</span></div>
<div class="line"><span class="lineno"> 132</span><span class="comment"> */</span></div>
<div class="line"><span class="lineno"> 133</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;int64_t, 10&gt;</a> testcase = {</div>
<div class="line"><span class="lineno"> 134</span> 1, 2, 3, 4, 5,</div>
<div class="line"><span class="lineno"> 135</span> 6, 7, 8, 9, 10}; <span class="comment">///&lt; array on which RMQ will be performed.</span></div>
<div class="line"><span class="lineno"> 136</span> <span class="keywordtype">size_t</span> testcase_size =</div>
<div class="line"><span class="lineno"> 137</span> <span class="keyword">sizeof</span>(testcase) / <span class="keyword">sizeof</span>(testcase[0]); <span class="comment">///&lt; size of self test&#39;s array</span></div>
<div class="line"><span class="lineno"> 138</span> </div>
<div class="line"><span class="lineno"> 139</span> <a class="code hl_struct" href="../../da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html">data_structures::sparse_table::Sparse_table</a></div>
<div class="line"><span class="lineno"> 140</span> st{}; <span class="comment">///&lt; declaring sparse tree</span></div>
<div class="line"><span class="lineno"> 141</span> </div>
<div class="line"><span class="lineno"> 142</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/copy.html">std::copy</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(testcase), <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a>(testcase),</div>
<div class="line"><span class="lineno"> 143</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a>(st.A)); <span class="comment">///&lt; copying array to the struct</span></div>
<div class="line"><span class="lineno"> 144</span> st.n = testcase_size; <span class="comment">///&lt; passing the array&#39;s size to the struct</span></div>
<div class="line"><span class="lineno"> 145</span> </div>
<div class="line"><span class="lineno"> 146</span> st.buildST(); <span class="comment">///&lt; precomputing sparse tree</span></div>
<div class="line"><span class="lineno"> 147</span> </div>
<div class="line"><span class="lineno"> 148</span> <span class="comment">// pass queries of the form: [l,r]</span></div>
<div class="line"><span class="lineno"> 149</span> assert(st.query(1, 9) == 1); <span class="comment">///&lt; as 1 is smallest from 1..9</span></div>
<div class="line"><span class="lineno"> 150</span> assert(st.query(2, 6) == 2); <span class="comment">///&lt; as 2 is smallest from 2..6</span></div>
<div class="line"><span class="lineno"> 151</span> assert(st.query(3, 8) == 3); <span class="comment">///&lt; as 3 is smallest from 3..8</span></div>
<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/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Self-test implementations passed!&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 154</span>}</div>
<div class="ttc" id="aarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array.html">std::array</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="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/iterator/begin.html">std::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
<div class="ttc" id="acopy_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/copy.html">std::copy</a></div><div class="ttdeci">T copy(T... args)</div></div>
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/iterator/end.html">std::end</a></div><div class="ttdeci">T end(T... args)</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="astructdata__structures_1_1sparse__table_1_1_sparse__table_html"><div class="ttname"><a href="../../da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html">data_structures::sparse_table::Sparse_table</a></div><div class="ttdef"><b>Definition</b> sparse_table.cpp:51</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="../../d8/dab/sparse__table_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="180" height="184"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a10f3ffb3f6f7e1b83d556b9c8de89a5d" name="a10f3ffb3f6f7e1b83d556b9c8de89a5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a10f3ffb3f6f7e1b83d556b9c8de89a5d">&#9670;&#160;</a></span>N</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint32_t data_structures::sparse_table::N = 12345</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">constexpr</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>A struct to represent sparse table for <code>min()</code> as their invariant function, for the given array <code>A</code>. The answer to queries are stored in the array ST. </p>
<p>the maximum size of the array. </p>
</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_2e746e9d06bf2d8ff842208bcc6ebcfc.html">data_structures</a></li><li class="navelem"><a class="el" href="../../d8/dab/sparse__table_8cpp.html">sparse_table.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,8 @@
var sparse__table_8cpp =
[
[ "data_structures::sparse_table::Sparse_table", "da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table.html", "da/d37/structdata__structures_1_1sparse__table_1_1_sparse__table" ],
[ "main", "d8/dab/sparse__table_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97", null ],
[ "test", "d8/dab/sparse__table_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ],
[ "M", "d8/dab/sparse__table_8cpp.html#af7db62f21983565c64d5d42d2a49888e", null ],
[ "N", "d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d", null ]
];

View File

@@ -0,0 +1,13 @@
<map id="main" name="main">
<area shape="rect" id="Node000001" title="Main function." alt="" coords="5,80,55,106"/>
<area shape="rect" id="Node000002" href="$d8/dab/sparse__table_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Self&#45;test implementations." alt="" coords="103,80,146,106"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,90,87,90,87,96,55,96"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/begin.html#" title=" " alt="" coords="194,5,272,31"/>
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="141,77,192,40,196,38,199,42,196,44,144,82"/>
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/copy.html#" title=" " alt="" coords="196,55,271,80"/>
<area shape="poly" id="edge3_Node000002_Node000004" title=" " alt="" coords="146,85,180,77,181,82,147,90"/>
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/end.html#" title=" " alt="" coords="199,104,267,130"/>
<area shape="poly" id="edge4_Node000002_Node000005" title=" " alt="" coords="147,95,184,103,183,109,146,100"/>
<area shape="rect" id="Node000006" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="198,153,269,179"/>
<area shape="poly" id="edge5_Node000002_Node000006" title=" " alt="" coords="145,104,196,140,199,142,196,147,192,144,142,108"/>
</map>

View File

@@ -0,0 +1 @@
37093734509d96a8fecd4cff3a423f8e

View File

@@ -0,0 +1,137 @@
<?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="208pt" height="138pt"
viewBox="0.00 0.00 208.25 138.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 134.25)">
<title>main</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Main function.">
<polygon fill="#999999" stroke="#666666" points="37,-74.25 0,-74.25 0,-55 37,-55 37,-74.25"/>
<text text-anchor="middle" x="18.5" y="-60.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="../../d8/dab/sparse__table_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Self&#45;test implementations.">
<polygon fill="white" stroke="#666666" points="105.5,-74.25 73,-74.25 73,-55 105.5,-55 105.5,-74.25"/>
<text text-anchor="middle" x="89.25" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.2,-64.62C44.58,-64.62 53.31,-64.62 61.45,-64.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.2,-68.13 71.2,-64.63 61.2,-61.13 61.2,-68.13"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/begin.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="200.25,-130.25 141.5,-130.25 141.5,-111 200.25,-111 200.25,-130.25"/>
<text text-anchor="middle" x="170.88" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::begin</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M103.12,-74.57C113.37,-82.4 128.17,-93.47 141.5,-102.62 142.34,-103.2 143.2,-103.79 144.07,-104.37"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="141.98,-107.19 152.27,-109.72 145.81,-101.32 141.98,-107.19"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/copy.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="199.12,-93.25 142.62,-93.25 142.62,-74 199.12,-74 199.12,-93.25"/>
<text text-anchor="middle" x="170.88" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::copy</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge3_Node000002_Node000004" class="edge">
<title>Node2&#45;&gt;Node4</title>
<g id="a_edge3_Node000002_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M105.98,-68.38C113.25,-70.11 122.23,-72.26 131.14,-74.38"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="130.23,-77.76 140.77,-76.68 131.86,-70.96 130.23,-77.76"/>
</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/iterator/end.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="196.5,-56.25 145.25,-56.25 145.25,-37 196.5,-37 196.5,-56.25"/>
<text text-anchor="middle" x="170.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::end</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node5 -->
<g id="edge4_Node000002_Node000005" class="edge">
<title>Node2&#45;&gt;Node5</title>
<g id="a_edge4_Node000002_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M105.98,-61.07C113.93,-59.27 123.93,-57.01 133.64,-54.82"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.31,-58.25 143.3,-52.63 132.77,-51.42 134.31,-58.25"/>
</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/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="197.62,-19.25 144.12,-19.25 144.12,0 197.62,0 197.62,-19.25"/>
<text text-anchor="middle" x="170.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node6 -->
<g id="edge5_Node000002_Node000006" class="edge">
<title>Node2&#45;&gt;Node6</title>
<g id="a_edge5_Node000002_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M103.58,-54.66C113.84,-47.09 128.42,-36.49 141.5,-27.62 142.35,-27.05 143.21,-26.47 144.08,-25.89"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="145.81,-28.94 152.29,-20.56 142,-23.07 145.81,-28.94"/>
</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: 5.8 KiB

View File

@@ -0,0 +1,111 @@
<?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="208pt" height="138pt"
viewBox="0.00 0.00 208.25 138.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 134.25)">
<title>main</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Main function.">
<polygon fill="#999999" stroke="#666666" points="37,-74.25 0,-74.25 0,-55 37,-55 37,-74.25"/>
<text text-anchor="middle" x="18.5" y="-60.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="../../d8/dab/sparse__table_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Self&#45;test implementations.">
<polygon fill="white" stroke="#666666" points="105.5,-74.25 73,-74.25 73,-55 105.5,-55 105.5,-74.25"/>
<text text-anchor="middle" x="89.25" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.2,-64.62C44.58,-64.62 53.31,-64.62 61.45,-64.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.2,-68.13 71.2,-64.63 61.2,-61.13 61.2,-68.13"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/begin.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="200.25,-130.25 141.5,-130.25 141.5,-111 200.25,-111 200.25,-130.25"/>
<text text-anchor="middle" x="170.88" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::begin</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M103.12,-74.57C113.37,-82.4 128.17,-93.47 141.5,-102.62 142.34,-103.2 143.2,-103.79 144.07,-104.37"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="141.98,-107.19 152.27,-109.72 145.81,-101.32 141.98,-107.19"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/copy.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="199.12,-93.25 142.62,-93.25 142.62,-74 199.12,-74 199.12,-93.25"/>
<text text-anchor="middle" x="170.88" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::copy</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge3_Node000002_Node000004" class="edge">
<title>Node2&#45;&gt;Node4</title>
<g id="a_edge3_Node000002_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M105.98,-68.38C113.25,-70.11 122.23,-72.26 131.14,-74.38"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="130.23,-77.76 140.77,-76.68 131.86,-70.96 130.23,-77.76"/>
</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/iterator/end.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="196.5,-56.25 145.25,-56.25 145.25,-37 196.5,-37 196.5,-56.25"/>
<text text-anchor="middle" x="170.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::end</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node5 -->
<g id="edge4_Node000002_Node000005" class="edge">
<title>Node2&#45;&gt;Node5</title>
<g id="a_edge4_Node000002_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M105.98,-61.07C113.93,-59.27 123.93,-57.01 133.64,-54.82"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.31,-58.25 143.3,-52.63 132.77,-51.42 134.31,-58.25"/>
</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/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="197.62,-19.25 144.12,-19.25 144.12,0 197.62,0 197.62,-19.25"/>
<text text-anchor="middle" x="170.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node6 -->
<g id="edge5_Node000002_Node000006" class="edge">
<title>Node2&#45;&gt;Node6</title>
<g id="a_edge5_Node000002_Node000006"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M103.58,-54.66C113.84,-47.09 128.42,-36.49 141.5,-27.62 142.35,-27.05 143.21,-26.47 144.08,-25.89"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="145.81,-28.94 152.29,-20.56 142,-23.07 145.81,-28.94"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -0,0 +1,11 @@
<map id="test" name="test">
<area shape="rect" id="Node000001" title="Self&#45;test implementations." alt="" coords="5,80,49,106"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/begin.html#" title=" " alt="" coords="97,5,175,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="44,77,95,40,99,38,102,42,98,44,47,82"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/copy.html#" title=" " alt="" coords="98,55,174,80"/>
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="49,85,82,77,83,82,50,90"/>
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/iterator/end.html#" title=" " alt="" coords="102,104,170,130"/>
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="50,95,87,103,86,109,49,100"/>
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="100,153,172,179"/>
<area shape="poly" id="edge4_Node000001_Node000005" title=" " alt="" coords="48,104,98,140,102,142,99,147,95,144,45,108"/>
</map>

View File

@@ -0,0 +1 @@
acd42c1201f0e2f16635373df7f51fb9

View File

@@ -0,0 +1,119 @@
<?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: test Pages: 1 -->
<svg width="135pt" height="138pt"
viewBox="0.00 0.00 135.25 138.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 134.25)">
<title>test</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Self&#45;test implementations.">
<polygon fill="#999999" stroke="#666666" points="32.5,-74.25 0,-74.25 0,-55 32.5,-55 32.5,-74.25"/>
<text text-anchor="middle" x="16.25" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/begin.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="127.25,-130.25 68.5,-130.25 68.5,-111 127.25,-111 127.25,-130.25"/>
<text text-anchor="middle" x="97.88" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::begin</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M30.12,-74.57C40.37,-82.4 55.17,-93.47 68.5,-102.62 69.34,-103.2 70.2,-103.79 71.07,-104.37"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="68.98,-107.19 79.27,-109.72 72.81,-101.32 68.98,-107.19"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/copy.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="126.12,-93.25 69.62,-93.25 69.62,-74 126.12,-74 126.12,-93.25"/>
<text text-anchor="middle" x="97.88" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::copy</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M32.98,-68.38C40.25,-70.11 49.23,-72.26 58.14,-74.38"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="57.23,-77.76 67.77,-76.68 58.86,-70.96 57.23,-77.76"/>
</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/iterator/end.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="123.5,-56.25 72.25,-56.25 72.25,-37 123.5,-37 123.5,-56.25"/>
<text text-anchor="middle" x="97.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::end</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;Node4</title>
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M32.98,-61.07C40.93,-59.27 50.93,-57.01 60.64,-54.82"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.31,-58.25 70.3,-52.63 59.77,-51.42 61.31,-58.25"/>
</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/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="124.62,-19.25 71.12,-19.25 71.12,0 124.62,0 124.62,-19.25"/>
<text text-anchor="middle" x="97.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4_Node000001_Node000005" class="edge">
<title>Node1&#45;&gt;Node5</title>
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M30.58,-54.66C40.84,-47.09 55.42,-36.49 68.5,-27.62 69.35,-27.05 70.21,-26.47 71.08,-25.89"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="72.81,-28.94 79.29,-20.56 69,-23.07 72.81,-28.94"/>
</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: 4.9 KiB

View File

@@ -0,0 +1,93 @@
<?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: test Pages: 1 -->
<svg width="135pt" height="138pt"
viewBox="0.00 0.00 135.25 138.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 134.25)">
<title>test</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Self&#45;test implementations.">
<polygon fill="#999999" stroke="#666666" points="32.5,-74.25 0,-74.25 0,-55 32.5,-55 32.5,-74.25"/>
<text text-anchor="middle" x="16.25" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/iterator/begin.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="127.25,-130.25 68.5,-130.25 68.5,-111 127.25,-111 127.25,-130.25"/>
<text text-anchor="middle" x="97.88" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::begin</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M30.12,-74.57C40.37,-82.4 55.17,-93.47 68.5,-102.62 69.34,-103.2 70.2,-103.79 71.07,-104.37"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="68.98,-107.19 79.27,-109.72 72.81,-101.32 68.98,-107.19"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/copy.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="126.12,-93.25 69.62,-93.25 69.62,-74 126.12,-74 126.12,-93.25"/>
<text text-anchor="middle" x="97.88" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::copy</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M32.98,-68.38C40.25,-70.11 49.23,-72.26 58.14,-74.38"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="57.23,-77.76 67.77,-76.68 58.86,-70.96 57.23,-77.76"/>
</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/iterator/end.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="123.5,-56.25 72.25,-56.25 72.25,-37 123.5,-37 123.5,-56.25"/>
<text text-anchor="middle" x="97.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::end</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;Node4</title>
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M32.98,-61.07C40.93,-59.27 50.93,-57.01 60.64,-54.82"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.31,-58.25 70.3,-52.63 59.77,-51.42 61.31,-58.25"/>
</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/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="124.62,-19.25 71.12,-19.25 71.12,0 124.62,0 124.62,-19.25"/>
<text text-anchor="middle" x="97.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge4_Node000001_Node000005" class="edge">
<title>Node1&#45;&gt;Node5</title>
<g id="a_edge4_Node000001_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M30.58,-54.66C40.84,-47.09 55.42,-36.49 68.5,-27.62 69.35,-27.05 70.21,-26.47 71.08,-25.89"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="72.81,-28.94 79.29,-20.56 69,-23.07 72.81,-28.94"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -212,7 +212,7 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<div class="fragment"><div class="line"><span class="lineno"> 65</span> {</div>
<div class="line"><span class="lineno"> 66</span> <span class="keywordflow">for</span> (uint32_t i = 2; i &lt;= <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
<div class="line"><span class="lineno"> 66</span> <span class="keywordflow">for</span> (uint32_t i = 2; i &lt;= <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
<div class="line"><span class="lineno"> 67</span> <span class="keywordflow">if</span> (is_prime[i]) {</div>
<div class="line"><span class="lineno"> 68</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; i &lt;&lt; <span class="charliteral">&#39; &#39;</span>;</div>
<div class="line"><span class="lineno"> 69</span> }</div>
@@ -220,8 +220,8 @@ Here is the call graph for this function:</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> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 72</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="adata__structures_2sparse__table_8cpp_html_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><div class="ttname"><a href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a></div><div class="ttdeci">constexpr uint32_t N</div><div class="ttdoc">A struct to represent sparse table for min() as their invariant function, for the given array A....</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:48</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="asparse__table_8cpp_html_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><div class="ttname"><a href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a></div><div class="ttdeci">constexpr uint32_t N</div><div class="ttdoc">A struct to represent sparse table for min() as their invariant function, for the given array A....</div><div class="ttdef"><b>Definition</b> sparse_table.cpp:48</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -258,9 +258,9 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 46</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;bool&gt;</a> <a class="code hl_function" href="../../dd/d47/namespacemath.html#abd8f794b2229b42876169ff841b6e444">is_prime</a>(N + 1, <span class="keyword">true</span>); <span class="comment">// Initialize all as prime numbers</span></div>
<div class="line"><span class="lineno"> 47</span> <a class="code hl_function" href="../../dd/d47/namespacemath.html#abd8f794b2229b42876169ff841b6e444">is_prime</a>[0] = <a class="code hl_function" href="../../dd/d47/namespacemath.html#abd8f794b2229b42876169ff841b6e444">is_prime</a>[1] = <span class="keyword">false</span>; <span class="comment">// 0 and 1 are not prime numbers</span></div>
<div class="line"><span class="lineno"> 48</span> </div>
<div class="line"><span class="lineno"> 49</span> <span class="keywordflow">for</span> (uint32_t i = 2; i * i &lt;= <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
<div class="line"><span class="lineno"> 49</span> <span class="keywordflow">for</span> (uint32_t i = 2; i * i &lt;= <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; i++) {</div>
<div class="line"><span class="lineno"> 50</span> <span class="keywordflow">if</span> (is_prime[i]) {</div>
<div class="line"><span class="lineno"> 51</span> <span class="keywordflow">for</span> (uint32_t j = i * i; j &lt;= <a class="code hl_variable" href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; j += i) {</div>
<div class="line"><span class="lineno"> 51</span> <span class="keywordflow">for</span> (uint32_t j = i * i; j &lt;= <a class="code hl_variable" href="../../d8/dab/sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">N</a>; j += i) {</div>
<div class="line"><span class="lineno"> 52</span> <a class="code hl_function" href="../../dd/d47/namespacemath.html#abd8f794b2229b42876169ff841b6e444">is_prime</a>[j] = <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 53</span> }</div>
<div class="line"><span class="lineno"> 54</span> }</div>