add isl_printer
[isl.git] / polyhedron_sample.c
blob6b07c7f341737c64550048d241a74dddcb605929
1 /*
2 * Copyright 2008-2009 Katholieke Universiteit Leuven
4 * Use of this software is governed by the GNU LGPLv2.1 license
6 * Written by Sven Verdoolaege, K.U.Leuven, Departement
7 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
8 */
10 #include <assert.h>
11 #include "isl_sample.h"
12 #include "isl_vec.h"
13 #include "isl_map_private.h"
15 int main(int argc, char **argv)
17 struct isl_ctx *ctx = isl_ctx_alloc();
18 struct isl_basic_set *bset;
19 struct isl_vec *sample;
21 bset = isl_basic_set_read_from_file(ctx, stdin, 0);
22 sample = isl_basic_set_sample_vec(isl_basic_set_copy(bset));
23 isl_vec_dump(sample, stdout, 0);
24 assert(sample);
25 if (sample->size > 0)
26 assert(isl_basic_set_contains(bset, sample));
27 isl_basic_set_free(bset);
28 isl_vec_free(sample);
29 isl_ctx_free(ctx);
31 return 0;