volume.c: allow computation of lower and upper bound volumes
[barvinok.git] / omega / vertices.cc
blobe155915ab640d0ac406257713456a653e48873a1
1 #include <omega.h>
2 #include <barvinok/util.h>
3 #include "omega/convert.h"
4 #include "vertices.h"
5 #include "config.h"
7 #ifdef HAVE_GROWING_CHERNIKOVA
8 #define MAXRAYS POL_NO_DUAL
9 #else
10 #define MAXRAYS 600
11 #endif
13 void vertices(Relation& r)
15 varvector vv;
16 varvector params;
17 Param_Polyhedron *PP;
19 Polyhedron *D = relation2Domain(r, vv, params);
20 assert(!D->next);
21 Polyhedron *ctx = Universe_Polyhedron(params.size());
23 r.setup_names();
24 const char **param_names = new const char *[params.size()];
25 for (int i = 0; i < params.size(); ++i)
26 param_names[i] = params[i]->char_name();
28 PP = Polyhedron2Param_Domain(D, ctx, MAXRAYS);
29 Param_Polyhedron_Print(stdout, PP, (char **)param_names);
31 delete [] param_names;
33 Param_Polyhedron_Free(PP);
34 Polyhedron_Free(ctx);
35 Domain_Free(D);