All Projects → cddlib → cddlib

cddlib / cddlib

Licence: GPL-2.0 license
An efficient implementation of the Double Description Method

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to cddlib

Linear-Algebra-and-Its-Applications-notes
《线性代数及其应用》笔记
Stars: ✭ 196 (+176.06%)
Mutual labels:  linear-programming, mathematics
matematicaelementar
Matemática Elementar para Computação
Stars: ✭ 29 (-59.15%)
Mutual labels:  mathematics
-
图形学书单
Stars: ✭ 84 (+18.31%)
Mutual labels:  mathematics
4ti2
A software package for algebraic, geometric and combinatorial problems on linear spaces. By R. Hemmecke, R. Hemmecke, M. Köppe, P. Malkin, M. Walter
Stars: ✭ 21 (-70.42%)
Mutual labels:  mathematics
Calculo
Escrita colaborativa de recursos educacionais abertos sobre cálculo diferencial e integral..
Stars: ✭ 18 (-74.65%)
Mutual labels:  mathematics
SDLP
Seidel's LP Algorithm: Linear-Complexity Linear Programming for Small-Dimensional Variables
Stars: ✭ 36 (-49.3%)
Mutual labels:  linear-programming
creative-coding-notebooks
🎨 An authorial collection of fundamental recipes on Creative Coding and Recreational Programming.
Stars: ✭ 17 (-76.06%)
Mutual labels:  mathematics
swap
A Solver for the Wavelength Assignment Problem (RWA) in WDM networks
Stars: ✭ 27 (-61.97%)
Mutual labels:  linear-programming
lpsolvers
Linear programming solvers in Python with a unified API
Stars: ✭ 20 (-71.83%)
Mutual labels:  linear-programming
tukey
Mini stats toolkit for Clojure/Script
Stars: ✭ 17 (-76.06%)
Mutual labels:  mathematics
Undergraduate-in-Statistics
Using Computer with your Statistics Major Course
Stars: ✭ 57 (-19.72%)
Mutual labels:  mathematics
coq-big-o
A general yet easy-to-use formalization of Big O, Big Theta, and more based on seminormed vector spaces.
Stars: ✭ 31 (-56.34%)
Mutual labels:  mathematics
string-math
Evaluates a math expression from a string. Supports variables and custom operators.
Stars: ✭ 14 (-80.28%)
Mutual labels:  mathematics
mathb
MathB.in - Mathematics Pastebin Written in Common Lisp
Stars: ✭ 203 (+185.92%)
Mutual labels:  mathematics
glm
OpenGL Mathematics (GLM)
Stars: ✭ 6,667 (+9290.14%)
Mutual labels:  mathematics
pydata-london-2018
Slides and notebooks for my tutorial at PyData London 2018
Stars: ✭ 22 (-69.01%)
Mutual labels:  linear-programming
mathraining
Site interactif avec théorie, exercices et problèmes
Stars: ✭ 31 (-56.34%)
Mutual labels:  mathematics
AtCoder
atcoder.jp/user/saikat
Stars: ✭ 24 (-66.2%)
Mutual labels:  mathematics
My NoteBook
サイエンス、テクノロジー、エンジニアリング関連の情報を記載したノート(忘備録)です。
Stars: ✭ 104 (+46.48%)
Mutual labels:  mathematics
machine-learning-notebooks
🤖 An authorial collection of fundamental python recipes on Machine Learning and Artificial Intelligence.
Stars: ✭ 63 (-11.27%)
Mutual labels:  mathematics

cddlib

The C-library cddlib is a C implementation of the Double Description Method of Motzkin et al. for generating all vertices (i.e. extreme points) and extreme rays of a general convex polyhedron in Rd given by a system of linear inequalities:

P = { x=(x1, ..., xd)T : b - A·x ≥ 0 }

where A is a given m×d real matrix, b is a given m-vector and 0 is the m-vector of all zeros.

The program can be used for the reverse operation (i.e. convex hull computation). This means that one can move back and forth between an inequality representation and a generator (i.e. vertex and ray) representation of a polyhedron with cddlib. Also, cddlib can solve a linear programming problem, i.e. a problem of maximizing and minimizing a linear function over P.

Report an Issue

If you find some problems or bugs, please kindly report them to our issue tracker.

Documentation

The documentation is still incomplete but contains descriptions of the most important functions. Please look at the examples for how the library functions can be used in user's C-codes.

H-representation & V-polyhedron

One convenient feature of cddlib is the ability to handle essentially any data. More precisely, it can generate an H-representation of a V-polyhedron which is not full-dimensional, and it can generate a V-representation of an H-polyhedron which has no extreme points.

Numerical Problems

A little caution is in order. Many people have seen numerical problems 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 rational approximation of the input (for example, one can replace 0.3333333 with 1/3) and to compute it with cddlib compiled with GMP Rational to see what a correct behavior should be. Whenever the time is not important, it is safer to use GMP rational arithmetic.

If you need speedy computation with floating-point arithmetic, you might want to play with the constant dd_almostzero defined in cdd.h:

#define dd_almostzero  1.0E-6

This number is used to recognize whether a number is zero: a number whose absolute value is smaller than dd_almostzero is considered zero, and nonzero otherwise. You might want to change this to modify the behavior of cddlib. Another thing one can do is scaling. If the values in one column of an input is of smaller magnitude than those in another column, scale one so that they become comparable.

Build the Latest Released Version

Download the most recent tarball from our Releases page and build cddlib with

tar zxf cddlib-*.tar.gz
cd cddlib-*
./configure
make

To install cddlib to /usr/local type

sudo make install

To link your own code with cddlib, invoke your compiler with something like

gcc -I/usr/local/include -L/usr/local/lib YOUR_CODE.c -lcdd

or, if you want to use rational arithmetic provided by GMP, with

gcc -I/usr/local/include -L/usr/local/lib -DGMPRATIONAL YOUR_CODE.c -lcddgmp -lgmp

Build from the Source Code Repository

Similar to the above, you can build from our github repository with

git clone https://github.com/cddlib/cddlib.git
cd cddlib
./bootstrap
./configure
make

Contact the Author

The library cddlib is free software, but if cddlib turns out to be useful, please kindly send a note or paper to the author mentioning what purpose and how cddlib has been used for. The most powerful support for free software development is user's appreciation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].