update "Counting with rational generating functions" reference
[barvinok.git] / polysign.c
blob41c0644b7ebcce0c2ec48cf941c50c1702c6ad8d
1 #include <barvinok/options.h>
2 #include <barvinok/util.h>
3 #include "polysign.h"
4 #include "config.h"
6 #ifndef HAVE_LIBCDDGMP
7 enum order_sign cdd_polyhedron_affine_sign(Polyhedron *D, Matrix *T,
8 struct barvinok_options *options)
10 assert(0);
13 enum order_sign cddf_polyhedron_affine_sign(Polyhedron *D, Matrix *T,
14 struct barvinok_options *options)
16 assert(0);
18 #endif
20 enum order_sign polyhedron_affine_sign(Polyhedron *D, Matrix *T,
21 struct barvinok_options *options)
23 if (options->lp_solver == BV_LP_POLYLIB)
24 return PL_polyhedron_affine_sign(D, T, options);
25 else if (options->lp_solver == BV_LP_GLPK)
26 return glpk_polyhedron_affine_sign(D, T, options);
27 else if (options->lp_solver == BV_LP_CDD)
28 return cdd_polyhedron_affine_sign(D, T, options);
29 else if (options->lp_solver == BV_LP_CDDF)
30 return cddf_polyhedron_affine_sign(D, T, options);
31 else
32 assert(0);
35 enum lp_result polyhedron_range(Polyhedron *D, Value *obj, Value denom,
36 Value *min, Value *max,
37 struct barvinok_options *options)
39 if (options->lp_solver == BV_LP_POLYLIB)
40 return PL_polyhedron_range(D, obj, denom, min, max, options);
41 else if (options->lp_solver == BV_LP_GLPK)
42 return glpk_polyhedron_range(D, obj, denom, min, max, options);
43 else if (options->lp_solver == BV_LP_CDD)
44 return cdd_polyhedron_range(D, obj, denom, min, max, options);
45 else if (options->lp_solver == BV_LP_CDDF)
46 return cddf_polyhedron_range(D, obj, denom, min, max, options);
47 else
48 assert(0);