1.1 --- a/src/lemon/lp_base.h Wed Apr 06 17:19:54 2005 +0000
1.2 +++ b/src/lemon/lp_base.h Thu Apr 07 06:31:03 2005 +0000
1.3 @@ -392,8 +392,11 @@
1.4 virtual void _setObjCoeff(int i, Value obj_coef) = 0;
1.5 virtual SolveExitStatus _solve() = 0;
1.6 virtual Value _getPrimal(int i) = 0;
1.7 - virtual SolutionStatus _getPrimalType() = 0;
1.8 -
1.9 + virtual Value _getPrimalValue() = 0;
1.10 + virtual SolutionStatus _getPrimalStatus() = 0;
1.11 + virtual void _setMax() = 0;
1.12 + virtual void _setMin() = 0;
1.13 +
1.14
1.15 void clearObj() {}
1.16 public:
1.17 @@ -427,7 +430,7 @@
1.18 ///\ref Col as its \c mapped_type
1.19 ///like
1.20 ///\code
1.21 - ///std::map<AnyType,LpSolverBase::Col>
1.22 + ///std::map<AnyStatus,LpSolverBase::Col>
1.23 ///\endcode
1.24 ///- an iterable lemon \ref concept::WriteMap "write map" like
1.25 ///\code
1.26 @@ -606,6 +609,12 @@
1.27 objCoeff((*i).first,(*i).second);
1.28 }
1.29
1.30 + ///Maximize
1.31 + void max() { _setMax(); }
1.32 + ///Minimize
1.33 + void min() { _setMin(); }
1.34 +
1.35 +
1.36 ///@}
1.37
1.38
1.39 @@ -623,13 +632,21 @@
1.40 ///@{
1.41
1.42 ///\e
1.43 - SolutionStatus primalType() {
1.44 - return _getPrimalType();
1.45 + SolutionStatus primalStatus() {
1.46 + return _getPrimalStatus();
1.47 }
1.48
1.49 ///\e
1.50 Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); }
1.51
1.52 + ///\e
1.53 +
1.54 + ///\return
1.55 + ///- \ref INF or -\ref INF means either infeasibility or unboundedness
1.56 + /// of the primal problem, depending on whether we minimize or maximize.
1.57 + ///- \ref NAN if no primal solution is found.
1.58 + ///- The (finite) objective value if an optimal solution is found.
1.59 + Value primalValue() { return _getPrimalValue();}
1.60 ///@}
1.61
1.62 };