remove gnulib link-warning module completely
[barvinok.git] / doc / omega.tex
blobdef2ce29d9e8afe9cb5055d7810fcdc45a3f2ae7
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 ) };
27 sum { [i,j] -> i*j + n*i*i*j : i,j >= 0 and 5i + 27j <= n+m };
28 \end{verbatim}
30 \begin{figure}
31 \begin{tabular}{lp{0.25\textwidth}p{0.5\textwidth}}
32 Name & Syntax & Explanation
34 \hline
35 Card & \ai[\tt]{card} $r$ & Computes the number of integer points in $r$ and
36 prints the result to standard output
38 Card & \ai[\tt]{card} $r$ {\tt using} \ai[\tt]{parker} &
39 Computes the number of integer points in $r$ and
40 prints the result to standard output
41 using the method of \shortciteN{Parker2004}
43 Ranking & \ai[\tt]{ranking} $r$ & Computes the rank function of $r$ and
44 prints the result to standard output
45 \shortcite{Loechner2002,Turjan2002}
47 Predecessors & \ai[\tt]{count\_lexsmaller} $r$ \ai[\tt]{within} $d$ &
48 Computes a function from the elements of $d$ to
49 the number of elements of $r$ that are lexicographically
50 smaller than that element and
51 prints the result to standard output.
53 Vertices & \ai[\tt]{vertices} $r$ &
54 Computes the parametric vertices of $r$ using \PolyLib/ \shortcite{Loechner1999}.
56 Bernstein & \ai[\tt]{bmax} $f$ &
57 Computes the \ai{Bernstein coefficient}s of the function $f$ over its domain
58 and removes the redundant coefficients by calling
59 \ai[\tt]{piecewise\_lst::maximize}. The results are printed to standard
60 output. See the example for how to specify the function $f$.
62 Sum & \ai[\tt]{sum} $f$ &
63 Computes the sum of the given polynomial $f$ over its domain
64 using \ai[\tt]{barvinok\_summate}.
65 \end{tabular}
66 \caption{Extra relational operations of {\tt occ}}
67 \label{f:unary}
68 \end{figure}