chiark / gitweb /
routesearch: use quick elim criterion separately per ap in bucketelim
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 17 Oct 2009 12:03:29 +0000 (13:03 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 17 Oct 2009 12:03:29 +0000 (13:03 +0100)
yarrg/rssearch.c

index b05a275..1f43e00 100644 (file)
@@ -111,11 +111,11 @@ static double process_route(int nports, int totaldist,
   }
 
   if (nports>=2) {
-    for (granui=0; granui<granus; granui++) {
-      if (guess[A] > buckets[granui]->prs[A].value[A] ||
-         guess[P] > buckets[granui]->prs[P].value[P])
-       goto not_bucketelim;
-    }
+    for (granui=0; granui<granus; granui++)
+      for (ap=0; ap<AP; ap++)
+       if (guess[ap] > buckets[granui]->prs[ap].value[ap] &&
+           guess[ap] > highscores[granui][ap][0].value)
+         goto not_bucketelim;
     ctr_routes_bucketelim++;
     debugf(" ELIM %f %f\n", guess[A], guess[P]);
     return guess[A];