Here are the comments at the top of  
freenet.node.LocationManager.shouldSwap():

      * If A > B then they switch.
      *
      * If A <= B, then calculate p = A^2 / B^2. They then switch with
      * probability p (that is, switch if rand.nextFloat() < p).

I'm concerned about this last bit, if I recall the algorithm  
correctly, you only square the A and B terms in the two dimensional  
case, in 1 dimension it would just be p= A / B.

Oskar, can you confirm or deny this?

Ian.

Ian Clarke: Co-Founder & Chief Scientist Revver, Inc.
phone: 323.871.2828 | personal blog - http://locut.us/blog

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20060819/f8b54d79/attachment.html>

Reply via email to