barvinok_enumerate_e: support verification of generating functions
[barvinok.git] / doc / omega.tex
blobe88c9c325d57c2158fe4f2d3c3b90041f717fbba
1 \section{\texorpdfstring{\protect\Omegalib/ interface}
2 {Omega interface}}
4 The \ai[\tt]{barvinok} distribution includes an interface
5 to \Omegalib/ \shortcite{Omega_lib} \ai[\tt]{occ}, an extension
6 of \ai[\tt]{oc} \shortcite{Omega_calc}.
7 The extension adds the operations shown in Figure~\ref{f:unary}.
8 Here are some examples:
9 \begin{verbatim}
10 symbolic n, m;
11 P := { [i,j] : 0 <= i <= n and i <= j <= m };
12 card P;
14 P := {[i,j] : 0 <= i < 4*n-1 and 0 <= j < n and
15 n-1 <= i+j <= 3*n-2 };
16 C1 := {[i,j] : 0 <= i < 4*n-1 and 0 <= j < n and
17 2*n-1 <= i+j <= 4*n-2 and i <= 2*n-1 };
19 count_lexsmaller P within C1;
21 vertices C1;
23 bmax { [i] -> 2*n*i - n*n + 3*n - 1/2*i*i - 3/2*i-1 :
24 (exists j : 0 <= i < 4*n-1 and 0 <= j < n and
25 2*n-1 <= i+j <= 4*n-2 and i <= 2*n-1 ) };
26 \end{verbatim}
28 \begin{figure}
29 \begin{tabular}{lp{0.25\textwidth}p{0.5\textwidth}}
30 Name & Syntax & Explanation
32 \hline
33 Card & \ai[\tt]{card} $r$ & Computes the number of integer points in $r$ and
34 prints the result to standard output
36 Ranking & \ai[\tt]{ranking} $r$ & Computes the rank function of $r$ and
37 prints the result to standard output
38 \shortcite{Loechner2002,Turjan2002}
40 Predecessors & \ai[\tt]{count\_lexsmaller} $r$ \ai[\tt]{within} $d$ &
41 Computes a function from the elements of $d$ to
42 the number of elements of $r$ that are lexicographically
43 smaller than that element and
44 prints the result to standard output.
46 Vertices & \ai[\tt]{vertices} $r$ &
47 Computes the parametric vertices of $r$ using \PolyLib/ \shortcite{Loechner1999}.
49 Bernstein & \ai[\tt]{bmax} $f$ &
50 Computes the \ai{Bernstein coefficient}s of the function $f$ over its domain
51 and removes the redundant coefficients by calling
52 \ai[\tt]{piecewise\_lst::maximize}. The results are printed to standard
53 output. See the example for how to specify the function $f$.
54 \end{tabular}
55 \caption{Extra relational operations of {\tt occ}}
56 \label{f:unary}
57 \end{figure}