lpdec is a scientific library dedicated to the decoding part of coding theory, in particular, decoding based on methods of mathematical optimization, such as linear programming (LP) decoding.
The library is written in Python. It was mainly developed using Python version 2.7, but was recently ported to Python3. Note that there is no CPLEX interface for Python3, so you can not use the CPLEX solvers with that version of Python.
To compile the library, you need Cython. Runtime requirements are the Python packages numpy, scipy, dateutil, sqlalchemy, sympy and jinja2. The setup.py script described below will pull these requirements automatically, but depending on your OS you might favor to install them using your system's package manager.
Some of the decoder implementations require additional software, namely GLPK (with C headers), IBM CPLEX, and Gurobi. The first is open source, the others have free academic licenses available.
We use the alternative gurobi python API called gurobimh.
Download the package and type:
python setup.py install --user
If you do not have GLPK installed, use:
python setup.py install --no-glpk --user
to skip installation of GLPK-based decoders. Likewise, the switch --no-gurobi
is available.
In both commands, replace python
by an appropriate call to your Python interpreter.
API documentation is provided online.
You can also try to generate the API doc with Sphinx. To build the documentation, run the following command from within lpdec's main directory:
sphinx-build2 doc doc-html
This will generate HTML API documentation inside the doc-html folder.