From aae83c3a75110ac270e246d01af99a977c49e211 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 5 Feb 2010 14:29:44 +0100 Subject: [PATCH] isl_convex_hull.c: wrap_facet: allow unbounded facets again. This reverts commit 7c08353 (isl_convex_hull.c: update wrap_facet to the fact we only apply it on polytopes). We want to export wrap_facet and allow it to be called on unbounded polyhedra. --- isl_convex_hull.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/isl_convex_hull.c b/isl_convex_hull.c index 77dcc2a..e91bf12 100644 --- a/isl_convex_hull.c +++ b/isl_convex_hull.c @@ -457,8 +457,9 @@ static struct isl_basic_set *wrap_constraints(struct isl_set *set) * In the original space, we need to take the same combination of the * corresponding constraints "facet" and "ridge". * - * Note that a is always finite, since we only apply the wrapping - * technique to a union of polytopes. + * If a = -infty = "-1/0", then we just return the original facet constraint. + * This means that the facet is unbounded, but has a bounded intersection + * with the union of sets. */ static isl_int *wrap_facet(struct isl_set *set, isl_int *facet, isl_int *ridge) { @@ -508,7 +509,8 @@ static isl_int *wrap_facet(struct isl_set *set, isl_int *facet, isl_int *ridge) isl_vec_free(obj); isl_basic_set_free(lp); isl_set_free(set); - isl_assert(set->ctx, res == isl_lp_ok, return NULL); + isl_assert(set->ctx, res == isl_lp_ok || res == isl_lp_unbounded, + return NULL); return facet; error: isl_basic_set_free(lp); -- 2.7.4