Index: lemon/lp_base.h
===================================================================
--- lemon/lp_base.h	(revision 1458)
+++ lemon/lp_base.h	(revision 1460)
@@ -119,5 +119,5 @@
     };
       
-    ///\e
+      ///\e
     enum SolutionStatus {
       ///Feasible solution has'n been found (but may exist).
@@ -138,4 +138,18 @@
       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
@@ -564,4 +578,9 @@
     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;
@@ -931,7 +950,17 @@
     ///@{
 
-    ///\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();
     }
 
Index: lemon/lp_cplex.cc
===================================================================
--- lemon/lp_cplex.cc	(revision 1458)
+++ lemon/lp_cplex.cc	(revision 1460)
@@ -261,4 +261,19 @@
   }
 
+  LpCplex::Value LpCplex::_getPrimal(int i)
+  {
+    Value x;
+    CPXgetx (env, lp, &x, i, i);
+    return x;
+  }
+  
+  LpCplex::Value LpCplex::_getPrimalValue()
+  {
+    Value objval;
+    //method = CPXgetmethod (env, lp);
+    status = CPXgetobjval (env, lp, &objval);
+    return objval;
+  }
+  
 
 //7.5-os cplex statusai (Vigyazat: a 9.0-asei masok!)
@@ -378,20 +393,22 @@
     }
 
-  LpCplex::Value LpCplex::_getPrimal(int i)
-  {
-    Value x;
-    CPXgetx (env, lp, &x, i, i);
-    return x;
-  }
-  
-  LpCplex::Value LpCplex::_getPrimalValue()
-  {
-    Value objval;
-    //method = CPXgetmethod (env, lp);
-    status = CPXgetobjval (env, lp, &objval);
-    return objval;
-  }
-  
  
+  LpCplex::ProblemTypes LpCplex::_getProblemType()
+  {
+    int stat = CPXgetstat (env, lp);
+    switch (stat) {
+    case CPX_OPTIMAL://Optimal
+	return PRIMAL_DUAL_FEASIBLE;
+    case CPX_UNBOUNDED:
+ 	return PRIMAL_FEASIBLE_DUAL_INFEASIBLE;
+// 	return PRIMAL_INFEASIBLE_DUAL_FEASIBLE;
+// 	return PRIMAL_DUAL_INFEASIBLE;
+
+//Seems to be that this is all we can say for sure
+    default:
+	//In all other cases
+	return UNKNOWN;
+      //FIXME error
+    }
 
 
Index: lemon/lp_cplex.h
===================================================================
--- lemon/lp_cplex.h	(revision 1435)
+++ lemon/lp_cplex.h	(revision 1460)
@@ -76,32 +76,17 @@
     ///\e
     
-    ///\bug Unimplemented
-    ///
     virtual SolveExitStatus _solve();
-    ///\e
 
-    ///\bug Unimplemented
-    ///
     virtual Value _getPrimal(int i);
-    ///\e
+
     
-    ///\bug Unimplemented
-    ///
     virtual Value _getPrimalValue();
-    ///\e
     
-    ///\bug Unimplemented
-    ///
     virtual SolutionStatus _getPrimalStatus();
+    virtual SolutionStatus _getDualStatus();
+    virtual ProblemTypes _getProblemType();
 
-    ///\e
     
-    ///\bug Unimplemented
-    ///
     virtual void _setMax();
-    ///\e
-    
-    ///\bug Unimplemented
-    ///
     virtual void _setMin();
 
Index: lemon/lp_glpk.cc
===================================================================
--- lemon/lp_glpk.cc	(revision 1458)
+++ lemon/lp_glpk.cc	(revision 1460)
@@ -445,5 +445,5 @@
       return UNDEFINED;
     case LPX_D_NOFEAS://There is no feasible solution (primal, I guess)
-    case LPX_D_INFEAS://Infeasible 
+//    case LPX_D_INFEAS://Infeasible 
       return INFEASIBLE;
     case LPX_FEAS://Feasible    
@@ -465,28 +465,17 @@
   LpGlpk::ProblemTypes LpGlpk::_problemType()
   {
-    int stat=  lpx_get_status(lp);
+      //int stat=  lpx_get_status(lp);
     int statp=  lpx_get_prim_stat(lp);
     int statd=  lpx_get_dual_stat(lp);
-    switch (stat) {
-    case LPX_UNDEF://Undefined (no solve has been run yet)
-      return UNDEFINED;
-      break;
-    case LPX_NOFEAS://There is no feasible solution (primal, I guess)
-    case LPX_INFEAS://Infeasible 
-      return INFEASIBLE;
-      break;
-    case LPX_UNBND://Unbounded
-      return INFINITE;
-      break;
-    case LPX_FEAS://Feasible
-      return FEASIBLE;
-      break;
-    case LPX_OPT://Feasible
-      return OPTIMAL;
-      break;
-    default:
-      return UNDEFINED; //to avoid gcc warning
-      //FIXME error
-    }
+    if (statp==LP_P_FEAS && statd==LP_D_FEAS)
+	return PRIMAL_DUAL_FEASIBLE;
+    if (statp==LP_P_FEAS && statd==LP_D_NOFEAS)
+	return PRIMAL_FEASIBLE_DUAL_INFEASIBLE;
+    if (statp==LP_P_NOFEAS && statd==LP_D_FEAS)
+	return PRIMAL_INFEASIBLE_DUAL_FEASIBLE;
+    if (statp==LP_P_NOFEAS && statd==LP_D_NOFEAS)
+	return PRIMAL_DUAL_INFEASIBLE;
+    //In all other cases
+    return UNKNOWN;
   }
 
Index: lemon/lp_glpk.h
===================================================================
--- lemon/lp_glpk.h	(revision 1435)
+++ lemon/lp_glpk.h	(revision 1460)
@@ -86,4 +86,7 @@
     ///
     virtual SolutionStatus _getPrimalStatus();
+    virtual SolutionStatus _getDualStatus();
+    virtual ProblemTypes _getProblemType();
+
     virtual void _setMax();
     virtual void _setMin();
Index: lemon/lp_skeleton.cc
===================================================================
--- lemon/lp_skeleton.cc	(revision 1435)
+++ lemon/lp_skeleton.cc	(revision 1460)
@@ -121,5 +121,15 @@
   LpSkeleton::SolutionStatus LpSkeleton::_getPrimalStatus()
   {
-    return OPTIMAL;
+    return UNDEFINED;
+  }
+
+  LpSkeleton::SolutionStatus LpSkeleton::_getDualStatus()
+  {
+    return UNDEFINED;
+  }
+
+  LpSkeleton::ProblemTypes LpSkeleton::_getProblemType()
+  {
+    return UNKNOWN;
   }
   
Index: lemon/lp_skeleton.h
===================================================================
--- lemon/lp_skeleton.h	(revision 1435)
+++ lemon/lp_skeleton.h	(revision 1460)
@@ -119,4 +119,11 @@
     virtual SolutionStatus _getPrimalStatus();
 
+    ////e
+    virtual SolutionStatus _getDualStatus();
+
+
+    ///\e
+    virtual ProblemTypes _getProblemType();
+
     ///\e
     virtual void _setMax();
