chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-live.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8dd381f
)
routesearch: abandon higher granuarities when tables become full
author
Ian Jackson
<ian@liberator.(none)>
Wed, 14 Oct 2009 20:33:27 +0000
(21:33 +0100)
committer
Ian Jackson
<ian@liberator.(none)>
Wed, 14 Oct 2009 20:33:27 +0000
(21:33 +0100)
yarrg/rssearch.c
patch
|
blob
|
history
diff --git
a/yarrg/rssearch.c
b/yarrg/rssearch.c
index 9676640aafc9e3a28a14b2374660d777e5806c55..31ec3d76b7ab12b842f15cf73a309331d87c8290 100644
(file)
--- 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);
debugf(" SOMEHOW %d BEST\n",granui);
fildebugf("final %d:%3d mid %d ",finarch,finisle,midarch);
+ int relevant=0;
for (ap=0; ap<AP; ap++) {
HighScoreEntry *scores= highscores[granui][ap];
for (ap=0; ap<AP; ap++) {
HighScoreEntry *scores= highscores[granui][ap];
@@
-170,11
+171,16
@@
static double process_route(int nports, int totaldist,
if (pos>0) {
scores[pos].value= value[ap];
scores[pos].pr= bucket;
if (pos>0) {
scores[pos].value= value[ap];
scores[pos].pr= bucket;
+ relevant=1;
}
fildebugf("@%2d", pos);
}
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");
fildebugf(" route");