Skip to content

Commit

Permalink
Random noise on link lengths.
Browse files Browse the repository at this point in the history
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 6219ace
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/freenet/node/MHProbe.java
Expand Up @@ -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;
Expand Down

0 comments on commit 6219ace

Please sign in to comment.