evalue.c: evalue_sum: split into orthants + some refactoring
[barvinok.git] / polysign_cdd.cc
blob6abeb698b3d76ca8e313c94c66ea7e1afffaf801
1 #define DD_LPType dd_LPType
2 #define DD_CreateLPData dd_CreateLPData
3 #define DD_LPObjectiveType dd_LPObjectiveType
4 #define DD_rowrange dd_rowrange
5 #define DD_colrange dd_colrange
6 #define DD_Rational dd_Rational
7 #define DD_FALSE dd_FALSE
8 #define DD_set_si dd_set_si
9 #define DD_neg dd_neg
10 #define DD_ErrorType dd_ErrorType
11 #define DD_DualSimplex dd_DualSimplex
12 #define DD_LPSolve dd_LPSolve
13 #define DD_NoError dd_NoError
14 #define DD_Optimal dd_Optimal
15 #define DD_DualInconsistent dd_DualInconsistent
16 #define DD_LPmin dd_LPmin
17 #define DD_Inconsistent dd_Inconsistent
18 #define DD_FreeLPData dd_FreeLPData
19 #define DD_LPmax dd_LPmax
20 #define DD_int_sign(sign,obj,val) \
21 do { \
22 if (obj == DD_LPmin) { \
23 if (mpq_sgn(val) > 0) \
24 sign = 1; \
25 else if (mpz_cmpabs(mpq_numref(val), mpq_denref(val)) < 0) \
26 sign = 0; \
27 else \
28 sign = -1; \
29 } else { \
30 if (mpz_cmp(mpq_numref(val), mpq_denref(val)) >= 0) \
31 sign = 1; \
32 else if (mpq_sgn(val) >= 0) \
33 sign = 0; \
34 else \
35 sign = -1; \
36 } \
37 } while (0)
38 #define DD_rat_sign(sign,obj,val) sign = dd_sgn(val)
40 #define DD_set_z(a,b) mpq_set_z(a,b)
42 #include "polysign_cdd_template.cc"