mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 16:45:11 -04:00
improvements to global router: longer half-life for routing events, re-sending of un-delivered items, removed unused constants, added missing file to .pro
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8148 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
69612c0c86
commit
a9ba944e27
6 changed files with 114 additions and 121 deletions
|
@ -210,8 +210,10 @@ bool GRouterMatrix::updateRoutingProbabilities()
|
|||
v.resize(_friend_indices.size(),0.0f) ;
|
||||
|
||||
for(std::list<RoutingMatrixHitEntry>::const_iterator it2(it->second.begin());it2!=it->second.end();++it2)
|
||||
{
|
||||
float time_difference_in_days = 1 + (now - (*it2).time_stamp ) / 86400.0f ;
|
||||
{
|
||||
// Half life period is 7 days.
|
||||
|
||||
float time_difference_in_days = 1 + (now - (*it2).time_stamp ) / (7*86400.0f) ;
|
||||
v[(*it2).friend_id] += (*it2).weight / (time_difference_in_days*time_difference_in_days) ;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue