iscc: add operations on int objects
[barvinok.git] / polyhedron_sample.c
blobedf6c037ac081c201cd171bb558d796ab6333e6b
1 #include <assert.h>
2 #include <barvinok/options.h>
3 #include <barvinok/sample.h>
5 int main(int argc, char **argv)
7 Matrix *M;
8 Polyhedron *P;
9 Vector *sample;
10 struct barvinok_options *bv_options = barvinok_options_new_with_defaults();
12 argc = barvinok_options_parse(bv_options, argc, argv, ISL_ARG_ALL);
14 M = Matrix_Read();
15 P = Constraints2Polyhedron(M, bv_options->MaxRays);
16 Matrix_Free(M);
18 sample = Polyhedron_Sample(P, bv_options);
19 if (sample) {
20 assert(in_domain(P, sample->p));
21 Vector_Print(stdout, P_VALUE_FMT, sample);
22 Vector_Free(sample);
25 Polyhedron_Free(P);
26 barvinok_options_free(bv_options);