chiark / gitweb /
routesearch: debugging newbest counters split by granu too
[ypp-sc-tools.db-test.git] / yarrg / rssearch.c
index 91bbc22cf76bdba7d24ff2ad0529adf8929d1638..74a2f4504feb0840444a3da69cbd166333010aa5 100644 (file)
@@ -79,8 +79,8 @@ static double process_route(int nports, int totaldist,
       return guess[A];
     }
 
-    if (guess[A] <= highscores[mingranu][A][0].value &&
-       guess[P] <= highscores[mingranu][P][0].value) {
+    if (guess[A] <= highscores[GRANUS-1][A][0].value &&
+       guess[P] <= highscores[GRANUS-1][P][0].value) {
       ctr_routes_quickelim++;
       debugf(" QELIM %f %f\n", guess[A], guess[P]);
       return guess[A];
@@ -149,7 +149,7 @@ static double process_route(int nports, int totaldist,
        debugf("      ");
       } else {
        int pos;
-       ctr_newbests_granu[ap]++;
+       ctr_newbests_granu[granui*AP+ap]++;
        bucket->value[ap]= value[ap];
        memcpy(bucket->ports[ap], ports, sizeof(*ports) * nports);
        if (nports < MAX_ROUTELEN-1) bucket->ports[ap][nports]= -1;