University of Minnesota, Twin Cities School of Statistics Rweb
This web page provides an interface from the R statistical computing environment to the cddlib library writen by Komei Fukuda.
New! Now at version 1.1 (2008-04-12). Fixes major bug in linear programming code in version 1.0-1 and earlier (gave error when negative Lagrange multipler in correctly posed problem).
Now at CRAN.
lpcdd
function.
allface
which produces list of faces
from H-representation.
redundant
which eliminates redundant rows from
H-representation or V-representation.
lpcdd
which does linear programming with exact
GMP arithmetic.
qsign
and qmatmult
to GMP arithmetic
functions
scdd
(before 0.7 V-rep was correctly explained but H-rep was incorrectly
explained, a sign mistake; in 0.7 H-rep was correct, but V-rep made
incorrect, sign change applied to both was wrong, now both correct).
scdd
function.
qsum
and qprod
to GMP arithmetic functions
scdd
function explaining one way
to obtain convex hulls in spaces of arbitrary dimension.
allfaces
function
added in version 0.10.
The package is installed on our Rweb server and can be tried out there.
If you don't know how to use Rweb, here is a web page with some Rweb examples for a paper.
The package vignette has many examples of using the package.
The R help files (HTML version) for the package are the real documentation.
Start with the help for
All of these functions use either the usual computer floating point arithmetic
(which causes problems because of inexactness) or exact infinite-precision
rational arithmetic. Hence even the linear programming provided by
the lpcdd
function is unlike that done by other R packages.
To use the package you need to get and install
rcdd
package
Obtain from http://www.r-project.org/ or from one of the CRAN mirrors listed there. Either obtain and install binaries for your particular OS, or compile from source.
Obtain from http://gmplib.org/ or from your operating system vendor. This is a standard GNU package and comes with many Linux distributions and may be found at the web sites of other vendors that distribute free software.
The source code for the library is found at
http://gmplib.org/#DOWNLOAD
To satisfy the distribution
requirements of the LGPL here is
a copy of the source code for GMP version 4.2.2,
but don't download it from here, go to
gmplib.org to get the current
version.
cddlib
library
This library (found at
http://www.ifor.math.ethz.ch/~fukuda/cdd_home/cdd.html),
although it does all the real work for the
rcdd
package, is no longer required.
Due to difficulties in building cddlib
, we have simply
incorporated version 0.94d of it into the code of rcdd
.
rcdd
package If the GMP libraries are found in standard places, then either do in R
install.packages("rcdd")
or obtain
right here (rcdd_1.1.tar.gz
)
and install from the unix command line as follows
R CMD INSTALL rcdd_1.1.tar.gz
Otherwise (if the GMP libraries are in a nonstandard place) something like
export CPPFLAGS="-I/APPS/include"
export LDFLAGS="-L/APPS/lib"
R CMD INSTALL rcdd_1.1.tar.gz
works, where /APPS/include
is the directory where the
include files for these libraries are found and /APPS/lib
is the directory where the libraries themselves are found.
It seems that when the libraries are in /usr/local
one
still needs this
export CPPFLAGS="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib"
R CMD INSTALL rcdd_1.1.tar.gz