--- /srv/reproducible-results/rbuild-debian/r-b-build.TqxTR798/b1/cddlib_094m-1.1_amd64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.TqxTR798/b2/cddlib_094m-1.1_amd64.changes ├── Files │ @@ -1,7 +1,7 @@ │ │ ee92090bc470eaf91327b4c1feb1645d 18520 libdevel optional libcdd-dev_094m-1.1_amd64.deb │ - 7dabbec9effa7ad2f45bfc9b326869f6 255576 doc optional libcdd-doc_094m-1.1_all.deb │ + afe0701dbb62b50e058d2d52fc17eb87 252748 doc optional libcdd-doc_094m-1.1_all.deb │ 58fb70768b520ff75b2e593ca794c564 118672 debug optional libcdd-tools-dbgsym_094m-1.1_amd64.deb │ e2c38dfa531d7b9681a1af9bdf25c1d3 28956 math optional libcdd-tools_094m-1.1_amd64.deb │ b80aeb26eae733180020c44ba5c218d5 394804 debug optional libcdd0t64-dbgsym_094m-1.1_amd64.deb │ e72883d198d1d1ee7418588fac51ff06 104532 libs optional libcdd0t64_094m-1.1_amd64.deb ├── libcdd-doc_094m-1.1_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2024-02-28 05:59:09.000000 debian-binary │ │ -rw-r--r-- 0 0 0 836 2024-02-28 05:59:09.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 254548 2024-02-28 05:59:09.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 251720 2024-02-28 05:59:09.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./control │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ Package: libcdd-doc │ │ │ │ Source: cddlib │ │ │ │ Version: 094m-1.1 │ │ │ │ Architecture: all │ │ │ │ Maintainer: Debian Math Team │ │ │ │ -Installed-Size: 259 │ │ │ │ +Installed-Size: 256 │ │ │ │ Breaks: libcdd-dev (<< 094g-3) │ │ │ │ Replaces: libcdd-dev (<< 094g-3) │ │ │ │ Section: doc │ │ │ │ Priority: optional │ │ │ │ Multi-Arch: foreign │ │ │ │ Homepage: https://github.com/cddlib/cddlib │ │ │ │ Description: documentation for libcdd │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-02-28 05:59:09.000000 ./ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-02-28 05:59:09.000000 ./usr/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-02-28 05:59:09.000000 ./usr/share/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-02-28 05:59:09.000000 ./usr/share/doc/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-02-28 05:59:09.000000 ./usr/share/doc/libcdd-dev/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 246304 2024-02-28 05:59:09.000000 ./usr/share/doc/libcdd-dev/cddlibman.pdf.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 243473 2024-02-28 05:59:09.000000 ./usr/share/doc/libcdd-dev/cddlibman.pdf.gz │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-02-28 05:59:09.000000 ./usr/share/doc/libcdd-doc/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 572 2024-02-28 05:59:09.000000 ./usr/share/doc/libcdd-doc/changelog.Debian.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5059 2020-12-08 14:43:12.000000 ./usr/share/doc/libcdd-doc/changelog.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1209 2018-09-29 19:12:01.000000 ./usr/share/doc/libcdd-doc/copyright │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-02-28 05:59:09.000000 ./usr/share/doc-base/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1173 2018-09-29 19:40:06.000000 ./usr/share/doc-base/libcdd-doc.cddlibman │ │ │ ├── ./usr/share/doc/libcdd-dev/cddlibman.pdf.gz │ │ │ │ ├── cddlibman.pdf │ │ │ │ │ ├── pdftotext {} - │ │ │ │ │ │ @@ -2,84 +2,19 @@ │ │ │ │ │ │ Komei Fukuda │ │ │ │ │ │ Institute for Operations Research │ │ │ │ │ │ and Institute of Theoretical Computer Science │ │ │ │ │ │ ETH Zentrum, CH-8092 Zurich, Switzerland │ │ │ │ │ │ (cddlib ver. 0.94, manual ver. February 7, 2008) │ │ │ │ │ │ │ │ │ │ │ │ Contents │ │ │ │ │ │ -1 Introduction │ │ │ │ │ │ - │ │ │ │ │ │ -2 │ │ │ │ │ │ - │ │ │ │ │ │ -2 Polyhedra H- and V-Formats (Version 1999) │ │ │ │ │ │ - │ │ │ │ │ │ -3 │ │ │ │ │ │ - │ │ │ │ │ │ -3 Basic Object Types (Structures) in cddlib │ │ │ │ │ │ - │ │ │ │ │ │ -4 │ │ │ │ │ │ - │ │ │ │ │ │ -4 Library Functions │ │ │ │ │ │ -4.1 Library Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ -4.2 Core Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ -4.3 Data Manipulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ -4.3.1 Number Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ -4.3.2 Arithmetic Operations for mytype Numbers . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ -4.3.3 Predefined Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ -4.3.4 Sign Evaluation and Comparison for mytype Numbers . . . . . . . . . . . . . │ │ │ │ │ │ -4.3.5 Polyhedra Data Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ -4.3.6 LP Data Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ -4.3.7 Matrix Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ -4.4 Input/Output Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ -4.5 Obsolete Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ -4.6 Set Functions in setoper library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . │ │ │ │ │ │ - │ │ │ │ │ │ -7 │ │ │ │ │ │ -7 │ │ │ │ │ │ -7 │ │ │ │ │ │ -11 │ │ │ │ │ │ -11 │ │ │ │ │ │ -11 │ │ │ │ │ │ -12 │ │ │ │ │ │ -12 │ │ │ │ │ │ -12 │ │ │ │ │ │ -13 │ │ │ │ │ │ -13 │ │ │ │ │ │ -14 │ │ │ │ │ │ -15 │ │ │ │ │ │ -15 │ │ │ │ │ │ - │ │ │ │ │ │ -5 An Extension of the CDD Library in GMP mode │ │ │ │ │ │ - │ │ │ │ │ │ -16 │ │ │ │ │ │ - │ │ │ │ │ │ -6 Examples │ │ │ │ │ │ - │ │ │ │ │ │ -16 │ │ │ │ │ │ - │ │ │ │ │ │ -7 Numerical Accuracy │ │ │ │ │ │ - │ │ │ │ │ │ -16 │ │ │ │ │ │ - │ │ │ │ │ │ -8 Other Useful Codes │ │ │ │ │ │ - │ │ │ │ │ │ -16 │ │ │ │ │ │ - │ │ │ │ │ │ -9 Codes Using Cddlib │ │ │ │ │ │ - │ │ │ │ │ │ -17 │ │ │ │ │ │ Abstract │ │ │ │ │ │ - │ │ │ │ │ │ This is a reference manual for cddlib-094. The manual describes the library functions and │ │ │ │ │ │ data types implemented in the cddlib C-library which is to perform fundamental polyhedral │ │ │ │ │ │ computations such as representation conversions and linear programming in both floating-point │ │ │ │ │ │ - │ │ │ │ │ │ -1 │ │ │ │ │ │ - │ │ │ │ │ │ - and GMP rational exact arithmetic. Please read the accompanying README file and test │ │ │ │ │ │ +and GMP rational exact arithmetic. Please read the accompanying README file and test │ │ │ │ │ │ programs to complement the manual. │ │ │ │ │ │ The new functions added in this version include dd MatrixCanonicalize to find a nonredundant proper H- or V-representation, dd FindRelativeInterior to find a relative interior │ │ │ │ │ │ point of an H-polyhedron, and dd ExistsRestrictedFace (Farkas-type alternative theorem │ │ │ │ │ │ verifier) to check the existence of a point satisfying a specified system of linear inequalities │ │ │ │ │ │ possibly including multiple strict inequalities. │ │ │ │ │ │ The new functions are particularly important for the development of related software packages MinkSum (by Ch. Weibel) and Gfan (by Anders Jensen), │ │ │ │ │ │ │ │ │ │ │ │ @@ -97,15 +32,18 @@ │ │ │ │ │ │ this library version, a large part of the cdd source (Version 0.61) has been rewritten. This library │ │ │ │ │ │ version is more flexible since it can be called from other programs in C/C++. Unlike cdd/cdd+, │ │ │ │ │ │ cddlib can handle any general input and is more general. Furthermore, additional functions have │ │ │ │ │ │ been written to extend its functionality. │ │ │ │ │ │ One useful feature of cddlib/cdd/cdd+ is its capability of handling the dual (reverse) problem │ │ │ │ │ │ without any transformation of data. The dual transformation problem of a V-representation to │ │ │ │ │ │ a minimal H-representation and is often called the (convex) hull problem. More explicitly, is to │ │ │ │ │ │ -obtain a linear inequality representation of a convex polyhedron given as the Minkowski sum of the │ │ │ │ │ │ + │ │ │ │ │ │ +1 │ │ │ │ │ │ + │ │ │ │ │ │ + obtain a linear inequality representation of a convex polyhedron given as the Minkowski sum of the │ │ │ │ │ │ convex hull of a finite set of points and the nonnegative hull of a finite set of points in Rd : │ │ │ │ │ │ P = conv(v1 , . . . , vn ) + nonneg(rn+1 , . . . , rn+s ), │ │ │ │ │ │ where the Minkowski sum of two subsets S and T of Rd is defined as │ │ │ │ │ │ S + T = {s + t |s ∈ S and t ∈ T }. │ │ │ │ │ │ As we see in this manual, the computation can be done in straightforward manner. Unlike the │ │ │ │ │ │ earlier versions of cdd/cdd+ that assume certain regularity conditions for input, cddlib is designed │ │ │ │ │ │ to do a correct transformation for any general input. The user must be aware of the fact that │ │ │ │ │ │ @@ -113,17 +51,15 @@ │ │ │ │ │ │ representations. For example, a line segment (1-dimensional polytope) in R3 has infinitely many │ │ │ │ │ │ minimal H-representations, and a halfspace in the same space has infinitely many minimal Vrepresentations. cddlib generates merely one minimal representation. │ │ │ │ │ │ cddlib comes with an LP code to solve the general linear programming (LP) problem to maximize (or minimize) a linear function over polyhedron P . It is useful mainly for solving dense LP’s │ │ │ │ │ │ with large m (say, up to few hundred thousands) and small d (say, up to 100). It implements a │ │ │ │ │ │ revised dual simplex method that updates (d + 1) × (d + 1) matrix for a pivot operation. │ │ │ │ │ │ The program cddlib has an I/O routines that read and write files in Polyhedra format which │ │ │ │ │ │ was defined by David Avis and the author in 1993, and has been updated in 1997 and 1999. The │ │ │ │ │ │ -2 │ │ │ │ │ │ - │ │ │ │ │ │ - program called lrs and lrslib [?] developed by David Avis is a C-implementation of the reverse │ │ │ │ │ │ +program called lrs and lrslib [?] developed by David Avis is a C-implementation of the reverse │ │ │ │ │ │ search algorithm [?] for the same enumeration purpose, and it conforms to Polyhedra format as │ │ │ │ │ │ well. Hopefully, this compatibility of the two programs enables users to use both programs for the │ │ │ │ │ │ same input files and to choose whichever is useful for their purposes. From our experiences with │ │ │ │ │ │ relatively large problems, the two methods are both useful and perhaps complementary to each │ │ │ │ │ │ other. In general, the program cddlib tends to be efficient for highly degenerate inputs and the │ │ │ │ │ │ program rs tends to be efficient for nondegenerate or slightly degenerate problems. │ │ │ │ │ │ Although the program can be used for nondegenerate inputs, it might not be very efficient. │ │ │ │ │ │ @@ -144,15 +80,17 @@ │ │ │ │ │ │ Polyhedra H- and V-Formats (Version 1999) │ │ │ │ │ │ │ │ │ │ │ │ Every convex polyhedron has two representations, one as the intersection of finite halfspaces and │ │ │ │ │ │ the other as Minkowski sum of the convex hull of finite points and the nonnegative hull of finite │ │ │ │ │ │ directions. These are called H-representation and V-representation, respectively. │ │ │ │ │ │ Naturally there are two basic Polyhedra formats, H-format for H-representation and V-format │ │ │ │ │ │ for V-representation. These two formats are designed to be almost indistinguishable, and in fact, │ │ │ │ │ │ -one can almost pretend one for the other. There is some asymmetry arising from the asymmetry │ │ │ │ │ │ +2 │ │ │ │ │ │ + │ │ │ │ │ │ + one can almost pretend one for the other. There is some asymmetry arising from the asymmetry │ │ │ │ │ │ of two representations. │ │ │ │ │ │ First we start with the H-representation. Let A be an m × d matrix, and let b be a column │ │ │ │ │ │ m-vector. The Polyhedra format (H-format ) of the system b − Ax ≥ 0 of m inequalities in d │ │ │ │ │ │ variables x = (x1 , x2 , . . . , xd )T is │ │ │ │ │ │ various comments │ │ │ │ │ │ H-representation │ │ │ │ │ │ (linearity t i1 i2 . . . it ) │ │ │ │ │ │ @@ -164,17 +102,15 @@ │ │ │ │ │ │ various options │ │ │ │ │ │ where numbertype can be one of integer, rational or real. When rational type is selected, each │ │ │ │ │ │ component of b and A can be specified by the usual integer expression or by the rational expression │ │ │ │ │ │ “p/q” or “−p/q” where p and q are arbitrary long positive integers (see the example input file │ │ │ │ │ │ rational.ine). In the 1997 format, we introduced “H-representation” which must appear before │ │ │ │ │ │ “begin”. There was one restriction in the old polyhedra format (before 1997): the last d rows must │ │ │ │ │ │ determine a vertex of P . This is obsolete now. │ │ │ │ │ │ -3 │ │ │ │ │ │ - │ │ │ │ │ │ - In the new 1999 format, we added the possibility of specifying linearity. This means that for │ │ │ │ │ │ +In the new 1999 format, we added the possibility of specifying linearity. This means that for │ │ │ │ │ │ H-representation, some of the input rows can be specified as equalities: bij − Aij x = 0 for all │ │ │ │ │ │ j = 1, 2, . . . , t. The linearity line may be omitted if there are no equalities. │ │ │ │ │ │ Option lines can be used to control computation of a specific program. In particular both cdd │ │ │ │ │ │ and lrs use the option lines to represent a linear objective function. See the attached LP files, │ │ │ │ │ │ samplelp*.ine. │ │ │ │ │ │ Next we define Polyhedra V-format. Let P be represented by n generating points and s generating directions (rays) as P = conv(v1 , . . . , vn ) + nonneg(rn+1 , . . . , rn+s ). Then the Polyhedra │ │ │ │ │ │ V-format for P is │ │ │ │ │ │ @@ -201,15 +137,17 @@ │ │ │ │ │ │ │ │ │ │ │ │ 0 │ │ │ │ │ │ rn+s │ │ │ │ │ │ end │ │ │ │ │ │ various options │ │ │ │ │ │ Here we do not require that vertices and rays are listed separately; they can appear mixed in │ │ │ │ │ │ arbitrary order. │ │ │ │ │ │ -Linearity for V-representation specifies a subset of generators whose coefficients are relaxed to │ │ │ │ │ │ +3 │ │ │ │ │ │ + │ │ │ │ │ │ + Linearity for V-representation specifies a subset of generators whose coefficients are relaxed to │ │ │ │ │ │ be free: for all j = 1, 2, . . . , t, the k = ij th generator (vk or rk whichever is the ij th generator) is │ │ │ │ │ │ a free generator. This means for each such a ray rk , the line generated by rk is in the polyhedron, │ │ │ │ │ │ and for each such a vertex vk , its coefficient is no longer nonnegative but still the coefficients for all │ │ │ │ │ │ vi ’s must sum up to one. It is highly unlikely that one needs to use linearity for vertex generators, │ │ │ │ │ │ and it is defined mostly for formality. │ │ │ │ │ │ When the representation statement, either “H-representation” or “V-representation”, is omitted, the former “H-representation” is assumed. │ │ │ │ │ │ It is strongly suggested to use the following rule for naming H-format files and V-format files: │ │ │ │ │ │ @@ -222,17 +160,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ Here are the types (defined in cddtypes.h) that are important for the cddlib user. The most │ │ │ │ │ │ important one, dd MatrixType, is to store a Polyhedra data in a straightforward manner. Once │ │ │ │ │ │ the user sets up a (pointer to) dd MatrixType data, he/she can load the data to an internal data │ │ │ │ │ │ type (dd PolyhedraType) by using functions described in the next section, and apply the double │ │ │ │ │ │ descrition method to get another representation. As an option dd MatrixType can save a linear │ │ │ │ │ │ objective function to be used by a linear programming solver. │ │ │ │ │ │ -4 │ │ │ │ │ │ - │ │ │ │ │ │ - The two dimensional array data in the structure dd MatrixType is dd Amatrix whose components are of type mytype. The type mytype is set to be either the rational type mpq t of the │ │ │ │ │ │ +The two dimensional array data in the structure dd MatrixType is dd Amatrix whose components are of type mytype. The type mytype is set to be either the rational type mpq t of the │ │ │ │ │ │ GNU MP Library or the C double array of size 1. This abstract type allows us to write a single │ │ │ │ │ │ program that can be compiled with the two or more different arithmetics, see example programs │ │ │ │ │ │ such as simplecdd.c, testlp*.c and testcdd*.c in the src and src-gmp subdirectories of the source │ │ │ │ │ │ distribution. │ │ │ │ │ │ There is another data type that is used very often, dd SetFamilyType. This is to store a │ │ │ │ │ │ family of subsets of a finite set. Such a family can represent the incidence relations between the │ │ │ │ │ │ set of extreme points and the set of facets of a polyhedron. Also, it can represent a graph structure by listing the set of vertices adjacent to each vertex (i.e. the adjacency list). To implement │ │ │ │ │ │ @@ -240,21 +176,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ #define dd_FALSE 0 │ │ │ │ │ │ #define dd_TRUE 1 │ │ │ │ │ │ typedef long dd_rowrange; │ │ │ │ │ │ typedef long dd_colrange; │ │ │ │ │ │ typedef long dd_bigrange; │ │ │ │ │ │ typedef set_type dd_rowset; │ │ │ │ │ │ -/* set_type defined in setoper.h */ │ │ │ │ │ │ typedef set_type dd_colset; │ │ │ │ │ │ typedef long *dd_rowindex; │ │ │ │ │ │ typedef int *dd_rowflag; │ │ │ │ │ │ typedef long *dd_colindex; │ │ │ │ │ │ -typedef mytype **dd_Amatrix; /* mytype is either GMP mpq_t or 1-dim double array. */ │ │ │ │ │ │ -typedef mytype *dd_Arow; │ │ │ │ │ │ +typedef mytype **dd_Amatrix; │ │ │ │ │ │ + │ │ │ │ │ │ +/* set_type defined in setoper.h */ │ │ │ │ │ │ + │ │ │ │ │ │ +/* mytype is either GMP mpq_t or 1-dim double array. */ │ │ │ │ │ │ +4 │ │ │ │ │ │ + │ │ │ │ │ │ + typedef mytype *dd_Arow; │ │ │ │ │ │ typedef set_type *dd_SetVector; │ │ │ │ │ │ typedef enum { │ │ │ │ │ │ dd_Real, dd_Rational, dd_Integer, dd_Unknown │ │ │ │ │ │ } dd_NumberType; │ │ │ │ │ │ typedef enum { │ │ │ │ │ │ dd_Inequality, dd_Generator, dd_Unspecified │ │ │ │ │ │ } dd_RepresentationType; │ │ │ │ │ │ @@ -263,17 +204,15 @@ │ │ │ │ │ │ dd_LexMin, dd_LexMax, dd_RandomRow │ │ │ │ │ │ } dd_RowOrderType; │ │ │ │ │ │ typedef enum { │ │ │ │ │ │ dd_InProgress, dd_AllFound, dd_RegionEmpty │ │ │ │ │ │ } dd_CompStatusType; │ │ │ │ │ │ typedef enum { │ │ │ │ │ │ dd_DimensionTooLarge, dd_ImproperInputFormat, │ │ │ │ │ │ -5 │ │ │ │ │ │ - │ │ │ │ │ │ - dd_NegativeMatrixSize, dd_EmptyVrepresentation, │ │ │ │ │ │ +dd_NegativeMatrixSize, dd_EmptyVrepresentation, │ │ │ │ │ │ dd_IFileNotFound, dd_OFileNotOpen, dd_NoLPObjective, │ │ │ │ │ │ dd_NoRealNumberSupport, dd_NoError │ │ │ │ │ │ } dd_ErrorType; │ │ │ │ │ │ typedef enum { │ │ │ │ │ │ dd_LPnone=0, dd_LPmax, dd_LPmin │ │ │ │ │ │ } dd_LPObjectiveType; │ │ │ │ │ │ typedef enum { │ │ │ │ │ │ @@ -288,15 +227,18 @@ │ │ │ │ │ │ /* a subset of rows of linearity (ie, generators of │ │ │ │ │ │ linearity space for V-representation, and equations │ │ │ │ │ │ for H-representation. */ │ │ │ │ │ │ dd_colrange colsize; │ │ │ │ │ │ dd_RepresentationType representation; │ │ │ │ │ │ dd_NumberType numbtype; │ │ │ │ │ │ dd_Amatrix matrix; │ │ │ │ │ │ -dd_LPObjectiveType objective; │ │ │ │ │ │ + │ │ │ │ │ │ +5 │ │ │ │ │ │ + │ │ │ │ │ │ + dd_LPObjectiveType objective; │ │ │ │ │ │ dd_Arow rowvec; │ │ │ │ │ │ } dd_MatrixType; │ │ │ │ │ │ typedef struct setfamily *dd_SetFamilyPtr; │ │ │ │ │ │ typedef struct setfamily { │ │ │ │ │ │ dd_bigrange famsize; │ │ │ │ │ │ dd_bigrange setsize; │ │ │ │ │ │ dd_SetVector set; │ │ │ │ │ │ @@ -307,18 +249,15 @@ │ │ │ │ │ │ dd_LPObjectiveType objective; │ │ │ │ │ │ dd_LPSolverType solver; │ │ │ │ │ │ dd_rowrange m; │ │ │ │ │ │ dd_colrange d; │ │ │ │ │ │ dd_NumberType numbtype; │ │ │ │ │ │ dd_LPStatusType LPS; /* the current solution status */ │ │ │ │ │ │ mytype optvalue; /* optimal value */ │ │ │ │ │ │ - │ │ │ │ │ │ -6 │ │ │ │ │ │ - │ │ │ │ │ │ - dd_Arow sol; │ │ │ │ │ │ +dd_Arow sol; │ │ │ │ │ │ /* primal solution */ │ │ │ │ │ │ dd_Arow dsol; /* dual solution */ │ │ │ │ │ │ dd_colindex nbindex; /* current basis represented by nonbasic indices */ │ │ │ │ │ │ dd_rowrange re; /* row index as a certificate in the case of inconsistency */ │ │ │ │ │ │ dd_colrange se; /* col index as a certificate in the case of dual inconsistency */ │ │ │ │ │ │ long pivots[5]; │ │ │ │ │ │ /* pivots[0]=setup (to find a basis), pivots[1]=PhaseI or Criss-Cross, │ │ │ │ │ │ @@ -334,15 +273,17 @@ │ │ │ │ │ │ matrixP, of type dd MatrixPtr*, err is of type dd ErrorType*, ifile and ofile are of type │ │ │ │ │ │ char*, A is of type dd Amatrix, point and vector are of type dd Arow, d is of type dd colrange, │ │ │ │ │ │ m and i are of type dd rowrange, x is of type mytype, a is of type signed long integer, b is │ │ │ │ │ │ of type double, set is of type set type. Also, setfam is of type dd SetFamilyPtr, lp is of type │ │ │ │ │ │ dd LPPtr, lps is of type dd LPSolutionPtr, solver is of type dd LPSolverType, roworder is of │ │ │ │ │ │ type dd RowOrderType. │ │ │ │ │ │ │ │ │ │ │ │ -4.1 │ │ │ │ │ │ +6 │ │ │ │ │ │ + │ │ │ │ │ │ + 4.1 │ │ │ │ │ │ │ │ │ │ │ │ Library Initialization │ │ │ │ │ │ │ │ │ │ │ │ void dd set global constants(void) : │ │ │ │ │ │ This is to set the global constants such as dd zero, dd purezero and dd one for sign recognition and basic arithmetic operations. Every program to use cddlib must call this function │ │ │ │ │ │ before doing any computation. Just call this once. See Section ?? for the definitions of │ │ │ │ │ │ constants. │ │ │ │ │ │ @@ -361,17 +302,15 @@ │ │ │ │ │ │ know that there is a serous limit in the sizes of problems that can be practically solved. Please │ │ │ │ │ │ check *.ext and *.ine files that come with cddlib to get ideas of tractable problems. │ │ │ │ │ │ In addition to previously defined objects, the symbol roworder is of dd RowOrderType. The │ │ │ │ │ │ symbol matrixP is a pointer to dd MatrixType. the arguments impl lin and redset are both │ │ │ │ │ │ a pointer to dd rowset type, and newpos is a pointer to dd rowindex type. │ │ │ │ │ │ dd PolyhedraPtr dd DDMatrix2Poly(matrix, err) : │ │ │ │ │ │ Store the representation given by matrix in a polyhedra data, and generate the second representation of *poly. It returns a pointer to the data. *err returns dd NoError if the │ │ │ │ │ │ -7 │ │ │ │ │ │ - │ │ │ │ │ │ - computation terminates normally. Otherwise, it returns a value according to the error occurred. │ │ │ │ │ │ +computation terminates normally. Otherwise, it returns a value according to the error occurred. │ │ │ │ │ │ dd PolyhedraPtr dd DDMatrix2Poly2(matrix, roworder, err) : │ │ │ │ │ │ This is the same function as dd DDMatrix2Poly except that the insertion order is specified by the user. The argument roworder is of dd RowOrderType and takes one of the values: dd MaxIndex, dd MinIndex, dd MinCutoff, dd MaxCutoff, dd MixCutoff, dd LexMin, │ │ │ │ │ │ dd LexMax, dd RandomRow. In general, dd LexMin is the best choice which is in fact chosen │ │ │ │ │ │ in dd DDMatrix2Poly. If you know that the input is already sorted in the order you like, use │ │ │ │ │ │ dd MinIndex or dd MaxIndex. If the input contains many redundant rows (say more than │ │ │ │ │ │ 80% redundant), you might want to try dd MaxCutoff which might result in much faster │ │ │ │ │ │ termination, see [?, ?] │ │ │ │ │ │ @@ -380,15 +319,18 @@ │ │ │ │ │ │ the second representation. The number of columns in *matrix must be equal to the input │ │ │ │ │ │ representation. │ │ │ │ │ │ boolean dd LPSolve(lp, solver, err) : │ │ │ │ │ │ Solve lp by the algorithm solver and save the solututions in *lp. Unlike the earlier versions │ │ │ │ │ │ (dplex, cdd+), it can deal with equations and totally zero right hand sides. It is recommended │ │ │ │ │ │ that solver is dd DualSimplex, the revised dual simplex method that updates a d × d dual │ │ │ │ │ │ basis matrix in each pivot (where d is the column size of lp). │ │ │ │ │ │ -The revised dual simplex method is ideal for dense LPs in small number of variables (i.e. │ │ │ │ │ │ + │ │ │ │ │ │ +7 │ │ │ │ │ │ + │ │ │ │ │ │ + The revised dual simplex method is ideal for dense LPs in small number of variables (i.e. │ │ │ │ │ │ small column size, typically less than 100) and many inequality constraints (i.e. large row │ │ │ │ │ │ size, can be a few ten thousands). If your LP has many variables but only few constraints, │ │ │ │ │ │ solve the dual LP by this function. │ │ │ │ │ │ When it is compiled for GMP rational arithmetic, it first tries to solve an LP with C double │ │ │ │ │ │ floating-point arithmetic and verifies whether the output basis is correct with GMP. If so, the │ │ │ │ │ │ correct solution is computed with GMP. Otherwise, it (re)solves the LP from scratch with │ │ │ │ │ │ GMP. This is newly implemented in the version 093. The original (non-crossover) version of │ │ │ │ │ │ @@ -402,18 +344,15 @@ │ │ │ │ │ │ changing the polyhedron. The function works for both V- and H-representations. │ │ │ │ │ │ dd boolean dd SRedundant(matrix, i, point, err) : │ │ │ │ │ │ Check whether ith data in matrix is strongly redundant for the representation. If i is a linearity, it does nothing and always returns dd FALSE. Here, ith inequality in H-representation │ │ │ │ │ │ is strongly redundant if it is redundant and there is no point in the polyhedron satisfying the │ │ │ │ │ │ inequality with equality. In V-representation, ith point is strongly redundant if it is redundant │ │ │ │ │ │ and it is in the relative interior of the polyhedron. If it is not strongly redundant, it returns │ │ │ │ │ │ a certificate. │ │ │ │ │ │ - │ │ │ │ │ │ -8 │ │ │ │ │ │ - │ │ │ │ │ │ - dd boolean dd ImplicitLinearity(matrix, i, err) : │ │ │ │ │ │ +dd boolean dd ImplicitLinearity(matrix, i, err) : │ │ │ │ │ │ Check whether ith row in the input is forced to be linearity (equality for H-representation). │ │ │ │ │ │ If i is linearity itself, it does nothing and always returns dd FALSE. │ │ │ │ │ │ dd rowset dd ImplicitLinearityRows(matrix, err) : │ │ │ │ │ │ Returns the set of indices of rows that are implicitly linearity. It simply calls the library │ │ │ │ │ │ function dd ImplicitLinearity for each inequality and collects the row indices for which │ │ │ │ │ │ the answer is dd TRUE. │ │ │ │ │ │ dd boolean dd MatrixCanonicalize(matrixP, impl lin, redset, newpos, err) : │ │ │ │ │ │ @@ -424,15 +363,17 @@ │ │ │ │ │ │ are returned by the array newpos. │ │ │ │ │ │ The cardinality of the new linearity set (*matrixP)->linset is the codimension of the polyhedron if it is H-polyhedron, and is the dimension of linearity space if it is V-polyhedron. │ │ │ │ │ │ Note that the present version should not be called a canonicalization because it may generate │ │ │ │ │ │ two different representations of the same polyhedron. In the future, this function is expected │ │ │ │ │ │ to be correctly implemented. │ │ │ │ │ │ dd boolean dd MatrixCanonicalizeLinearity(matrixP, impl linset, newpos, err) : │ │ │ │ │ │ It does only the first half of dd boolean dd MatrixCanonicalize, namely, it detects all │ │ │ │ │ │ -implicit linearities and puts a maximally independent linearities at the top of the matrix. For │ │ │ │ │ │ +8 │ │ │ │ │ │ + │ │ │ │ │ │ + implicit linearities and puts a maximally independent linearities at the top of the matrix. For │ │ │ │ │ │ example, this function can be used to detect the dimension of an H-polyhedron. │ │ │ │ │ │ dd boolean dd MatrixRedundancyRemove(matrixP, redset, newpos, err) : │ │ │ │ │ │ It does essentially the second half of dd boolean dd MatrixCanonicalize, namely, it detects │ │ │ │ │ │ all redundancies. This function should be used after dd MatrixCanonicalizeLinearity has │ │ │ │ │ │ been called. │ │ │ │ │ │ dd boolean dd FindRelativeInterior(matrix, impl lin, lin basis, lps, err) : │ │ │ │ │ │ Computes a point in the relative interior of an H-polyhedron given by matrix, by solving │ │ │ │ │ │ @@ -452,17 +393,15 @@ │ │ │ │ │ │ br − Ar x = 0, ∀r ∈ R ∪ L │ │ │ │ │ │ bs − As x > 0, ∀s ∈ S │ │ │ │ │ │ bt − At x ≥ 0, ∀t ∈ T, │ │ │ │ │ │ │ │ │ │ │ │ where L is the set of linearity rows of matrix, and T represents the set of rows that are not │ │ │ │ │ │ in R ∪ L ∪ S. Both R and S are of dd rowset type. The set S is supposed to be disjoint from │ │ │ │ │ │ both R and L. If it is not the case, the set S will be considered as S \ (R ∪ L). │ │ │ │ │ │ -9 │ │ │ │ │ │ - │ │ │ │ │ │ - This function ignores matrix->representation, and thus even if it is set to dd Generator │ │ │ │ │ │ +This function ignores matrix->representation, and thus even if it is set to dd Generator │ │ │ │ │ │ or dd Unspecified, it treats the matrix as if it were inequality representation. │ │ │ │ │ │ dd boolean dd ExistsRestrictedFace2(matrix, R, S, lps, err) : │ │ │ │ │ │ It is the same as the function dd ExistsRestrictedFace except that it returns also a certificate for the answer. The certificate is a solution to the bounded LP: │ │ │ │ │ │ (P) max z │ │ │ │ │ │ │ │ │ │ │ │ subject to │ │ │ │ │ │ │ │ │ │ │ │ @@ -480,15 +419,17 @@ │ │ │ │ │ │ dual unbounded direction) can be considered as a certificate for the NO answer, if the answer │ │ │ │ │ │ is NO. │ │ │ │ │ │ This function ignores matrix->representation, and thus even if it is set to dd Generator │ │ │ │ │ │ or dd Unspecified, it treats the matrix as if it were inequality representation. │ │ │ │ │ │ dd SetFamilyPtr dd Matrix2Adjacency(matrix, err) : │ │ │ │ │ │ Computes the adjacency list of input rows using the LP solver and without running the │ │ │ │ │ │ representation conversion. When the input is H-representation, it gives the facet graph of the │ │ │ │ │ │ -polyhedron. For V-representation, it gives the (vertex) graph of the polyhedron. It is required │ │ │ │ │ │ +9 │ │ │ │ │ │ + │ │ │ │ │ │ + polyhedron. For V-representation, it gives the (vertex) graph of the polyhedron. It is required │ │ │ │ │ │ that the input matrix is a minimal representation. Run redundancy removal functions before │ │ │ │ │ │ calling this function, see the sample code adjacency.c. │ │ │ │ │ │ dd SetFamilyPtr dd Matrix2WeakAdjacency(matrix, err) : │ │ │ │ │ │ Computes the weak adjacency list of input rows using the LP solver and without running │ │ │ │ │ │ the representation conversion. When the input is H-representation, it gives the graph where │ │ │ │ │ │ its nodes are the facets two nodes are adjacent if and only if the associated facets have some │ │ │ │ │ │ intersection. For V-representation, it gives the graph where its nodes are the vertices and two │ │ │ │ │ │ @@ -505,17 +446,15 @@ │ │ │ │ │ │ the extreme rays of the dual linear system. See comments in the code cddproj.c for details. │ │ │ │ │ │ This might be a faster way to eliminate variables than the repeated FourierElimination when │ │ │ │ │ │ the number of variables to eliminate is large. If the input matrix is V-representation, *err │ │ │ │ │ │ returns dd NotAvailForV. This function does not remove redundancy and one might want to │ │ │ │ │ │ call redundancy removal functions afterwards. See the sample code projection.c. │ │ │ │ │ │ dd rowrange dd RayShooting(matrix, point, vector) : │ │ │ │ │ │ Finds the index of a halfspace first left by the ray starting from point toward the direction │ │ │ │ │ │ -10 │ │ │ │ │ │ - │ │ │ │ │ │ - vector. It resolves tie by a lexicographic perturbation. Those inequalities violated by point │ │ │ │ │ │ +vector. It resolves tie by a lexicographic perturbation. Those inequalities violated by point │ │ │ │ │ │ will be simply ignored. │ │ │ │ │ │ │ │ │ │ │ │ 4.3 │ │ │ │ │ │ 4.3.1 │ │ │ │ │ │ │ │ │ │ │ │ Data Manipulations │ │ │ │ │ │ Number Assignments │ │ │ │ │ │ @@ -527,15 +466,18 @@ │ │ │ │ │ │ void dd init(x) : │ │ │ │ │ │ This is to initialize a mytype variable x and to set it to zero. This initialization has to be │ │ │ │ │ │ called before any mytype variable to be used. │ │ │ │ │ │ void dd clear(x) : │ │ │ │ │ │ This is to free the space allocated to a mytype variable x. │ │ │ │ │ │ void dd set si(x, a) : │ │ │ │ │ │ This is to set a mytype variable x to the value of signed long integer a. │ │ │ │ │ │ -void dd set si2(x, a, b) : │ │ │ │ │ │ + │ │ │ │ │ │ +10 │ │ │ │ │ │ + │ │ │ │ │ │ + void dd set si2(x, a, b) : │ │ │ │ │ │ This is to set a mytype variable x to the value of the rational expression a/b, where a is signed │ │ │ │ │ │ long and b is unsigned long integers. │ │ │ │ │ │ void dd set d(x, b) : │ │ │ │ │ │ This is to set a mytype variable x to the value of double b. This is available only when the │ │ │ │ │ │ library is compiled without -DGMPRATIONAL compiler option. │ │ │ │ │ │ 4.3.2 │ │ │ │ │ │ │ │ │ │ │ │ @@ -548,18 +490,15 @@ │ │ │ │ │ │ Set x to be the substraction of z from y. │ │ │ │ │ │ void dd mul(x, y, z) : │ │ │ │ │ │ Set x to be the multiplication of y and z. │ │ │ │ │ │ void dd div(x, y, z) : │ │ │ │ │ │ Set x to be the division of y over z. │ │ │ │ │ │ void dd inv(x, y) : │ │ │ │ │ │ Set x to be the reciplocal of y. │ │ │ │ │ │ - │ │ │ │ │ │ -11 │ │ │ │ │ │ - │ │ │ │ │ │ - 4.3.3 │ │ │ │ │ │ +4.3.3 │ │ │ │ │ │ │ │ │ │ │ │ Predefined Constants │ │ │ │ │ │ │ │ │ │ │ │ There are several mytype constants defined when dd set global constants(void) is called. Some │ │ │ │ │ │ constants depend on the double constant dd almostzero which is normally set to 10−7 in cdd.h. │ │ │ │ │ │ This value can be modified depending on how numerically delicate your problems are but an extra │ │ │ │ │ │ caution should be taken. │ │ │ │ │ │ @@ -569,15 +508,18 @@ │ │ │ │ │ │ This represents the largest positive number which should be considered to be zero. In the │ │ │ │ │ │ GMPRATIONAL mode, it is equal to dd purezero. In the C double mode, it is set to the │ │ │ │ │ │ value of dd almostzero. │ │ │ │ │ │ mytype dd minuszero : │ │ │ │ │ │ The negative of dd zero. │ │ │ │ │ │ mytype dd one : │ │ │ │ │ │ This represents the mathematical one 1. │ │ │ │ │ │ -4.3.4 │ │ │ │ │ │ + │ │ │ │ │ │ +11 │ │ │ │ │ │ + │ │ │ │ │ │ + 4.3.4 │ │ │ │ │ │ │ │ │ │ │ │ Sign Evaluation and Comparison for mytype Numbers │ │ │ │ │ │ │ │ │ │ │ │ Below x, y, z are of type mytype. │ │ │ │ │ │ dd boolean dd Positive(x) : │ │ │ │ │ │ Returns dd TRUE if x is considered positive, and dd FALSE otherwise. In the GMPRATIONAL │ │ │ │ │ │ mode, the positivity recognition is exact. In the C double mode, this means the value is strictly │ │ │ │ │ │ @@ -598,32 +540,33 @@ │ │ │ │ │ │ 4.3.5 │ │ │ │ │ │ │ │ │ │ │ │ Polyhedra Data Manipulation │ │ │ │ │ │ │ │ │ │ │ │ dd MatrixPtr dd PolyFile2Matrix (f, err) : │ │ │ │ │ │ Read a Polyhedra data from stream f and store it in matrixdata and return a pointer to the │ │ │ │ │ │ data. │ │ │ │ │ │ -12 │ │ │ │ │ │ - │ │ │ │ │ │ - dd MatrixPtr dd CopyInequalities(poly) : │ │ │ │ │ │ +dd MatrixPtr dd CopyInequalities(poly) : │ │ │ │ │ │ Copy the inequality representation pointed by poly to matrixdata and return dd MatrixPtr. │ │ │ │ │ │ dd MatrixPtr dd CopyGenerators(poly) : │ │ │ │ │ │ Copy the generator representation pointed by poly to matrixdata and return dd MatrixPtr. │ │ │ │ │ │ dd SetFamilyPtr dd CopyIncidence(poly) : │ │ │ │ │ │ Copy the incidence representation of the computed representation pointed by poly to setfamily │ │ │ │ │ │ and return dd SetFamilyPtr. The computed representation is Inequality if the input is │ │ │ │ │ │ Generator, and the vice visa. │ │ │ │ │ │ dd SetFamilyPtr dd CopyAdjacency(poly) : │ │ │ │ │ │ Copy the adjacency representation of the computed representation pointed by poly to setfamily │ │ │ │ │ │ and return dd SetFamilyPtr. The computed representation is Inequality if the input is │ │ │ │ │ │ Generator, and the vice visa. │ │ │ │ │ │ dd SetFamilyPtr dd CopyInputIncidence(poly) : │ │ │ │ │ │ Copy the incidence representation of the input representation pointed by poly to setfamily │ │ │ │ │ │ and return d SetFamilyPtr. │ │ │ │ │ │ -dd SetFamilyPtr dd CopyInputAdjacency(poly) : │ │ │ │ │ │ + │ │ │ │ │ │ +12 │ │ │ │ │ │ + │ │ │ │ │ │ + dd SetFamilyPtr dd CopyInputAdjacency(poly) : │ │ │ │ │ │ Copy the adjacency representation of the input representation pointed by poly to setfamily │ │ │ │ │ │ and return d SetFamilyPtr. │ │ │ │ │ │ void dd FreePolyhedra(poly) : │ │ │ │ │ │ Free memory allocated to poly. │ │ │ │ │ │ 4.3.6 │ │ │ │ │ │ │ │ │ │ │ │ LP Data Manipulation │ │ │ │ │ │ @@ -643,18 +586,15 @@ │ │ │ │ │ │ Free memory allocated as an LP solution data pointed by lps. │ │ │ │ │ │ 4.3.7 │ │ │ │ │ │ │ │ │ │ │ │ Matrix Manipulation │ │ │ │ │ │ │ │ │ │ │ │ dd MatrixPtr dd CopyMatrix(matrix) : │ │ │ │ │ │ Make a copy of matrixdata pointed by matrix and return a pointer to the copy. │ │ │ │ │ │ - │ │ │ │ │ │ -13 │ │ │ │ │ │ - │ │ │ │ │ │ - dd MatrixPtr dd AppendMatrix(matrix1, matrix2) : │ │ │ │ │ │ +dd MatrixPtr dd AppendMatrix(matrix1, matrix2) : │ │ │ │ │ │ Make a matrixdata by copying *matrix1 and appending the matrix in *matrix2 and return │ │ │ │ │ │ a pointer to the data. The colsize must be equal in the two input matrices. It returns a │ │ │ │ │ │ NULL pointer if the input matrices are not appropriate. Its rowsize is set to the sum of │ │ │ │ │ │ the rowsizes of matrix1 and matrix2. The new matrixdata inherits everything else (i.e. │ │ │ │ │ │ numbertype, representation, etc) from the first matrix. │ │ │ │ │ │ int dd MatrixAppendTo(& matrix1, matrix2) : │ │ │ │ │ │ Same as dd AppendMatrix except that the first matrix is modified to take the result. │ │ │ │ │ │ @@ -662,16 +602,17 @@ │ │ │ │ │ │ Remove the ith row of matrix. │ │ │ │ │ │ dd MatrixPtr dd MatrixSubmatrix(matrix, set) : │ │ │ │ │ │ Generate the submatrix of matrix by removing the rows indexed by set and return a matrixdata pointer. │ │ │ │ │ │ dd SetFamilyPtr dd Matrix2Adjacency(matrix, err) : │ │ │ │ │ │ Return the adjacency list of the representation given by matrix. The computation is done by │ │ │ │ │ │ the built-in LP solver. The representation should be free of redundancy when this function is │ │ │ │ │ │ called. See the function dd rowset dd RedundantRows and the example program adjacency.c. │ │ │ │ │ │ +13 │ │ │ │ │ │ │ │ │ │ │ │ -4.4 │ │ │ │ │ │ + 4.4 │ │ │ │ │ │ │ │ │ │ │ │ Input/Output Functions │ │ │ │ │ │ │ │ │ │ │ │ dd MatrixPtr dd PolyFile2Matrix (f, err) : │ │ │ │ │ │ Read a Polyhedra data from stream f and store it in matrixdata and return a pointer to the │ │ │ │ │ │ data. │ │ │ │ │ │ boolean dd DDFile2File(ifile, ofile, err) : │ │ │ │ │ │ @@ -688,17 +629,15 @@ │ │ │ │ │ │ Write error messages given by err to stream f. │ │ │ │ │ │ void dd WriteSetFamily(f, setfam) : │ │ │ │ │ │ Write the set family pointed by setfam to stream f. For each set, it outputs its index, its │ │ │ │ │ │ cardinality, a colon “:” and a ordered list of its elements. │ │ │ │ │ │ void dd WriteSetFamilyCompressed(f, setfam) : │ │ │ │ │ │ Write the set family pointed by setfam to stream f. For each set, it outputs its index, its │ │ │ │ │ │ cardinality or the negative of the cardinality, a colon “:” and the elements in the set or its │ │ │ │ │ │ -14 │ │ │ │ │ │ - │ │ │ │ │ │ - complements whichever is smaller. Whenever it outputs the complements, the cardinality │ │ │ │ │ │ +complements whichever is smaller. Whenever it outputs the complements, the cardinality │ │ │ │ │ │ is negated so that there is no ambiguity. This will be considered standard for outputing │ │ │ │ │ │ incidence (*.icd, *ecd) and adjacency (*.iad, *.ead) data in cddlib. But there is some minor │ │ │ │ │ │ incompatibility with cdd/cdd+ standalone codes. │ │ │ │ │ │ void dd WriteProgramDescription(f) : │ │ │ │ │ │ Write the cddlib version information to stream f. │ │ │ │ │ │ void dd WriteDDTimes(f, poly) : │ │ │ │ │ │ Write the representation conversion time information on poly to stream f. │ │ │ │ │ │ @@ -710,16 +649,17 @@ │ │ │ │ │ │ boolean dd DoubleDescription(poly, err) : (removed in Version 0.90c) │ │ │ │ │ │ The new function dd DDMatrix2Poly(matrix, err) (see Section ??) replaces (and actually │ │ │ │ │ │ combines) both this and dd Matrix2Poly(matrix, err). │ │ │ │ │ │ dd PolyhedraPtr dd Matrix2Poly(matrix, err) : (removed in Version 0.90c) │ │ │ │ │ │ See above for the reason for removal. │ │ │ │ │ │ dd LPSolutionPtr dd LPSolutionLoad(lp) : (renamed in Version 0.90c) │ │ │ │ │ │ This function is now called dd CopyLPSolution(lp). │ │ │ │ │ │ +14 │ │ │ │ │ │ │ │ │ │ │ │ -4.6 │ │ │ │ │ │ + 4.6 │ │ │ │ │ │ │ │ │ │ │ │ Set Functions in setoper library │ │ │ │ │ │ │ │ │ │ │ │ The cddlib comes with a simple set operation library setoper. The key type defined is set type. │ │ │ │ │ │ A set is represented by a fixed length binary strings. Thus, the maximum length of a set must be │ │ │ │ │ │ declared when it is initialized. │ │ │ │ │ │ Below the symbols a, b, c are of type set type. The symbols aP is a pointer to type set type, │ │ │ │ │ │ @@ -735,18 +675,15 @@ │ │ │ │ │ │ of b. │ │ │ │ │ │ void set addelem(a, t)) : │ │ │ │ │ │ Add an element t to a set a. The set a stays unchanged if it contains the element t. │ │ │ │ │ │ long set card(a)) : │ │ │ │ │ │ Return the cardinality of set a. │ │ │ │ │ │ int set member(t, a)) : │ │ │ │ │ │ Return 1 if t is a member of set a, and 0 otherwise. │ │ │ │ │ │ - │ │ │ │ │ │ -15 │ │ │ │ │ │ - │ │ │ │ │ │ - void set write(a)) : │ │ │ │ │ │ +void set write(a)) : │ │ │ │ │ │ Print out the elements of set a to stdout. The function void set fwrite(f, a)) output to │ │ │ │ │ │ stream f. │ │ │ │ │ │ │ │ │ │ │ │ 5 │ │ │ │ │ │ │ │ │ │ │ │ An Extension of the CDD Library in GMP mode │ │ │ │ │ │ │ │ │ │ │ │ @@ -762,15 +699,17 @@ │ │ │ │ │ │ 6 │ │ │ │ │ │ │ │ │ │ │ │ Examples │ │ │ │ │ │ │ │ │ │ │ │ See example codes such as testcdd*.c , testlp*.c, redcheck.c, adjacency.c, allfaces,c and simplecdd.c │ │ │ │ │ │ in the src and src-gmp subdirectories of the source distribution. │ │ │ │ │ │ │ │ │ │ │ │ -7 │ │ │ │ │ │ +15 │ │ │ │ │ │ + │ │ │ │ │ │ + 7 │ │ │ │ │ │ │ │ │ │ │ │ Numerical Accuracy │ │ │ │ │ │ │ │ │ │ │ │ A little caution is in order. Many people have observed numerical problems of cddlib when the │ │ │ │ │ │ floating version of cddlib is used. As we all know, floating-point computation might not give a │ │ │ │ │ │ correct answer, especially when an input data is very sensitive to a small perturbation. When some │ │ │ │ │ │ strange behavior is observed, it is always wise to create a rationalization of the input (for example, │ │ │ │ │ │ @@ -793,32 +732,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ 8 │ │ │ │ │ │ │ │ │ │ │ │ Other Useful Codes │ │ │ │ │ │ │ │ │ │ │ │ There are several other useful codes available for vertex enumeration and/or convex hull computation such as lrs, qhull, porta and irisa-polylib. The pointers to these codes are available at │ │ │ │ │ │ 1. lrs by D. Avis [?] (C implementation of the reverse search algorithm [?]). │ │ │ │ │ │ -16 │ │ │ │ │ │ - │ │ │ │ │ │ - 2. qhull by C.B. Barber [?] (C implementation of the beneath-beyond method, see [?, ?], which │ │ │ │ │ │ +2. qhull by C.B. Barber [?] (C implementation of the beneath-beyond method, see [?, ?], which │ │ │ │ │ │ is the dual of the dd method). │ │ │ │ │ │ 3. porta by T. Christof and A. Löbel [?] (C implementation of the Fourier-Motzkin elimination). │ │ │ │ │ │ 4. IRISA polyhedral library by D.K. Wilde [?] (C implementation of a variation of the dd │ │ │ │ │ │ algorithm). │ │ │ │ │ │ 5. PPL: the Parma Polyhedra Library [?] by R. Bagnara (C++ implementation of a variation │ │ │ │ │ │ of the dd algorithm). │ │ │ │ │ │ 6. pd by A. Marzetta [?] (C implementation of the primal-dual algorithm [?]). │ │ │ │ │ │ 7. Geometry Center Software List by N. Amenta [?]. │ │ │ │ │ │ 8. Computational Geometry Pages by J. Erickson [?]. │ │ │ │ │ │ 9. Linear Programming FAQ by R. Fourer and J. Gregory [?]. │ │ │ │ │ │ 10. ZIB Berlin polyhedral software list: │ │ │ │ │ │ ftp://elib.zib-berlin.de/pub/mathprog/polyth/index.html. │ │ │ │ │ │ 11. Polyhedral Computation FAQ [?]. │ │ │ │ │ │ │ │ │ │ │ │ -9 │ │ │ │ │ │ +16 │ │ │ │ │ │ + │ │ │ │ │ │ + 9 │ │ │ │ │ │ │ │ │ │ │ │ Codes Using Cddlib │ │ │ │ │ │ │ │ │ │ │ │ There are quite a few nice programs using some functions of cddlib. Here are some of them. │ │ │ │ │ │ 1. LattE [?] computes the number of lattice points in a convex polytope. │ │ │ │ │ │ 2. Minksum [?] is a program to compute the V-representation (i.e. the set of vertices) of the │ │ │ │ │ │ Minkowski addition of several convex polytopes given by their V-representation in Rd . It is an │ │ │ │ │ │ @@ -835,28 +774,30 @@ │ │ │ │ │ │ to support the the development of cdd codes (cdd, cdd+, cddlib). Without their generous and │ │ │ │ │ │ continuing support, the present form of this program would not have existed. │ │ │ │ │ │ There are many other people who helped me to improve cdd, in particular, I am indebted to │ │ │ │ │ │ David Avis, Alexander Bockmayr, David Bremner, Henry Crapo, Istvan Csabai, Francois Margot, │ │ │ │ │ │ Marc Pfetsch, Alain Prodon, Jörg Rambau, Dima Pasechnik, Shawn Rusaw, Matthew Saltzman, │ │ │ │ │ │ Masanori Sato, Anders Jensen, Ruriko Yoshida, Charles Geyer, Michal Kvasnica, Sven Verdoolaege │ │ │ │ │ │ (listed in arbitrary order) and those listed in the HISTORY file. │ │ │ │ │ │ -17 │ │ │ │ │ │ │ │ │ │ │ │ - References │ │ │ │ │ │ +References │ │ │ │ │ │ [1] N. Amenta. Directory of computational geometry. http://www.geom.uiuc.edu/software/cglist/. │ │ │ │ │ │ [2] D. Avis. lrs Homepage. http://cgm.cs.mcgill.ca/˜avis/C/lrs.html. │ │ │ │ │ │ [3] D. Avis, D. Bremner, and R. Seidel. How good are convex hull algorithms. Computational │ │ │ │ │ │ Geometry: Theory and Applications, 7:265–302, 1997. │ │ │ │ │ │ [4] D. Avis and K. Fukuda. A pivoting algorithm for convex hulls and vertex enumeration of │ │ │ │ │ │ arrangements and polyhedra. Discrete Comput. Geom., 8:295–313, 1992. │ │ │ │ │ │ [5] R. Bagnara. Parma polyhedra library homepage, 2004. http://www.cs.unipr.it/ppl/. │ │ │ │ │ │ [6] C.B. Barber, D.P. Dobkin, and H. Huhdanpaa. qhull, Version 2003.1, 2003. program and │ │ │ │ │ │ report available from http://www.qhull.org/. │ │ │ │ │ │ [7] D. Bremner, K. Fukuda, and A. Marzetta. Primal-dual methods for vertex and facet enumeration. In Proc. 13th Annu. ACM Sympos. Comput. Geom., pages 49–56, 1997. │ │ │ │ │ │ -[8] T. Christof and A. Löbel. PORTA: Polyhedron representation transformation algorithm (ver. │ │ │ │ │ │ + │ │ │ │ │ │ +17 │ │ │ │ │ │ + │ │ │ │ │ │ + [8] T. Christof and A. Löbel. PORTA: Polyhedron representation transformation algorithm (ver. │ │ │ │ │ │ 1.3.1), 1997. http://www.zib.de/Optimization/Software/Porta/. │ │ │ │ │ │ [9] J. de Loera, D. Haws, R. Hemmecke, Peter Huggins, J. Tauzer, and R. Yoshida. LattE. │ │ │ │ │ │ University of California, Davis, 2005. available from http://www.math.ucdavis.edu/ latte/. │ │ │ │ │ │ [10] H. Edelsbrunner. Algorithms in Combinatorial Geometry. Springer-Verlag, 1987. │ │ │ │ │ │ [11] J. Erickson. │ │ │ │ │ │ Computational geometry pages, list of software libraries and codes. │ │ │ │ │ │ http://compgeom.cs.uiuc.edu/˜jeffe/compgeom/. │ │ │ │ │ │ @@ -872,24 +813,22 @@ │ │ │ │ │ │ and I. Manoussakis, editors, Combinatorics and Computer Science, volume 1120 of Lecture Notes in Computer Science, pages 91–111. Springer-Verlag, 1996. ps file available from │ │ │ │ │ │ ftp://ftp.ifor.math.ethz.ch/pub/fukuda/reports/ddrev960315.ps.gz. │ │ │ │ │ │ [17] A.N. Jensen. Gfan version 0.1: A User’s Manual. Department of Mathematical Sciences, │ │ │ │ │ │ University of Aarhus and Institute for Operations Research, ETH Zurich, 2005. available from │ │ │ │ │ │ http://home.imf.au.dk/ajensen/software/gfan/gfan.html. │ │ │ │ │ │ [18] A. Marzetta. pd – C-implementation of the primal-dual algoirithm, 1997. code available from │ │ │ │ │ │ http://www.cs.unb.ca/profs/bremner/pd/. │ │ │ │ │ │ -18 │ │ │ │ │ │ - │ │ │ │ │ │ - [19] T.S. Motzkin, H. Raiffa, GL. Thompson, and R.M. Thrall. The double description method. │ │ │ │ │ │ +[19] T.S. Motzkin, H. Raiffa, GL. Thompson, and R.M. Thrall. The double description method. │ │ │ │ │ │ In H.W. Kuhn and A.W.Tucker, editors, Contributions to theory of games, Vol. 2. Princeton │ │ │ │ │ │ University Press, Princeton, RI, 1953. │ │ │ │ │ │ [20] K. Mulmuley. Computational Geometry, An Introduction Through Randamized Algorithms. │ │ │ │ │ │ Prentice-Hall, 1994. │ │ │ │ │ │ [21] J. Rambau. TOPCOM, a package for computing Triangulations Of Point Configurations │ │ │ │ │ │ and Oriented Matroids. University of Bayreuth, 2005. available from http://www.unibayreuth.de/departments/wirtschaftsmathematik/rambau/TOPCOM/. │ │ │ │ │ │ [22] C. Weibel. Minksum version 1.1. Mathematics Institute, EPF Lausanne, 2005. available from │ │ │ │ │ │ http://roso.epfl.ch/cw/poly/public.php. │ │ │ │ │ │ [23] D.K. Wilde. A library for doing polyhedral operations. Master’s thesis, Oregon State University, Corvallis, Oregon, Dec 1993. Also published in IRISA technical report PI 785, Rennes, │ │ │ │ │ │ France; Dec, 1993. │ │ │ │ │ │ │ │ │ │ │ │ -19 │ │ │ │ │ │ +18