summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2010-03-06 16:57:09 +0100
committerSven Verdoolaege <skimo@kotnet.org>2010-03-09 13:35:28 +0100
commitfe7284963999cecd86bc5a9b18019af8caecf3d5 (patch)
tree0149029c896a9f0b4775f0d599b01d9b47945da6 /doc
parent894080825c4bd7a5926c3618975965d9bcbbdf44 (diff)
downloadisl-fe7284963999cecd86bc5a9b18019af8caecf3d5.tar.gz
isl-fe7284963999cecd86bc5a9b18019af8caecf3d5.tar.bz2
isl-fe7284963999cecd86bc5a9b18019af8caecf3d5.zip
add isl_pw_qpolynomial_foreach_piece
Diffstat (limited to 'doc')
-rw-r--r--doc/user.pod44
1 files changed, 44 insertions, 0 deletions
diff --git a/doc/user.pod b/doc/user.pod
index 08641f92..b8fe52f0 100644
--- a/doc/user.pod
+++ b/doc/user.pod
@@ -1184,6 +1184,50 @@ functions.
void isl_pw_qpolynomial_free(
__isl_take isl_pw_qpolynomial *pwqp);
+=head3 Inspecting (Piecewise) Quasipolynomials
+
+To iterate over the cells in a piecewise quasipolynomial,
+use the following function
+
+ int isl_pw_qpolynomial_foreach_piece(
+ __isl_keep isl_pw_qpolynomial *pwqp,
+ int (*fn)(__isl_take isl_set *set,
+ __isl_take isl_qpolynomial *qp,
+ void *user), void *user);
+
+As usual, the function C<fn> should return C<0> on success
+and C<-1> on failure.
+
+To iterate over all terms in a quasipolynomial,
+use
+
+ int isl_qpolynomial_foreach_term(
+ __isl_keep isl_qpolynomial *qp,
+ int (*fn)(__isl_take isl_term *term,
+ void *user), void *user);
+
+The terms themselves can be inspected and freed using
+these functions
+
+ unsigned isl_term_dim(__isl_keep isl_term *term,
+ enum isl_dim_type type);
+ void isl_term_get_num(__isl_keep isl_term *term,
+ isl_int *n);
+ void isl_term_get_den(__isl_keep isl_term *term,
+ isl_int *d);
+ int isl_term_get_exp(__isl_keep isl_term *term,
+ enum isl_dim_type type, unsigned pos);
+ __isl_give isl_div *isl_term_get_div(
+ __isl_keep isl_term *term, unsigned pos);
+ void isl_term_free(__isl_take isl_term *term);
+
+Each term is a product of parameters, set variables and
+integer divisions. The function C<isl_term_get_exp>
+returns the exponent of a given dimensions in the given term.
+The C<isl_int>s in the arguments of C<isl_term_get_num>
+and C<isl_term_get_den> need to have been initialized
+using C<isl_int_init> before calling these functions.
+
=head3 Properties of (Piecewise) Quasipolynomials
To check whether a quasipolynomial is actually a constant,