Add Laurent expansion based summation
[barvinok/uuh.git] / polyhedron_sample.c
blob067816278956733c724a0c733f71922c35571e2e
1 #include <assert.h>
2 #include <barvinok/options.h>
3 #include <barvinok/sample.h>
4 #include "config.h"
5 #include "argp.h"
6 #include "progname.h"
8 int main(int argc, char **argv)
10 Matrix *M;
11 Polyhedron *P;
12 Vector *sample;
13 struct barvinok_options *bv_options = barvinok_options_new_with_defaults();
15 set_program_name(argv[0]);
16 argp_parse(&barvinok_argp, argc, argv, 0, 0, bv_options);
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 barvinok_options_free(bv_options);