From: Ian Jackson Date: Wed, 14 Oct 2009 20:33:27 +0000 (+0100) Subject: routesearch: abandon higher granuarities when tables become full X-Git-Tag: 5.0^2~42 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=commitdiff_plain;h=7ad4d18b7d353d1b068bdc47a3a98351175e09f8 routesearch: abandon higher granuarities when tables become full --- diff --git a/yarrg/rssearch.c b/yarrg/rssearch.c index 9676640..31ec3d7 100644 --- a/yarrg/rssearch.c +++ b/yarrg/rssearch.c @@ -139,6 +139,7 @@ static double process_route(int nports, int totaldist, debugf(" SOMEHOW %d BEST\n",granui); fildebugf("final %d:%3d mid %d ",finarch,finisle,midarch); + int relevant=0; for (ap=0; ap0) { scores[pos].value= value[ap]; scores[pos].pr= bucket; + relevant=1; } fildebugf("@%2d", pos); - } - } - } + } /* new best */ + } /* ap */ + if (!relevant) + /* both absolute and perleague are full at this granularity, + * so we don't care about anything more granular */ + granus= granui+1; + } /* granui */ fildebugf(" route");