dpoly_r: micro-optimizations
[barvinok.git] / polyhedron_sample.c
blob96e50a6af3cf16f7b7c4ffd03cfd0e27c5e08d95
1 #include <barvinok/options.h>
2 #include <barvinok/sample.h>
3 #include "config.h"
5 #ifdef HAVE_GROWING_CHERNIKOVA
6 #define MAXRAYS (POL_NO_DUAL | POL_INTEGER)
7 #else
8 #define MAXRAYS 600
9 #endif
11 int main(int argc, char **argv)
13 Matrix *M;
14 Polyhedron *P;
15 Vector *sample;
16 struct barvinok_options *bv_options = barvinok_options_new_with_defaults();
18 M = Matrix_Read();
19 P = Constraints2Polyhedron(M, bv_options->MaxRays);
20 Matrix_Free(M);
22 sample = Polyhedron_Sample(P, bv_options);
23 if (sample) {
24 assert(in_domain(P, sample->p));
25 Vector_Print(stdout, P_VALUE_FMT, sample);
26 Vector_Free(sample);
29 Polyhedron_Free(P);
30 free(bv_options);