next up previous
Next: Some Useful Tips for Up: cdd/cdd+ Reference Manual Previous: Source Files and Compilation


Source Files and Compilation for cdd+

(1)
[Files and Compilation] The source files for distribution are

cdd+.readme The readme file
cdd.C C++ main source file
cddarith.C C++ main arithmetic code
cddpivot.C C++ pivot operation arithmetic code
cddio.C C++ IO code
cddrevs.C C++ reverse search code
cdd.h The header file for cdd.C
cdddef.h cdd+ definition file (whose two lines are to be edited by user)
cddtype.h cdd+ arithmetic type definition file
cddrevs.h The header file for cddrevs.C
setoper.C C++ library for set operation
setoper.h The header file for setoper.C
cddman.tex Latex 2$\epsilon$ source file of cdd+ Reference Manual
cddman.bbl bibliography file of cdd+ Reference Manual
cddHISTORY brief description of changes made at each updates
ine A subdirectory containing sample inequality input files
ext A subdirectory containing sample point/ray input files
makefile gcc-2.8.* makefile for cddf+ and cddr+
get_essential gawk script for facet_listing and vertex_listing
gmp_integer.cc Polymake's GMP wrapper in C++
gmp_rational.cc Polymake's GMP wrapper in C++
COPYING GNU GENERAL PUBLIC LICENSE

For compilation of cdd+, one needs either GNU's GMP (libgmp.a) or GNU's g++ Rational library (libg++.a) . It is strongly recommended to use GMP since it runs much faster. Note that libg++ is not supported by GNU any more. Also try to use a recent GNU's C++ compiler (gcc-2.8.* or higher). Most likely you have to edit makefile according to the setup of a GNU gcc compiler, GMP or g++-library, and type

   % make all
which creates two executables, cddr+ (either cddr+_gmp or cddr+_g++) and cddf+. The executable cddr+ computes with rational (exact arithmetic) and cddf+ computes with floating-point arithmetic. If you want to create only one of them, use ''make cddf+'' or ''make cddr+''. Once these executables are created one might want to remove all object files *.o by
   % rm *.o

We experienced some problems with older versions of gcc. Also, be aware that gcc and g++-library that come with NEXTSTEP 3.2 have bugs in the Rational library. Please use gcc and g++lib on the newest version NEXTSTEP 3.3, or build a recent gcc and g++library on older systems.

Note that cddr+ reads Polyhedra data in integer or rational number type, while cddf+ reads data in integer, rational and real number type. When cddf+ reads integer or rational numbers, it first converts them to floating point numbers and computes with floating-point arithmetic.

(2)
[Recompilation] The first two constants in the program cdddef.h are to be changed by the user if necessary, and the program must be recompiled each time after any change is made. These constants are simply to specify the largest size of acceptable input data $(b, -A)$:
#define MMAX    5002  /* USER'S CHOICE: max row size of A plus one */
#define NMAX    101   /* USER'S CHOICE: max column size of A plus one */
If this input data has $m$ rows and $d+1$ columns, then in the program, MMAX should be at least $m+1$ and NMAX should be at least $d+1$. Although it has no sense to set the sizes MMAX and NMAX much larger than necessary, the program only creates spaces for MMAX+NMAX pointers and uses only necessary storage space for each input, and thus large MMAX and NMAX won't be too harmful.

Unlike the pascal version pdd, one can set the size MMAX as large as one wants. It is no more restricted by the SET TYPE element sizes of usual Pascal compilers.

(3)
[Windows/Mac Users] In principle, cdd+ with GMP can be compiled on any platform that allows GMP and comes with modern C++ compilers with STL. Yet, I have no experiences. You might also want to try the ANSI C program cdd and cddlib instead which can be found in the same ftp site as cdd+.


next up previous
Next: Some Useful Tips for Up: cdd/cdd+ Reference Manual Previous: Source Files and Compilation
Komei Fukuda 2004-11-24