Merge branch 'topcom'
[barvinok.git] / basis_reduction.c
blobc634f38fe82199cdb67e3dab60f907e91d238973
1 #include <assert.h>
2 #include <barvinok/basis_reduction.h>
3 #include <barvinok/options.h>
4 #include "config.h"
6 #ifndef HAVE_LIBGLPK
7 Matrix *glpk_Polyhedron_Reduced_Basis(Polyhedron *P)
9 assert(0);
11 #endif
13 #ifndef HAVE_LIBCDDGMP
14 Matrix *cdd_Polyhedron_Reduced_Basis(Polyhedron *P)
16 assert(0);
18 #endif
20 Matrix *Polyhedron_Reduced_Basis(Polyhedron *P, struct barvinok_options *options)
22 if (options->gbr_lp_solver == BV_GBR_GLPK)
23 return glpk_Polyhedron_Reduced_Basis(P);
24 else if (options->gbr_lp_solver == BV_GBR_CDD)
25 return cdd_Polyhedron_Reduced_Basis(P);
26 else if (options->gbr_lp_solver == BV_GBR_PIP)
27 return pip_Polyhedron_Reduced_Basis(P);
28 else if (options->gbr_lp_solver == BV_GBR_PIP_DUAL)
29 return pip_dual_Polyhedron_Reduced_Basis(P);
30 else
31 assert(0);