assume NTL has been compiled in ISO mode
[barvinok.git] / README
blobc0678c7bead478610be2ba2e6051eebbb0b3bc33
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), NTL (http://shoup.net/ntl/).
14 If you have cloned the git repository, you need to run
15         git submodule init
16         git submodule update
17         sh autogen.sh
18 to get the submodules and create the configure scripts.
20 Additionally, the following packages can optionally be used
21 - Omega+ (http://chunchen.info/omega/)
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
27 NTL also needs to have been compiled in ISO mode.
28 For versions older than 5.4, this means you need an additional
29     NTL_STD_CXX=on
31 Suppose you want to install everything in /opt,
32 Then you configure/compile NTL using
34 cd src
35 ./configure NTL_GMP_LIP=on PREFIX=/opt GMP_PREFIX=/path/to/gmp
36 make
37 make install
39 Configure this library using
41 ./configure --prefix=/opt --with-gmp-prefix=/path/to/gmp --with-ntl-prefix=/opt
43 If you want shared libraries, then configure with the
44 --enable-shared-barvinok option.
45 Note that this doesn't work on some systems because we link in libntl, which
46 is only available as a static library.
47 Also note that if you have previously installed a shared library of an older
48 version of barvinok, and you do not install one for this version, then the
49 linker may pick up the old shared library rather than the new static library.
51 If you want to compile and use the included pet library, then
52 you need the following packages:
53 - libyaml (http://pyyaml.org/wiki/LibYAML)
54 - LLVM/clang (http://clang.llvm.org/get_started.html)
55 Additionally, you need to configure with the --with-pet=bundled option.
56 See pet/README for more information.
58 Then
60 make
61 make check
62 make install
64 If you want to put any one of these packages in the default location
65 (typically /usr/local), then the prefix argument can be omitted.
66 For more information on other arguments,
68 ./configure --help
70 The input format of barvinok_enumerate is the same as that
71 of testehrhart from the PolyLib distribution.
72 See the PolyLib manual, barvinok_enumerate.c or the
73 examples in tests/ehrhart/ .
75 Note that the fractional representation is subject to change.
77 The library supports three specialization algorithms.
78 The first performs a direct specialization using a random vector.
79 The second performs a "depth-first" incremental specialization.
80 The third performs a "breadth-first" incremental specialization.
82 The first is usually the fastest, but can fail if the random
83 vector happens to be chosen incorrectly.
84 The incremental algorithms should never fail, but can be slower,
85 in some cases by quite a bit.  The breadth-first version should
86 be faster than the depth-first version, especially on polytopes
87 of moderate dimension with a lot of "structure", but can require
88 more memory.
90 For bug reports, feature requests and questions,
91 contact http://groups.google.com/group/isl-development