-
我想你知道一个MRU缓存是什么,否则你不会读这个…
I suppose you know what a MRU cache is, otherwise you wouldn t been reading this.
This is an implementation of a very simple one using only STL.
To implement a cache, derive a subclass from this template class.
As an implementor, you d have to implement two methods:
HandleNonExistingKeyFetch - to handle cache misses. In this method you access the real source of data behind the cache and return the value.
HandleItemRelease - (optional) called when an item is removed from the cache.
The cache class is a template of two types, a key and value (like hash map). The value type is the type of the resource and the key type is the type of the resource address. (this is how you fetch a resource) -I suppose you know what a MRU cache is, otherwise you wouldn t been reading this.This is an implementation of a very simple one using only STL.To implement a cache, derive a subclass from this template class.As an implementor, you d have to implement two methods: HandleNonExistingKeyF
- 2022-11-30 08:45:03下载
- 积分:1
-
堆栈和队列
简单队列在 C 程序。程序是有效
- 2022-03-29 00:10:32下载
- 积分:1
-
Visual C++ 6 24学时学习教程
Visual C++ 6 24学时学习教程-VC++ 6.0 24 hour study.
- 2022-08-16 05:35:34下载
- 积分:1
-
计算提安阳黑子的相关函数,由此可以看出具体的周期
计算提安阳黑子的相关函数,由此可以看出具体的周期-Simitian Yang calculated the correlation function of sunspots, which can be seen the specific cycle
- 2022-05-25 14:30:18下载
- 积分:1
-
Simulation of the bank s savings system, C++ Courses encoding, part of less comp...
模拟银行储蓄系统,C++课程编码,其中一部分,不太完整-Simulation of the bank s savings system, C++ Courses encoding, part of less complete
- 2022-03-14 03:40:48下载
- 积分:1
-
AODV 工作源代码
AODV 是一种按需路由协议。它从数目的路径选择最短路径。它包括三个阶段: RREQ 路由请求、 RREP 路由答复和 RRER 错误消息路由。存储节点将播出自己的 id 给邻居使用你好消息。您可以检查源代码在 ns2 文件夹 aodv.cc 和 aodv.h 来获取关于这个专题的详细信息。AODV 包含四个表,即,AODV 的邻居表、 AODV 前体列表、 AODV 广播的 ID 表和 AODV 路由表。Neighbortable 用来存储任何节点的邻居的 ID。以上就是描绘了相邻表的类,它具有公共的 andprotected 成员。在公共成员就只有一个成员函数 "AODV_Neighbour" 是实际上是一个构造函数,它 initializethe 变量 "nb_addr" 创建类实例时。它是由两个组成的 inprotected 的成员变量 1) nb_addr 和 2) nb_expire。这两个变量是商店的邻居表中。第是邻居地址,第二个是到期时间为基于。这些表或类是保持运行 AODV 协议的 thetopology 中的所有节点。Precursorlist 维护 RREQ 源和 RREQ 目的地 whilegiving 答复到源的 id。它定期删除该条目。BroadcastIdclass 是 SourceAdress(nsaddr_t src),Currentnode"Id (u_int32_t id) 的存储并使其过期时间,播出的 idrecord。在 AODV 协议源启动 RREQ 数据包时它 willbroacast 在自然和 RREQ 数据包还有一个 rq-> rq_bcast_id 的字段代表当前 RREQ 广播 id 值。所以 whileforwarding RREQ 数据包的每个节点维护此表,因此 calledBroadcastID 表的处理广播请求数据包。像所有无功的协议,在 AODV,哲学是由节点点播只传播拓扑信息。当一个节点要传输到对没有路由的主机通信时,它将生成将会被淹没一个有限的方式到其他节点的 re
- 2022-05-05 17:04:43下载
- 积分:1
-
一个定时自动关机程序
一个定时自动关机程序-a regular automatic shutdown procedures
- 2022-11-24 18:30:03下载
- 积分:1
-
欢迎使用闰年查询程序,大家好啊!查询一下几时是闰年也是生活中的一种乐趣嘛...
欢迎使用闰年查询程序,大家好啊!查询一下几时是闰年也是生活中的一种乐趣嘛-welcomed the use of procedures for leap year, we said! Inquiries about the earliest it is a leap year is a life of fun!
- 2022-01-28 17:29:17下载
- 积分:1
-
c算法的一些应用,以帮助大家可以更好的理解C 和VC
c算法的一些应用,以帮助大家可以更好的理解C 和VC-c算法的一些应用
- 2022-11-24 00:10:04下载
- 积分:1
-
pic508实现手机长按键开关机功能,其功耗小,引脚少等特点。
pic508实现手机长按键开关机功能,其功耗小,引脚少等特点。-pic508 realize long keyswitch phone capabilities, its power consumption in small, pin-less and so on.
- 2022-01-30 19:40:09下载
- 积分:1