diff -r 4b3191b4970b -r cd8897f67c26 lemon/lp_base.h --- a/lemon/lp_base.h Mon Jul 17 07:30:56 2006 +0000 +++ b/lemon/lp_base.h Mon Jul 17 09:00:21 2006 +0000 @@ -175,6 +175,7 @@ protected: int id; friend class LpSolverBase; + friend class MipSolverBase; public: typedef Value ExprValue; typedef True LpSolverCol; @@ -1156,7 +1157,33 @@ }; - ///\e + + ///Common base class for ILP solvers + ///\todo Much more docs + ///\ingroup gen_opt_group + class MipSolverBase : virtual public LpSolverBase{ + public: + + ///Set the type of the given Col to integer or remove that property. + /// + ///Set the type of the given Col to integer or remove that property. + void integer(Col c, bool enable) { + _integer(cols.floatingId(c.id),enable); + } + + ///Gives back the type of the column. + /// + ///Gives back the type of the column. + ///\return true if the column has integer type and false if not. + bool integer(Col c){ + return _integer(cols.floatingId(c.id)); + } + + protected: + + virtual bool _integer(int col) = 0; + virtual void _integer(int col, bool enable) = 0; + }; ///\relates LpSolverBase::Expr ///