diff -r b810a07248a0 -r 48f9299b390d src/lemon/lp_base.h --- a/src/lemon/lp_base.h Wed Apr 06 17:19:54 2005 +0000 +++ b/src/lemon/lp_base.h Thu Apr 07 06:31:03 2005 +0000 @@ -392,8 +392,11 @@ virtual void _setObjCoeff(int i, Value obj_coef) = 0; virtual SolveExitStatus _solve() = 0; virtual Value _getPrimal(int i) = 0; - virtual SolutionStatus _getPrimalType() = 0; - + virtual Value _getPrimalValue() = 0; + virtual SolutionStatus _getPrimalStatus() = 0; + virtual void _setMax() = 0; + virtual void _setMin() = 0; + void clearObj() {} public: @@ -427,7 +430,7 @@ ///\ref Col as its \c mapped_type ///like ///\code - ///std::map + ///std::map ///\endcode ///- an iterable lemon \ref concept::WriteMap "write map" like ///\code @@ -606,6 +609,12 @@ objCoeff((*i).first,(*i).second); } + ///Maximize + void max() { _setMax(); } + ///Minimize + void min() { _setMin(); } + + ///@} @@ -623,13 +632,21 @@ ///@{ ///\e - SolutionStatus primalType() { - return _getPrimalType(); + SolutionStatus primalStatus() { + return _getPrimalStatus(); } ///\e Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); } + ///\e + + ///\return + ///- \ref INF or -\ref INF means either infeasibility or unboundedness + /// of the primal problem, depending on whether we minimize or maximize. + ///- \ref NAN if no primal solution is found. + ///- The (finite) objective value if an optimal solution is found. + Value primalValue() { return _getPrimalValue();} ///@} };