Author: toad
Date: 2008-02-09 14:52:30 +0000 (Sat, 09 Feb 2008)
New Revision: 17754

Modified:
   trunk/freenet/src/freenet/node/simulator/RealNodeTest.java
Log:
Fix variable name (not a constant any more)

Modified: trunk/freenet/src/freenet/node/simulator/RealNodeTest.java
===================================================================
--- trunk/freenet/src/freenet/node/simulator/RealNodeTest.java  2008-02-09 
14:52:04 UTC (rev 17753)
+++ trunk/freenet/src/freenet/node/simulator/RealNodeTest.java  2008-02-09 
14:52:30 UTC (rev 17754)
@@ -21,7 +21,7 @@
        /*
         Borrowed from mrogers simulation code (February 6, 2008)
         */
-       static void makeKleinbergNetwork (Node[] nodes, boolean idealLocations, 
int DEGREE)
+       static void makeKleinbergNetwork (Node[] nodes, boolean idealLocations, 
int degree)
        {
                // First set the locations up so we don't spend a long time 
swapping just to stabilise each network.
                double div = 1.0 / (nodes.length + 1);
@@ -39,12 +39,12 @@
                                if (a.getLocation() == b.getLocation()) 
continue;
                                norm += 1.0 / distance (a, b);
                        }
-                       // Create DEGREE/2 outgoing connections
+                       // Create degree/2 outgoing connections
                        for (int k=0; k<nodes.length; k++) {
                                Node b = nodes[k];
                                if (a.getLocation() == b.getLocation()) 
continue;
                                double p = 1.0 / distance (a, b) / norm;
-                               for (int n = 0; n < DEGREE / 2; n++) {
+                               for (int n = 0; n < degree / 2; n++) {
                                        if (Math.random() < p) {
                                                connect(a, b);
                                                break;


Reply via email to