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:
fb82c8f
)
WIP routesearch; add no. of ports to divisor for per-league
author
Ian Jackson
<ian@liberator.(none)>
Sat, 3 Oct 2009 09:22:23 +0000
(10:22 +0100)
committer
Ian Jackson
<ian@liberator.(none)>
Sat, 3 Oct 2009 09:22:23 +0000
(10:22 +0100)
yarrg/rssearch.c
patch
|
blob
|
history
diff --git
a/yarrg/rssearch.c
b/yarrg/rssearch.c
index 88ea45132fcb5ae1c5448ceb3e1e7364b21dfef6..eb5e9583a3ef92c4c8e02a0fc30b2bd739d625b9 100644
(file)
--- a/
yarrg/rssearch.c
+++ b/
yarrg/rssearch.c
@@
-36,7
+36,7
@@
static double best_absolute, best_perleague;
static void process_route(int nports, int totaldist) {
double absolute= value_route(nports, ports);
- double perleague= absolute /
totaldist
;
+ double perleague= absolute /
(totaldist + nports)
;
if (absolute < best_absolute && perleague < best_perleague) return;