From 90da5badb3ec240876090532e713042d99fb0872 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 25 Feb 2008 14:45:47 +0100 Subject: [PATCH] barvinok_enumerate_with_options: compute (exact) Bernoulli sum at request We (ab)use the summation option to communicate this request. --- barvinok.cc | 3 ++- barvinok_enumerate.cc | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/barvinok.cc b/barvinok.cc index e215aaf..7454443 100644 --- a/barvinok.cc +++ b/barvinok.cc @@ -1409,7 +1409,8 @@ evalue* barvinok_enumerate_with_options(Polyhedron *P, Polyhedron* C, next = P->next; P->next = NULL; - if (options->approximation_method == BV_APPROX_BERNOULLI) + if (options->approximation_method == BV_APPROX_BERNOULLI || + options->summation == BV_SUM_BERNOULLI) eres = Bernoulli_sum(P, C, options); else eres = enumerate(P, C, options); diff --git a/barvinok_enumerate.cc b/barvinok_enumerate.cc index b5bd0a9..ae5edb4 100644 --- a/barvinok_enumerate.cc +++ b/barvinok_enumerate.cc @@ -334,6 +334,7 @@ int main(int argc, char **argv) } } else { EP = barvinok_enumerate_with_options(A, C, bv_options); + assert(EP); if (evalue_convert(EP, &options.convert, bv_options->verbose, C->Dimension, param_name)) print_solution = 0; -- 2.11.4.GIT