This is an exact LP solver. It was initially written for the usage with mpq_class from GMP to solve rational linear programs using the revised dual simplex algorithm. Later, a template parameter was added to be able to solve non-rational linear programs. Only use exact data types! This solver will almost surely fail using inexact data types like float, double, mpf_class, ...

You can define TO_DISABLE_OUTPUT to disable output.

Actually, there is no primal simplex method. So if the solver returns "dual infeasible", you have to create the dual problem if you want to find out whether the problem is infeasible or unbounded. You can avoid this by providing upper and lower bounds to all variables which implies dual feasibility.

The opt-method has 3 return values:
0: optimal, 1: dual unbounded, 2: dual infeasible.

If you find any improvements, please let me know.


TODO: Write tutorial for the API.
