use isl for argument parsing
[barvinok.git] / barvinok / options.h
blobd841c4d9e5af4cca4b9ca7ea62039351843a4541
1 #ifndef BARVINOK_OPTIONS_H
2 #define BARVINOK_OPTIONS_H
4 #include <stdio.h>
5 #include <isl_arg.h>
7 #if defined(__cplusplus)
8 extern "C" {
9 #endif
11 struct barvinok_stats {
12 long base_cones;
13 long volume_simplices;
14 long topcom_empty_chambers;
15 long topcom_chambers;
16 long topcom_distinct_chambers;
17 long gbr_solved_lps;
18 long bernoulli_sums;
21 void barvinok_stats_clear(struct barvinok_stats *stats);
22 void barvinok_stats_print(struct barvinok_stats *stats, FILE *out);
24 struct barvinok_approximation_options {
25 #define BV_APPROX_SIGN_NONE 0
26 #define BV_APPROX_SIGN_APPROX 1
27 #define BV_APPROX_SIGN_LOWER 2
28 #define BV_APPROX_SIGN_UPPER 3
29 int approximation;
30 #define BV_APPROX_NONE 0
31 #define BV_APPROX_DROP 1
32 #define BV_APPROX_SCALE 2
33 #define BV_APPROX_VOLUME 3
34 #define BV_APPROX_BERNOULLI 4
35 int method;
36 #define BV_APPROX_SCALE_FAST (1 << 0)
37 #define BV_APPROX_SCALE_NARROW (1 << 1)
38 #define BV_APPROX_SCALE_NARROW2 (1 << 2)
39 #define BV_APPROX_SCALE_CHAMBER (1 << 3)
40 int scale_flags;
41 #define BV_VOL_LIFT 0
42 #define BV_VOL_VERTEX 1
43 #define BV_VOL_BARYCENTER 2
44 int volume_triangulate;
47 struct barvinok_options {
48 struct isl_options *isl;
49 struct barvinok_approximation_options *approx;
50 struct barvinok_stats *stats;
52 /* PolyLib options */
53 unsigned MaxRays;
55 /* NTL options */
56 /* LLL reduction parameter delta=LLL_a/LLL_b */
57 long LLL_a;
58 long LLL_b;
60 /* barvinok options */
61 #define BV_SPECIALIZATION_BF 2
62 #define BV_SPECIALIZATION_DF 1
63 #define BV_SPECIALIZATION_RANDOM 0
64 #define BV_SPECIALIZATION_TODD 3
65 int incremental_specialization;
67 unsigned long max_index;
68 int primal;
69 int lookup_table;
70 int count_sample_infinite;
72 int try_Delaunay_triangulation;
74 /* basis reduction options */
75 #define BV_GBR_PIP 0
76 #define BV_GBR_GLPK 1
77 #define BV_GBR_CDD 2
78 #define BV_GBR_PIP_DUAL 3
79 int gbr_lp_solver;
81 #define BV_BOUND_BERNSTEIN 0
82 #define BV_BOUND_RANGE 1
83 int bound;
85 /* bernstein options */
86 #define BV_BERNSTEIN_NONE 0
87 #define BV_BERNSTEIN_MAX 1
88 #define BV_BERNSTEIN_MIN -1
89 int bernstein_optimize;
91 #define BV_BERNSTEIN_FACTORS 1
92 #define BV_BERNSTEIN_INTERVALS 2
93 int bernstein_recurse;
95 #define BV_LP_POLYLIB 0
96 #define BV_LP_GLPK 1
97 #define BV_LP_CDD 2
98 #define BV_LP_CDDF 3
99 #define BV_LP_PIP 4
100 int lp_solver;
102 #define BV_SUM_BOX 0
103 /* deprecated */
104 #define BV_SUM_BARVINOK 0
105 #define BV_SUM_EULER 1
106 #define BV_SUM_BERNOULLI 2
107 #define BV_SUM_LAURENT 3
108 #define BV_SUM_LAURENT_OLD 4
109 int summation;
111 #define BV_CHAMBERS_POLYLIB 0
112 #define BV_CHAMBERS_TOPCOM 1
113 int chambers;
115 #define BV_HULL_GBR 0
116 #define BV_HULL_HILBERT 1
117 int integer_hull;
119 int verbose;
121 int print_stats;
123 int gbr_only_first;
126 ISL_ARG_DECL(barvinok_options, struct barvinok_options, barvinok_options_arg)
128 #if defined(__cplusplus)
130 #endif
132 #endif