update isl for removal of isl_div
[barvinok.git] / README
bloba7acc694843b4bc19113a6a0db590615df54fadb
1 barvinok is a library for counting the number of integer points
2 in parametric and non-parametric polytopes as well as projections
3 of such sets.
4 For parametric polytopes the count is represented by either
5 an explicit function or a generating function.
6 The first comes in the shape of a piece-wise step-polynomial.
7 This is a generalization of both Ehrhart quasi-polynomials
8 and vector partition functions.
9 The second is a generalization of an Ehrhart series.
11 This library shares some functionality with LattE
12 (http://www.math.ucdavis.edu/~latte/)
13 and uses PolyLib (included), PIP (included), NTL (http://shoup.net/ntl/)
14 and optionally Omega (included).
15 If you have cloned the git repository, you need to run
16         git submodule init
17         git submodule update
18         sh autogen.sh
19 to get the submodules and create the configure scripts.
21 Additionally, the following packages can optionally be used
22 - GLPK (http://www.gnu.org/software/glpk/)
24 NTL needs to have been compiled with GMP support.
25 That is, you have to specify
26     NTL_GMP_LIP=on
28 Suppose you want to put everything in /opt,
29 Then you configure/compile NTL using
31 cd src
32 ./configure NTL_GMP_LIP=on PREFIX=/opt GMP_PREFIX=/path/to/gmp
33 make
34 make install
36 Configure this library using
38 ./configure --prefix=/opt --with-libgmp=/path/to/gmp  --with-ntl=/opt
40 If you want shared libraries, then configure with the
41 --enable-shared-barvinok option.
42 Note that this doesn't work on some systems because we link in libntl, which
43 is only available as a static library.
44 Also note that if you have previously installed a shared library of an older
45 version of barvinok, and you do not install one for this version, then the
46 linker may pick up the old shared library rather than the new static library.
48 If you want to compile and use the included pet library, then
49 you need the following packages:
50 - libyaml (http://pyyaml.org/wiki/LibYAML)
51 - LLVM/clang (http://clang.llvm.org/get_started.html)
52 Additionally, you need to configure with the --with-pet=bundled option.
54 If you want to compile and use the included Omega, then configure with
55 the --with-omega=bundled option.
57 Then
59 make
60 make check
61 make install
63 If you want to put any one of these packages in the default location
64 (typically /usr/local), then the prefix argument can be omitted.
65 For more information on other arguments,
67 ./configure --help
69 The input format of barvinok_enumerate is the same as that
70 of testehrhart from the PolyLib distribution.
71 See the PolyLib manual, barvinok_enumerate.c or the
72 examples in tests/ehrhart/ .
74 Note that the fractional representation is subject to change.
76 The library supports three specialization algorithms.
77 The first performs a direct specialization using a random vector.
78 The second performs a "depth-first" incremental specialization.
79 The third performs a "breadth-first" incremental specialization.
81 The first is usually the fastest, but can fail if the random
82 vector happens to be chosen incorrectly.
83 The incremental algorithms should never fail, but can be slower,
84 in some cases by quite a bit.  The breadth-first version should
85 be faster than the depth-first version, especially on polytopes
86 of moderate dimension with a lot of "structure", but can require
87 more memory.
89 Sven Verdoolaege <skimo@kotnet.org>