diff -r 2ee881cf30a8 -r 7c58aabb9eea lemon/lp_base.h --- a/lemon/lp_base.h Thu Jun 09 09:49:56 2005 +0000 +++ b/lemon/lp_base.h Thu Jun 09 15:03:58 2005 +0000 @@ -118,7 +118,7 @@ UNSOLVED = 1 }; - ///\e + ///\e enum SolutionStatus { ///Feasible solution has'n been found (but may exist). @@ -137,6 +137,20 @@ ///corresponding bases) INFINITE = 4 }; + + ///\e The type of the investigated LP problem + enum Problemtypes { + ///Primal-dual feasible + PRIMAL_DUAL_FEASIBLE = 0, + ///Primal feasible dual infeasible + PRIMAL_FEASIBLE_DUAL_INFEASIBLE = 1, + ///Primal infeasible dual feasible + PRIMAL_INFEASIBLE_DUAL_FEASIBLE = 2, + ///Primal-dual infeasible + PRIMAL_DUAL_INFEASIBLE = 3, + ///Could not determine so far + UNKNOWN = 4 + }; ///The floating point type used by the solver typedef double Value; @@ -563,6 +577,11 @@ virtual Value _getPrimal(int i) = 0; virtual Value _getPrimalValue() = 0; virtual SolutionStatus _getPrimalStatus() = 0; + virtual SolutionStatus _getDualStatus() = 0; + ///\todo This could be implemented here, too, using _getPrimalStatus() and + ///_getDualStatus() + virtual ProblemTypes _getProblemType() = 0; + virtual void _setMax() = 0; virtual void _setMin() = 0; @@ -930,11 +949,21 @@ ///@{ - ///\e + /// The status of the primal problem (the original LP problem) SolutionStatus primalStatus() { return _getPrimalStatus(); } + /// The status of the dual (of the original LP) problem + SolutionStatus dualStatus() { + return _getDualStatus(); + } + + ///The type of the original LP problem + Problemtypes problemType() { + return _getProblemType(); + } + ///\e Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); }