bernstein: add piecewise_lst::is_equal
[barvinok.git] / README
blob82c676841740d466c4e6ad6db52833a8d571f827
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) and 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://www.cs.umd.edu/projects/omega/ or 
22     http://www.liacs.nl/~sverdool/gitweb.cgi?p=omega.git;a=summary)
23 - GLPK (http://www.gnu.org/software/glpk/)
24 - GiNaC (http://www.ginac.de/) (needed for the bernstein library)
26 NTL needs to have been compiled with GMP support.
27 That is, you have to specify
28     NTL_GMP_LIP=on
30 Suppose you want to put everything in /opt,
31 Then you configure/compile NTL using
33 ./configure --prefix=/opt
34 make
35 make install
37 For NTL,
39 cd src
40 ./configure NTL_GMP_LIP=on PREFIX=/opt GMP_PREFIX=/path/to/gmp
41 make
42 make install
44 For Omega,
46 vi -c '/DESTDIR=/|s/=.*$/=\/opt/|wq' Makefile.config
47 make libomega.a libcode_gen.a
48 make install
50 Configure this library using
52 ./configure --prefix=/opt --with-libgmp=/path/to/gmp  --with-ntl=/opt
54 If you want shared libraries, then configure with the --enable-shared option.
55 Note that this doesn't work on some systems because we link in libntl, which
56 is only available as a static library.
57 Also note that if you have previously installed a shared library of an older
58 version of barvinok, and you do not install one for this version, then the
59 linker may pick up the old shared library rather than the new static library.
61 Then
63 make
64 make check
65 make install
67 If you want to put any one of these packages in the default location
68 (typically /usr/local), then the prefix argument can be omitted.
69 For more information on other arguments,
71 ./configure --help
73 The input format of barvinok_enumerate is the same as that
74 of testehrhart from the PolyLib distribution.
75 See the PolyLib manual, barvinok_enumerate.c or the
76 examples in tests/ehrhart/ .
78 Note that the fractional representation is subject to change.
80 The library supports three specialization algorithms.
81 The first performs a direct specialization using a random vector.
82 The second performs a "depth-first" incremental specialization.
83 The third performs a "breadth-first" incremental specialization.
85 The first is usually the fastest, but can fail if the random
86 vector happens to be chosen incorrectly.
87 The incremental algorithms should never fail, but can be slower,
88 in some cases by quite a bit.  The breadth-first version should
89 be faster than the depth-first version, especially on polytopes
90 of moderate dimension with a lot of "structure", but can require
91 more memory.
93 Sven Verdoolaege <skimo@kotnet.org>