1.1 --- a/lemon/lp_base.h Thu Jun 09 09:49:56 2005 +0000
1.2 +++ b/lemon/lp_base.h Thu Jun 09 15:03:58 2005 +0000
1.3 @@ -118,7 +118,7 @@
1.4 UNSOLVED = 1
1.5 };
1.6
1.7 - ///\e
1.8 + ///\e
1.9 enum SolutionStatus {
1.10 ///Feasible solution has'n been found (but may exist).
1.11
1.12 @@ -137,6 +137,20 @@
1.13 ///corresponding bases)
1.14 INFINITE = 4
1.15 };
1.16 +
1.17 + ///\e The type of the investigated LP problem
1.18 + enum Problemtypes {
1.19 + ///Primal-dual feasible
1.20 + PRIMAL_DUAL_FEASIBLE = 0,
1.21 + ///Primal feasible dual infeasible
1.22 + PRIMAL_FEASIBLE_DUAL_INFEASIBLE = 1,
1.23 + ///Primal infeasible dual feasible
1.24 + PRIMAL_INFEASIBLE_DUAL_FEASIBLE = 2,
1.25 + ///Primal-dual infeasible
1.26 + PRIMAL_DUAL_INFEASIBLE = 3,
1.27 + ///Could not determine so far
1.28 + UNKNOWN = 4
1.29 + };
1.30
1.31 ///The floating point type used by the solver
1.32 typedef double Value;
1.33 @@ -563,6 +577,11 @@
1.34 virtual Value _getPrimal(int i) = 0;
1.35 virtual Value _getPrimalValue() = 0;
1.36 virtual SolutionStatus _getPrimalStatus() = 0;
1.37 + virtual SolutionStatus _getDualStatus() = 0;
1.38 + ///\todo This could be implemented here, too, using _getPrimalStatus() and
1.39 + ///_getDualStatus()
1.40 + virtual ProblemTypes _getProblemType() = 0;
1.41 +
1.42 virtual void _setMax() = 0;
1.43 virtual void _setMin() = 0;
1.44
1.45 @@ -930,11 +949,21 @@
1.46
1.47 ///@{
1.48
1.49 - ///\e
1.50 + /// The status of the primal problem (the original LP problem)
1.51 SolutionStatus primalStatus() {
1.52 return _getPrimalStatus();
1.53 }
1.54
1.55 + /// The status of the dual (of the original LP) problem
1.56 + SolutionStatus dualStatus() {
1.57 + return _getDualStatus();
1.58 + }
1.59 +
1.60 + ///The type of the original LP problem
1.61 + Problemtypes problemType() {
1.62 + return _getProblemType();
1.63 + }
1.64 +
1.65 ///\e
1.66 Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); }
1.67