for vector
for vector
-
Other algorithms.
for std::unordered_map
+
Other algorithms.
for IO operations
for reverse for assert for I/O operations for stack
Other algorithms
diff --git a/d0/d6f/namespaceothers.js b/d0/d6f/namespaceothers.js
index 92c2630c8..baf841bfa 100644
--- a/d0/d6f/namespaceothers.js
+++ b/d0/d6f/namespaceothers.js
@@ -1,5 +1,6 @@
var namespaceothers =
[
+ [ "Cache", "db/dde/namespaceothers_1_1_cache.html", "db/dde/namespaceothers_1_1_cache" ],
[ "are_almost_equal", "d0/d6f/namespaceothers.html#aa17dc6d061dff34f6b9a610bc5e26703", null ],
[ "kelvin_to_celsius", "d0/d6f/namespaceothers.html#a48677fae5d683070432b1a905722d9ec", null ]
];
\ No newline at end of file
diff --git a/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph.map b/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph.map
new file mode 100644
index 000000000..e1baff9f2
--- /dev/null
+++ b/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph.map
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph.md5 b/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph.md5
new file mode 100644
index 000000000..e26e027b1
--- /dev/null
+++ b/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph.md5
@@ -0,0 +1 @@
+6ac5b9d32a99a7471b8fdd6c74403344
\ No newline at end of file
diff --git a/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph.svg b/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph.svg
new file mode 100644
index 000000000..2c311ba34
--- /dev/null
+++ b/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph.svg
@@ -0,0 +1,253 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+others::Cache::LFUCache< K, V >
+
+
+Node1
+
+
+others::Cache::LFUCache
+< K, V >
+
+
+
+
+
+Node2
+
+
+std::unordered_map
+< K, std::pair< others
+::Cache::D_Node< K, V
+ > *, int > >
+
+
+
+
+
+Node2->Node1
+
+
+
+
+
+ node_map
+
+
+
+Node3
+
+
+K
+
+
+
+
+
+Node3->Node2
+
+
+
+
+
+ keys
+
+
+
+Node5
+
+
+others::Cache::D_Node
+< K, V >
+
+
+
+
+
+Node3->Node5
+
+
+
+
+
+ data
+
+
+
+Node4
+
+
+std::pair< others::
+Cache::D_Node< K, V
+ > *, int >
+
+
+
+
+
+Node4->Node2
+
+
+
+
+
+ elements
+
+
+
+Node5->Node4
+
+
+
+
+
+ first_type
+
+
+
+Node7
+
+
+std::pair< others::
+Cache::D_Node< K, V
+ > *, others::Cache::
+D_Node< K, V > * >
+
+
+
+
+
+Node5->Node7
+
+
+
+
+
+ first_type
+second_type
+
+
+
+Node6
+
+
+std::unordered_map
+< int, std::pair< others
+::Cache::D_Node< K, V >
+ *, others::Cache::D_Node
+< K, V > * > >
+
+
+
+
+
+Node6->Node1
+
+
+
+
+
+ freq_map
+
+
+
+Node7->Node6
+
+
+
+
+
+ elements
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph_org.svg b/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph_org.svg
new file mode 100644
index 000000000..57ab5ac1c
--- /dev/null
+++ b/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph_org.svg
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+others::Cache::LFUCache< K, V >
+
+
+Node1
+
+
+others::Cache::LFUCache
+< K, V >
+
+
+
+
+
+Node2
+
+
+std::unordered_map
+< K, std::pair< others
+::Cache::D_Node< K, V
+ > *, int > >
+
+
+
+
+
+Node2->Node1
+
+
+
+
+
+ node_map
+
+
+
+Node3
+
+
+K
+
+
+
+
+
+Node3->Node2
+
+
+
+
+
+ keys
+
+
+
+Node5
+
+
+others::Cache::D_Node
+< K, V >
+
+
+
+
+
+Node3->Node5
+
+
+
+
+
+ data
+
+
+
+Node4
+
+
+std::pair< others::
+Cache::D_Node< K, V
+ > *, int >
+
+
+
+
+
+Node4->Node2
+
+
+
+
+
+ elements
+
+
+
+Node5->Node4
+
+
+
+
+
+ first_type
+
+
+
+Node7
+
+
+std::pair< others::
+Cache::D_Node< K, V
+ > *, others::Cache::
+D_Node< K, V > * >
+
+
+
+
+
+Node5->Node7
+
+
+
+
+
+ first_type
+second_type
+
+
+
+Node6
+
+
+std::unordered_map
+< int, std::pair< others
+::Cache::D_Node< K, V >
+ *, others::Cache::D_Node
+< K, V > * > >
+
+
+
+
+
+Node6->Node1
+
+
+
+
+
+ freq_map
+
+
+
+Node7->Node6
+
+
+
+
+
+ elements
+
+
+
diff --git a/d5/ddb/classothers_1_1_cache_1_1_d___node-members.html b/d5/ddb/classothers_1_1_cache_1_1_d___node-members.html
new file mode 100644
index 000000000..99f4bf590
--- /dev/null
+++ b/d5/ddb/classothers_1_1_cache_1_1_d___node-members.html
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
Algorithms_in_C++: Member List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
This is the complete list of members for others::Cache::D_Node< T > , including all inherited members.
+
+
+
+
+
+
diff --git a/d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html b/d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html
index df1fc3514..af637d1f7 100644
--- a/d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html
+++ b/d6/dae/classothers_1_1lru__cache_1_1_l_r_u_cache.html
@@ -146,7 +146,7 @@ uint64_t
pageFrame
std::list < uint64_t > cache
-
Cache linked list (using the STL)
+
Cache linked list (using the STL)
std::unordered_map < uint64_t, std::list < uint64_t >::iterator > pageMap
diff --git a/d6/dca/lfu__cache_8cpp__incl.map b/d6/dca/lfu__cache_8cpp__incl.map
new file mode 100644
index 000000000..5a561b332
--- /dev/null
+++ b/d6/dca/lfu__cache_8cpp__incl.map
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/d6/dca/lfu__cache_8cpp__incl.md5 b/d6/dca/lfu__cache_8cpp__incl.md5
new file mode 100644
index 000000000..2f18aca1b
--- /dev/null
+++ b/d6/dca/lfu__cache_8cpp__incl.md5
@@ -0,0 +1 @@
+08f5951acd7232c48a62c9afc57379b1
\ No newline at end of file
diff --git a/d6/dca/lfu__cache_8cpp__incl.svg b/d6/dca/lfu__cache_8cpp__incl.svg
new file mode 100644
index 000000000..8b6fe3308
--- /dev/null
+++ b/d6/dca/lfu__cache_8cpp__incl.svg
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+others/lfu_cache.cpp
+
+
+Node1
+
+
+others/lfu_cache.cpp
+
+
+
+
+
+Node2
+
+
+cassert
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+
+
+
+Node3
+
+
+iostream
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+
+
+
+Node4
+
+
+unordered_map
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/d6/dca/lfu__cache_8cpp__incl_org.svg b/d6/dca/lfu__cache_8cpp__incl_org.svg
new file mode 100644
index 000000000..c693b3016
--- /dev/null
+++ b/d6/dca/lfu__cache_8cpp__incl_org.svg
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+others/lfu_cache.cpp
+
+
+Node1
+
+
+others/lfu_cache.cpp
+
+
+
+
+
+Node2
+
+
+cassert
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+
+
+
+Node3
+
+
+iostream
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+
+
+
+Node4
+
+
+unordered_map
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+
+
+
diff --git a/d9/d65/lfu__cache_8cpp.html b/d9/d65/lfu__cache_8cpp.html
new file mode 100644
index 000000000..23c47ab36
--- /dev/null
+++ b/d9/d65/lfu__cache_8cpp.html
@@ -0,0 +1,290 @@
+
+
+
+
+
+
+
+
Algorithms_in_C++: others/lfu_cache.cpp File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
Implementation for [LFU Cache] (https://en.wikipedia.org/wiki/Least_frequently_used )
+More...
+
#include <cassert>
+#include <iostream>
+#include <unordered_map>
+
+
+
+template<typename K , typename V >
+using others::Cache::CacheNode = D_Node <std::pair <K, V>>
+
+
+
+static void test ()
+ self test implementation
+
+int main ()
+ main function
+
+
+
+
Implementation for [LFU Cache] (https://en.wikipedia.org/wiki/Least_frequently_used )
+
LFU discards the least frequently used value. if there are multiple items with the same minimum frequency then, the least recently used among them is discarded. Data structures used - doubly linked list and unordered_map(hash
+map).
+
Hashmap maps the key to the address of the node of the linked list and its current usage frequency. If the element is accessed the element is removed from the linked list of the current frequency and added to the linked list of incremented frequency.
+
When the cache is full, the last element in the minimum frequency linked list is popped.
+
Author Karan Sharma
+
+
+
◆ main()
+
+
+
+
+
+ int main
+ (
+ void )
+
+
+
+
+
+
main function
+
Returns 0 on exit
+
301 {
+
+
303 return 0;
+
304 }
+
static void test()
self test implementation
Definition lfu_cache.cpp:250
+
+
+
+
+
+
+
◆ test()
+
+
+
+
+
+
+
+
+ static void test
+ (
+ )
+
+
+
+
+
+static
+
+
+
+
+
self test implementation
+
Returns void
+
250 {
+
+
252
+
253
+
254 assert(cache.size() == 0);
+
255 assert(cache.capacity() == 5);
+
256 assert(cache.empty());
+
257
+
258
+
259 cache.put(1, 10);
+
260 cache.put(-2, 20);
+
261
+
262
+
263 assert(cache.size() == 2);
+
264 assert(cache.capacity() == 5);
+
265 assert(!cache.empty());
+
266
+
267
+
268 assert(cache.get(1) == 10);
+
269 assert(cache.get(-2) == 20);
+
270
+
271 cache.put(-3, -30);
+
272 cache.put(4, 40);
+
273 cache.put(5, -50);
+
274 cache.put(6, 60);
+
275
+
276
+
277 assert(cache.size() == 5);
+
278 assert(cache.capacity() == 5);
+
279 assert(!cache.empty());
+
280
+
281
+
282 assert(cache.get(1) == 10);
+
283 assert(cache.get(-2) == 20);
+
284
+
285
+
286
+
287
+
288
+
289
+
290 assert(cache.get(4) == 40);
+
291 assert(cache.get(5) == -50);
+
292 assert(cache.get(6) == 60);
+
293
+
+
295 }
+
+
LFUCache.
Definition lfu_cache.cpp:64
+
+
+
+
+
+
+
+
+
+
+
diff --git a/d9/d65/lfu__cache_8cpp.js b/d9/d65/lfu__cache_8cpp.js
new file mode 100644
index 000000000..b5e36b383
--- /dev/null
+++ b/d9/d65/lfu__cache_8cpp.js
@@ -0,0 +1,7 @@
+var lfu__cache_8cpp =
+[
+ [ "others::Cache::D_Node< T >", "de/d21/classothers_1_1_cache_1_1_d___node.html", "de/d21/classothers_1_1_cache_1_1_d___node" ],
+ [ "others::Cache::LFUCache< K, V >", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache" ],
+ [ "main", "d9/d65/lfu__cache_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
+ [ "test", "d9/d65/lfu__cache_8cpp.html#aa8dca7b867074164d5f45b0f3851269d", null ]
+];
\ No newline at end of file
diff --git a/d9/d65/lfu__cache_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map b/d9/d65/lfu__cache_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map
new file mode 100644
index 000000000..baedf2a3c
--- /dev/null
+++ b/d9/d65/lfu__cache_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.map
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/d9/d65/lfu__cache_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5 b/d9/d65/lfu__cache_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5
new file mode 100644
index 000000000..a4e7f9181
--- /dev/null
+++ b/d9/d65/lfu__cache_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.md5
@@ -0,0 +1 @@
+0591dc07f3e2271183514438a924765e
\ No newline at end of file
diff --git a/d9/d65/lfu__cache_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg b/d9/d65/lfu__cache_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg
new file mode 100644
index 000000000..8c7d0e073
--- /dev/null
+++ b/d9/d65/lfu__cache_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg
@@ -0,0 +1,271 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test
+
+
+Node1
+
+
+test
+
+
+
+
+
+Node2
+
+
+others::Cache::LFUCache
+::capacity
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+
+
+
+Node3
+
+
+others::Cache::LFUCache
+::empty
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+
+
+
+Node4
+
+
+others::Cache::LFUCache::get
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+
+
+
+Node7
+
+
+others::Cache::LFUCache::put
+
+
+
+
+
+Node1->Node7
+
+
+
+
+
+
+
+
+Node9
+
+
+others::Cache::LFUCache
+::size
+
+
+
+
+
+Node1->Node9
+
+
+
+
+
+
+
+
+Node5
+
+
+others::Cache::LFUCache
+::increase_frequency
+
+
+
+
+
+Node4->Node5
+
+
+
+
+
+
+
+
+Node6
+
+
+others::Cache::LFUCache
+::push
+
+
+
+
+
+Node5->Node6
+
+
+
+
+
+
+
+
+Node7->Node5
+
+
+
+
+
+
+
+
+Node7->Node6
+
+
+
+
+
+
+
+
+Node8
+
+
+others::Cache::LFUCache::pop
+
+
+
+
+
+Node7->Node8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/d9/d65/lfu__cache_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph_org.svg b/d9/d65/lfu__cache_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph_org.svg
new file mode 100644
index 000000000..96f47300c
--- /dev/null
+++ b/d9/d65/lfu__cache_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph_org.svg
@@ -0,0 +1,188 @@
+
+
+
+
+
+
+test
+
+
+Node1
+
+
+test
+
+
+
+
+
+Node2
+
+
+others::Cache::LFUCache
+::capacity
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+
+
+
+Node3
+
+
+others::Cache::LFUCache
+::empty
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+
+
+
+Node4
+
+
+others::Cache::LFUCache::get
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+
+
+
+Node7
+
+
+others::Cache::LFUCache::put
+
+
+
+
+
+Node1->Node7
+
+
+
+
+
+
+
+
+Node9
+
+
+others::Cache::LFUCache
+::size
+
+
+
+
+
+Node1->Node9
+
+
+
+
+
+
+
+
+Node5
+
+
+others::Cache::LFUCache
+::increase_frequency
+
+
+
+
+
+Node4->Node5
+
+
+
+
+
+
+
+
+Node6
+
+
+others::Cache::LFUCache
+::push
+
+
+
+
+
+Node5->Node6
+
+
+
+
+
+
+
+
+Node7->Node5
+
+
+
+
+
+
+
+
+Node7->Node6
+
+
+
+
+
+
+
+
+Node8
+
+
+others::Cache::LFUCache::pop
+
+
+
+
+
+Node7->Node8
+
+
+
+
+
+
+
+
diff --git a/d9/d65/lfu__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/d9/d65/lfu__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
new file mode 100644
index 000000000..bc9db1e6c
--- /dev/null
+++ b/d9/d65/lfu__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/d9/d65/lfu__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/d9/d65/lfu__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
new file mode 100644
index 000000000..9641dce67
--- /dev/null
+++ b/d9/d65/lfu__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
@@ -0,0 +1 @@
+d353b232a9a0af8fc1835fc904dbe96e
\ No newline at end of file
diff --git a/d9/d65/lfu__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/d9/d65/lfu__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
new file mode 100644
index 000000000..9e6a3f8c4
--- /dev/null
+++ b/d9/d65/lfu__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
@@ -0,0 +1,289 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+main
+
+
+Node1
+
+
+main
+
+
+
+
+
+Node2
+
+
+test
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+
+
+
+Node3
+
+
+others::Cache::LFUCache
+::capacity
+
+
+
+
+
+Node2->Node3
+
+
+
+
+
+
+
+
+Node4
+
+
+others::Cache::LFUCache
+::empty
+
+
+
+
+
+Node2->Node4
+
+
+
+
+
+
+
+
+Node5
+
+
+others::Cache::LFUCache::get
+
+
+
+
+
+Node2->Node5
+
+
+
+
+
+
+
+
+Node8
+
+
+others::Cache::LFUCache::put
+
+
+
+
+
+Node2->Node8
+
+
+
+
+
+
+
+
+Node10
+
+
+others::Cache::LFUCache
+::size
+
+
+
+
+
+Node2->Node10
+
+
+
+
+
+
+
+
+Node6
+
+
+others::Cache::LFUCache
+::increase_frequency
+
+
+
+
+
+Node5->Node6
+
+
+
+
+
+
+
+
+Node7
+
+
+others::Cache::LFUCache
+::push
+
+
+
+
+
+Node6->Node7
+
+
+
+
+
+
+
+
+Node8->Node6
+
+
+
+
+
+
+
+
+Node8->Node7
+
+
+
+
+
+
+
+
+Node9
+
+
+others::Cache::LFUCache::pop
+
+
+
+
+
+Node8->Node9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/d9/d65/lfu__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg b/d9/d65/lfu__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg
new file mode 100644
index 000000000..6dfeed12c
--- /dev/null
+++ b/d9/d65/lfu__cache_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+main
+
+
+Node1
+
+
+main
+
+
+
+
+
+Node2
+
+
+test
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+
+
+
+Node3
+
+
+others::Cache::LFUCache
+::capacity
+
+
+
+
+
+Node2->Node3
+
+
+
+
+
+
+
+
+Node4
+
+
+others::Cache::LFUCache
+::empty
+
+
+
+
+
+Node2->Node4
+
+
+
+
+
+
+
+
+Node5
+
+
+others::Cache::LFUCache::get
+
+
+
+
+
+Node2->Node5
+
+
+
+
+
+
+
+
+Node8
+
+
+others::Cache::LFUCache::put
+
+
+
+
+
+Node2->Node8
+
+
+
+
+
+
+
+
+Node10
+
+
+others::Cache::LFUCache
+::size
+
+
+
+
+
+Node2->Node10
+
+
+
+
+
+
+
+
+Node6
+
+
+others::Cache::LFUCache
+::increase_frequency
+
+
+
+
+
+Node5->Node6
+
+
+
+
+
+
+
+
+Node7
+
+
+others::Cache::LFUCache
+::push
+
+
+
+
+
+Node6->Node7
+
+
+
+
+
+
+
+
+Node8->Node6
+
+
+
+
+
+
+
+
+Node8->Node7
+
+
+
+
+
+
+
+
+Node9
+
+
+others::Cache::LFUCache::pop
+
+
+
+
+
+Node8->Node9
+
+
+
+
+
+
+
+
diff --git a/db/d36/classothers_1_1_cache_1_1_l_f_u_cache-members.html b/db/d36/classothers_1_1_cache_1_1_l_f_u_cache-members.html
new file mode 100644
index 000000000..afafec019
--- /dev/null
+++ b/db/d36/classothers_1_1_cache_1_1_l_f_u_cache-members.html
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
Algorithms_in_C++: Member List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
This is the complete list of members for others::Cache::LFUCache< K, V > , including all inherited members.
+
+ _capacity others::Cache::LFUCache< K, V > private
+ capacity () constothers::Cache::LFUCache< K, V > inline
+ empty () constothers::Cache::LFUCache< K, V > inline
+ freq_map others::Cache::LFUCache< K, V > private
+ get (K key)others::Cache::LFUCache< K, V > inline
+ increase_frequency (std::pair< CacheNode< K, V > *, int > &p_node)others::Cache::LFUCache< K, V > inline private
+ LFUCache (int _capacity)others::Cache::LFUCache< K, V > inline explicit
+ minFreq others::Cache::LFUCache< K, V > private
+ node_map others::Cache::LFUCache< K, V > private
+ pop ()others::Cache::LFUCache< K, V > inline private
+ push (int freq, CacheNode< K, V > *node)others::Cache::LFUCache< K, V > inline private
+ put (K key, V value)others::Cache::LFUCache< K, V > inline
+ size () constothers::Cache::LFUCache< K, V > inline
+ ~LFUCache ()others::Cache::LFUCache< K, V > inline
+
+
+
+
+
+
diff --git a/db/dde/namespaceothers_1_1_cache.html b/db/dde/namespaceothers_1_1_cache.html
new file mode 100644
index 000000000..4c1259356
--- /dev/null
+++ b/db/dde/namespaceothers_1_1_cache.html
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
Algorithms_in_C++: others::Cache Namespace Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
Cache algorithm.
+More...
+
+
+
+template<typename K , typename V >
+using CacheNode = D_Node <std::pair <K, V>>
+
+
+
+
+
+
+
+
+
diff --git a/db/dde/namespaceothers_1_1_cache.js b/db/dde/namespaceothers_1_1_cache.js
new file mode 100644
index 000000000..9817e71e3
--- /dev/null
+++ b/db/dde/namespaceothers_1_1_cache.js
@@ -0,0 +1,5 @@
+var namespaceothers_1_1_cache =
+[
+ [ "D_Node", "de/d21/classothers_1_1_cache_1_1_d___node.html", "de/d21/classothers_1_1_cache_1_1_d___node" ],
+ [ "LFUCache", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache" ]
+];
\ No newline at end of file
diff --git a/de/d21/classothers_1_1_cache_1_1_d___node.html b/de/d21/classothers_1_1_cache_1_1_d___node.html
new file mode 100644
index 000000000..12eca7324
--- /dev/null
+++ b/de/d21/classothers_1_1_cache_1_1_d___node.html
@@ -0,0 +1,197 @@
+
+
+
+
+
+
+
+
Algorithms_in_C++: others::Cache::D_Node< T > Class Template Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
Node for a doubly linked list with data, prev and next pointers.
+ More...
+
+
+
+
+
+T data
+ data of the node
+
+
+D_Node < T > * prev
+ previous node in the doubly linked list
+
+
+D_Node < T > * next
+ next node in the doubly linked list
+
+
+
+
template<typename T>
+class others::Cache::D_Node< T >
Node for a doubly linked list with data, prev and next pointers.
+
Template Parameters
+
+ T type of the data of the node
+
+
+
+
+
+
◆ D_Node()
+
+
+
+
+template<typename T >
+
+
+
+
+
+
+inline explicit
+
+
+
+
+
D_Node< T > * prev
previous node in the doubly linked list
Definition lfu_cache.cpp:48
+
T data
data of the node
Definition lfu_cache.cpp:47
+
D_Node< T > * next
next node in the doubly linked list
Definition lfu_cache.cpp:49
+
+
+
+
The documentation for this class was generated from the following file:
+
+
+
+
+
+
diff --git a/de/d21/classothers_1_1_cache_1_1_d___node.js b/de/d21/classothers_1_1_cache_1_1_d___node.js
new file mode 100644
index 000000000..c24cc15b6
--- /dev/null
+++ b/de/d21/classothers_1_1_cache_1_1_d___node.js
@@ -0,0 +1,6 @@
+var classothers_1_1_cache_1_1_d___node =
+[
+ [ "data", "de/d21/classothers_1_1_cache_1_1_d___node.html#a8902e7ff872fa3c80fe6ce5f5cf5cc75", null ],
+ [ "next", "de/d21/classothers_1_1_cache_1_1_d___node.html#a99420ff7864ecea51429fe61f9c6cb14", null ],
+ [ "prev", "de/d21/classothers_1_1_cache_1_1_d___node.html#a1c5295011209f1241fa0aac827129414", null ]
+];
\ No newline at end of file
diff --git a/de/d6f/classothers_1_1_cache_1_1_d___node__coll__graph.map b/de/d6f/classothers_1_1_cache_1_1_d___node__coll__graph.map
new file mode 100644
index 000000000..82dcc1fb1
--- /dev/null
+++ b/de/d6f/classothers_1_1_cache_1_1_d___node__coll__graph.map
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/de/d6f/classothers_1_1_cache_1_1_d___node__coll__graph.md5 b/de/d6f/classothers_1_1_cache_1_1_d___node__coll__graph.md5
new file mode 100644
index 000000000..19377a789
--- /dev/null
+++ b/de/d6f/classothers_1_1_cache_1_1_d___node__coll__graph.md5
@@ -0,0 +1 @@
+63edbfb406bc0ef38cc4583da9998fb4
\ No newline at end of file
diff --git a/de/d6f/classothers_1_1_cache_1_1_d___node__coll__graph.svg b/de/d6f/classothers_1_1_cache_1_1_d___node__coll__graph.svg
new file mode 100644
index 000000000..d408b1028
--- /dev/null
+++ b/de/d6f/classothers_1_1_cache_1_1_d___node__coll__graph.svg
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+others::Cache::D_Node< T >
+
+
+Node1
+
+
+others::Cache::D_Node< T >
+
+
+
+
+
+Node2
+
+
+T
+
+
+
+
+
+Node2->Node1
+
+
+
+
+
+ data
+
+
+
+
+
+
+
+
diff --git a/de/d6f/classothers_1_1_cache_1_1_d___node__coll__graph_org.svg b/de/d6f/classothers_1_1_cache_1_1_d___node__coll__graph_org.svg
new file mode 100644
index 000000000..e4ec5e825
--- /dev/null
+++ b/de/d6f/classothers_1_1_cache_1_1_d___node__coll__graph_org.svg
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+others::Cache::D_Node< T >
+
+
+Node1
+
+
+others::Cache::D_Node< T >
+
+
+
+
+
+Node2
+
+
+T
+
+
+
+
+
+Node2->Node1
+
+
+
+
+
+ data
+
+
+
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html
new file mode 100644
index 000000000..20e60eb44
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html
@@ -0,0 +1,684 @@
+
+
+
+
+
+
+
+
Algorithms_in_C++: others::Cache::LFUCache< K, V > Class Template Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
LFUCache .
+ More...
+
+
+
+
+ LFUCache (int _capacity )
+ Constructor, Initialize with minFreq and _capacity.
+
+void put (K key, V value)
+ upsert a key-value pair
+
+V get (K key)
+ get the value of the key-value pair if exists
+
+int size () const
+ Returns the number of items present in the cache.
+
+int capacity () const
+ Returns the total capacity of the cache.
+
+bool empty () const
+ returns true if the cache is empty, false otherwise.
+
+ ~LFUCache ()
+ destructs the cache, iterates on the map and deletes every node present in the cache.
+
+
+
+void push (int freq, CacheNode < K, V > *node )
+ push the node at first position in the linked list of given frequency
+
+void increase_frequency (std::pair < CacheNode < K, V > *, int > &p_node)
+ increase the frequency of node and push it in the respective list.
+
+void pop ()
+ pop the last node in the least frequently used linked list
+
+
+
+
template<typename K, typename V>
+class others::Cache::LFUCache< K, V >
LFUCache .
+
Template Parameters
+
+ K type of key in the LFU
+ V type of value in the LFU
+
+
+
+
+
+
◆ LFUCache()
+
+
+
+
+template<typename K , typename V >
+
+
+
+
+
+
+inline explicit
+
+
+
+
+
Constructor, Initialize with minFreq and _capacity.
+
Parameters
+
+ _capacity Total capacity of the cache.
+
+
+
+
+
int _capacity
maximum capacity of the cache
Definition lfu_cache.cpp:71
+
int minFreq
minimum frequency in the cache
Definition lfu_cache.cpp:70
+
+
+
+
+
◆ ~LFUCache()
+
+
+
+
+template<typename K , typename V >
+
+
+
+
destructs the cache, iterates on the map and deletes every node present in the cache.
+
235 {
+
+
+
238 delete it->second.first;
+
239 ++it;
+
240 }
+
241 }
+
std::unordered_map< K, std::pair< CacheNode< K, V > *, int > > node_map
maps the key to the node address and frequency
Definition lfu_cache.cpp:66
+
+
+
+
+
+
◆ capacity()
+
+
+
+
+template<typename K , typename V >
+
+
+
+
Returns the total capacity of the cache.
+
Returns Total capacity of the cache
+
+
+
+
+
◆ empty()
+
+
+
+
+template<typename K , typename V >
+
+
+
+
returns true if the cache is empty, false otherwise.
+
Returns true if the cache is empty, false otherwise.
+
+
+
+
+
◆ get()
+
+
+
+
+template<typename K , typename V >
+
+
+
+
get the value of the key-value pair if exists
+
Parameters
+
+ key key of the key-value pair
+
+
+
+
Returns the value mapped to the given key
+
Exceptions
+
+ exception is thrown if the key is not present in the cache
+
+
+
+
202 {
+
+
+
205 }
+
206
+
207
+
208 V value =
node_map [key].first->data.second;
+
+
210 return value;
+
211 }
+
void increase_frequency(std::pair< CacheNode< K, V > *, int > &p_node)
increase the frequency of node and push it in the respective list.
Definition lfu_cache.cpp:109
+
+
+
+
+
+
+
+
◆ increase_frequency()
+
+
+
+
+template<typename K , typename V >
+
+
+
+
+
+
+inline private
+
+
+
+
+
increase the frequency of node and push it in the respective list.
+
Parameters
+
+ p_node the node to be updated
+
+
+
+
109 {
+
110 CacheNode<K, V> *
node = p_node.first;
+
111 int freq = p_node.second;
+
112
+
+
114
+
115
+
116
+
117
+
118 if (p.first ==
node && p.second ==
node ) {
+
+
+
+
122 }
+
123 } else {
+
124
+
+
+
127 node ->prev =
nullptr ;
+
128 node ->next =
nullptr ;
+
129
+
130 if (prev) {
+
+
132 } else {
+
+
134 }
+
135
+
136 if (next) {
+
+
138 } else {
+
+
140 }
+
141 }
+
+
143 ++p_node.second;
+
144 }
+
std::unordered_map< int, std::pair< CacheNode< K, V > *, CacheNode< K, V > * > > freq_map
maps the frequency to doubly linked list
Definition lfu_cache.cpp:68
+
void push(int freq, CacheNode< K, V > *node)
push the node at first position in the linked list of given frequency
Definition lfu_cache.cpp:88
+
+
+
+
Definition binary_search_tree.cpp:11
+
+
+
+
+
+
+
◆ pop()
+
+
+
+
+template<typename K , typename V >
+
+
+
+
+
+
+inline private
+
+
+
+
+
pop the last node in the least frequently used linked list
+
149 {
+
+
151
+
152
+
153
+
154
+
155 if (p.first == p.second) {
+
156 delete p.first;
+
+
158 return ;
+
159 }
+
160
+
161
+
162 CacheNode<K, V> *temp = p.second;
+
163 p.second = temp->prev;
+
164 p.second->next = nullptr ;
+
165 delete temp;
+
166 }
+
+
+
+
+
◆ push()
+
+
+
+
+template<typename K , typename V >
+
+
+
+
+
+
+inline private
+
+
+
+
+
push the node at first position in the linked list of given frequency
+
Parameters
+
+ freq the frequency mapping to the linked list where node should be pushed.
+ node node to be pushed to the linked list.
+
+
+
+
88 {
+
89
+
90
+
+
+
93 return ;
+
94 }
+
95
+
+
97
+
98
+
99
+
100 p.first->prev =
node ;
+
101 node ->next = p.first;
+
+
103 }
+
struct node { int data; int height; struct node *left; struct node *right;} node
for std::queue
Definition avltree.cpp:13
+
+
+
+
+
◆ put()
+
+
+
+
+template<typename K , typename V >
+
+
+
+
upsert a key-value pair
+
Parameters
+
+ key key of the key-value pair
+ value value of the key-value pair
+
+
+
+
174 {
+
175
+
+
177 node_map [key].first->data.second = value;
+
+
179 return ;
+
180 }
+
181
+
182
+
183
+
+
+
+
187 }
+
188
+
189
+
190 CacheNode<K, V> *
node =
new CacheNode<K, V>({key, value});
+
+
+
+
194 }
+
void pop()
pop the last node in the least frequently used linked list
Definition lfu_cache.cpp:149
+
+
+
+
+
+
+
◆ size()
+
+
+
+
+template<typename K , typename V >
+
+
+
+
Returns the number of items present in the cache.
+
Returns number of items in the cache
+
+
+
+
The documentation for this class was generated from the following file:
+
+
+
+
+
+
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.js b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.js
new file mode 100644
index 000000000..d13df9feb
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.js
@@ -0,0 +1,17 @@
+var classothers_1_1_cache_1_1_l_f_u_cache =
+[
+ [ "LFUCache", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#affd7776c246caa2d0f92fd8616f6e5dc", null ],
+ [ "~LFUCache", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#a8857531ecc8ed2e36868e267148eff36", null ],
+ [ "capacity", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#ac27c9076377cbed2a2acc45a189fed2c", null ],
+ [ "empty", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#a68e1be0a3e0a6478aa35f04000e0e9b0", null ],
+ [ "get", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#a58e37d3713f28d36abbb8cdf6c432781", null ],
+ [ "increase_frequency", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#a16a25c102554c5653721a5112ef676c9", null ],
+ [ "pop", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#ab3561ab204754295199f9566924f7e69", null ],
+ [ "push", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#adad4ab43141fb8ba43facd3a71e07047", null ],
+ [ "put", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#af6f8e5a66a45436b490dfe015ff8866e", null ],
+ [ "size", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#adbfb2ef7358423fdf1f49d410f55f195", null ],
+ [ "_capacity", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#a3acc10e6bb67d9d9c4187f625723e6c5", null ],
+ [ "freq_map", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#aba5d59d0f6ab0c0d30a92551ca5a05f2", null ],
+ [ "minFreq", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#a6de844d1589a809239cc07752f311285", null ],
+ [ "node_map", "df/d8f/classothers_1_1_cache_1_1_l_f_u_cache.html#ac7684879e2e5da3d8bc5b1699ee42d35", null ]
+];
\ No newline at end of file
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a16a25c102554c5653721a5112ef676c9_cgraph.map b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a16a25c102554c5653721a5112ef676c9_cgraph.map
new file mode 100644
index 000000000..1cf680f50
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a16a25c102554c5653721a5112ef676c9_cgraph.map
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a16a25c102554c5653721a5112ef676c9_cgraph.md5 b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a16a25c102554c5653721a5112ef676c9_cgraph.md5
new file mode 100644
index 000000000..67ab39f10
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a16a25c102554c5653721a5112ef676c9_cgraph.md5
@@ -0,0 +1 @@
+136e5b2fde508fd9779a8e62e4f72912
\ No newline at end of file
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a16a25c102554c5653721a5112ef676c9_cgraph.svg b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a16a25c102554c5653721a5112ef676c9_cgraph.svg
new file mode 100644
index 000000000..7450e45b2
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a16a25c102554c5653721a5112ef676c9_cgraph.svg
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+others::Cache::LFUCache::increase_frequency
+
+
+Node1
+
+
+others::Cache::LFUCache
+::increase_frequency
+
+
+
+
+
+Node2
+
+
+others::Cache::LFUCache
+::push
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a16a25c102554c5653721a5112ef676c9_cgraph_org.svg b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a16a25c102554c5653721a5112ef676c9_cgraph_org.svg
new file mode 100644
index 000000000..dc4fed684
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a16a25c102554c5653721a5112ef676c9_cgraph_org.svg
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+others::Cache::LFUCache::increase_frequency
+
+
+Node1
+
+
+others::Cache::LFUCache
+::increase_frequency
+
+
+
+
+
+Node2
+
+
+others::Cache::LFUCache
+::push
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+
+
+
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a58e37d3713f28d36abbb8cdf6c432781_cgraph.map b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a58e37d3713f28d36abbb8cdf6c432781_cgraph.map
new file mode 100644
index 000000000..38f488886
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a58e37d3713f28d36abbb8cdf6c432781_cgraph.map
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a58e37d3713f28d36abbb8cdf6c432781_cgraph.md5 b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a58e37d3713f28d36abbb8cdf6c432781_cgraph.md5
new file mode 100644
index 000000000..7860c59f0
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a58e37d3713f28d36abbb8cdf6c432781_cgraph.md5
@@ -0,0 +1 @@
+a478dd2129b44698d51017d165ed8e6b
\ No newline at end of file
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a58e37d3713f28d36abbb8cdf6c432781_cgraph.svg b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a58e37d3713f28d36abbb8cdf6c432781_cgraph.svg
new file mode 100644
index 000000000..8b4346172
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a58e37d3713f28d36abbb8cdf6c432781_cgraph.svg
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+others::Cache::LFUCache::get
+
+
+Node1
+
+
+others::Cache::LFUCache::get
+
+
+
+
+
+Node2
+
+
+others::Cache::LFUCache
+::increase_frequency
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+
+
+
+Node3
+
+
+others::Cache::LFUCache
+::push
+
+
+
+
+
+Node2->Node3
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a58e37d3713f28d36abbb8cdf6c432781_cgraph_org.svg b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a58e37d3713f28d36abbb8cdf6c432781_cgraph_org.svg
new file mode 100644
index 000000000..c7ca8ce15
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_a58e37d3713f28d36abbb8cdf6c432781_cgraph_org.svg
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+others::Cache::LFUCache::get
+
+
+Node1
+
+
+others::Cache::LFUCache::get
+
+
+
+
+
+Node2
+
+
+others::Cache::LFUCache
+::increase_frequency
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+
+
+
+Node3
+
+
+others::Cache::LFUCache
+::push
+
+
+
+
+
+Node2->Node3
+
+
+
+
+
+
+
+
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_af6f8e5a66a45436b490dfe015ff8866e_cgraph.map b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_af6f8e5a66a45436b490dfe015ff8866e_cgraph.map
new file mode 100644
index 000000000..30a25279c
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_af6f8e5a66a45436b490dfe015ff8866e_cgraph.map
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_af6f8e5a66a45436b490dfe015ff8866e_cgraph.md5 b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_af6f8e5a66a45436b490dfe015ff8866e_cgraph.md5
new file mode 100644
index 000000000..087ab199a
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_af6f8e5a66a45436b490dfe015ff8866e_cgraph.md5
@@ -0,0 +1 @@
+2f5e8422a3e70831f5f71798302110cc
\ No newline at end of file
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_af6f8e5a66a45436b490dfe015ff8866e_cgraph.svg b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_af6f8e5a66a45436b490dfe015ff8866e_cgraph.svg
new file mode 100644
index 000000000..3b4fbe19c
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_af6f8e5a66a45436b490dfe015ff8866e_cgraph.svg
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+others::Cache::LFUCache::put
+
+
+Node1
+
+
+others::Cache::LFUCache::put
+
+
+
+
+
+Node2
+
+
+others::Cache::LFUCache
+::increase_frequency
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+
+
+
+Node3
+
+
+others::Cache::LFUCache
+::push
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+
+
+
+Node4
+
+
+others::Cache::LFUCache::pop
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+
+
+
+Node2->Node3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_af6f8e5a66a45436b490dfe015ff8866e_cgraph_org.svg b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_af6f8e5a66a45436b490dfe015ff8866e_cgraph_org.svg
new file mode 100644
index 000000000..0c6694ad8
--- /dev/null
+++ b/df/d8f/classothers_1_1_cache_1_1_l_f_u_cache_af6f8e5a66a45436b490dfe015ff8866e_cgraph_org.svg
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+others::Cache::LFUCache::put
+
+
+Node1
+
+
+others::Cache::LFUCache::put
+
+
+
+
+
+Node2
+
+
+others::Cache::LFUCache
+::increase_frequency
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+
+
+
+Node3
+
+
+others::Cache::LFUCache
+::push
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+
+
+
+Node4
+
+
+others::Cache::LFUCache::pop
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+
+
+
+Node2->Node3
+
+
+
+
+
+
+
+
diff --git a/dir_9510827d0b234b3cc54b29892f217477.html b/dir_9510827d0b234b3cc54b29892f217477.html
index bcafdb1db..ca268f8a1 100644
--- a/dir_9510827d0b234b3cc54b29892f217477.html
+++ b/dir_9510827d0b234b3cc54b29892f217477.html
@@ -137,6 +137,9 @@ Files
kelvin_to_celsius.cpp
Conversion from Kelvin to Celsius degrees.
+
lfu_cache.cpp
+
Implementation for [LFU Cache] (https://en.wikipedia.org/wiki/Least_frequently_used )
+
lru_cache.cpp
An implementation of LRU Cache . Lru is a part of cache algorithms (also frequently called cache replacement algorithms or cache replacement policies).
diff --git a/dir_9510827d0b234b3cc54b29892f217477.js b/dir_9510827d0b234b3cc54b29892f217477.js
index d7d4364e8..3dd46e444 100644
--- a/dir_9510827d0b234b3cc54b29892f217477.js
+++ b/dir_9510827d0b234b3cc54b29892f217477.js
@@ -9,6 +9,7 @@ var dir_9510827d0b234b3cc54b29892f217477 =
[ "iterative_tree_traversals.cpp", "d8/d90/iterative__tree__traversals_8cpp.html", "d8/d90/iterative__tree__traversals_8cpp" ],
[ "kadanes3.cpp", "de/dcd/kadanes3_8cpp.html", "de/dcd/kadanes3_8cpp" ],
[ "kelvin_to_celsius.cpp", "db/d6b/kelvin__to__celsius_8cpp.html", "db/d6b/kelvin__to__celsius_8cpp" ],
+ [ "lfu_cache.cpp", "d9/d65/lfu__cache_8cpp.html", "d9/d65/lfu__cache_8cpp" ],
[ "lru_cache.cpp", "d3/db3/lru__cache_8cpp.html", "d3/db3/lru__cache_8cpp" ],
[ "matrix_exponentiation.cpp", "d7/d35/matrix__exponentiation_8cpp.html", "d7/d35/matrix__exponentiation_8cpp" ],
[ "palindrome_of_number.cpp", "da/d9a/palindrome__of__number_8cpp.html", "da/d9a/palindrome__of__number_8cpp" ],
diff --git a/doxygen_crawl.html b/doxygen_crawl.html
index 093ef54bd..1237e3165 100644
--- a/doxygen_crawl.html
+++ b/doxygen_crawl.html
@@ -233,6 +233,7 @@
+
@@ -592,6 +593,11 @@
+
+
+
+
+
@@ -2748,6 +2754,9 @@
+
+
+
@@ -3264,6 +3273,7 @@
+
@@ -3688,6 +3698,10 @@
+
+
+
+
@@ -3922,6 +3936,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/files.html b/files.html
index dd730239a..3e47a8a2c 100644
--- a/files.html
+++ b/files.html
@@ -343,20 +343,21 @@ N)\) time, with precision fixed using
iterative_tree_traversals.cpp Iterative version of Preorder, Postorder, and preorder [Traversal of the Tree] (https://en.wikipedia.org/wiki/Tree_traversal )
kadanes3.cpp Efficient implementation for maximum contiguous subarray sum by Kadane's algorithm
kelvin_to_celsius.cpp Conversion from Kelvin to Celsius degrees
-
lru_cache.cpp An implementation of LRU Cache . Lru is a part of cache algorithms (also frequently called cache replacement algorithms or cache replacement policies)
-
matrix_exponentiation.cpp Matrix Exponentiation
-
palindrome_of_number.cpp Check if a number is palindrome or not
-
paranthesis_matching.cpp Perform paranthesis matching
-
pascal_triangle.cpp Pascal's triangle implementation
-
postfix_evaluation.cpp Evaluation of Postfix Expression
-
primality_test.cpp Primality test implementation
-
recursive_tree_traversal.cpp Recursive version of Inorder, Preorder, and Postorder [Traversal of the Tree] (https://en.wikipedia.org/wiki/Tree_traversal )
-
smallest_circle.cpp Get centre and radius of the smallest circle that circumscribes given set of points
-
sparse_matrix.cpp
-
spiral_print.cpp Print the elements of a matrix traversing it spirally
-
stairs_pattern.cpp This program is use to print the following pattern
-
tower_of_hanoi.cpp Solve the Tower of Hanoi problem
-
vector_important_functions.cpp A C++ program to demonstrate working of std::sort() , std::reverse()
+
lfu_cache.cpp Implementation for [LFU Cache] (https://en.wikipedia.org/wiki/Least_frequently_used )
+
lru_cache.cpp An implementation of LRU Cache . Lru is a part of cache algorithms (also frequently called cache replacement algorithms or cache replacement policies)
+
matrix_exponentiation.cpp Matrix Exponentiation
+
palindrome_of_number.cpp Check if a number is palindrome or not
+
paranthesis_matching.cpp Perform paranthesis matching
+
pascal_triangle.cpp Pascal's triangle implementation
+
postfix_evaluation.cpp Evaluation of Postfix Expression
+
primality_test.cpp Primality test implementation
+
recursive_tree_traversal.cpp Recursive version of Inorder, Preorder, and Postorder [Traversal of the Tree] (https://en.wikipedia.org/wiki/Tree_traversal )
+
smallest_circle.cpp Get centre and radius of the smallest circle that circumscribes given set of points
+
sparse_matrix.cpp
+
spiral_print.cpp Print the elements of a matrix traversing it spirally
+
stairs_pattern.cpp This program is use to print the following pattern
+
tower_of_hanoi.cpp Solve the Tower of Hanoi problem
+
vector_important_functions.cpp A C++ program to demonstrate working of std::sort() , std::reverse()
► physics
ground_to_ground_projectile_motion.cpp Ground to ground projectile motion equation implementations
► probability
diff --git a/functions.html b/functions.html
index e68cae852..c98376b6a 100644
--- a/functions.html
+++ b/functions.html
@@ -109,6 +109,7 @@ $(function(){initNavTree('functions.html',''); initResizable(true); });
- _ -
diff --git a/functions_func_s.html b/functions_func_s.html
index 318b1e380..eb85aa225 100644
--- a/functions_func_s.html
+++ b/functions_func_s.html
@@ -123,7 +123,7 @@ $(function(){initNavTree('functions_func_s.html',''); initResizable(true); });
Here is a list of all documented variables with links to the class documentation for each member: