mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-07-16 11:32:44 +08:00
Documentation for 446e0a5ce8
This commit is contained in:
431
d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html
Normal file
431
d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html
Normal file
@@ -0,0 +1,431 @@
|
||||
<!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::LRUCache Class 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++
|
||||
 <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&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&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&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.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="#pub-methods">Public Member Functions</a> |
|
||||
<a href="#pri-attribs">Private Attributes</a> |
|
||||
<a href="../../df/d51/classothers_1_1lru__cache_1_1_l_r_u_cache-members.html">List of all members</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">others::lru_cache::LRUCache Class Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>LRU cache class.
|
||||
<a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#details">More...</a></p>
|
||||
<div class="dynheader">
|
||||
Collaboration diagram for others::lru_cache::LRUCache:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d8/da6/classothers_1_1lru__cache_1_1_l_r_u_cache__coll__graph.svg" width="100%" height="379"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a41c9b6f1693b8a316cc4a2d8c9149ba4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a41c9b6f1693b8a316cc4a2d8c9149ba4">LRUCache</a> (uint64_t pf)</td></tr>
|
||||
<tr class="memdesc:a41c9b6f1693b8a316cc4a2d8c9149ba4"><td class="mdescLeft"> </td><td class="mdescRight">Constructor, Initialize thee LRU class with page frame. <a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a41c9b6f1693b8a316cc4a2d8c9149ba4">More...</a><br /></td></tr>
|
||||
<tr class="separator:a41c9b6f1693b8a316cc4a2d8c9149ba4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7dbf04bf7e1472c48639694f0b110602"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602">refer</a> (uint64_t page)</td></tr>
|
||||
<tr class="memdesc:a7dbf04bf7e1472c48639694f0b110602"><td class="mdescLeft"> </td><td class="mdescRight">Refer to a page, or request a page from memory. <a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602">More...</a><br /></td></tr>
|
||||
<tr class="separator:a7dbf04bf7e1472c48639694f0b110602"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aad506b1c1a3cd5b93cc7e497626bfb53"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aad506b1c1a3cd5b93cc7e497626bfb53">display</a> ()</td></tr>
|
||||
<tr class="memdesc:aad506b1c1a3cd5b93cc7e497626bfb53"><td class="mdescLeft"> </td><td class="mdescRight">A function to display the current cache. <a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aad506b1c1a3cd5b93cc7e497626bfb53">More...</a><br /></td></tr>
|
||||
<tr class="separator:aad506b1c1a3cd5b93cc7e497626bfb53"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa24a141455b9fbcbec22392c28d04933"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933">getHits</a> () const</td></tr>
|
||||
<tr class="memdesc:aa24a141455b9fbcbec22392c28d04933"><td class="mdescLeft"> </td><td class="mdescRight">A function to get page hits. <a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933">More...</a><br /></td></tr>
|
||||
<tr class="separator:aa24a141455b9fbcbec22392c28d04933"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a78be932dac71c90f485a67d4fda877e2"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2">getPageFault</a> () const</td></tr>
|
||||
<tr class="memdesc:a78be932dac71c90f485a67d4fda877e2"><td class="mdescLeft"> </td><td class="mdescRight">A function to get page fault. <a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2">More...</a><br /></td></tr>
|
||||
<tr class="separator:a78be932dac71c90f485a67d4fda877e2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
|
||||
Private Attributes</h2></td></tr>
|
||||
<tr class="memitem:a1aafd0444b410e0fcb66287e9954c893"><td class="memItemLeft" align="right" valign="top"><a id="a1aafd0444b410e0fcb66287e9954c893"></a>
|
||||
uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a1aafd0444b410e0fcb66287e9954c893">pageFrame</a></td></tr>
|
||||
<tr class="memdesc:a1aafd0444b410e0fcb66287e9954c893"><td class="mdescLeft"> </td><td class="mdescRight">Page frame, or total size of the cache. <br /></td></tr>
|
||||
<tr class="separator:a1aafd0444b410e0fcb66287e9954c893"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3ee3560a6b90e6f50f6e063d690ba8e8"><td class="memItemLeft" align="right" valign="top"><a id="a3ee3560a6b90e6f50f6e063d690ba8e8"></a>
|
||||
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list.html">std::list</a>< uint64_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a3ee3560a6b90e6f50f6e063d690ba8e8">cache</a></td></tr>
|
||||
<tr class="memdesc:a3ee3560a6b90e6f50f6e063d690ba8e8"><td class="mdescLeft"> </td><td class="mdescRight">Cache linked list (using the STL) <br /></td></tr>
|
||||
<tr class="separator:a3ee3560a6b90e6f50f6e063d690ba8e8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa4d6db56109af196ffc7e5f72bc9907c"><td class="memItemLeft" align="right" valign="top"><a id="aa4d6db56109af196ffc7e5f72bc9907c"></a>
|
||||
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">std::unordered_map</a>< uint64_t, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list.html">std::list</a>< uint64_t >::iterator > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa4d6db56109af196ffc7e5f72bc9907c">pageMap</a></td></tr>
|
||||
<tr class="memdesc:aa4d6db56109af196ffc7e5f72bc9907c"><td class="mdescLeft"> </td><td class="mdescRight">Hash map containing pages and their addresses. <br /></td></tr>
|
||||
<tr class="separator:aa4d6db56109af196ffc7e5f72bc9907c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a5f33913e7ddfbb38062362e7bd859154"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a5f33913e7ddfbb38062362e7bd859154">hits</a></td></tr>
|
||||
<tr class="memdesc:a5f33913e7ddfbb38062362e7bd859154"><td class="mdescLeft"> </td><td class="mdescRight">was found in cache. <a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a5f33913e7ddfbb38062362e7bd859154">More...</a><br /></td></tr>
|
||||
<tr class="separator:a5f33913e7ddfbb38062362e7bd859154"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a09cbe562b0c396329607f5d388d57c9c"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a09cbe562b0c396329607f5d388d57c9c">pageFault</a> = 0</td></tr>
|
||||
<tr class="separator:a09cbe562b0c396329607f5d388d57c9c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>LRU cache class. </p>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="a41c9b6f1693b8a316cc4a2d8c9149ba4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a41c9b6f1693b8a316cc4a2d8c9149ba4">◆ </a></span>LRUCache()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">others::lru_cache::LRUCache::LRUCache </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint64_t </td>
|
||||
<td class="paramname"><em>pf</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Constructor, Initialize thee LRU class with page frame. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">pf</td><td>Page frame or total size of cache. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> { <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a1aafd0444b410e0fcb66287e9954c893">pageFrame</a> = pf; }</div>
|
||||
<div class="ttc" id="aclassothers_1_1lru__cache_1_1_l_r_u_cache_html_a1aafd0444b410e0fcb66287e9954c893"><div class="ttname"><a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a1aafd0444b410e0fcb66287e9954c893">others::lru_cache::LRUCache::pageFrame</a></div><div class="ttdeci">uint64_t pageFrame</div><div class="ttdoc">Page frame, or total size of the cache.</div><div class="ttdef"><b>Definition:</b> lru_cache.cpp:68</div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="aad506b1c1a3cd5b93cc7e497626bfb53"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aad506b1c1a3cd5b93cc7e497626bfb53">◆ </a></span>display()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void others::lru_cache::LRUCache::display </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>A function to display the current cache. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Void </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  {</div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keywordflow">for</span> (uint64_t &it : <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a3ee3560a6b90e6f50f6e063d690ba8e8">cache</a>) {</div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << it << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  }</div>
|
||||
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <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="l00125"></a><span class="lineno"> 125</span>  }</div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="aclassothers_1_1lru__cache_1_1_l_r_u_cache_html_a3ee3560a6b90e6f50f6e063d690ba8e8"><div class="ttname"><a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a3ee3560a6b90e6f50f6e063d690ba8e8">others::lru_cache::LRUCache::cache</a></div><div class="ttdeci">std::list< uint64_t > cache</div><div class="ttdoc">Cache linked list (using the STL)</div><div class="ttdef"><b>Definition:</b> lru_cache.cpp:69</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="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache_aad506b1c1a3cd5b93cc7e497626bfb53_cgraph.svg" width="267" height="52"><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="aa24a141455b9fbcbec22392c28d04933"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa24a141455b9fbcbec22392c28d04933">◆ </a></span>getHits()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">uint64_t others::lru_cache::LRUCache::getHits </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>A function to get page hits. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00130"></a><span class="lineno"> 130</span> { <span class="keywordflow">return</span> <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a5f33913e7ddfbb38062362e7bd859154">hits</a>; }</div>
|
||||
<div class="ttc" id="aclassothers_1_1lru__cache_1_1_l_r_u_cache_html_a5f33913e7ddfbb38062362e7bd859154"><div class="ttname"><a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a5f33913e7ddfbb38062362e7bd859154">others::lru_cache::LRUCache::hits</a></div><div class="ttdeci">uint64_t hits</div><div class="ttdoc">was found in cache.</div><div class="ttdef"><b>Definition:</b> lru_cache.cpp:73</div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a78be932dac71c90f485a67d4fda877e2"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a78be932dac71c90f485a67d4fda877e2">◆ </a></span>getPageFault()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">uint64_t others::lru_cache::LRUCache::getPageFault </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>A function to get page fault. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> { <span class="keywordflow">return</span> <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a09cbe562b0c396329607f5d388d57c9c">pageFault</a>; }</div>
|
||||
<div class="ttc" id="aclassothers_1_1lru__cache_1_1_l_r_u_cache_html_a09cbe562b0c396329607f5d388d57c9c"><div class="ttname"><a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a09cbe562b0c396329607f5d388d57c9c">others::lru_cache::LRUCache::pageFault</a></div><div class="ttdeci">uint64_t pageFault</div><div class="ttdef"><b>Definition:</b> lru_cache.cpp:76</div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a7dbf04bf7e1472c48639694f0b110602"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a7dbf04bf7e1472c48639694f0b110602">◆ </a></span>refer()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void others::lru_cache::LRUCache::refer </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint64_t </td>
|
||||
<td class="paramname"><em>page</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Refer to a page, or request a page from memory. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">page</td><td>The page that you are referring to. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<p>< Increase the page fault by one.</p>
|
||||
<div class="fragment"><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  {</div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="comment">// If the page requested not in cache.</span></div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordflow">if</span> (<a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa4d6db56109af196ffc7e5f72bc9907c">pageMap</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/unordered_map/find.html">find</a>(page) == <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa4d6db56109af196ffc7e5f72bc9907c">pageMap</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/unordered_map/end.html">end</a>()) {</div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a09cbe562b0c396329607f5d388d57c9c">pageFault</a>++; <span class="comment">///< Increase the page fault by one.</span></div>
|
||||
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  </div>
|
||||
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="comment">// Check if the cache is full</span></div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">if</span> (<a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a3ee3560a6b90e6f50f6e063d690ba8e8">cache</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list/size.html">size</a>() == <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a1aafd0444b410e0fcb66287e9954c893">pageFrame</a>) {</div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="comment">// delete the last page from cache</span></div>
|
||||
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  uint64_t lastPage = <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a3ee3560a6b90e6f50f6e063d690ba8e8">cache</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list/back.html">back</a>();</div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a3ee3560a6b90e6f50f6e063d690ba8e8">cache</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list/pop_back.html">pop_back</a>();</div>
|
||||
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa4d6db56109af196ffc7e5f72bc9907c">pageMap</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/unordered_map/erase.html">erase</a>(lastPage);</div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  }</div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  }</div>
|
||||
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="comment">// The requested page is in the cache</span></div>
|
||||
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a5f33913e7ddfbb38062362e7bd859154">hits</a>++;</div>
|
||||
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="comment">// present in cache, erase from current position to bring in front</span></div>
|
||||
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a3ee3560a6b90e6f50f6e063d690ba8e8">cache</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list/erase.html">erase</a>(<a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa4d6db56109af196ffc7e5f72bc9907c">pageMap</a>[page]);</div>
|
||||
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  }</div>
|
||||
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="comment">// Push it in the front of the cache and update the page reference in</span></div>
|
||||
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="comment">// page map.</span></div>
|
||||
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a3ee3560a6b90e6f50f6e063d690ba8e8">cache</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list/push_front.html">push_front</a>(page);</div>
|
||||
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa4d6db56109af196ffc7e5f72bc9907c">pageMap</a>[page] = <a class="code" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a3ee3560a6b90e6f50f6e063d690ba8e8">cache</a>.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list/begin.html">begin</a>();</div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  }</div>
|
||||
<div class="ttc" id="aback_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/list/back.html">std::list::back</a></div><div class="ttdeci">T back(T... args)</div></div>
|
||||
<div class="ttc" id="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/list/begin.html">std::list::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
|
||||
<div class="ttc" id="aclassothers_1_1lru__cache_1_1_l_r_u_cache_html_aa4d6db56109af196ffc7e5f72bc9907c"><div class="ttname"><a href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa4d6db56109af196ffc7e5f72bc9907c">others::lru_cache::LRUCache::pageMap</a></div><div class="ttdeci">std::unordered_map< uint64_t, std::list< uint64_t >::iterator > pageMap</div><div class="ttdoc">Hash map containing pages and their addresses.</div><div class="ttdef"><b>Definition:</b> lru_cache.cpp:71</div></div>
|
||||
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/unordered_map/end.html">std::unordered_map::end</a></div><div class="ttdeci">T end(T... args)</div></div>
|
||||
<div class="ttc" id="aerase_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/unordered_map/erase.html">std::unordered_map::erase</a></div><div class="ttdeci">T erase(T... args)</div></div>
|
||||
<div class="ttc" id="afind_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/unordered_map/find.html">std::unordered_map::find</a></div><div class="ttdeci">T find(T... args)</div></div>
|
||||
<div class="ttc" id="apop_back_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/list/pop_back.html">std::list::pop_back</a></div><div class="ttdeci">T pop_back(T... args)</div></div>
|
||||
<div class="ttc" id="apush_front_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/list/push_front.html">std::list::push_front</a></div><div class="ttdeci">T push_front(T... args)</div></div>
|
||||
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/list/size.html">std::list::size</a></div><div class="ttdeci">T size(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="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache_a7dbf04bf7e1472c48639694f0b110602_cgraph.svg" width="362" 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>
|
||||
<h2 class="groupheader">Member Data Documentation</h2>
|
||||
<a id="a5f33913e7ddfbb38062362e7bd859154"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a5f33913e7ddfbb38062362e7bd859154">◆ </a></span>hits</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">uint64_t others::lru_cache::LRUCache::hits</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<b>Initial value:</b><div class="fragment"><div class="line">=</div>
|
||||
<div class="line"> 0</div>
|
||||
</div><!-- fragment -->
|
||||
<p>was found in cache. </p>
|
||||
<p>Total number of hits, or total number of times a page </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a09cbe562b0c396329607f5d388d57c9c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a09cbe562b0c396329607f5d388d57c9c">◆ </a></span>pageFault</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">uint64_t others::lru_cache::LRUCache::pageFault = 0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Total number of miss/page fault, or total number of times a page was not found in cache </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>others/<a class="el" href="../../d3/db3/lru__cache_8cpp.html">lru_cache.cpp</a></li>
|
||||
</ul>
|
||||
</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="../../d0/d6f/namespaceothers.html">others</a></li><li class="navelem"><b>lru_cache</b></li><li class="navelem"><a class="el" href="../../d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html">LRUCache</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>
|
||||
13
d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.js
Normal file
13
d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.js
Normal file
@@ -0,0 +1,13 @@
|
||||
var classothers_1_1lru__cache_1_1_l_r_u_cache =
|
||||
[
|
||||
[ "LRUCache", "d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a41c9b6f1693b8a316cc4a2d8c9149ba4", null ],
|
||||
[ "display", "d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aad506b1c1a3cd5b93cc7e497626bfb53", null ],
|
||||
[ "getHits", "d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa24a141455b9fbcbec22392c28d04933", null ],
|
||||
[ "getPageFault", "d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a78be932dac71c90f485a67d4fda877e2", null ],
|
||||
[ "refer", "d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a7dbf04bf7e1472c48639694f0b110602", null ],
|
||||
[ "cache", "d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a3ee3560a6b90e6f50f6e063d690ba8e8", null ],
|
||||
[ "hits", "d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a5f33913e7ddfbb38062362e7bd859154", null ],
|
||||
[ "pageFault", "d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a09cbe562b0c396329607f5d388d57c9c", null ],
|
||||
[ "pageFrame", "d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#a1aafd0444b410e0fcb66287e9954c893", null ],
|
||||
[ "pageMap", "d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html#aa4d6db56109af196ffc7e5f72bc9907c", null ]
|
||||
];
|
||||
@@ -0,0 +1,12 @@
|
||||
<map id="others::lru_cache::LRUCache::refer" name="others::lru_cache::LRUCache::refer">
|
||||
<area shape="rect" id="node1" title="Refer to a page, or request a page from memory." alt="" coords="5,217,137,258"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/back.html#" title=" " alt="" coords="221,5,320,32"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/begin.html#" title=" " alt="" coords="219,56,323,83"/>
|
||||
<area shape="rect" id="node4" 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="185,107,356,133"/>
|
||||
<area shape="rect" id="node5" 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="200,158,341,199"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/erase.html#" title=" " alt="" coords="219,224,323,251"/>
|
||||
<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/find.html#" title=" " alt="" coords="200,275,341,317"/>
|
||||
<area shape="rect" id="node8" 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="206,341,335,368"/>
|
||||
<area shape="rect" id="node9" 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="204,392,337,419"/>
|
||||
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/list/size.html#" title=" " alt="" coords="223,443,318,469"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
8d34906632cd4341388e0e546730454b
|
||||
@@ -0,0 +1,160 @@
|
||||
<?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: others::lru_cache::LRUCache::refer Pages: 1 -->
|
||||
<svg width="271pt" height="356pt"
|
||||
viewBox="0.00 0.00 271.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>others::lru_cache::LRUCache::refer</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-352 267,-352 267,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Refer to a page, or request a page from memory.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-159 0,-189 99,-189 99,-159 0,-159"/>
|
||||
<text text-anchor="start" x="8" y="-177" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
|
||||
<text text-anchor="middle" x="49.5" y="-166" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::refer</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/container/list/back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="162,-328.5 162,-347.5 236,-347.5 236,-328.5 162,-328.5"/>
|
||||
<text text-anchor="middle" x="199" y="-335.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M55.16,-189.23C64.98,-218.77 90.63,-283.99 135,-319 140.06,-322.99 145.95,-326.15 152.06,-328.64"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="151.16,-332.04 161.76,-332.04 153.48,-325.43 151.16,-332.04"/>
|
||||
</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/container/list/begin.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="160,-290.5 160,-309.5 238,-309.5 238,-290.5 160,-290.5"/>
|
||||
<text text-anchor="middle" x="199" y="-297.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::begin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M58.46,-189.19C71.4,-212.42 99.19,-256.63 135,-281 139.66,-284.17 144.87,-286.83 150.24,-289.05"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="149.4,-292.47 160,-292.59 151.79,-285.89 149.4,-292.47"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/end.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="135,-252.5 135,-271.5 263,-271.5 263,-252.5 135,-252.5"/>
|
||||
<text text-anchor="middle" x="199" y="-259.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map::end</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M65.36,-189.25C81.27,-204.79 107.91,-228.59 135,-243 139.19,-245.23 143.68,-247.24 148.27,-249.03"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="147.14,-252.35 157.74,-252.43 149.51,-245.76 147.14,-252.35"/>
|
||||
</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/unordered_map/erase.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="146,-203 146,-233 252,-233 252,-203 146,-203"/>
|
||||
<text text-anchor="start" x="154" y="-221" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
|
||||
<text text-anchor="middle" x="199" y="-210" font-family="Helvetica,sans-Serif" font-size="10.00">::erase</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M99.21,-188.53C111.58,-192.22 125.01,-196.23 137.88,-200.07"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="136.99,-203.45 147.58,-202.96 138.99,-196.75 136.99,-203.45"/>
|
||||
</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/erase.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="160,-164.5 160,-183.5 238,-183.5 238,-164.5 160,-164.5"/>
|
||||
<text text-anchor="middle" x="199" y="-171.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::erase</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node1->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M99.21,-174C115.31,-174 133.23,-174 149.33,-174"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="149.62,-177.5 159.62,-174 149.62,-170.5 149.62,-177.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/unordered_map/find.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="146,-115 146,-145 252,-145 252,-115 146,-115"/>
|
||||
<text text-anchor="start" x="154" y="-133" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
|
||||
<text text-anchor="middle" x="199" y="-122" font-family="Helvetica,sans-Serif" font-size="10.00">::find</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node1->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M99.21,-159.47C111.58,-155.78 125.01,-151.77 137.88,-147.93"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="138.99,-151.25 147.58,-145.04 136.99,-144.55 138.99,-151.25"/>
|
||||
</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/pop_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="150.5,-76.5 150.5,-95.5 247.5,-95.5 247.5,-76.5 150.5,-76.5"/>
|
||||
<text text-anchor="middle" x="199" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::pop_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node1->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M65.74,-158.78C81.75,-143.53 108.29,-120.34 135,-106 139.87,-103.39 145.13,-101.05 150.47,-98.98"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="151.86,-102.2 160.09,-95.53 149.5,-95.61 151.86,-102.2"/>
|
||||
</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/push_front.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="149,-38.5 149,-57.5 249,-57.5 249,-38.5 149,-38.5"/>
|
||||
<text text-anchor="middle" x="199" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::push_front</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node9 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node1->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M58.46,-158.81C71.4,-135.58 99.19,-91.37 135,-67 137.92,-65.01 141.06,-63.23 144.31,-61.62"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="145.92,-64.74 153.72,-57.58 143.16,-58.31 145.92,-64.74"/>
|
||||
</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/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="163.5,-0.5 163.5,-19.5 234.5,-19.5 234.5,-0.5 163.5,-0.5"/>
|
||||
<text text-anchor="middle" x="199" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node10 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node1->Node10</title>
|
||||
<path fill="none" stroke="midnightblue" d="M55.16,-158.77C64.98,-129.23 90.63,-64.01 135,-29 140.48,-24.67 146.94,-21.33 153.59,-18.75"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="155.01,-21.96 163.39,-15.48 152.8,-15.32 155.01,-21.96"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 8.2 KiB |
@@ -0,0 +1,4 @@
|
||||
<map id="others::lru_cache::LRUCache::display" name="others::lru_cache::LRUCache::display">
|
||||
<area shape="rect" id="node1" title="A function to display the current cache." alt="" coords="5,5,141,47"/>
|
||||
<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="189,13,261,39"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
765608dc03f088ee3097a6d35c7027c4
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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: others::lru_cache::LRUCache::display Pages: 1 -->
|
||||
<svg width="200pt" height="39pt"
|
||||
viewBox="0.00 0.00 200.00 39.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 35)">
|
||||
<title>others::lru_cache::LRUCache::display</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 196,-35 196,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="A function to display the current cache.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-30.5 102,-30.5 102,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
|
||||
<text text-anchor="middle" x="51" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::display</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="138,-6 138,-25 192,-25 192,-6 138,-6"/>
|
||||
<text text-anchor="middle" x="165" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M102.1,-15.5C110.69,-15.5 119.46,-15.5 127.6,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="127.87,-19 137.87,-15.5 127.87,-12 127.87,-19"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
Reference in New Issue
Block a user