Permalink
Browse files

Random noise on link lengths.

Link lengths are fairly identifiable - hopefully this will retain
the interesting properties of the data while making it more difficult to
connect to any given node.
  • Loading branch information...
Thynix committed May 18, 2012
1 parent cc7dc83 commit 6219acefe25bfceaff6bf00e540b7c3504c730c3
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/freenet/node/MHProbe.java
@@ -344,9 +344,8 @@ public void request(final Message message, final PeerNode source, final AsyncMes
double[] linkLengths = new double[degree()];
int i = 0;
for (PeerNode peer : node.peers.connectedPeers) {
- linkLengths[i++] = Math.min(Math.abs(peer.getLocation() - node.peers.node.getLocation()),
- 1.0 - Math.abs(peer.getLocation() - node.peers.node.getLocation()));
- //TODO: random noise or limit mantissa
+ linkLengths[i++] = randomNoise(Math.min(Math.abs(peer.getLocation() - node.peers.node.getLocation()),
+ 1.0 - Math.abs(peer.getLocation() - node.peers.node.getLocation())));
}
result = DMT.createMHProbeLinkLengths(identifier, linkLengths);
break;

0 comments on commit 6219ace

Please sign in to comment.