1 \section{\protect\isl/ interface
}
5 The
\barvinok/ library currently supports just two
6 functions that interface with the
\isl/ library.
7 In time, this interface will grow and is set to replace
8 the
\PolyLib/ interface.
9 For more information on the
\isl/ data structures, see
10 the
\isl/ user manual.
13 __isl_give isl_pw_qpolynomial *isl_set_card(__isl_take isl_set *set);
15 Compute the number of elements in an
\ai[\tt]{isl
\_set}.
16 The resulting
\ai[\tt]{isl
\_pw\_qpolynomial} has purely parametric cells.
19 __isl_give isl_pw_qpolynomial *isl_map_card(__isl_take isl_map *map);
21 Compute a closed form expression for the number of image elements
22 associated to any element in the domain of the given
\ai[\tt]{isl
\_map}.
23 The union of the cells in the resulting
\ai[\tt]{isl
\_pw\_qpolynomial}
24 is equal to the domain of the input
\ai[\tt]{isl
\_map}.
27 __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_sum(
28 __isl_take isl_pw_qpolynomial *pwqp);
30 Compute the sum of the given piecewise quasipolynomial over
31 all integer points in the domain. The result is a piecewise
32 quasipolynomial that only involves the parameters.
34 \subsection{Calculator
}
36 The
\ai[\tt]{iscc
} calculator offers an interface to some
37 of the functionality provided by the
\isl/ and
\barvinok/
39 The unary operations are shown in
\autoref{t:iscc:unary
},
40 while the binary operations are shown in
\autoref{t:iscc:binary
}.
41 Here are some examples:
43 P :=
[n, m
] ->
{ [i,j
] :
0 <= i <= n and i <= j <= m
};
46 f :=
[n,m
] ->
{ [i,j
] -> i*j + n*i*i*j : i,j >=
0 and
5i +
27j <= n+m
};
49 s @
[n,m
] ->
{ [] :
0 <= n,m <=
20 };
51 f :=
[n
] ->
{ [i
] ->
2*n*i - n*n +
3*n -
1/
2*i*i -
3/
2*i-
1 :
52 (exists j :
0 <= i <
4*n-
1 and
0 <= j < n and
53 2*n-
1 <= i+j <=
4*n-
2 and i <=
2*n-
1 )
};
56 u @
[n
] ->
{ [] :
0 <= n <=
10 };
60 \begin{tabular
}{lllp
{0.5\textwidth}}
61 Name & Argument type & Result type & Meaning
64 \ai[\tt]{card
} & set & pw quasipolynomial &
65 number of elements in the set
67 \ai[\tt]{card
} & map & pw quasipolynomial &
68 number of elements in the image of a domain element
70 \ai[\tt]{dom
} & map & set &
73 \ai[\tt]{ran
} & map & set &
76 \ai[\tt]{lexmin
} & set & set &
77 lexicographically minimal element of a set
79 \ai[\tt]{lexmin
} & map & map &
80 lexicographically minimal image element
82 \ai[\tt]{lexmax
} & set & set &
83 lexicographically maximal element of a set
85 \ai[\tt]{lexmax
} & map & map &
86 lexicographically maximal image element
88 \ai[\tt]{sample
} & set & set &
89 a sample element of the set
91 \ai[\tt]{sample
} & map & map &
92 a sample element of the map
94 \ai[\tt]{sum
} & pw qp & pw qp &
95 sum over all integer points in the domain
97 \ai[\tt]{ub
} & pw qp & pw qp fold &
98 upper bound on the quasipolynomial over
99 all integer points in the domain.
100 This operation is only available if
101 \ai[\tt]{GiNaC
} support was compiled in.
104 \caption{\protect\ai[\tt]{iscc
} unary operations
}
109 \begin{tabular
}{llllp
{0.5\textwidth}}
110 LHS type & Name & RHS type & Result type & Meaning
113 set &
\ai{$+$
} & set & set & union
115 map &
\ai{$+$
} & map & map & union
117 pwqp &
\ai{$+$
} & pwqp & pwqp & sum
119 set &
\ai{$-$
} & set & set & set difference
121 map &
\ai{$-$
} & map & map & set difference
123 pwqp &
\ai{$-$
} & pwqp & pwqp & difference
125 set &
\ai{$*$
} & set & set & intersection
127 map &
\ai{$*$
} & map & map & intersection
129 pwqp &
\ai{$*$
} & pwqp & pwqp & product
131 pwqp &
\ai{@
} & set & pwqp &
132 evaluate the piecewise quasipolynomial in each element
133 of the set and return a piecewise quasipolynomial
134 mapping each of the individual elements to the resulting
137 pw qp fold &
\ai{@
} & set & pwqp &
138 evaluate the piecewise quasipolynomial fold in each element
139 of the set and return a piecewise quasipolynomial
140 mapping each of the individual elements to the resulting
144 \caption{\protect\ai[\tt]{iscc
} binary operations
}
145 \label{t:iscc:binary
}