mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-11 19:17:21 +08:00
278 lines
13 KiB
XML
278 lines
13 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
|
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
<!-- Generated by graphviz version 12.1.0 (20240811.2233)
|
|
-->
|
|
<!-- Title: lru_tests::test_3 Pages: 1 -->
|
|
<svg width="419pt" height="347pt"
|
|
viewBox="0.00 0.00 419.00 347.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
|
|
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
|
|
|
<style type="text/css"><![CDATA[
|
|
.node, .edge {opacity: 0.7;}
|
|
.node.selected, .edge.selected {opacity: 1;}
|
|
.edge:hover path { stroke: red; }
|
|
.edge:hover polygon { stroke: red; fill: red; }
|
|
]]></style>
|
|
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
|
<svg id="graph" class="graph">
|
|
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 343.25)">
|
|
<title>lru_tests::test_3</title>
|
|
<!-- Node1 -->
|
|
<g id="Node000001" class="node">
|
|
<title>Node1</title>
|
|
<g id="a_Node000001"><a xlink:title="A simple test case The assert statement will check expected hist and miss to resultant hits and miss.">
|
|
<polygon fill="#999999" stroke="#666666" points="86.5,-234.25 0,-234.25 0,-215 86.5,-215 86.5,-234.25"/>
|
|
<text text-anchor="middle" x="43.25" y="-220.75" font-family="Helvetica,sans-Serif" font-size="10.00">lru_tests::test_3</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node1->Node1 -->
|
|
<g id="edge13_Node000001_Node000001" class="edge">
|
|
<title>Node1->Node1</title>
|
|
<g id="a_edge13_Node000001_Node000001"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M20.78,-234.54C10.54,-243.15 18.03,-252.25 43.25,-252.25 57.04,-252.25 65.54,-249.53 68.72,-245.65"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="72.1,-244.74 66.11,-236 65.34,-246.57 72.1,-244.74"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node2 -->
|
|
<g id="Node000002" class="node">
|
|
<title>Node2</title>
|
|
<g id="a_Node000002"><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="#666666" points="237.88,-288.88 135.62,-288.88 135.62,-258.38 237.88,-258.38 237.88,-288.88"/>
|
|
<text text-anchor="start" x="143.62" y="-275.38" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
|
|
<text text-anchor="middle" x="186.75" y="-264.12" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getHits</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node1->Node2 -->
|
|
<g id="edge1_Node000001_Node000002" class="edge">
|
|
<title>Node1->Node2</title>
|
|
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M73.23,-234.66C89.46,-240.28 110.25,-247.48 129.54,-254.16"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="128.35,-257.45 138.94,-257.42 130.64,-250.84 128.35,-257.45"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node3 -->
|
|
<g id="Node000003" class="node">
|
|
<title>Node3</title>
|
|
<g id="a_Node000003"><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="#666666" points="251,-239.88 122.5,-239.88 122.5,-209.38 251,-209.38 251,-239.88"/>
|
|
<text text-anchor="start" x="130.5" y="-226.38" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
|
|
<text text-anchor="middle" x="186.75" y="-215.12" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::getPageFault</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node1->Node3 -->
|
|
<g id="edge2_Node000001_Node000003" class="edge">
|
|
<title>Node1->Node3</title>
|
|
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M86.7,-224.62C94.37,-224.62 102.57,-224.62 110.84,-224.62"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="110.62,-228.13 120.62,-224.63 110.62,-221.13 110.62,-228.13"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node4 -->
|
|
<g id="Node000004" class="node">
|
|
<title>Node4</title>
|
|
<g id="a_Node000004"><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="#666666" points="235.25,-190.88 138.25,-190.88 138.25,-160.38 235.25,-160.38 235.25,-190.88"/>
|
|
<text text-anchor="start" x="146.25" y="-177.38" font-family="Helvetica,sans-Serif" font-size="10.00">others::lru_cache::</text>
|
|
<text text-anchor="middle" x="186.75" y="-166.12" font-family="Helvetica,sans-Serif" font-size="10.00">LRUCache::refer</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node1->Node4 -->
|
|
<g id="edge3_Node000001_Node000004" class="edge">
|
|
<title>Node1->Node4</title>
|
|
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M73.23,-214.59C89.46,-208.97 110.25,-201.77 129.54,-195.09"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="130.64,-198.41 138.94,-191.83 128.35,-191.8 130.64,-198.41"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node5 -->
|
|
<g id="Node000005" class="node">
|
|
<title>Node5</title>
|
|
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/back.html#" xlink:title=" ">
|
|
<polygon fill="white" stroke="#666666" points="386.62,-339.25 311.38,-339.25 311.38,-320 386.62,-320 386.62,-339.25"/>
|
|
<text text-anchor="middle" x="349" y="-325.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::back</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node4->Node5 -->
|
|
<g id="edge4_Node000004_Node000005" class="edge">
|
|
<title>Node4->Node5</title>
|
|
<g id="a_edge4_Node000004_Node000005"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M235.59,-189.08C241.3,-192.18 246.64,-195.98 251,-200.62 286.5,-238.43 249.84,-275.44 287,-311.62 290.9,-315.42 295.56,-318.42 300.54,-320.79"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="299.07,-323.98 309.66,-324.29 301.58,-317.44 299.07,-323.98"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node6 -->
|
|
<g id="Node000006" class="node">
|
|
<title>Node6</title>
|
|
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/begin.html#" xlink:title=" ">
|
|
<polygon fill="white" stroke="#666666" points="387.75,-302.25 310.25,-302.25 310.25,-283 387.75,-283 387.75,-302.25"/>
|
|
<text text-anchor="middle" x="349" y="-288.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::begin</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node4->Node6 -->
|
|
<g id="edge5_Node000004_Node000006" class="edge">
|
|
<title>Node4->Node6</title>
|
|
<g id="a_edge5_Node000004_Node000006"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M235.65,-190C241.21,-192.94 246.5,-196.45 251,-200.62 277.83,-225.48 259.08,-250.99 287,-274.62 290.65,-277.71 294.81,-280.27 299.21,-282.39"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="297.76,-285.59 308.35,-286.03 300.35,-279.08 297.76,-285.59"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node7 -->
|
|
<g id="Node000007" class="node">
|
|
<title>Node7</title>
|
|
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/end.html#" xlink:title=" ">
|
|
<polygon fill="white" stroke="#666666" points="411,-265.25 287,-265.25 287,-246 411,-246 411,-265.25"/>
|
|
<text text-anchor="middle" x="349" y="-251.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map::end</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node4->Node7 -->
|
|
<g id="edge6_Node000004_Node000007" class="edge">
|
|
<title>Node4->Node7</title>
|
|
<g id="a_edge6_Node000004_Node000007"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M234.17,-191.31C240.03,-194.05 245.79,-197.15 251,-200.62 270.09,-213.35 267.36,-225.77 287,-237.62 289.03,-238.85 291.15,-240 293.33,-241.07"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="291.89,-244.26 302.46,-244.97 294.64,-237.82 291.89,-244.26"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node8 -->
|
|
<g id="Node000008" class="node">
|
|
<title>Node8</title>
|
|
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/erase.html#" xlink:title=" ">
|
|
<polygon fill="white" stroke="#666666" points="388.12,-228.25 309.88,-228.25 309.88,-209 388.12,-209 388.12,-228.25"/>
|
|
<text text-anchor="middle" x="349" y="-214.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::erase</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node4->Node8 -->
|
|
<g id="edge7_Node000004_Node000008" class="edge">
|
|
<title>Node4->Node8</title>
|
|
<g id="a_edge7_Node000004_Node000008"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M235.4,-188.41C255.64,-193.84 279.2,-200.16 299.53,-205.62"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="298.42,-208.95 308.99,-208.16 300.24,-202.18 298.42,-208.95"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node9 -->
|
|
<g id="Node000009" class="node">
|
|
<title>Node9</title>
|
|
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/erase.html#" xlink:title=" ">
|
|
<polygon fill="white" stroke="#666666" points="400.12,-190.88 297.88,-190.88 297.88,-160.38 400.12,-160.38 400.12,-190.88"/>
|
|
<text text-anchor="start" x="305.88" y="-177.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
|
|
<text text-anchor="middle" x="349" y="-166.12" font-family="Helvetica,sans-Serif" font-size="10.00">::erase</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node4->Node9 -->
|
|
<g id="edge8_Node000004_Node000009" class="edge">
|
|
<title>Node4->Node9</title>
|
|
<g id="a_edge8_Node000004_Node000009"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M235.4,-175.62C251.29,-175.62 269.23,-175.62 286.05,-175.62"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="285.96,-179.13 295.96,-175.63 285.96,-172.13 285.96,-179.13"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node10 -->
|
|
<g id="Node000010" class="node">
|
|
<title>Node10</title>
|
|
<g id="a_Node000010"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/unordered_map/find.html#" xlink:title=" ">
|
|
<polygon fill="white" stroke="#666666" points="400.12,-141.88 297.88,-141.88 297.88,-111.38 400.12,-111.38 400.12,-141.88"/>
|
|
<text text-anchor="start" x="305.88" y="-128.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::unordered_map</text>
|
|
<text text-anchor="middle" x="349" y="-117.12" font-family="Helvetica,sans-Serif" font-size="10.00">::find</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node4->Node10 -->
|
|
<g id="edge9_Node000004_Node000010" class="edge">
|
|
<title>Node4->Node10</title>
|
|
<g id="a_edge9_Node000004_Node000010"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M235.4,-161.06C251.44,-156.15 269.58,-150.6 286.53,-145.42"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="287.48,-148.79 296.02,-142.52 285.44,-142.09 287.48,-148.79"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node11 -->
|
|
<g id="Node000011" class="node">
|
|
<title>Node11</title>
|
|
<g id="a_Node000011"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/pop_back.html#" xlink:title=" ">
|
|
<polygon fill="white" stroke="#666666" points="397.12,-93.25 300.88,-93.25 300.88,-74 397.12,-74 397.12,-93.25"/>
|
|
<text text-anchor="middle" x="349" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::pop_back</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node4->Node11 -->
|
|
<g id="edge10_Node000004_Node000011" class="edge">
|
|
<title>Node4->Node11</title>
|
|
<g id="a_edge10_Node000004_Node000011"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M205.21,-159.95C224.16,-143.65 255.88,-118.35 287,-102.62 290.52,-100.84 294.24,-99.19 298.04,-97.67"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="299.24,-100.96 307.42,-94.22 296.82,-94.38 299.24,-100.96"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node12 -->
|
|
<g id="Node000012" class="node">
|
|
<title>Node12</title>
|
|
<g id="a_Node000012"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/push_front.html#" xlink:title=" ">
|
|
<polygon fill="white" stroke="#666666" points="399,-56.25 299,-56.25 299,-37 399,-37 399,-56.25"/>
|
|
<text text-anchor="middle" x="349" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::push_front</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node4->Node12 -->
|
|
<g id="edge11_Node000004_Node000012" class="edge">
|
|
<title>Node4->Node12</title>
|
|
<g id="a_edge11_Node000004_Node000012"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M197.35,-160.26C213.12,-136.27 246.8,-90.06 287,-64.62 288.85,-63.45 290.79,-62.35 292.78,-61.32"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="294,-64.61 301.71,-57.34 291.15,-58.22 294,-64.61"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node13 -->
|
|
<g id="Node000013" class="node">
|
|
<title>Node13</title>
|
|
<g id="a_Node000013"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/list/size.html#" xlink:title=" ">
|
|
<polygon fill="white" stroke="#666666" points="385.12,-19.25 312.88,-19.25 312.88,0 385.12,0 385.12,-19.25"/>
|
|
<text text-anchor="middle" x="349" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::list::size</text>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
<!-- Node4->Node13 -->
|
|
<g id="edge12_Node000004_Node000013" class="edge">
|
|
<title>Node4->Node13</title>
|
|
<g id="a_edge12_Node000004_Node000013"><a xlink:title=" ">
|
|
<path fill="none" stroke="#63b8ff" d="M193.88,-160.04C206.57,-129.83 238.63,-63.15 287,-27.62 291.44,-24.36 296.46,-21.69 301.68,-19.5"/>
|
|
<polygon fill="#63b8ff" stroke="#63b8ff" points="302.84,-22.8 311.09,-16.15 300.5,-16.21 302.84,-22.8"/>
|
|
</a>
|
|
</g>
|
|
</g>
|
|
</g>
|
|
</svg>
|
|
</svg>
|
|
|
|
<style type='text/css'>
|
|
<![CDATA[
|
|
[data-mouse-over-selected='false'] { opacity: 0.7; }
|
|
[data-mouse-over-selected='true'] { opacity: 1.0; }
|
|
]]>
|
|
</style>
|
|
<script type="application/ecmascript"><![CDATA[
|
|
document.addEventListener('DOMContentLoaded', (event) => {
|
|
highlightEdges();
|
|
highlightAdjacentNodes();
|
|
});
|
|
]]></script>
|
|
</svg>
|