Documentation for 446e0a5ce8

This commit is contained in:
github-actions
2021-08-17 17:31:10 +00:00
parent 23420673c5
commit aedf852194
358 changed files with 10673 additions and 11389 deletions

490
d3/db3/lru__cache_8cpp.html Normal file
View File

@@ -0,0 +1,490 @@
<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: others/lru_cache.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>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.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 style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Algorithms_in_C++
&#160;<span id="projectnumber">1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
/* @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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('d3/db3/lru__cache_8cpp.html','../../'); initResizable(); });
/* @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">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</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> </div>
<div class="headertitle">
<div class="title">lru_cache.cpp File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>An implementation of <a href="https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)">LRU Cache</a>. Lru is a part of cache algorithms (also frequently called cache replacement algorithms or cache replacement policies).
<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;list&gt;</code><br />
<code>#include &lt;unordered_map&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for lru_cache.cpp:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d6d/lru__cache_8cpp__incl.svg" width="376" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html">others::lru_cache::LRUCache</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">LRU cache class. <a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#details">More...</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 name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:d0/d6f/namespaceothers"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d6f/namespaceothers.html">others</a></td></tr>
<tr class="memdesc:d0/d6f/namespaceothers"><td class="mdescLeft">&#160;</td><td class="mdescRight">for <code>vector</code> <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d8/dcd/namespacelru__cache"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/dcd/namespacelru__cache.html">lru_cache</a></td></tr>
<tr class="memdesc:d8/dcd/namespacelru__cache"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implementation of the <a href="https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)">LRU caching algorithm</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 name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a24d21a345ed06f7fba6919718cf3e058"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a24d21a345ed06f7fba6919718cf3e058"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/db3/lru__cache_8cpp.html#a24d21a345ed06f7fba6919718cf3e058">lru_tests::log</a> (T msg)</td></tr>
<tr class="memdesc:a24d21a345ed06f7fba6919718cf3e058"><td class="mdescLeft">&#160;</td><td class="mdescRight">A function to print given message on console. <a href="../../d3/db3/lru__cache_8cpp.html#a24d21a345ed06f7fba6919718cf3e058">More...</a><br /></td></tr>
<tr class="separator:a24d21a345ed06f7fba6919718cf3e058"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6401e8f2d41d8cc9cd0e52ab381608d4"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db3/lru__cache_8cpp.html#a6401e8f2d41d8cc9cd0e52ab381608d4">lru_tests::test_1</a> ()</td></tr>
<tr class="memdesc:a6401e8f2d41d8cc9cd0e52ab381608d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">A simple test case The assert statement will check expected hist and miss to resultant hits and miss. <a href="../../d3/db3/lru__cache_8cpp.html#a6401e8f2d41d8cc9cd0e52ab381608d4">More...</a><br /></td></tr>
<tr class="separator:a6401e8f2d41d8cc9cd0e52ab381608d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b02e288a407876a8d6024f98a2a25ec"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db3/lru__cache_8cpp.html#a4b02e288a407876a8d6024f98a2a25ec">lru_tests::test_2</a> ()</td></tr>
<tr class="memdesc:a4b02e288a407876a8d6024f98a2a25ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">A test case contains hits more than cache size The assert statement will check expected hist and miss to resultant hits and miss. <a href="../../d3/db3/lru__cache_8cpp.html#a4b02e288a407876a8d6024f98a2a25ec">More...</a><br /></td></tr>
<tr class="separator:a4b02e288a407876a8d6024f98a2a25ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01ec21fc91ddafd964ae2035ba7892c0"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db3/lru__cache_8cpp.html#a01ec21fc91ddafd964ae2035ba7892c0">lru_tests::test_3</a> ()</td></tr>
<tr class="memdesc:a01ec21fc91ddafd964ae2035ba7892c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">A simple test case The assert statement will check expected hist and miss to resultant hits and miss. <a href="../../d3/db3/lru__cache_8cpp.html#a01ec21fc91ddafd964ae2035ba7892c0">More...</a><br /></td></tr>
<tr class="separator:a01ec21fc91ddafd964ae2035ba7892c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a3be6d8871b1f5dc03688da8f3ee9e6"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db3/lru__cache_8cpp.html#a6a3be6d8871b1f5dc03688da8f3ee9e6">lru_tests::run_tests</a> ()</td></tr>
<tr class="memdesc:a6a3be6d8871b1f5dc03688da8f3ee9e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">A function to invoke all test cases. <a href="../../d3/db3/lru__cache_8cpp.html#a6a3be6d8871b1f5dc03688da8f3ee9e6">More...</a><br /></td></tr>
<tr class="separator:a6a3be6d8871b1f5dc03688da8f3ee9e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db3/lru__cache_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function. <a href="../../d3/db3/lru__cache_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><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>An implementation of <a href="https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)">LRU Cache</a>. Lru is a part of cache algorithms (also frequently called cache replacement algorithms or cache replacement policies). </p>
<h3><a class="anchor" id="autotoc_md84"></a>
Logic</h3>
<ul>
<li>Discards the least recently used items first.</li>
<li>This algorithm requires keeping track of what was used when, which is expensive if one wants to make sure the algorithm always discards the least recently used item.</li>
<li>General implementations of this technique require keeping "age bits" for cache-lines and track the "Least Recently Used" cache-line based on age-bits.</li>
<li>In such an implementation, every time a cache-line is used, the age of all other cache-lines changes</li>
</ul>
<h3><a class="anchor" id="autotoc_md85"></a>
Algorithm explanation</h3>
<p>For a cache of page frame x:</p><ul>
<li>Check if the page is present in cache.</li>
<li>If not present, then check is the cache is full or not:</li>
<li>If the cache is full, REMOVE the last element from the cache.</li>
<li>If the element is present in cache, then shift that element to first position in cache from its original position.<ul>
<li>This way you can keep the least recently used elements in the last and most recently used in front of the cache.</li>
</ul>
</li>
</ul>
<p>Every time a requested page is not found in cache, that is a miss or page fault, and if the page is present in cache, then its a hit.</p>
<h2><a class="anchor" id="autotoc_md86"></a>
Data Structure used</h2>
<ul>
<li>In the algorithm below we used two different data structure, one is linked list and other one is a hash map</li>
<li>The linked list is used to contain the pages and the hash map contains the pages and their address.</li>
<li>Every time a new page is requested, we first check in the hash map if the page is present or not.</li>
<li>If not present, and the cache is full, we simply delete the last entry in the cache.</li>
<li>If present, we shift that page from its current location to beginning of the cache and update the address in hash map for that page.</li>
</ul>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/foo290">Nitin Sharma</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a24d21a345ed06f7fba6919718cf3e058"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24d21a345ed06f7fba6919718cf3e058">&#9670;&nbsp;</a></span>log()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="memname">
<tr>
<td class="memname">void lru_tests::log </td>
<td>(</td>
<td class="paramtype">T&#160;</td>
<td class="paramname"><em>msg</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>A function to print given message on console. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">T</td><td>Type of the given message. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; {</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="comment">// It&#39;s just to avoid writing cout and endl</span></div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;[TESTS] : ---&gt; &quot;</span> &lt;&lt; msg &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;}</div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
</div><!-- 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="../../d3/db3/lru__cache_8cpp_a24d21a345ed06f7fba6919718cf3e058_cgraph.svg" width="228" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</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&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; {</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <a class="code" href="../../d3/db3/lru__cache_8cpp.html#a6a3be6d8871b1f5dc03688da8f3ee9e6">lru_tests::run_tests</a>();</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; </div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <span class="comment">// Usage</span></div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html">others::lru_cache::LRUCache</a> cache(4);</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; cache.refer(1);</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; cache.refer(2);</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; cache.refer(3);</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; cache.refer(4);</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; cache.refer(5);</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; cache.refer(5);</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; </div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; cache.display();</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; </div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Hits: &quot;</span> &lt;&lt; cache.getHits()</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; &lt;&lt; <span class="stringliteral">&quot; Miss: &quot;</span> &lt;&lt; cache.getPageFault() &lt;&lt; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160;}</div>
<div class="ttc" id="aclassothers_1_1lru__cache_1_1_l_r_u_cache_html"><div class="ttname"><a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html">others::lru_cache::LRUCache</a></div><div class="ttdoc">LRU cache class.</div><div class="ttdef"><b>Definition:</b> lru_cache.cpp:67</div></div>
<div class="ttc" id="alru__cache_8cpp_html_a6a3be6d8871b1f5dc03688da8f3ee9e6"><div class="ttname"><a href="../../d3/db3/lru__cache_8cpp.html#a6a3be6d8871b1f5dc03688da8f3ee9e6">lru_tests::run_tests</a></div><div class="ttdeci">static void run_tests()</div><div class="ttdoc">A function to invoke all test cases.</div><div class="ttdef"><b>Definition:</b> lru_cache.cpp:238</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="../../d3/db3/lru__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="502" height="534"><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="a6a3be6d8871b1f5dc03688da8f3ee9e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a3be6d8871b1f5dc03688da8f3ee9e6">&#9670;&nbsp;</a></span>run_tests()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void lru_tests::run_tests </td>
<td>(</td>
<td class="paramname"></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>A function to invoke all test cases. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; {</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; <a class="code" href="../../d3/db3/lru__cache_8cpp.html#a6401e8f2d41d8cc9cd0e52ab381608d4">test_1</a>();</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <a class="code" href="../../d3/db3/lru__cache_8cpp.html#a4b02e288a407876a8d6024f98a2a25ec">test_2</a>();</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <a class="code" href="../../d3/db3/lru__cache_8cpp.html#a01ec21fc91ddafd964ae2035ba7892c0">test_3</a>();</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;TESTS COMPLETED!&quot;</span>);</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;}</div>
<div class="ttc" id="alog_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/log.html">std::log</a></div><div class="ttdeci">T log(T... args)</div></div>
<div class="ttc" id="alru__cache_8cpp_html_a01ec21fc91ddafd964ae2035ba7892c0"><div class="ttname"><a href="../../d3/db3/lru__cache_8cpp.html#a01ec21fc91ddafd964ae2035ba7892c0">lru_tests::test_3</a></div><div class="ttdeci">static void test_3()</div><div class="ttdoc">A simple test case The assert statement will check expected hist and miss to resultant hits and miss.</div><div class="ttdef"><b>Definition:</b> lru_cache.cpp:213</div></div>
<div class="ttc" id="alru__cache_8cpp_html_a4b02e288a407876a8d6024f98a2a25ec"><div class="ttname"><a href="../../d3/db3/lru__cache_8cpp.html#a4b02e288a407876a8d6024f98a2a25ec">lru_tests::test_2</a></div><div class="ttdeci">static void test_2()</div><div class="ttdoc">A test case contains hits more than cache size The assert statement will check expected hist and miss...</div><div class="ttdef"><b>Definition:</b> lru_cache.cpp:186</div></div>
<div class="ttc" id="alru__cache_8cpp_html_a6401e8f2d41d8cc9cd0e52ab381608d4"><div class="ttname"><a href="../../d3/db3/lru__cache_8cpp.html#a6401e8f2d41d8cc9cd0e52ab381608d4">lru_tests::test_1</a></div><div class="ttdeci">static void test_1()</div><div class="ttdoc">A simple test case The assert statement will check expected hist and miss to resultant hits and miss.</div><div class="ttdef"><b>Definition:</b> lru_cache.cpp:159</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d3/db3/lru__cache_8cpp_a6a3be6d8871b1f5dc03688da8f3ee9e6_cgraph.svg" width="100%" height="600"><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>
<a id="a6401e8f2d41d8cc9cd0e52ab381608d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6401e8f2d41d8cc9cd0e52ab381608d4">&#9670;&nbsp;</a></span>test_1()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void lru_tests::test_1 </td>
<td>(</td>
<td class="paramname"></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>A simple test case The assert statement will check expected hist and miss to resultant hits and miss. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; {</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; uint64_t expected_hits = 2;</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; uint64_t expected_pageFault = 4;</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; </div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;Running Test-1...&quot;</span>);</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html">others::lru_cache::LRUCache</a> cache(4);</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; cache.refer(1);</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; cache.refer(2);</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; cache.refer(5);</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; cache.refer(1);</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; cache.refer(4);</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; cache.refer(5);</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;Checking assert statement...&quot;</span>);</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; assert(cache.getHits() == expected_hits &amp;&amp;</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; cache.getPageFault() == expected_pageFault);</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;Assert successful!&quot;</span>);</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;Test-1 complete!&quot;</span>);</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;}</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="../../d3/db3/lru__cache_8cpp_a6401e8f2d41d8cc9cd0e52ab381608d4_cgraph.svg" width="567" height="475"><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="a4b02e288a407876a8d6024f98a2a25ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b02e288a407876a8d6024f98a2a25ec">&#9670;&nbsp;</a></span>test_2()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void lru_tests::test_2 </td>
<td>(</td>
<td class="paramname"></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>A test case contains hits more than cache size The assert statement will check expected hist and miss to resultant hits and miss. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; {</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; uint64_t expected_hits = 4;</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; uint64_t expected_pageFault = 2;</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; </div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;Running Test-2...&quot;</span>);</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; </div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html">others::lru_cache::LRUCache</a> cache(4);</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; cache.refer(1);</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; cache.refer(1);</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; cache.refer(1);</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; cache.refer(1);</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; cache.refer(1);</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; cache.refer(5);</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; </div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;Checking assert statement...&quot;</span>);</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; assert(cache.getHits() == expected_hits &amp;&amp;</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; cache.getPageFault() == expected_pageFault);</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;Assert successful!&quot;</span>);</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;Test-2 complete!&quot;</span>);</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;}</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="../../d3/db3/lru__cache_8cpp_a4b02e288a407876a8d6024f98a2a25ec_cgraph.svg" width="567" height="475"><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="a01ec21fc91ddafd964ae2035ba7892c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a01ec21fc91ddafd964ae2035ba7892c0">&#9670;&nbsp;</a></span>test_3()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void lru_tests::test_3 </td>
<td>(</td>
<td class="paramname"></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>A simple test case The assert statement will check expected hist and miss to resultant hits and miss. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; {</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; uint64_t expected_hits = 1;</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; uint64_t expected_pageFault = 5;</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; </div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;Running Test-3...&quot;</span>);</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; </div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html">others::lru_cache::LRUCache</a> cache(4);</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; cache.refer(1);</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; cache.refer(2);</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; cache.refer(3);</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; cache.refer(4);</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; cache.refer(5);</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; cache.refer(5);</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; </div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;Checking assert statement...&quot;</span>);</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; assert(cache.getHits() == expected_hits &amp;&amp;</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; cache.getPageFault() == expected_pageFault);</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;Assert successful!&quot;</span>);</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/log.html">log</a>(<span class="stringliteral">&quot;Test-3 complete!&quot;</span>);</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;}</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="../../d3/db3/lru__cache_8cpp_a01ec21fc91ddafd964ae2035ba7892c0_cgraph.svg" width="567" height="475"><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_9510827d0b234b3cc54b29892f217477.html">others</a></li><li class="navelem"><a class="el" href="../../d3/db3/lru__cache_8cpp.html">lru_cache.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.9.1 </li>
</ul>
</div>
</body>
</html>

10
d3/db3/lru__cache_8cpp.js vendored Normal file
View File

@@ -0,0 +1,10 @@
var lru__cache_8cpp =
[
[ "LRUCache", "d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html", "d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache" ],
[ "log", "d3/db3/lru__cache_8cpp.html#a24d21a345ed06f7fba6919718cf3e058", null ],
[ "main", "d3/db3/lru__cache_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
[ "run_tests", "d3/db3/lru__cache_8cpp.html#a6a3be6d8871b1f5dc03688da8f3ee9e6", null ],
[ "test_1", "d3/db3/lru__cache_8cpp.html#a6401e8f2d41d8cc9cd0e52ab381608d4", null ],
[ "test_2", "d3/db3/lru__cache_8cpp.html#a4b02e288a407876a8d6024f98a2a25ec", null ],
[ "test_3", "d3/db3/lru__cache_8cpp.html#a01ec21fc91ddafd964ae2035ba7892c0", null ]
];

View File

@@ -0,0 +1,15 @@
<map id="lru_tests::test_3" name="lru_tests::test_3">
<area shape="rect" id="node1" title="A simple test case The assert statement will check expected hist and miss to resultant hits and miss." alt="" coords="5,159,121,185"/>
<area shape="rect" id="node2" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933" title="A function to get page hits." alt="" coords="188,86,324,127"/>
<area shape="rect" id="node3" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2" title="A function to get page fault." alt="" coords="169,151,343,193"/>
<area shape="rect" id="node4" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602" title="Refer to a page, or request a page from memory." alt="" coords="190,217,322,258"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/back.html#" title=" " alt="" coords="427,5,525,32"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/begin.html#" title=" " alt="" coords="424,56,528,83"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/end.html#" title=" " alt="" coords="391,107,561,133"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/erase.html#" title=" " alt="" coords="405,158,547,199"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/erase.html#" title=" " alt="" coords="424,224,528,251"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/find.html#" title=" " alt="" coords="405,275,547,317"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/pop_back.html#" title=" " alt="" coords="411,341,541,368"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/push_front.html#" title=" " alt="" coords="409,392,543,419"/>
<area shape="rect" id="node13" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/size.html#" title=" " alt="" coords="429,443,523,469"/>
</map>

View File

@@ -0,0 +1 @@
6f1627251c4a8062e2d8a345ba499026

View File

@@ -0,0 +1,213 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
-->
<!-- Title: lru_tests::test_3 Pages: 1 -->
<svg width="425pt" height="356pt"
viewBox="0.00 0.00 425.00 356.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 352)">
<title>lru_tests::test_3</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-352 421,-352 421,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="A simple test case The assert statement will check expected hist and miss to resultant hits and miss.">
<polygon fill="#bfbfbf" stroke="black" points="0,-213.5 0,-232.5 87,-232.5 87,-213.5 0,-213.5"/>
<text text-anchor="middle" x="43.5" y="-220.5" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::test_3</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge13" class="edge">
<title>Node1&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M21.31,-232.76C10.51,-241.57 17.91,-251 43.5,-251 60.3,-251 69.26,-246.94 70.38,-241.65"/>
<polygon fill="midnightblue" stroke="midnightblue" points="73.45,-239.97 65.69,-232.76 67.26,-243.24 73.45,-239.97"/>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933" target="_top" xlink:title="A function to get page hits.">
<polygon fill="white" stroke="black" points="137,-257 137,-287 239,-287 239,-257 137,-257"/>
<text text-anchor="start" x="145" y="-275" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="188" y="-264" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getHits</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M72.31,-232.56C89.72,-238.55 112.73,-246.46 133.57,-253.63"/>
<polygon fill="midnightblue" stroke="midnightblue" points="132.68,-257.02 143.27,-256.96 134.95,-250.4 132.68,-257.02"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2" target="_top" xlink:title="A function to get page fault.">
<polygon fill="white" stroke="black" points="123,-208 123,-238 253,-238 253,-208 123,-208"/>
<text text-anchor="start" x="131" y="-226" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="188" y="-215" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getPageFault</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M87.25,-223C95.33,-223 103.98,-223 112.7,-223"/>
<polygon fill="midnightblue" stroke="midnightblue" points="112.93,-226.5 122.93,-223 112.93,-219.5 112.93,-226.5"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602" target="_top" xlink:title="Refer to a page, or request a page from memory.">
<polygon fill="white" stroke="black" points="138.5,-159 138.5,-189 237.5,-189 237.5,-159 138.5,-159"/>
<text text-anchor="start" x="146.5" y="-177" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="188" y="-166" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::refer</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M72.31,-213.44C89.72,-207.45 112.73,-199.54 133.57,-192.37"/>
<polygon fill="midnightblue" stroke="midnightblue" points="134.95,-195.6 143.27,-189.04 132.68,-188.98 134.95,-195.6"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="316,-328.5 316,-347.5 390,-347.5 390,-328.5 316,-328.5"/>
<text text-anchor="middle" x="353" y="-335.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::back</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node4&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M237.5,-187.29C243.26,-190.41 248.63,-194.26 253,-199 290.75,-239.93 249.66,-279.6 289,-319 293.83,-323.83 299.84,-327.45 306.21,-330.14"/>
<polygon fill="midnightblue" stroke="midnightblue" points="305.13,-333.47 315.72,-333.48 307.44,-326.87 305.13,-333.47"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/begin.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="314,-290.5 314,-309.5 392,-309.5 392,-290.5 314,-290.5"/>
<text text-anchor="middle" x="353" y="-297.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::begin</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node4&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M237.62,-188.14C243.23,-191.12 248.52,-194.71 253,-199 281.72,-226.56 259.21,-254.61 289,-281 293.49,-284.98 298.79,-288.13 304.38,-290.61"/>
<polygon fill="midnightblue" stroke="midnightblue" points="303.38,-293.97 313.97,-294.21 305.83,-287.42 303.38,-293.97"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/end.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="289,-252.5 289,-271.5 417,-271.5 417,-252.5 289,-252.5"/>
<text text-anchor="middle" x="353" y="-259.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map::end</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node4&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M235.93,-189.06C241.93,-191.91 247.79,-195.21 253,-199 273.44,-213.86 267.99,-228.96 289,-243 292.08,-245.06 295.39,-246.9 298.82,-248.54"/>
<polygon fill="midnightblue" stroke="midnightblue" points="297.54,-251.8 308.11,-252.46 300.26,-245.35 297.54,-251.8"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/erase.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="300,-203 300,-233 406,-233 406,-203 300,-203"/>
<text text-anchor="start" x="308" y="-221" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="353" y="-210" font-family="Helvetica,sans-Serif" font-size="10.00">::erase</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node4&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M237.91,-187.2C254.21,-191.6 272.6,-196.57 289.78,-201.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="289.16,-204.66 299.73,-203.89 290.98,-197.9 289.16,-204.66"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/erase.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="314,-164.5 314,-183.5 392,-183.5 392,-164.5 314,-164.5"/>
<text text-anchor="middle" x="353" y="-171.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::erase</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node4&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M237.91,-174C258.68,-174 282.84,-174 303.57,-174"/>
<polygon fill="midnightblue" stroke="midnightblue" points="303.75,-177.5 313.75,-174 303.75,-170.5 303.75,-177.5"/>
</g>
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/find.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="300,-115 300,-145 406,-145 406,-115 300,-115"/>
<text text-anchor="start" x="308" y="-133" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="353" y="-122" font-family="Helvetica,sans-Serif" font-size="10.00">::find</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node4&#45;&gt;Node10</title>
<path fill="none" stroke="midnightblue" d="M237.91,-160.8C254.21,-156.4 272.6,-151.43 289.78,-146.8"/>
<polygon fill="midnightblue" stroke="midnightblue" points="290.98,-150.1 299.73,-144.11 289.16,-143.34 290.98,-150.1"/>
</g>
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/pop_back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="304.5,-76.5 304.5,-95.5 401.5,-95.5 401.5,-76.5 304.5,-76.5"/>
<text text-anchor="middle" x="353" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::pop_back</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node11 -->
<g id="edge10" class="edge">
<title>Node4&#45;&gt;Node11</title>
<path fill="none" stroke="midnightblue" d="M207.53,-158.96C226.88,-143.86 258.6,-120.77 289,-106 294.36,-103.4 300.13,-101.03 305.93,-98.91"/>
<polygon fill="midnightblue" stroke="midnightblue" points="307.33,-102.12 315.65,-95.57 305.06,-95.5 307.33,-102.12"/>
</g>
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/push_front.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="303,-38.5 303,-57.5 403,-57.5 403,-38.5 303,-38.5"/>
<text text-anchor="middle" x="353" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::push_front</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node12 -->
<g id="edge11" class="edge">
<title>Node4&#45;&gt;Node12</title>
<path fill="none" stroke="midnightblue" d="M199.12,-158.85C215.36,-135.68 249.48,-91.56 289,-67 292.4,-64.89 296.04,-63 299.8,-61.31"/>
<polygon fill="midnightblue" stroke="midnightblue" points="301.33,-64.47 309.32,-57.52 298.74,-57.97 301.33,-64.47"/>
</g>
<!-- Node13 -->
<g id="node13" class="node">
<title>Node13</title>
<g id="a_node13"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="317.5,-0.5 317.5,-19.5 388.5,-19.5 388.5,-0.5 317.5,-0.5"/>
<text text-anchor="middle" x="353" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::size</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node13 -->
<g id="edge12" class="edge">
<title>Node4&#45;&gt;Node13</title>
<path fill="none" stroke="midnightblue" d="M195.32,-158.75C208.35,-129.2 241.06,-63.95 289,-29 294.58,-24.93 301.04,-21.72 307.65,-19.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="308.98,-22.44 317.36,-15.97 306.77,-15.8 308.98,-22.44"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,4 @@
<map id="lru_tests::log" name="lru_tests::log">
<area shape="rect" id="node1" title="A function to print given message on console." alt="" coords="5,5,103,32"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="151,5,223,32"/>
</map>

View File

@@ -0,0 +1 @@
e149af01456297f376234d136b796dc9

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
-->
<!-- Title: lru_tests::log Pages: 1 -->
<svg width="171pt" height="28pt"
viewBox="0.00 0.00 171.00 28.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 24)">
<title>lru_tests::log</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-24 167,-24 167,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="A function to print given message on console.">
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-19.5 73,-19.5 73,-0.5 0,-0.5"/>
<text text-anchor="middle" x="36.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::log</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="109,-0.5 109,-19.5 163,-19.5 163,-0.5 109,-0.5"/>
<text text-anchor="middle" x="136" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M73.25,-10C81.51,-10 90.3,-10 98.58,-10"/>
<polygon fill="midnightblue" stroke="midnightblue" points="98.72,-13.5 108.72,-10 98.72,-6.5 98.72,-13.5"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,15 @@
<map id="lru_tests::test_2" name="lru_tests::test_2">
<area shape="rect" id="node1" title="A test case contains hits more than cache size The assert statement will check expected hist and miss..." alt="" coords="5,159,121,185"/>
<area shape="rect" id="node2" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933" title="A function to get page hits." alt="" coords="188,86,324,127"/>
<area shape="rect" id="node3" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2" title="A function to get page fault." alt="" coords="169,151,343,193"/>
<area shape="rect" id="node4" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602" title="Refer to a page, or request a page from memory." alt="" coords="190,217,322,258"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/back.html#" title=" " alt="" coords="427,5,525,32"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/begin.html#" title=" " alt="" coords="424,56,528,83"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/end.html#" title=" " alt="" coords="391,107,561,133"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/erase.html#" title=" " alt="" coords="405,158,547,199"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/erase.html#" title=" " alt="" coords="424,224,528,251"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/find.html#" title=" " alt="" coords="405,275,547,317"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/pop_back.html#" title=" " alt="" coords="411,341,541,368"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/push_front.html#" title=" " alt="" coords="409,392,543,419"/>
<area shape="rect" id="node13" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/size.html#" title=" " alt="" coords="429,443,523,469"/>
</map>

View File

@@ -0,0 +1 @@
079c7cb9ee316a61f55a1d34d3d7a4a1

View File

@@ -0,0 +1,213 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
-->
<!-- Title: lru_tests::test_2 Pages: 1 -->
<svg width="425pt" height="356pt"
viewBox="0.00 0.00 425.00 356.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 352)">
<title>lru_tests::test_2</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-352 421,-352 421,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="A test case contains hits more than cache size The assert statement will check expected hist and miss...">
<polygon fill="#bfbfbf" stroke="black" points="0,-213.5 0,-232.5 87,-232.5 87,-213.5 0,-213.5"/>
<text text-anchor="middle" x="43.5" y="-220.5" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::test_2</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge13" class="edge">
<title>Node1&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M21.31,-232.76C10.51,-241.57 17.91,-251 43.5,-251 60.3,-251 69.26,-246.94 70.38,-241.65"/>
<polygon fill="midnightblue" stroke="midnightblue" points="73.45,-239.97 65.69,-232.76 67.26,-243.24 73.45,-239.97"/>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933" target="_top" xlink:title="A function to get page hits.">
<polygon fill="white" stroke="black" points="137,-257 137,-287 239,-287 239,-257 137,-257"/>
<text text-anchor="start" x="145" y="-275" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="188" y="-264" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getHits</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M72.31,-232.56C89.72,-238.55 112.73,-246.46 133.57,-253.63"/>
<polygon fill="midnightblue" stroke="midnightblue" points="132.68,-257.02 143.27,-256.96 134.95,-250.4 132.68,-257.02"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2" target="_top" xlink:title="A function to get page fault.">
<polygon fill="white" stroke="black" points="123,-208 123,-238 253,-238 253,-208 123,-208"/>
<text text-anchor="start" x="131" y="-226" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="188" y="-215" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getPageFault</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M87.25,-223C95.33,-223 103.98,-223 112.7,-223"/>
<polygon fill="midnightblue" stroke="midnightblue" points="112.93,-226.5 122.93,-223 112.93,-219.5 112.93,-226.5"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602" target="_top" xlink:title="Refer to a page, or request a page from memory.">
<polygon fill="white" stroke="black" points="138.5,-159 138.5,-189 237.5,-189 237.5,-159 138.5,-159"/>
<text text-anchor="start" x="146.5" y="-177" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="188" y="-166" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::refer</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M72.31,-213.44C89.72,-207.45 112.73,-199.54 133.57,-192.37"/>
<polygon fill="midnightblue" stroke="midnightblue" points="134.95,-195.6 143.27,-189.04 132.68,-188.98 134.95,-195.6"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="316,-328.5 316,-347.5 390,-347.5 390,-328.5 316,-328.5"/>
<text text-anchor="middle" x="353" y="-335.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::back</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node4&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M237.5,-187.29C243.26,-190.41 248.63,-194.26 253,-199 290.75,-239.93 249.66,-279.6 289,-319 293.83,-323.83 299.84,-327.45 306.21,-330.14"/>
<polygon fill="midnightblue" stroke="midnightblue" points="305.13,-333.47 315.72,-333.48 307.44,-326.87 305.13,-333.47"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/begin.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="314,-290.5 314,-309.5 392,-309.5 392,-290.5 314,-290.5"/>
<text text-anchor="middle" x="353" y="-297.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::begin</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node4&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M237.62,-188.14C243.23,-191.12 248.52,-194.71 253,-199 281.72,-226.56 259.21,-254.61 289,-281 293.49,-284.98 298.79,-288.13 304.38,-290.61"/>
<polygon fill="midnightblue" stroke="midnightblue" points="303.38,-293.97 313.97,-294.21 305.83,-287.42 303.38,-293.97"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/end.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="289,-252.5 289,-271.5 417,-271.5 417,-252.5 289,-252.5"/>
<text text-anchor="middle" x="353" y="-259.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map::end</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node4&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M235.93,-189.06C241.93,-191.91 247.79,-195.21 253,-199 273.44,-213.86 267.99,-228.96 289,-243 292.08,-245.06 295.39,-246.9 298.82,-248.54"/>
<polygon fill="midnightblue" stroke="midnightblue" points="297.54,-251.8 308.11,-252.46 300.26,-245.35 297.54,-251.8"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/erase.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="300,-203 300,-233 406,-233 406,-203 300,-203"/>
<text text-anchor="start" x="308" y="-221" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="353" y="-210" font-family="Helvetica,sans-Serif" font-size="10.00">::erase</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node4&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M237.91,-187.2C254.21,-191.6 272.6,-196.57 289.78,-201.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="289.16,-204.66 299.73,-203.89 290.98,-197.9 289.16,-204.66"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/erase.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="314,-164.5 314,-183.5 392,-183.5 392,-164.5 314,-164.5"/>
<text text-anchor="middle" x="353" y="-171.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::erase</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node4&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M237.91,-174C258.68,-174 282.84,-174 303.57,-174"/>
<polygon fill="midnightblue" stroke="midnightblue" points="303.75,-177.5 313.75,-174 303.75,-170.5 303.75,-177.5"/>
</g>
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/find.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="300,-115 300,-145 406,-145 406,-115 300,-115"/>
<text text-anchor="start" x="308" y="-133" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="353" y="-122" font-family="Helvetica,sans-Serif" font-size="10.00">::find</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node4&#45;&gt;Node10</title>
<path fill="none" stroke="midnightblue" d="M237.91,-160.8C254.21,-156.4 272.6,-151.43 289.78,-146.8"/>
<polygon fill="midnightblue" stroke="midnightblue" points="290.98,-150.1 299.73,-144.11 289.16,-143.34 290.98,-150.1"/>
</g>
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/pop_back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="304.5,-76.5 304.5,-95.5 401.5,-95.5 401.5,-76.5 304.5,-76.5"/>
<text text-anchor="middle" x="353" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::pop_back</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node11 -->
<g id="edge10" class="edge">
<title>Node4&#45;&gt;Node11</title>
<path fill="none" stroke="midnightblue" d="M207.53,-158.96C226.88,-143.86 258.6,-120.77 289,-106 294.36,-103.4 300.13,-101.03 305.93,-98.91"/>
<polygon fill="midnightblue" stroke="midnightblue" points="307.33,-102.12 315.65,-95.57 305.06,-95.5 307.33,-102.12"/>
</g>
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/push_front.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="303,-38.5 303,-57.5 403,-57.5 403,-38.5 303,-38.5"/>
<text text-anchor="middle" x="353" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::push_front</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node12 -->
<g id="edge11" class="edge">
<title>Node4&#45;&gt;Node12</title>
<path fill="none" stroke="midnightblue" d="M199.12,-158.85C215.36,-135.68 249.48,-91.56 289,-67 292.4,-64.89 296.04,-63 299.8,-61.31"/>
<polygon fill="midnightblue" stroke="midnightblue" points="301.33,-64.47 309.32,-57.52 298.74,-57.97 301.33,-64.47"/>
</g>
<!-- Node13 -->
<g id="node13" class="node">
<title>Node13</title>
<g id="a_node13"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="317.5,-0.5 317.5,-19.5 388.5,-19.5 388.5,-0.5 317.5,-0.5"/>
<text text-anchor="middle" x="353" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::size</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node13 -->
<g id="edge12" class="edge">
<title>Node4&#45;&gt;Node13</title>
<path fill="none" stroke="midnightblue" d="M195.32,-158.75C208.35,-129.2 241.06,-63.95 289,-29 294.58,-24.93 301.04,-21.72 307.65,-19.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="308.98,-22.44 317.36,-15.97 306.77,-15.8 308.98,-22.44"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,15 @@
<map id="lru_tests::test_1" name="lru_tests::test_1">
<area shape="rect" id="node1" title="A simple test case The assert statement will check expected hist and miss to resultant hits and miss." alt="" coords="5,159,121,185"/>
<area shape="rect" id="node2" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933" title="A function to get page hits." alt="" coords="188,86,324,127"/>
<area shape="rect" id="node3" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2" title="A function to get page fault." alt="" coords="169,151,343,193"/>
<area shape="rect" id="node4" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602" title="Refer to a page, or request a page from memory." alt="" coords="190,217,322,258"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/back.html#" title=" " alt="" coords="427,5,525,32"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/begin.html#" title=" " alt="" coords="424,56,528,83"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/end.html#" title=" " alt="" coords="391,107,561,133"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/erase.html#" title=" " alt="" coords="405,158,547,199"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/erase.html#" title=" " alt="" coords="424,224,528,251"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/find.html#" title=" " alt="" coords="405,275,547,317"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/pop_back.html#" title=" " alt="" coords="411,341,541,368"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/push_front.html#" title=" " alt="" coords="409,392,543,419"/>
<area shape="rect" id="node13" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/size.html#" title=" " alt="" coords="429,443,523,469"/>
</map>

View File

@@ -0,0 +1 @@
e8058ff046b63bac9cf326cffba504b2

View File

@@ -0,0 +1,213 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
-->
<!-- Title: lru_tests::test_1 Pages: 1 -->
<svg width="425pt" height="356pt"
viewBox="0.00 0.00 425.00 356.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 352)">
<title>lru_tests::test_1</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-352 421,-352 421,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="A simple test case The assert statement will check expected hist and miss to resultant hits and miss.">
<polygon fill="#bfbfbf" stroke="black" points="0,-213.5 0,-232.5 87,-232.5 87,-213.5 0,-213.5"/>
<text text-anchor="middle" x="43.5" y="-220.5" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::test_1</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge13" class="edge">
<title>Node1&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M21.31,-232.76C10.51,-241.57 17.91,-251 43.5,-251 60.3,-251 69.26,-246.94 70.38,-241.65"/>
<polygon fill="midnightblue" stroke="midnightblue" points="73.45,-239.97 65.69,-232.76 67.26,-243.24 73.45,-239.97"/>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933" target="_top" xlink:title="A function to get page hits.">
<polygon fill="white" stroke="black" points="137,-257 137,-287 239,-287 239,-257 137,-257"/>
<text text-anchor="start" x="145" y="-275" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="188" y="-264" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getHits</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M72.31,-232.56C89.72,-238.55 112.73,-246.46 133.57,-253.63"/>
<polygon fill="midnightblue" stroke="midnightblue" points="132.68,-257.02 143.27,-256.96 134.95,-250.4 132.68,-257.02"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2" target="_top" xlink:title="A function to get page fault.">
<polygon fill="white" stroke="black" points="123,-208 123,-238 253,-238 253,-208 123,-208"/>
<text text-anchor="start" x="131" y="-226" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="188" y="-215" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getPageFault</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M87.25,-223C95.33,-223 103.98,-223 112.7,-223"/>
<polygon fill="midnightblue" stroke="midnightblue" points="112.93,-226.5 122.93,-223 112.93,-219.5 112.93,-226.5"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602" target="_top" xlink:title="Refer to a page, or request a page from memory.">
<polygon fill="white" stroke="black" points="138.5,-159 138.5,-189 237.5,-189 237.5,-159 138.5,-159"/>
<text text-anchor="start" x="146.5" y="-177" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="188" y="-166" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::refer</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M72.31,-213.44C89.72,-207.45 112.73,-199.54 133.57,-192.37"/>
<polygon fill="midnightblue" stroke="midnightblue" points="134.95,-195.6 143.27,-189.04 132.68,-188.98 134.95,-195.6"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="316,-328.5 316,-347.5 390,-347.5 390,-328.5 316,-328.5"/>
<text text-anchor="middle" x="353" y="-335.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::back</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node5 -->
<g id="edge4" class="edge">
<title>Node4&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M237.5,-187.29C243.26,-190.41 248.63,-194.26 253,-199 290.75,-239.93 249.66,-279.6 289,-319 293.83,-323.83 299.84,-327.45 306.21,-330.14"/>
<polygon fill="midnightblue" stroke="midnightblue" points="305.13,-333.47 315.72,-333.48 307.44,-326.87 305.13,-333.47"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/begin.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="314,-290.5 314,-309.5 392,-309.5 392,-290.5 314,-290.5"/>
<text text-anchor="middle" x="353" y="-297.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::begin</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node6 -->
<g id="edge5" class="edge">
<title>Node4&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M237.62,-188.14C243.23,-191.12 248.52,-194.71 253,-199 281.72,-226.56 259.21,-254.61 289,-281 293.49,-284.98 298.79,-288.13 304.38,-290.61"/>
<polygon fill="midnightblue" stroke="midnightblue" points="303.38,-293.97 313.97,-294.21 305.83,-287.42 303.38,-293.97"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/end.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="289,-252.5 289,-271.5 417,-271.5 417,-252.5 289,-252.5"/>
<text text-anchor="middle" x="353" y="-259.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map::end</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node7 -->
<g id="edge6" class="edge">
<title>Node4&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M235.93,-189.06C241.93,-191.91 247.79,-195.21 253,-199 273.44,-213.86 267.99,-228.96 289,-243 292.08,-245.06 295.39,-246.9 298.82,-248.54"/>
<polygon fill="midnightblue" stroke="midnightblue" points="297.54,-251.8 308.11,-252.46 300.26,-245.35 297.54,-251.8"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/erase.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="300,-203 300,-233 406,-233 406,-203 300,-203"/>
<text text-anchor="start" x="308" y="-221" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="353" y="-210" font-family="Helvetica,sans-Serif" font-size="10.00">::erase</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node8 -->
<g id="edge7" class="edge">
<title>Node4&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M237.91,-187.2C254.21,-191.6 272.6,-196.57 289.78,-201.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="289.16,-204.66 299.73,-203.89 290.98,-197.9 289.16,-204.66"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/erase.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="314,-164.5 314,-183.5 392,-183.5 392,-164.5 314,-164.5"/>
<text text-anchor="middle" x="353" y="-171.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::erase</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node9 -->
<g id="edge8" class="edge">
<title>Node4&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M237.91,-174C258.68,-174 282.84,-174 303.57,-174"/>
<polygon fill="midnightblue" stroke="midnightblue" points="303.75,-177.5 313.75,-174 303.75,-170.5 303.75,-177.5"/>
</g>
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/find.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="300,-115 300,-145 406,-145 406,-115 300,-115"/>
<text text-anchor="start" x="308" y="-133" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="353" y="-122" font-family="Helvetica,sans-Serif" font-size="10.00">::find</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node10 -->
<g id="edge9" class="edge">
<title>Node4&#45;&gt;Node10</title>
<path fill="none" stroke="midnightblue" d="M237.91,-160.8C254.21,-156.4 272.6,-151.43 289.78,-146.8"/>
<polygon fill="midnightblue" stroke="midnightblue" points="290.98,-150.1 299.73,-144.11 289.16,-143.34 290.98,-150.1"/>
</g>
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/pop_back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="304.5,-76.5 304.5,-95.5 401.5,-95.5 401.5,-76.5 304.5,-76.5"/>
<text text-anchor="middle" x="353" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::pop_back</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node11 -->
<g id="edge10" class="edge">
<title>Node4&#45;&gt;Node11</title>
<path fill="none" stroke="midnightblue" d="M207.53,-158.96C226.88,-143.86 258.6,-120.77 289,-106 294.36,-103.4 300.13,-101.03 305.93,-98.91"/>
<polygon fill="midnightblue" stroke="midnightblue" points="307.33,-102.12 315.65,-95.57 305.06,-95.5 307.33,-102.12"/>
</g>
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/push_front.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="303,-38.5 303,-57.5 403,-57.5 403,-38.5 303,-38.5"/>
<text text-anchor="middle" x="353" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::push_front</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node12 -->
<g id="edge11" class="edge">
<title>Node4&#45;&gt;Node12</title>
<path fill="none" stroke="midnightblue" d="M199.12,-158.85C215.36,-135.68 249.48,-91.56 289,-67 292.4,-64.89 296.04,-63 299.8,-61.31"/>
<polygon fill="midnightblue" stroke="midnightblue" points="301.33,-64.47 309.32,-57.52 298.74,-57.97 301.33,-64.47"/>
</g>
<!-- Node13 -->
<g id="node13" class="node">
<title>Node13</title>
<g id="a_node13"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="317.5,-0.5 317.5,-19.5 388.5,-19.5 388.5,-0.5 317.5,-0.5"/>
<text text-anchor="middle" x="353" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::size</text>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node13 -->
<g id="edge12" class="edge">
<title>Node4&#45;&gt;Node13</title>
<path fill="none" stroke="midnightblue" d="M195.32,-158.75C208.35,-129.2 241.06,-63.95 289,-29 294.58,-24.93 301.04,-21.72 307.65,-19.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="308.98,-22.44 317.36,-15.97 306.77,-15.8 308.98,-22.44"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,18 @@
<map id="lru_tests::run_tests" name="lru_tests::run_tests">
<area shape="rect" id="node1" title="A function to invoke all test cases." alt="" coords="5,159,140,185"/>
<area shape="rect" id="node2" href="$d3/db3/lru__cache_8cpp.html#a6401e8f2d41d8cc9cd0e52ab381608d4" title="A simple test case The assert statement will check expected hist and miss to resultant hits and miss." alt="" coords="188,84,304,111"/>
<area shape="rect" id="node15" href="$d3/db3/lru__cache_8cpp.html#a4b02e288a407876a8d6024f98a2a25ec" title="A test case contains hits more than cache size The assert statement will check expected hist and miss..." alt="" coords="188,159,304,185"/>
<area shape="rect" id="node16" href="$d3/db3/lru__cache_8cpp.html#a01ec21fc91ddafd964ae2035ba7892c0" title="A simple test case The assert statement will check expected hist and miss to resultant hits and miss." alt="" coords="188,233,304,260"/>
<area shape="rect" id="node3" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933" title="A function to get page hits." alt="" coords="371,86,507,127"/>
<area shape="rect" id="node4" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2" title="A function to get page fault." alt="" coords="352,151,525,193"/>
<area shape="rect" id="node5" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602" title="Refer to a page, or request a page from memory." alt="" coords="373,217,505,258"/>
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/back.html#" title=" " alt="" coords="609,5,708,32"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/begin.html#" title=" " alt="" coords="607,56,711,83"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/end.html#" title=" " alt="" coords="573,107,744,133"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/erase.html#" title=" " alt="" coords="588,158,729,199"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/erase.html#" title=" " alt="" coords="607,224,711,251"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/find.html#" title=" " alt="" coords="588,275,729,317"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/pop_back.html#" title=" " alt="" coords="594,341,723,368"/>
<area shape="rect" id="node13" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/push_front.html#" title=" " alt="" coords="592,392,725,419"/>
<area shape="rect" id="node14" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/size.html#" title=" " alt="" coords="611,443,706,469"/>
</map>

View File

@@ -0,0 +1 @@
c74df4f9d34a65270206097c224a3fec

View File

@@ -0,0 +1,400 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
-->
<!-- Title: lru_tests::run_tests Pages: 1 -->
<!--zoomable 356 -->
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" onload="init(evt)">
<style type="text/css"><![CDATA[
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="text/javascript"><![CDATA[
var edges = document.getElementsByTagName('g');
if (edges && edges.length) {
for (var i=0;i<edges.length;i++) {
if (edges[i].id.substr(0,4)=='edge') {
edges[i].setAttribute('class','edge');
}
}
}
]]></script>
<defs>
<circle id="rim" cx="0" cy="0" r="7"/>
<circle id="rim2" cx="0" cy="0" r="3.5"/>
<g id="zoomPlus">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="zoomplus.mouseover" end="zoomplus.mouseout"/>
</use>
<path d="M-4,0h8M0,-4v8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
</g>
<g id="zoomMin">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="zoomminus.mouseover" end="zoomminus.mouseout"/>
</use>
<path d="M-4,0h8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
</g>
<g id="dirArrow">
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
<g id="resetDef">
<use xlink:href="#rim2" fill="#404040">
<set attributeName="fill" to="#808080" begin="reset.mouseover" end="reset.mouseout"/>
</use>
</g>
</defs>
<script type="text/javascript">
var viewWidth = 562;
var viewHeight = 356;
var sectionId = 'dynsection-3';
</script>
<script xlink:href="../../svgpan.js"/>
<svg id="graph" class="graph">
<g id="viewport">
<title>lru_tests::run_tests</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-352 558,-352 558,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="A function to invoke all test cases.">
<polygon fill="#bfbfbf" stroke="black" points="0,-213.5 0,-232.5 101,-232.5 101,-213.5 0,-213.5"/>
<text text-anchor="middle" x="50.5" y="-220.5" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::run_tests</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M30.46,-232.76C20.72,-241.57 27.39,-251 50.5,-251 65.3,-251 73.36,-247.13 74.68,-242.03"/>
<polygon fill="midnightblue" stroke="midnightblue" points="77.81,-240.46 70.54,-232.76 71.42,-243.31 77.81,-240.46"/>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d3/db3/lru__cache_8cpp.html#a6401e8f2d41d8cc9cd0e52ab381608d4" target="_top" xlink:title="A simple test case The assert statement will check expected hist and miss to resultant hits and miss.">
<polygon fill="white" stroke="black" points="137,-269.5 137,-288.5 224,-288.5 224,-269.5 137,-269.5"/>
<text text-anchor="middle" x="180.5" y="-276.5" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::test_1</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M73.5,-232.63C94.14,-241.66 125.22,-255.25 148.39,-265.39"/>
<polygon fill="midnightblue" stroke="midnightblue" points="147.22,-268.7 157.78,-269.5 150.02,-262.28 147.22,-268.7"/>
</g>
<!-- Node15 -->
<g id="node15" class="node">
<title>Node15</title>
<g id="a_node15"><a xlink:href="../../d3/db3/lru__cache_8cpp.html#a4b02e288a407876a8d6024f98a2a25ec" target="_top" xlink:title="A test case contains hits more than cache size The assert statement will check expected hist and miss...">
<polygon fill="white" stroke="black" points="137,-213.5 137,-232.5 224,-232.5 224,-213.5 137,-213.5"/>
<text text-anchor="middle" x="180.5" y="-220.5" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::test_2</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node15 -->
<g id="edge16" class="edge">
<title>Node1&#45;&gt;Node15</title>
<path fill="none" stroke="midnightblue" d="M101.35,-223C109.64,-223 118.26,-223 126.61,-223"/>
<polygon fill="midnightblue" stroke="midnightblue" points="126.64,-226.5 136.64,-223 126.64,-219.5 126.64,-226.5"/>
</g>
<!-- Node16 -->
<g id="node16" class="node">
<title>Node16</title>
<g id="a_node16"><a xlink:href="../../d3/db3/lru__cache_8cpp.html#a01ec21fc91ddafd964ae2035ba7892c0" target="_top" xlink:title="A simple test case The assert statement will check expected hist and miss to resultant hits and miss.">
<polygon fill="white" stroke="black" points="137,-157.5 137,-176.5 224,-176.5 224,-157.5 137,-157.5"/>
<text text-anchor="middle" x="180.5" y="-164.5" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::test_3</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node16 -->
<g id="edge21" class="edge">
<title>Node1&#45;&gt;Node16</title>
<path fill="none" stroke="midnightblue" d="M73.5,-213.37C94.14,-204.34 125.22,-190.75 148.39,-180.61"/>
<polygon fill="midnightblue" stroke="midnightblue" points="150.02,-183.72 157.78,-176.5 147.22,-177.3 150.02,-183.72"/>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge15" class="edge">
<title>Node2&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M160.46,-288.76C150.72,-297.57 157.39,-307 180.5,-307 195.3,-307 203.36,-303.13 204.68,-298.03"/>
<polygon fill="midnightblue" stroke="midnightblue" points="207.81,-296.46 200.54,-288.76 201.42,-299.31 207.81,-296.46"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933" target="_top" xlink:title="A function to get page hits.">
<polygon fill="white" stroke="black" points="274,-257 274,-287 376,-287 376,-257 274,-257"/>
<text text-anchor="start" x="282" y="-275" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="325" y="-264" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getHits</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge3" class="edge">
<title>Node2&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M224.25,-276.9C236.67,-276.29 250.46,-275.61 263.73,-274.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="263.93,-278.45 273.75,-274.47 263.59,-271.46 263.93,-278.45"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2" target="_top" xlink:title="A function to get page fault.">
<polygon fill="white" stroke="black" points="260,-208 260,-238 390,-238 390,-208 260,-208"/>
<text text-anchor="start" x="268" y="-226" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="325" y="-215" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getPageFault</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge4" class="edge">
<title>Node2&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M205.54,-269.48C221.07,-263.34 241.72,-255.18 260,-248 265.14,-245.98 270.5,-243.88 275.85,-241.78"/>
<polygon fill="midnightblue" stroke="midnightblue" points="277.37,-244.95 285.41,-238.05 274.82,-238.43 277.37,-244.95"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602" target="_top" xlink:title="Refer to a page, or request a page from memory.">
<polygon fill="white" stroke="black" points="275.5,-159 275.5,-189 374.5,-189 374.5,-159 275.5,-159"/>
<text text-anchor="start" x="283.5" y="-177" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="325" y="-166" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::refer</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node5 -->
<g id="edge5" class="edge">
<title>Node2&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M209.52,-269.45C214.69,-266.9 219.78,-263.77 224,-260 247.48,-239.03 236.02,-219.4 260,-199 261.99,-197.31 264.1,-195.72 266.31,-194.24"/>
<polygon fill="midnightblue" stroke="midnightblue" points="268.36,-197.1 275.19,-189 264.8,-191.07 268.36,-197.1"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="453,-328.5 453,-347.5 527,-347.5 527,-328.5 453,-328.5"/>
<text text-anchor="middle" x="490" y="-335.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::back</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge6" class="edge">
<title>Node5&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M374.5,-187.29C380.26,-190.41 385.63,-194.26 390,-199 427.75,-239.93 386.66,-279.6 426,-319 430.83,-323.83 436.84,-327.45 443.21,-330.14"/>
<polygon fill="midnightblue" stroke="midnightblue" points="442.13,-333.47 452.72,-333.48 444.44,-326.87 442.13,-333.47"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/begin.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="451,-290.5 451,-309.5 529,-309.5 529,-290.5 451,-290.5"/>
<text text-anchor="middle" x="490" y="-297.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::begin</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node7 -->
<g id="edge7" class="edge">
<title>Node5&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M374.62,-188.14C380.23,-191.12 385.52,-194.71 390,-199 418.72,-226.56 396.21,-254.61 426,-281 430.49,-284.98 435.79,-288.13 441.38,-290.61"/>
<polygon fill="midnightblue" stroke="midnightblue" points="440.38,-293.97 450.97,-294.21 442.83,-287.42 440.38,-293.97"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/end.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="426,-252.5 426,-271.5 554,-271.5 554,-252.5 426,-252.5"/>
<text text-anchor="middle" x="490" y="-259.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map::end</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node8 -->
<g id="edge8" class="edge">
<title>Node5&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M372.93,-189.06C378.93,-191.91 384.79,-195.21 390,-199 410.44,-213.86 404.99,-228.96 426,-243 429.08,-245.06 432.39,-246.9 435.82,-248.54"/>
<polygon fill="midnightblue" stroke="midnightblue" points="434.54,-251.8 445.11,-252.46 437.26,-245.35 434.54,-251.8"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/erase.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="437,-203 437,-233 543,-233 543,-203 437,-203"/>
<text text-anchor="start" x="445" y="-221" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="490" y="-210" font-family="Helvetica,sans-Serif" font-size="10.00">::erase</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node9 -->
<g id="edge9" class="edge">
<title>Node5&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M374.91,-187.2C391.21,-191.6 409.6,-196.57 426.78,-201.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="426.16,-204.66 436.73,-203.89 427.98,-197.9 426.16,-204.66"/>
</g>
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/erase.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="451,-164.5 451,-183.5 529,-183.5 529,-164.5 451,-164.5"/>
<text text-anchor="middle" x="490" y="-171.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::erase</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node10 -->
<g id="edge10" class="edge">
<title>Node5&#45;&gt;Node10</title>
<path fill="none" stroke="midnightblue" d="M374.91,-174C395.68,-174 419.84,-174 440.57,-174"/>
<polygon fill="midnightblue" stroke="midnightblue" points="440.75,-177.5 450.75,-174 440.75,-170.5 440.75,-177.5"/>
</g>
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/find.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="437,-115 437,-145 543,-145 543,-115 437,-115"/>
<text text-anchor="start" x="445" y="-133" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="490" y="-122" font-family="Helvetica,sans-Serif" font-size="10.00">::find</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node11 -->
<g id="edge11" class="edge">
<title>Node5&#45;&gt;Node11</title>
<path fill="none" stroke="midnightblue" d="M374.91,-160.8C391.21,-156.4 409.6,-151.43 426.78,-146.8"/>
<polygon fill="midnightblue" stroke="midnightblue" points="427.98,-150.1 436.73,-144.11 426.16,-143.34 427.98,-150.1"/>
</g>
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/pop_back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="441.5,-76.5 441.5,-95.5 538.5,-95.5 538.5,-76.5 441.5,-76.5"/>
<text text-anchor="middle" x="490" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::pop_back</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node12 -->
<g id="edge12" class="edge">
<title>Node5&#45;&gt;Node12</title>
<path fill="none" stroke="midnightblue" d="M344.53,-158.96C363.88,-143.86 395.6,-120.77 426,-106 431.36,-103.4 437.13,-101.03 442.93,-98.91"/>
<polygon fill="midnightblue" stroke="midnightblue" points="444.33,-102.12 452.65,-95.57 442.06,-95.5 444.33,-102.12"/>
</g>
<!-- Node13 -->
<g id="node13" class="node">
<title>Node13</title>
<g id="a_node13"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/push_front.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="440,-38.5 440,-57.5 540,-57.5 540,-38.5 440,-38.5"/>
<text text-anchor="middle" x="490" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::push_front</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<title>Node5&#45;&gt;Node13</title>
<path fill="none" stroke="midnightblue" d="M336.12,-158.85C352.36,-135.68 386.48,-91.56 426,-67 429.4,-64.89 433.04,-63 436.8,-61.31"/>
<polygon fill="midnightblue" stroke="midnightblue" points="438.33,-64.47 446.32,-57.52 435.74,-57.97 438.33,-64.47"/>
</g>
<!-- Node14 -->
<g id="node14" class="node">
<title>Node14</title>
<g id="a_node14"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="454.5,-0.5 454.5,-19.5 525.5,-19.5 525.5,-0.5 454.5,-0.5"/>
<text text-anchor="middle" x="490" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::size</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<title>Node5&#45;&gt;Node14</title>
<path fill="none" stroke="midnightblue" d="M332.32,-158.75C345.35,-129.2 378.06,-63.95 426,-29 431.58,-24.93 438.04,-21.72 444.65,-19.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="445.98,-22.44 454.36,-15.97 443.77,-15.8 445.98,-22.44"/>
</g>
<!-- Node15&#45;&gt;Node3 -->
<g id="edge17" class="edge">
<title>Node15&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M209.31,-232.56C226.72,-238.55 249.73,-246.46 270.57,-253.63"/>
<polygon fill="midnightblue" stroke="midnightblue" points="269.68,-257.02 280.27,-256.96 271.95,-250.4 269.68,-257.02"/>
</g>
<!-- Node15&#45;&gt;Node4 -->
<g id="edge18" class="edge">
<title>Node15&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M224.25,-223C232.33,-223 240.98,-223 249.7,-223"/>
<polygon fill="midnightblue" stroke="midnightblue" points="249.93,-226.5 259.93,-223 249.93,-219.5 249.93,-226.5"/>
</g>
<!-- Node15&#45;&gt;Node5 -->
<g id="edge19" class="edge">
<title>Node15&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M209.31,-213.44C226.72,-207.45 249.73,-199.54 270.57,-192.37"/>
<polygon fill="midnightblue" stroke="midnightblue" points="271.95,-195.6 280.27,-189.04 269.68,-188.98 271.95,-195.6"/>
</g>
<!-- Node15&#45;&gt;Node15 -->
<g id="edge20" class="edge">
<title>Node15&#45;&gt;Node15</title>
<path fill="none" stroke="midnightblue" d="M160.46,-232.76C150.72,-241.57 157.39,-251 180.5,-251 195.3,-251 203.36,-247.13 204.68,-242.03"/>
<polygon fill="midnightblue" stroke="midnightblue" points="207.81,-240.46 200.54,-232.76 201.42,-243.31 207.81,-240.46"/>
</g>
<!-- Node16&#45;&gt;Node3 -->
<g id="edge22" class="edge">
<title>Node16&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M193.52,-176.54C202.31,-183.73 214.33,-194.03 224,-204 241.59,-222.14 239.46,-233.28 260,-248 262.07,-249.48 264.24,-250.88 266.48,-252.21"/>
<polygon fill="midnightblue" stroke="midnightblue" points="264.93,-255.35 275.41,-256.95 268.21,-249.17 264.93,-255.35"/>
</g>
<!-- Node16&#45;&gt;Node4 -->
<g id="edge23" class="edge">
<title>Node16&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M204.45,-176.55C220.06,-183.01 241.22,-191.65 260,-199 264.46,-200.75 269.11,-202.54 273.77,-204.32"/>
<polygon fill="midnightblue" stroke="midnightblue" points="272.71,-207.66 283.31,-207.94 275.2,-201.12 272.71,-207.66"/>
</g>
<!-- Node16&#45;&gt;Node5 -->
<g id="edge24" class="edge">
<title>Node16&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M224.25,-169.1C237.06,-169.73 251.33,-170.43 264.99,-171.1"/>
<polygon fill="midnightblue" stroke="midnightblue" points="265.12,-174.61 275.28,-171.61 265.46,-167.62 265.12,-174.61"/>
</g>
<!-- Node16&#45;&gt;Node16 -->
<g id="edge25" class="edge">
<title>Node16&#45;&gt;Node16</title>
<path fill="none" stroke="midnightblue" d="M160.46,-176.76C150.72,-185.57 157.39,-195 180.5,-195 195.3,-195 203.36,-191.13 204.68,-186.03"/>
<polygon fill="midnightblue" stroke="midnightblue" points="207.81,-184.46 200.54,-176.76 201.42,-187.31 207.81,-184.46"/>
</g>
</g>
</svg>
<g id="navigator" transform="translate(0 0)" fill="#404254">
<rect fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width=".5" x="0" y="0" width="60" height="60"/>
<use id="zoomplus" xlink:href="#zoomPlus" x="17" y="9" onmousedown="handleZoom(evt,'in')"/>
<use id="zoomminus" xlink:href="#zoomMin" x="42" y="9" onmousedown="handleZoom(evt,'out')"/>
<use id="reset" xlink:href="#resetDef" x="30" y="36" onmousedown="handleReset()"/>
<g id="arrowUp" xlink:href="#dirArrow" transform="translate(30 24)" onmousedown="handlePan(0,-1)">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="arrowUp.mouseover" end="arrowUp.mouseout"/>
</use>
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
<g id="arrowRight" xlink:href="#dirArrow" transform="rotate(90) translate(36 -43)" onmousedown="handlePan(1,0)">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="arrowRight.mouseover" end="arrowRight.mouseout"/>
</use>
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
<g id="arrowDown" xlink:href="#dirArrow" transform="rotate(180) translate(-30 -48)" onmousedown="handlePan(0,1)">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="arrowDown.mouseover" end="arrowDown.mouseout"/>
</use>
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
<g id="arrowLeft" xlink:href="#dirArrow" transform="rotate(270) translate(-36 17)" onmousedown="handlePan(-1,0)">
<use xlink:href="#rim" fill="#404040">
<set attributeName="fill" to="#808080" begin="arrowLeft.mouseover" end="arrowLeft.mouseout"/>
</use>
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
</g>
</g>
<svg viewBox="0 0 15 15" width="100%" height="30px" preserveAspectRatio="xMaxYMin meet">
<g id="arrow_out" transform="scale(0.3 0.3)">
<a xlink:href="lru__cache_8cpp_a6a3be6d8871b1f5dc03688da8f3ee9e6_cgraph_org.svg" target="_base">
<rect id="button" ry="5" rx="5" y="6" x="6" height="38" width="38"
fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width="1.0"/>
<path id="arrow"
d="M 11.500037,31.436501 C 11.940474,20.09759 22.043105,11.32322 32.158766,21.979434 L 37.068811,17.246167 C 37.068811,17.246167 37.088388,32 37.088388,32 L 22.160133,31.978069 C 22.160133,31.978069 26.997745,27.140456 26.997745,27.140456 C 18.528582,18.264221 13.291696,25.230495 11.500037,31.436501 z"
style="fill:#404040;"/>
</a>
</g>
</svg>
</svg>

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -0,0 +1,312 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
-->
<!-- Title: lru_tests::run_tests Pages: 1 -->
<svg width="562pt" height="356pt"
viewBox="0.00 0.00 562.00 356.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 352)">
<title>lru_tests::run_tests</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-352 558,-352 558,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="A function to invoke all test cases.">
<polygon fill="#bfbfbf" stroke="black" points="0,-213.5 0,-232.5 101,-232.5 101,-213.5 0,-213.5"/>
<text text-anchor="middle" x="50.5" y="-220.5" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::run_tests</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node1</title>
<path fill="none" stroke="midnightblue" d="M30.46,-232.76C20.72,-241.57 27.39,-251 50.5,-251 65.3,-251 73.36,-247.13 74.68,-242.03"/>
<polygon fill="midnightblue" stroke="midnightblue" points="77.81,-240.46 70.54,-232.76 71.42,-243.31 77.81,-240.46"/>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d3/db3/lru__cache_8cpp.html#a6401e8f2d41d8cc9cd0e52ab381608d4" target="_top" xlink:title="A simple test case The assert statement will check expected hist and miss to resultant hits and miss.">
<polygon fill="white" stroke="black" points="137,-269.5 137,-288.5 224,-288.5 224,-269.5 137,-269.5"/>
<text text-anchor="middle" x="180.5" y="-276.5" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::test_1</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge2" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M73.5,-232.63C94.14,-241.66 125.22,-255.25 148.39,-265.39"/>
<polygon fill="midnightblue" stroke="midnightblue" points="147.22,-268.7 157.78,-269.5 150.02,-262.28 147.22,-268.7"/>
</g>
<!-- Node15 -->
<g id="node15" class="node">
<title>Node15</title>
<g id="a_node15"><a xlink:href="../../d3/db3/lru__cache_8cpp.html#a4b02e288a407876a8d6024f98a2a25ec" target="_top" xlink:title="A test case contains hits more than cache size The assert statement will check expected hist and miss...">
<polygon fill="white" stroke="black" points="137,-213.5 137,-232.5 224,-232.5 224,-213.5 137,-213.5"/>
<text text-anchor="middle" x="180.5" y="-220.5" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::test_2</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node15 -->
<g id="edge16" class="edge">
<title>Node1&#45;&gt;Node15</title>
<path fill="none" stroke="midnightblue" d="M101.35,-223C109.64,-223 118.26,-223 126.61,-223"/>
<polygon fill="midnightblue" stroke="midnightblue" points="126.64,-226.5 136.64,-223 126.64,-219.5 126.64,-226.5"/>
</g>
<!-- Node16 -->
<g id="node16" class="node">
<title>Node16</title>
<g id="a_node16"><a xlink:href="../../d3/db3/lru__cache_8cpp.html#a01ec21fc91ddafd964ae2035ba7892c0" target="_top" xlink:title="A simple test case The assert statement will check expected hist and miss to resultant hits and miss.">
<polygon fill="white" stroke="black" points="137,-157.5 137,-176.5 224,-176.5 224,-157.5 137,-157.5"/>
<text text-anchor="middle" x="180.5" y="-164.5" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::test_3</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node16 -->
<g id="edge21" class="edge">
<title>Node1&#45;&gt;Node16</title>
<path fill="none" stroke="midnightblue" d="M73.5,-213.37C94.14,-204.34 125.22,-190.75 148.39,-180.61"/>
<polygon fill="midnightblue" stroke="midnightblue" points="150.02,-183.72 157.78,-176.5 147.22,-177.3 150.02,-183.72"/>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge15" class="edge">
<title>Node2&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M160.46,-288.76C150.72,-297.57 157.39,-307 180.5,-307 195.3,-307 203.36,-303.13 204.68,-298.03"/>
<polygon fill="midnightblue" stroke="midnightblue" points="207.81,-296.46 200.54,-288.76 201.42,-299.31 207.81,-296.46"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933" target="_top" xlink:title="A function to get page hits.">
<polygon fill="white" stroke="black" points="274,-257 274,-287 376,-287 376,-257 274,-257"/>
<text text-anchor="start" x="282" y="-275" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="325" y="-264" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getHits</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge3" class="edge">
<title>Node2&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M224.25,-276.9C236.67,-276.29 250.46,-275.61 263.73,-274.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="263.93,-278.45 273.75,-274.47 263.59,-271.46 263.93,-278.45"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2" target="_top" xlink:title="A function to get page fault.">
<polygon fill="white" stroke="black" points="260,-208 260,-238 390,-238 390,-208 260,-208"/>
<text text-anchor="start" x="268" y="-226" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="325" y="-215" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getPageFault</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge4" class="edge">
<title>Node2&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M205.54,-269.48C221.07,-263.34 241.72,-255.18 260,-248 265.14,-245.98 270.5,-243.88 275.85,-241.78"/>
<polygon fill="midnightblue" stroke="midnightblue" points="277.37,-244.95 285.41,-238.05 274.82,-238.43 277.37,-244.95"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602" target="_top" xlink:title="Refer to a page, or request a page from memory.">
<polygon fill="white" stroke="black" points="275.5,-159 275.5,-189 374.5,-189 374.5,-159 275.5,-159"/>
<text text-anchor="start" x="283.5" y="-177" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="325" y="-166" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::refer</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node5 -->
<g id="edge5" class="edge">
<title>Node2&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M209.52,-269.45C214.69,-266.9 219.78,-263.77 224,-260 247.48,-239.03 236.02,-219.4 260,-199 261.99,-197.31 264.1,-195.72 266.31,-194.24"/>
<polygon fill="midnightblue" stroke="midnightblue" points="268.36,-197.1 275.19,-189 264.8,-191.07 268.36,-197.1"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="453,-328.5 453,-347.5 527,-347.5 527,-328.5 453,-328.5"/>
<text text-anchor="middle" x="490" y="-335.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::back</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node6 -->
<g id="edge6" class="edge">
<title>Node5&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M374.5,-187.29C380.26,-190.41 385.63,-194.26 390,-199 427.75,-239.93 386.66,-279.6 426,-319 430.83,-323.83 436.84,-327.45 443.21,-330.14"/>
<polygon fill="midnightblue" stroke="midnightblue" points="442.13,-333.47 452.72,-333.48 444.44,-326.87 442.13,-333.47"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/begin.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="451,-290.5 451,-309.5 529,-309.5 529,-290.5 451,-290.5"/>
<text text-anchor="middle" x="490" y="-297.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::begin</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node7 -->
<g id="edge7" class="edge">
<title>Node5&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M374.62,-188.14C380.23,-191.12 385.52,-194.71 390,-199 418.72,-226.56 396.21,-254.61 426,-281 430.49,-284.98 435.79,-288.13 441.38,-290.61"/>
<polygon fill="midnightblue" stroke="midnightblue" points="440.38,-293.97 450.97,-294.21 442.83,-287.42 440.38,-293.97"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/end.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="426,-252.5 426,-271.5 554,-271.5 554,-252.5 426,-252.5"/>
<text text-anchor="middle" x="490" y="-259.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map::end</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node8 -->
<g id="edge8" class="edge">
<title>Node5&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M372.93,-189.06C378.93,-191.91 384.79,-195.21 390,-199 410.44,-213.86 404.99,-228.96 426,-243 429.08,-245.06 432.39,-246.9 435.82,-248.54"/>
<polygon fill="midnightblue" stroke="midnightblue" points="434.54,-251.8 445.11,-252.46 437.26,-245.35 434.54,-251.8"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/erase.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="437,-203 437,-233 543,-233 543,-203 437,-203"/>
<text text-anchor="start" x="445" y="-221" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="490" y="-210" font-family="Helvetica,sans-Serif" font-size="10.00">::erase</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node9 -->
<g id="edge9" class="edge">
<title>Node5&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M374.91,-187.2C391.21,-191.6 409.6,-196.57 426.78,-201.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="426.16,-204.66 436.73,-203.89 427.98,-197.9 426.16,-204.66"/>
</g>
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/erase.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="451,-164.5 451,-183.5 529,-183.5 529,-164.5 451,-164.5"/>
<text text-anchor="middle" x="490" y="-171.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::erase</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node10 -->
<g id="edge10" class="edge">
<title>Node5&#45;&gt;Node10</title>
<path fill="none" stroke="midnightblue" d="M374.91,-174C395.68,-174 419.84,-174 440.57,-174"/>
<polygon fill="midnightblue" stroke="midnightblue" points="440.75,-177.5 450.75,-174 440.75,-170.5 440.75,-177.5"/>
</g>
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/find.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="437,-115 437,-145 543,-145 543,-115 437,-115"/>
<text text-anchor="start" x="445" y="-133" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="490" y="-122" font-family="Helvetica,sans-Serif" font-size="10.00">::find</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node11 -->
<g id="edge11" class="edge">
<title>Node5&#45;&gt;Node11</title>
<path fill="none" stroke="midnightblue" d="M374.91,-160.8C391.21,-156.4 409.6,-151.43 426.78,-146.8"/>
<polygon fill="midnightblue" stroke="midnightblue" points="427.98,-150.1 436.73,-144.11 426.16,-143.34 427.98,-150.1"/>
</g>
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/pop_back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="441.5,-76.5 441.5,-95.5 538.5,-95.5 538.5,-76.5 441.5,-76.5"/>
<text text-anchor="middle" x="490" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::pop_back</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node12 -->
<g id="edge12" class="edge">
<title>Node5&#45;&gt;Node12</title>
<path fill="none" stroke="midnightblue" d="M344.53,-158.96C363.88,-143.86 395.6,-120.77 426,-106 431.36,-103.4 437.13,-101.03 442.93,-98.91"/>
<polygon fill="midnightblue" stroke="midnightblue" points="444.33,-102.12 452.65,-95.57 442.06,-95.5 444.33,-102.12"/>
</g>
<!-- Node13 -->
<g id="node13" class="node">
<title>Node13</title>
<g id="a_node13"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/push_front.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="440,-38.5 440,-57.5 540,-57.5 540,-38.5 440,-38.5"/>
<text text-anchor="middle" x="490" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::push_front</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<title>Node5&#45;&gt;Node13</title>
<path fill="none" stroke="midnightblue" d="M336.12,-158.85C352.36,-135.68 386.48,-91.56 426,-67 429.4,-64.89 433.04,-63 436.8,-61.31"/>
<polygon fill="midnightblue" stroke="midnightblue" points="438.33,-64.47 446.32,-57.52 435.74,-57.97 438.33,-64.47"/>
</g>
<!-- Node14 -->
<g id="node14" class="node">
<title>Node14</title>
<g id="a_node14"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="454.5,-0.5 454.5,-19.5 525.5,-19.5 525.5,-0.5 454.5,-0.5"/>
<text text-anchor="middle" x="490" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::size</text>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<title>Node5&#45;&gt;Node14</title>
<path fill="none" stroke="midnightblue" d="M332.32,-158.75C345.35,-129.2 378.06,-63.95 426,-29 431.58,-24.93 438.04,-21.72 444.65,-19.2"/>
<polygon fill="midnightblue" stroke="midnightblue" points="445.98,-22.44 454.36,-15.97 443.77,-15.8 445.98,-22.44"/>
</g>
<!-- Node15&#45;&gt;Node3 -->
<g id="edge17" class="edge">
<title>Node15&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M209.31,-232.56C226.72,-238.55 249.73,-246.46 270.57,-253.63"/>
<polygon fill="midnightblue" stroke="midnightblue" points="269.68,-257.02 280.27,-256.96 271.95,-250.4 269.68,-257.02"/>
</g>
<!-- Node15&#45;&gt;Node4 -->
<g id="edge18" class="edge">
<title>Node15&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M224.25,-223C232.33,-223 240.98,-223 249.7,-223"/>
<polygon fill="midnightblue" stroke="midnightblue" points="249.93,-226.5 259.93,-223 249.93,-219.5 249.93,-226.5"/>
</g>
<!-- Node15&#45;&gt;Node5 -->
<g id="edge19" class="edge">
<title>Node15&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M209.31,-213.44C226.72,-207.45 249.73,-199.54 270.57,-192.37"/>
<polygon fill="midnightblue" stroke="midnightblue" points="271.95,-195.6 280.27,-189.04 269.68,-188.98 271.95,-195.6"/>
</g>
<!-- Node15&#45;&gt;Node15 -->
<g id="edge20" class="edge">
<title>Node15&#45;&gt;Node15</title>
<path fill="none" stroke="midnightblue" d="M160.46,-232.76C150.72,-241.57 157.39,-251 180.5,-251 195.3,-251 203.36,-247.13 204.68,-242.03"/>
<polygon fill="midnightblue" stroke="midnightblue" points="207.81,-240.46 200.54,-232.76 201.42,-243.31 207.81,-240.46"/>
</g>
<!-- Node16&#45;&gt;Node3 -->
<g id="edge22" class="edge">
<title>Node16&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M193.52,-176.54C202.31,-183.73 214.33,-194.03 224,-204 241.59,-222.14 239.46,-233.28 260,-248 262.07,-249.48 264.24,-250.88 266.48,-252.21"/>
<polygon fill="midnightblue" stroke="midnightblue" points="264.93,-255.35 275.41,-256.95 268.21,-249.17 264.93,-255.35"/>
</g>
<!-- Node16&#45;&gt;Node4 -->
<g id="edge23" class="edge">
<title>Node16&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M204.45,-176.55C220.06,-183.01 241.22,-191.65 260,-199 264.46,-200.75 269.11,-202.54 273.77,-204.32"/>
<polygon fill="midnightblue" stroke="midnightblue" points="272.71,-207.66 283.31,-207.94 275.2,-201.12 272.71,-207.66"/>
</g>
<!-- Node16&#45;&gt;Node5 -->
<g id="edge24" class="edge">
<title>Node16&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M224.25,-169.1C237.06,-169.73 251.33,-170.43 264.99,-171.1"/>
<polygon fill="midnightblue" stroke="midnightblue" points="265.12,-174.61 275.28,-171.61 265.46,-167.62 265.12,-174.61"/>
</g>
<!-- Node16&#45;&gt;Node16 -->
<g id="edge25" class="edge">
<title>Node16&#45;&gt;Node16</title>
<path fill="none" stroke="midnightblue" d="M160.46,-176.76C150.72,-185.57 157.39,-195 180.5,-195 195.3,-195 203.36,-191.13 204.68,-186.03"/>
<polygon fill="midnightblue" stroke="midnightblue" points="207.81,-184.46 200.54,-176.76 201.42,-187.31 207.81,-184.46"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,17 @@
<map id="main" name="main">
<area shape="rect" id="node1" title="Main function." alt="" coords="5,130,56,157"/>
<area shape="rect" id="node2" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aad506b1c1a3cd5b93cc7e497626bfb53" title="A function to display the current cache." alt="" coords="123,5,259,47"/>
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="375,13,447,39"/>
<area shape="rect" id="node4" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933" title="A function to get page hits." alt="" coords="123,123,259,164"/>
<area shape="rect" id="node5" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2" title="A function to get page fault." alt="" coords="104,188,277,229"/>
<area shape="rect" id="node6" href="$d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602" title="Refer to a page, or request a page from memory." alt="" coords="125,264,257,305"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/back.html#" title=" " alt="" coords="361,63,460,90"/>
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/begin.html#" title=" " alt="" coords="359,114,463,141"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/end.html#" title=" " alt="" coords="325,165,496,191"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/erase.html#" title=" " alt="" coords="340,216,481,257"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/erase.html#" title=" " alt="" coords="359,282,463,309"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/unordered_map/find.html#" title=" " alt="" coords="340,333,481,375"/>
<area shape="rect" id="node13" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/pop_back.html#" title=" " alt="" coords="346,399,475,426"/>
<area shape="rect" id="node14" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/push_front.html#" title=" " alt="" coords="344,450,477,477"/>
<area shape="rect" id="node15" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/size.html#" title=" " alt="" coords="363,501,458,527"/>
</map>

View File

@@ -0,0 +1 @@
7b5765ca7874b2630d439c39927a8723

View File

@@ -0,0 +1,244 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.48.0 (20210717.1556)
-->
<!-- Title: main Pages: 1 -->
<svg width="376pt" height="400pt"
viewBox="0.00 0.00 376.00 399.50" 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 395.5)">
<title>main</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-395.5 372,-395.5 372,4 -4,4"/>
<!-- Node1 -->
<g id="node1" class="node">
<title>Node1</title>
<g id="a_node1"><a xlink:title="Main function.">
<polygon fill="#bfbfbf" stroke="black" points="0,-278.5 0,-297.5 38,-297.5 38,-278.5 0,-278.5"/>
<text text-anchor="middle" x="19" y="-285.5" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aad506b1c1a3cd5b93cc7e497626bfb53" target="_top" xlink:title="A function to display the current cache.">
<polygon fill="white" stroke="black" points="88,-361 88,-391 190,-391 190,-361 88,-361"/>
<text text-anchor="start" x="96" y="-379" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="139" y="-368" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::display</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1" class="edge">
<title>Node1&#45;&gt;Node2</title>
<path fill="none" stroke="midnightblue" d="M27.12,-297.7C36.66,-310.17 54.65,-331.9 74,-346 79.14,-349.75 84.83,-353.21 90.62,-356.34"/>
<polygon fill="midnightblue" stroke="midnightblue" points="89.26,-359.58 99.76,-361 92.44,-353.34 89.26,-359.58"/>
</g>
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="277,-366.5 277,-385.5 331,-385.5 331,-366.5 277,-366.5"/>
<text text-anchor="middle" x="304" y="-373.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge3" class="edge">
<title>Node1&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M38.18,-297.33C48.5,-302.4 61.78,-308.52 74,-313 109.54,-326.01 211.86,-352.76 266.92,-366.85"/>
<polygon fill="midnightblue" stroke="midnightblue" points="266.07,-370.25 276.62,-369.33 267.8,-363.46 266.07,-370.25"/>
</g>
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933" target="_top" xlink:title="A function to get page hits.">
<polygon fill="white" stroke="black" points="88,-273 88,-303 190,-303 190,-273 88,-273"/>
<text text-anchor="start" x="96" y="-291" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="139" y="-280" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getHits</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge4" class="edge">
<title>Node1&#45;&gt;Node4</title>
<path fill="none" stroke="midnightblue" d="M38.18,-288C49,-288 63.41,-288 77.91,-288"/>
<polygon fill="midnightblue" stroke="midnightblue" points="77.92,-291.5 87.92,-288 77.92,-284.5 77.92,-291.5"/>
</g>
<!-- Node5 -->
<g id="node5" class="node">
<title>Node5</title>
<g id="a_node5"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2" target="_top" xlink:title="A function to get page fault.">
<polygon fill="white" stroke="black" points="74,-224 74,-254 204,-254 204,-224 74,-224"/>
<text text-anchor="start" x="82" y="-242" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="139" y="-231" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getPageFault</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge5" class="edge">
<title>Node1&#45;&gt;Node5</title>
<path fill="none" stroke="midnightblue" d="M38.4,-279.57C48.8,-274.87 62.07,-268.98 74,-264 78.83,-261.98 83.88,-259.93 88.94,-257.9"/>
<polygon fill="midnightblue" stroke="midnightblue" points="90.62,-261 98.62,-254.05 88.04,-254.49 90.62,-261"/>
</g>
<!-- Node6 -->
<g id="node6" class="node">
<title>Node6</title>
<g id="a_node6"><a xlink:href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602" target="_top" xlink:title="Refer to a page, or request a page from memory.">
<polygon fill="white" stroke="black" points="89.5,-167 89.5,-197 188.5,-197 188.5,-167 89.5,-167"/>
<text text-anchor="start" x="97.5" y="-185" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
<text text-anchor="middle" x="139" y="-174" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::refer</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node6 -->
<g id="edge6" class="edge">
<title>Node1&#45;&gt;Node6</title>
<path fill="none" stroke="midnightblue" d="M25.17,-278.39C33.68,-263.29 51.91,-233.8 74,-215 79.63,-210.21 86.07,-205.87 92.65,-202.03"/>
<polygon fill="midnightblue" stroke="midnightblue" points="94.55,-204.98 101.65,-197.11 91.19,-198.84 94.55,-204.98"/>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2" class="edge">
<title>Node2&#45;&gt;Node3</title>
<path fill="none" stroke="midnightblue" d="M190.24,-376C214.95,-376 244.18,-376 266.68,-376"/>
<polygon fill="midnightblue" stroke="midnightblue" points="266.83,-379.5 276.83,-376 266.83,-372.5 266.83,-379.5"/>
</g>
<!-- Node7 -->
<g id="node7" class="node">
<title>Node7</title>
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="267,-328.5 267,-347.5 341,-347.5 341,-328.5 267,-328.5"/>
<text text-anchor="middle" x="304" y="-335.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::back</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node7 -->
<g id="edge7" class="edge">
<title>Node6&#45;&gt;Node7</title>
<path fill="none" stroke="midnightblue" d="M180.87,-197.17C189.39,-201.84 197.7,-207.73 204,-215 236.03,-251.97 204.72,-285.12 240,-319 244.93,-323.73 250.99,-327.29 257.39,-329.96"/>
<polygon fill="midnightblue" stroke="midnightblue" points="256.32,-333.3 266.91,-333.28 258.62,-326.69 256.32,-333.3"/>
</g>
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/begin.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="265,-290.5 265,-309.5 343,-309.5 343,-290.5 265,-290.5"/>
<text text-anchor="middle" x="304" y="-297.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::begin</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node8 -->
<g id="edge8" class="edge">
<title>Node6&#45;&gt;Node8</title>
<path fill="none" stroke="midnightblue" d="M178.35,-197.08C187.47,-201.88 196.67,-207.84 204,-215 227.9,-238.35 214.06,-259.93 240,-281 244.6,-284.74 249.93,-287.74 255.49,-290.15"/>
<polygon fill="midnightblue" stroke="midnightblue" points="254.41,-293.48 265,-293.68 256.84,-286.92 254.41,-293.48"/>
</g>
<!-- Node9 -->
<g id="node9" class="node">
<title>Node9</title>
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/end.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="240,-252.5 240,-271.5 368,-271.5 368,-252.5 240,-252.5"/>
<text text-anchor="middle" x="304" y="-259.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map::end</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node9 -->
<g id="edge9" class="edge">
<title>Node6&#45;&gt;Node9</title>
<path fill="none" stroke="midnightblue" d="M172.23,-197.15C182.6,-202.41 193.99,-208.61 204,-215 221.08,-225.91 221.99,-233.69 240,-243 244.28,-245.21 248.86,-247.21 253.52,-249"/>
<polygon fill="midnightblue" stroke="midnightblue" points="252.54,-252.37 263.14,-252.41 254.88,-245.77 252.54,-252.37"/>
</g>
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/erase.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="251,-203 251,-233 357,-233 357,-203 251,-203"/>
<text text-anchor="start" x="259" y="-221" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="304" y="-210" font-family="Helvetica,sans-Serif" font-size="10.00">::erase</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node10 -->
<g id="edge10" class="edge">
<title>Node6&#45;&gt;Node10</title>
<path fill="none" stroke="midnightblue" d="M188.91,-192.8C205.21,-196.4 223.6,-200.46 240.78,-204.26"/>
<polygon fill="midnightblue" stroke="midnightblue" points="240.21,-207.72 250.73,-206.45 241.72,-200.88 240.21,-207.72"/>
</g>
<!-- Node11 -->
<g id="node11" class="node">
<title>Node11</title>
<g id="a_node11"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/erase.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="265,-164.5 265,-183.5 343,-183.5 343,-164.5 265,-164.5"/>
<text text-anchor="middle" x="304" y="-171.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::erase</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node11 -->
<g id="edge11" class="edge">
<title>Node6&#45;&gt;Node11</title>
<path fill="none" stroke="midnightblue" d="M188.91,-179.6C209.68,-178.58 233.84,-177.39 254.57,-176.38"/>
<polygon fill="midnightblue" stroke="midnightblue" points="254.93,-179.86 264.75,-175.88 254.59,-172.87 254.93,-179.86"/>
</g>
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/find.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="251,-115 251,-145 357,-145 357,-115 251,-115"/>
<text text-anchor="start" x="259" y="-133" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
<text text-anchor="middle" x="304" y="-122" font-family="Helvetica,sans-Serif" font-size="10.00">::find</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node12 -->
<g id="edge12" class="edge">
<title>Node6&#45;&gt;Node12</title>
<path fill="none" stroke="midnightblue" d="M187.15,-166.96C205.65,-161.06 227.04,-154.23 246.36,-148.07"/>
<polygon fill="midnightblue" stroke="midnightblue" points="247.5,-151.38 255.96,-145.01 245.37,-144.71 247.5,-151.38"/>
</g>
<!-- Node13 -->
<g id="node13" class="node">
<title>Node13</title>
<g id="a_node13"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/pop_back.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="255.5,-76.5 255.5,-95.5 352.5,-95.5 352.5,-76.5 255.5,-76.5"/>
<text text-anchor="middle" x="304" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::pop_back</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node13 -->
<g id="edge13" class="edge">
<title>Node6&#45;&gt;Node13</title>
<path fill="none" stroke="midnightblue" d="M155.72,-166.92C174.42,-149.73 207.26,-121.82 240,-105 244.34,-102.77 248.99,-100.75 253.73,-98.94"/>
<polygon fill="midnightblue" stroke="midnightblue" points="255.21,-102.13 263.49,-95.51 252.89,-95.53 255.21,-102.13"/>
</g>
<!-- Node14 -->
<g id="node14" class="node">
<title>Node14</title>
<g id="a_node14"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/push_front.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="254,-38.5 254,-57.5 354,-57.5 354,-38.5 254,-38.5"/>
<text text-anchor="middle" x="304" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::push_front</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node14 -->
<g id="edge14" class="edge">
<title>Node6&#45;&gt;Node14</title>
<path fill="none" stroke="midnightblue" d="M149.07,-166.9C164.61,-142.32 198.67,-93.72 240,-67 243.16,-64.96 246.55,-63.12 250.06,-61.48"/>
<polygon fill="midnightblue" stroke="midnightblue" points="251.63,-64.62 259.54,-57.57 248.96,-58.15 251.63,-64.62"/>
</g>
<!-- Node15 -->
<g id="node15" class="node">
<title>Node15</title>
<g id="a_node15"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/size.html#" xlink:title=" ">
<polygon fill="white" stroke="black" points="268.5,-0.5 268.5,-19.5 339.5,-19.5 339.5,-0.5 268.5,-0.5"/>
<text text-anchor="middle" x="304" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::size</text>
</a>
</g>
</g>
<!-- Node6&#45;&gt;Node15 -->
<g id="edge15" class="edge">
<title>Node6&#45;&gt;Node15</title>
<path fill="none" stroke="midnightblue" d="M145.7,-166.87C158.04,-136.15 190.2,-66.26 240,-29 245.53,-24.86 251.96,-21.62 258.56,-19.08"/>
<polygon fill="midnightblue" stroke="midnightblue" points="259.89,-22.32 268.27,-15.84 257.68,-15.68 259.89,-22.32"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -136,7 +136,7 @@ Functions</h2></td></tr>
<dl class="section author"><dt>Author</dt><dd><a href="https://adityaprakash.tech">Aditya Prakash</a></dd></dl>
<p>The working principle of the Bubble sort algorithm.</p>
<p>Bubble sort is a simple sorting algorithm used to rearrange a set of ascending or descending order elements. Bubble sort gets its name from the fact that data "bubbles" to the top of the dataset.</p>
<h3><a class="anchor" id="autotoc_md93"></a>
<h3><a class="anchor" id="autotoc_md96"></a>
Algorithm</h3>
<p>What is Swap?</p>
<p>Swapping two numbers means that we interchange their values. Often, an additional variable is required for this operation. This is further illustrated in the following:</p>