evalue.c: export evalue_reorder_terms
[barvinok.git] / doc / omega.tex
blob10e3cc63c94ed0b5c5b1181edb71ce232c6eb6a5
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 Card & \ai[\tt]{card} $r$ {\tt using} \ai[\tt]{parker} &
37 Computes the number of integer points in $r$ and
38 prints the result to standard output
39 using the method of \shortciteN{Parker2004}
41 Ranking & \ai[\tt]{ranking} $r$ & Computes the rank function of $r$ and
42 prints the result to standard output
43 \shortcite{Loechner2002,Turjan2002}
45 Predecessors & \ai[\tt]{count\_lexsmaller} $r$ \ai[\tt]{within} $d$ &
46 Computes a function from the elements of $d$ to
47 the number of elements of $r$ that are lexicographically
48 smaller than that element and
49 prints the result to standard output.
51 Vertices & \ai[\tt]{vertices} $r$ &
52 Computes the parametric vertices of $r$ using \PolyLib/ \shortcite{Loechner1999}.
54 Bernstein & \ai[\tt]{bmax} $f$ &
55 Computes the \ai{Bernstein coefficient}s of the function $f$ over its domain
56 and removes the redundant coefficients by calling
57 \ai[\tt]{piecewise\_lst::maximize}. The results are printed to standard
58 output. See the example for how to specify the function $f$.
59 \end{tabular}
60 \caption{Extra relational operations of {\tt occ}}
61 \label{f:unary}
62 \end{figure}