chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP routesearch UI: entry improvements re advanced options
[ypp-sc-tools.db-live.git]
/
yarrg
/
rscommon.h
diff --git
a/yarrg/rscommon.h
b/yarrg/rscommon.h
index b4e780362b5286b5a3fbe849f552f16ee9fd290a..ab92fa587af412b890db8cafccc0976baa9e4093 100644
(file)
--- a/
yarrg/rscommon.h
+++ b/
yarrg/rscommon.h
@@
-10,6
+10,7
@@
DF(search) \
DF(filter) \
DF(check) \
DF(search) \
DF(filter) \
DF(check) \
+ DF(tableau) \
DF(lp)
#define debug debug_file
DF(lp)
#define debug debug_file
@@
-32,14
+33,15
@@
extern FILE *debug_file;
CTR(routes_stratelim) \
CTR(routes_valued) \
CTR(routes_wrongfinal) \
CTR(routes_stratelim) \
CTR(routes_valued) \
CTR(routes_wrongfinal) \
- CTR(newbests_strat_absolute) \
- CTR(newbests_strat_perleague) \
+ CTRA(newbests_strat,2) \
CTR(subroute_tails_valued) \
CTR(subroutes_valued) \
CTR(subroutes_nonempty)
CTR(subroute_tails_valued) \
CTR(subroutes_valued) \
CTR(subroutes_nonempty)
-#define CTR(x) extern int ctr_##x;
+#define CTR(x) extern int ctr_##x;
+#define CTRA(x,n) extern int ctr_##x[n];
COUNTER_LIST
#undef CTR
COUNTER_LIST
#undef CTR
+#undef CTRA
#define SQL_MUST( call ) ({ \
/* `call' is an expression returning result, using const char *sqe; \
#define SQL_MUST( call ) ({ \
/* `call' is an expression returning result, using const char *sqe; \
@@
-110,9
+112,13
@@
IslandPair *ipair_get_maybe(int si, int di);
double value_route(int nislands, const int *islands, int exclude_arbitrage);
void setup_value(void);
double value_route(int nislands, const int *islands, int exclude_arbitrage);
void setup_value(void);
+#define AP 2 /* 0=absolute, 1=perleague */
+#define A 0
+#define P 1
+
typedef struct {
typedef struct {
- double
absolute, perleague
;
- int
absolute_ports[MAX_ROUTELEN], perleague_ports
[MAX_ROUTELEN];
+ double
value[AP]
;
+ int
ports[AP]
[MAX_ROUTELEN];
} PotentialResult;
void setup_search(void);
} PotentialResult;
void setup_search(void);
@@
-155,9
+161,8
@@
typedef struct {
PotentialResult *pr;
} HighScoreEntry;
PotentialResult *pr;
} HighScoreEntry;
-extern int nhighscores_absolute, nhighscores_perleague;
-extern HighScoreEntry *highscores_absolute;
-extern HighScoreEntry *highscores_perleague;
+extern int nhighscores[AP];
+extern HighScoreEntry *highscores[AP];
#define ONDEMAND(pointer_lvalue, calloc_size_count) \
#define ONDEMAND(pointer_lvalue, calloc_size_count) \