Installation

Installation

This section shows how to install Julia, Polyhedra and a Polyhedra Manipulation Library of your choice.

Getting Julia

The first step is to install Julia. Polyhedra supports Julia v0.4 to Julia v0.6 but the latest version only supports Julia v0.6 (the command Pkg.add will automatically install the latest compatible version of Polyhedra). Download links and more detailed instructions are available on the Julia website.

Getting Polyhedra

Open a Julia console (e.g. enter julia at the command line) and write

julia> Pkg.add("Polyhedra")

To start using Polyhedra, you can now just write

julia> using Polyhedra

Polyhedra includes a default implementation for every operation but external library can also be used. See the next section on installing a library.

Getting Libraries

Many C libraries are are available for manipulating Polyhedra. Some of them works with floating point arithmetic and some of them can do the computation exactly using rational arithmetic and multiple precision libraries such as GMP. Julia also natively support Rational arithmetic using multiple precision libraries and of course floating point arithmetic. That makes the use of both arithmetic very easy and transparent.

The following table provides a list of Polyhedra Manipulation Libraries. When they have a Julia library implementing the interface of Polyhedra.jl then the "Library" column shows the name of the library.

SolverJulia PackageLibraryLicenseExact RationalFloating point
cddCDDLib.jlCDDLibrary()GPLXX
ConvexHullConvexHull.jlConvexHullLib()MITX
lrsLRSLib.jlLRSLibrary()GPLXX
qhullQHull.jlQHullLib()X
CHull2dCHull2d.jlMITXX
NewPolkaNoneGPLX
Parma Polyhedra LibraryNoneGPLX
pdNoneGPLX
portaNoneGPLX (overflow !)

Please let me know if you plan to write a new wrapper (or an implementation in pure Julia). Since libraries use different algorithms, no library is better for every problem; here and here are comparisons.