GeoCalcLib is an interface to lrs and redund developed by Rainer Schaich. For the original repository and website, see http://worc4021.github.io/GeoCalcLib. This fork serves to provide detailed installation instructions and possible improvements to this repository.
The geometric calculation library uses David Avis'
LRS library, to
compute the vertex enumeration of a polyhedral set P = {x: A*x<=b}
. It also computes the facet enumeration to P = conv(V) + cone(R)
. It has a function to compute the
projection of a polyhedron, as well as reduction functions
to obtain minimal representations of both V and
H-representations of polyhedra.
- MATLAB (Tested with R2018b, 2020a)
- Requires
GMP
library andgcc
,make
,m4
.⚠️ MATLAB may complain that it found a version ofgcc
that is not in its list of supported compilers https://www.mathworks.com/support/requirements/supported-compilers.html. Ignoring this warning has not proved to be fatal yet! We were able to get MATLAB R2020a accept gcc-5.5 version as well.
Your standard gcc should have GMP installed. Else, see the instructions in troubleshooting below.
- Download a zip file of this repository OR clone this
repository using
git clone https://github.com/sreachtools/GeoCalcLib
- Edit
User.make
file to include the path to MATLAB root folder.- Note that
<FULL-PATH-TO-YOUR-MATLAB-INSTALLATION>
is the parent directory of MATLAB bin folder and does not end with a/
. - Run in MATLAB command prompt
See https://www.mathworks.com/matlabcentral/answers/66570-what-is-the-default-installation-path-for-matlab-on-architecture-x#answer_78163 for more details
matlabroot
- Note that
- Run in MATLAB command prompt
to make sure that that MATLAB's
mex -v -setup
mex
knows wheregcc
is. - Run in Unix command prompt after changing directory to the
GeoCalcLib
folder,make
- Add
/path/to/GeoCalcLib/mexfiles
to MATLAB path. If you want to use this across sessions, we recommend adding the following command to your MATLAB startup.addpath('/path/to/GeoCalcLib/mexfiles');
Issue: make
fails to find gmp.h
Solution: Install GMP --- a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers.
Steps: Build GMP from sources. (Last tested on gmp-6.2.0.tar.lz
)
- Get the tar ball from https://gmplib.org/#DOWNLOAD
- Follow the installation instructions
https://gmplib.org/manual/Installing-GMP.html#Installing-GMP
- Run
./configure
in the folder containing the extracted gmp files. - Run
make
- Run
sudo make install
to add the files.
- Run
A major issue is the LRS's requirement of GMP. If anyone figures out how to jump that hoop, please let me know.