X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=yarrg%2Frscommon.h;h=f62fd99d9ed15cdf4d9cd873a6406c3d7a60d38b;hp=a9bca8c1fdadc87dfab844bcde2f28d9f4fe8350;hb=fe2cd54600f099689170bc2d9c47a48559c1d692;hpb=24f73490c5cff2cbe09a575b0929ac181c36704a diff --git a/yarrg/rscommon.h b/yarrg/rscommon.h index a9bca8c..f62fd99 100644 --- a/yarrg/rscommon.h +++ b/yarrg/rscommon.h @@ -48,8 +48,20 @@ void sql_bind(sqlite3_stmt *ss, int index, int value, extern sqlite3 *db; void setup_sql(void); -double value_route(int nislands, const int *islands); + + +typedef struct { + double distance_loss_factor; + int ntrades; + struct TradesBlock *trades; + double route_tail_value; +} IslandPair; + +IslandPair *ipair_get(int si, int di); + +double value_route(int nislands, const int *islands, int exclude_arbitrage); void setup_value(void); + void setup_search(void); void search(int start_isle);