[ndnSIM] question for policy functions

Alex Afanasyev alexander.afanasyev at ucla.edu
Sun Mar 31 11:17:17 PDT 2013

Hi Aaron,

Policies defined in utils/trie/*-policy.h files are used by a special "policy-based" container defined in utils/trie/trie-with-policy.h.  The main storage for the container is defined in trie.h file, which implements a hash-based trie-like structure, resembling Patricia Trees, but with every level corresponds to the whole name component and children nodes organized using hash-container.

As you may see, both trie.h, trie-with-policy.h, and all policies are templated classes.  Particular instantiation of these classes happens in PIT/FIB/CS implementations.  For example, you can check content store implementation using trie-with-policy in  model/cs/content-store-impl.h (full definition of the content store) and  model/cs/content-store-impl.cc (instantiation of "known" content store types).


On Mar 30, 2013, at 10:55 PM, Aaron <aaronishere at qq.com> wrote:

> Hi, Alex
> I'm confused about the policy like LRU, LFU etc. under the file /utils/trie.  In the file such as LRU-policy.h, there are functions like insert, lookup, update, erase and so on. I'm not sure which functions/files, how and when call those funcitons in the lru/lfu/fifo/random policy.h?   
> Aaron

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130331/adf2f010/attachment.html>

More information about the ndnSIM mailing list