From 08c48c20c2cf8ea09e4de4838f19b33deb40bfa9 Mon Sep 17 00:00:00 2001 From: skimo Date: Sun, 1 Aug 2004 15:39:49 +0000 Subject: [PATCH] perform range reduction if requested --- barvinok_enumerate_e.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/barvinok_enumerate_e.c b/barvinok_enumerate_e.c index f70c6ac..02e7e6f 100644 --- a/barvinok_enumerate_e.c +++ b/barvinok_enumerate_e.c @@ -1,5 +1,6 @@ #include #include +#include #include #include "ev_operations.h" #include @@ -14,7 +15,12 @@ * The polytope is in PolyLib notation. */ -int main() +struct option options[] = { + { "range", no_argument, 0, 'r' }, + { 0, 0, 0, 0 } +}; + +int main(int argc, char **argv) { Polyhedron *A; Matrix *M; @@ -22,6 +28,16 @@ int main() int exist, nparam; char s[128]; evalue *EP; + int c, ind = 0; + int range = 0; + + while ((c = getopt_long(argc, argv, "r", options, &ind)) != -1) { + switch (c) { + case 'r': + range = 1; + break; + } + } M = Matrix_Read(); A = Constraints2Polyhedron(M, 600); @@ -39,6 +55,8 @@ int main() printf("exist: %d, nparam: %d\n", exist, nparam); param_name = Read_ParamNames(stdin, nparam); EP = barvinok_enumerate_e(A, exist, nparam, 600); + if (range) + evalue_range_reduction(EP); print_evalue(stdout, EP, param_name); free_evalue_refs(EP); Free_ParamNames(param_name, nparam); -- 2.11.4.GIT