/* Copyright (c) 1997-2006 Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Berlin, Germany) http://www.math.tu-berlin.de/polymake, mailto:polymake@math.tu-berlin.de This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version: http://www.gnu.org/licenses/gpl.txt. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ #ifndef _POLYMAKE_LRS_INTERFACE_H #define _POLYMAKE_LRS_INTERFACE_H "$Project: polymake $$Id: lrs_interface.h 7315 2006-04-02 21:37:53Z gawrilow $" #include #include #include #include #include namespace polymake { namespace polytope { namespace lrs_interface { class solver { public: typedef Rational coord_type; solver(); typedef std::pair< Matrix, Matrix > matrix_pair; /// @retval first: facets, second: affine hull matrix_pair enumerate_facets(const Matrix& Points) throw (std::bad_alloc, infeasible); long count_facets(const Matrix& Points) throw (std::bad_alloc, infeasible, unbounded); Matrix enumerate_vertices(const Matrix& Inequalities, const Matrix& Equations, bool accept_non_pointed=false) throw (std::bad_alloc, infeasible, not_pointed); std::pair count_vertices(const Matrix& Inequalities, const Matrix& Equations, bool only_bounded=false) throw (std::bad_alloc, infeasible, not_pointed); typedef std::pair > non_redundant; /// @retval first: indices of vertices, second: affine hull non_redundant find_vertices_among_points(const Matrix& Points) throw (std::bad_alloc, infeasible); Vector find_a_vertex(const Matrix& Inequalities, const Matrix& Equations) throw (std::bad_alloc, infeasible, not_pointed); typedef std::pair > feasibility_solution; feasibility_solution check_feasibility(const Matrix& Inequalities, const Matrix& Equations) throw (std::bad_alloc); typedef std::pair > lp_solution; /// @retval first: objective value, second: solution lp_solution solve_lp(const Matrix& Inequalities, const Matrix& Equations, const Vector& Objective, bool maximize) throw (std::bad_alloc, infeasible, unbounded); private: class initializer; struct dictionary; }; } } } #endif // _POLYMAKE_LRS_INTERFACE_H // Local Variables: // mode:C++ // c-basic-offset:3 // End: