<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Getting the number of cached Data packets can be done something like this (I'm copying a part of examples/ndn-simple-with-cs-lfu.cc):</div><div><br></div><div><div>  uint64_t csCount = 0;</div><div>  for (NodeList::Iterator node = NodeList::Begin ();</div><div>       node != NodeList::End ();</div><div>       node ++)</div><div>    {</div><div>      Ptr<ndn::ContentStore> cs = (*node)->GetObject<ndn::ContentStore> ();</div><div>      csCount += cs->GetSize ();</div><div>    }</div></div><div><br></div><div>The total number of content in the network is something that is known just to you in your simulation scenario, so you can manually pre-calculate the value based on simulation setup.  (In general, number of content in the network is virtually unlimited.)</div><div><br></div><div>---</div><div>Alex</div><br><div><div>On Aug 27, 2013, at 8:34 PM, 陈胜蓝 <<a href="mailto:blindeafer@163.com">blindeafer@163.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="line-height: 1.7; font-size: 14px; font-family: arial; ">Hi All,<div>I would like to obtain an average content diversity of network, I think it would be number of content cached in network divided by total number of content,how could I obtain the value from simulation,would you please give me some hints?</div><div><br></div><div>Regards.</div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br>http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br></blockquote></div><br></body></html>