X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Frssearch.c;h=f14b0cd7a87670e6785d6a34bcc2d0adca4e3a22;hb=b5f936bf08ab82b34f9529b72946c0cd66ef5a62;hp=c51aae02f655571571b246aec89e578e2aef2b58;hpb=0145dc7f4fcaf62090a77fb2d69d5d7807c8d48d;p=ypp-sc-tools.db-live.git diff --git a/yarrg/rssearch.c b/yarrg/rssearch.c index c51aae0..f14b0cd 100644 --- a/yarrg/rssearch.c +++ b/yarrg/rssearch.c @@ -2,6 +2,8 @@ #include "rscommon.h" +DEBUG_DEFINE_DEBUGF(search); + typedef struct Neighbour { struct Neighbour *next; int islandid; @@ -32,26 +34,41 @@ static Neighbour *get_neighbours(int isle) { return head; } -static double bestsofar; - -static void process_route(int nports) { - double value= value_route(nports, ports); - if (value < bestsofar) return; +static double best_absolute, best_perleague; - fprintf(stderr,"value %20f route", value); +static void process_route(int nports, int totaldist) { int i; + + debugf("========== ROUTE"); + for (i=0; i= MAX_ROUTELEN) return; Neighbour *add;