#include <isl/constraint.h>
+ int isl_basic_set_n_constraint(
+ __isl_keep isl_basic_set *bset);
int isl_basic_set_foreach_constraint(
__isl_keep isl_basic_set *bset,
int (*fn)(__isl_take isl_constraint *c, void *user),
struct isl_constraint *isl_constraint_copy(struct isl_constraint *c);
void *isl_constraint_free(__isl_take isl_constraint *c);
+int isl_basic_set_n_constraint(__isl_keep isl_basic_set *bset);
int isl_basic_map_foreach_constraint(__isl_keep isl_basic_map *bmap,
int (*fn)(__isl_take isl_constraint *c, void *user), void *user);
int isl_basic_set_foreach_constraint(__isl_keep isl_basic_set *bset,
return NULL;
}
+/* Return the number of constraints in "bset", i.e., the
+ * number of times isl_basic_set_foreach_constraint will
+ * call the callback.
+ */
+int isl_basic_set_n_constraint(__isl_keep isl_basic_set *bset)
+{
+ if (!bset)
+ return -1;
+
+ return bset->n_eq + bset->n_ineq;
+}
+
int isl_basic_map_foreach_constraint(__isl_keep isl_basic_map *bmap,
int (*fn)(__isl_take isl_constraint *c, void *user), void *user)
{