Index: src/lemon/lp_glpk.cc
===================================================================
--- src/lemon/lp_glpk.cc	(revision 1314)
+++ src/lemon/lp_glpk.cc	(revision 1321)
@@ -25,199 +25,164 @@
 namespace lemon {
 
-    /// \e
-    int LpGlpk::_addCol() { 
-	int i=lpx_add_cols(lp, 1);
-	_setColLowerBound(i, -INF);
-	_setColUpperBound(i, INF);
-	return i;
-    }
-
-    /// \e
-    int LpGlpk::_addRow() { 
-	int i=lpx_add_rows(lp, 1);
-	return i;
-    }
-
-  
-    void LpGlpk::_setRowCoeffs(int i, 
-			       int length,
-			       const int   * indices, 
-			       const Value   * values )
-    {
-      lpx_set_mat_row(lp, i, length,
-		      const_cast<int * >(indices) ,
-		      const_cast<Value * >(values));
-    }
-  
-    void LpGlpk::_setColCoeffs(int i, 
-			       int length,
-			       const int   * indices, 
-			       const Value   * values)
-    {
-      lpx_set_mat_col(lp, i, length,
-		      const_cast<int * >(indices),
-		      const_cast<Value * >(values));
-    }
-  
-    void LpGlpk::_setColLowerBound(int i, Value lo)
-    {
-      if (lo==INF) {
-	//FIXME error
-      }
-      int b=lpx_get_col_type(lp, i);
-      double up=lpx_get_col_ub(lp, i);	
-      if (lo==-INF) {
-	switch (b) {
-	case LPX_FR:
-	case LPX_LO:
-	  lpx_set_col_bnds(lp, i, LPX_FR, lo, up);
-	  break;
-	case LPX_UP:
-	  break;
-	case LPX_DB:
-	case LPX_FX:
-	  lpx_set_col_bnds(lp, i, LPX_UP, lo, up);
-	  break;
-	default: ;
-	  //FIXME error
-	}
-      } else {
-	switch (b) {
-	case LPX_FR:
-	case LPX_LO:
-	  lpx_set_col_bnds(lp, i, LPX_LO, lo, up);
-	  break;
-	case LPX_UP:	  
-	case LPX_DB:
-	case LPX_FX:
-	  if (lo==up) 
-	    lpx_set_col_bnds(lp, i, LPX_FX, lo, up);
-	  else 
-	    lpx_set_col_bnds(lp, i, LPX_DB, lo, up);
-	  break;
-	default: ;
-	  //FIXME error
-	}
-      }
-
-    }
-  
-    void LpGlpk::_setColUpperBound(int i, Value up)
-    {
-      if (up==-INF) {
-	//FIXME error
-      }
-      int b=lpx_get_col_type(lp, i);
-      double lo=lpx_get_col_lb(lp, i);
-      if (up==INF) {
-	switch (b) {
-	case LPX_FR:
-	case LPX_LO:
-	  break;
-	case LPX_UP:
-	  lpx_set_col_bnds(lp, i, LPX_FR, lo, up);
-	  break;
-	case LPX_DB:
-	case LPX_FX:
-	  lpx_set_col_bnds(lp, i, LPX_LO, lo, up);
-	  break;
-	default: ;
-	  //FIXME error
-	}
-      } else {
-	switch (b) {
-	case LPX_FR:
-	  lpx_set_col_bnds(lp, i, LPX_UP, lo, up);
-	  break;
-	case LPX_UP:
-	  lpx_set_col_bnds(lp, i, LPX_UP, lo, up);
-	  break;
-	case LPX_LO:
-	case LPX_DB:
-	case LPX_FX:
-	  if (lo==up) 
-	    lpx_set_col_bnds(lp, i, LPX_FX, lo, up);
-	  else 
-	    lpx_set_col_bnds(lp, i, LPX_DB, lo, up);
-	  break;
-	default: ;
-	  //FIXME error
-	}
-      }
-    }
-  
-    void LpGlpk::_setRowLowerBound(int i, Value lo)
-    {
-      if (lo==INF) {
-	//FIXME error
-      }
-      int b=lpx_get_row_type(lp, i);
-      double up=lpx_get_row_ub(lp, i);	
-      if (lo==-INF) {
-	switch (b) {
-	case LPX_FR:
-	case LPX_LO:
-	  lpx_set_row_bnds(lp, i, LPX_FR, lo, up);
-	  break;
-	case LPX_UP:
-	  break;
-	case LPX_DB:
-	case LPX_FX:
-	  lpx_set_row_bnds(lp, i, LPX_UP, lo, up);
-	  break;
-	default: ;
-	  //FIXME error
-	}
-      } else {
-	switch (b) {
-	case LPX_FR:
-	case LPX_LO:
-	  lpx_set_row_bnds(lp, i, LPX_LO, lo, up);
-	  break;
-	case LPX_UP:	  
-	case LPX_DB:
-	case LPX_FX:
-	  if (lo==up) 
-	    lpx_set_row_bnds(lp, i, LPX_FX, lo, up);
-	  else 
-	    lpx_set_row_bnds(lp, i, LPX_DB, lo, up);
-	  break;
-	default: ;
-	  //FIXME error
-	}
-      }
-    }
-  
-  void LpGlpk::_setRowUpperBound(int i, Value up)
+  LpGlpk::LpGlpk() : Parent(), 
+		     lp(lpx_create_prob()) {
+    ///\todo constrol function for this:
+    lpx_set_int_parm(lp, LPX_K_DUAL, 1);
+    messageLevel(0);
+  }
+  
+  LpGlpk::~LpGlpk() {
+    lpx_delete_prob(lp);
+  }
+  
+  int LpGlpk::_addCol() { 
+    int i=lpx_add_cols(lp, 1);
+    _setColLowerBound(i, -INF);
+    _setColUpperBound(i, INF);
+    return i;
+  }
+
+  int LpGlpk::_addRow() { 
+    int i=lpx_add_rows(lp, 1);
+    return i;
+  }
+
+  
+  void LpGlpk::_setRowCoeffs(int i, 
+			     int length,
+			     const int   * indices, 
+			     const Value   * values )
+  {
+    lpx_set_mat_row(lp, i, length,
+		    const_cast<int * >(indices) ,
+		    const_cast<Value * >(values));
+  }
+  
+  void LpGlpk::_setColCoeffs(int i, 
+			     int length,
+			     const int   * indices, 
+			     const Value   * values)
+  {
+    lpx_set_mat_col(lp, i, length,
+		    const_cast<int * >(indices),
+		    const_cast<Value * >(values));
+  }
+  
+  void LpGlpk::_setColLowerBound(int i, Value lo)
+  {
+    if (lo==INF) {
+      //FIXME error
+    }
+    int b=lpx_get_col_type(lp, i);
+    double up=lpx_get_col_ub(lp, i);	
+    if (lo==-INF) {
+      switch (b) {
+      case LPX_FR:
+      case LPX_LO:
+	lpx_set_col_bnds(lp, i, LPX_FR, lo, up);
+	break;
+      case LPX_UP:
+	break;
+      case LPX_DB:
+      case LPX_FX:
+	lpx_set_col_bnds(lp, i, LPX_UP, lo, up);
+	break;
+      default: ;
+	//FIXME error
+      }
+    } else {
+      switch (b) {
+      case LPX_FR:
+      case LPX_LO:
+	lpx_set_col_bnds(lp, i, LPX_LO, lo, up);
+	break;
+      case LPX_UP:	  
+      case LPX_DB:
+      case LPX_FX:
+	if (lo==up) 
+	  lpx_set_col_bnds(lp, i, LPX_FX, lo, up);
+	else 
+	  lpx_set_col_bnds(lp, i, LPX_DB, lo, up);
+	break;
+      default: ;
+	//FIXME error
+      }
+    }
+
+  }
+  
+  void LpGlpk::_setColUpperBound(int i, Value up)
   {
     if (up==-INF) {
       //FIXME error
     }
+    int b=lpx_get_col_type(lp, i);
+    double lo=lpx_get_col_lb(lp, i);
+    if (up==INF) {
+      switch (b) {
+      case LPX_FR:
+      case LPX_LO:
+	break;
+      case LPX_UP:
+	lpx_set_col_bnds(lp, i, LPX_FR, lo, up);
+	break;
+      case LPX_DB:
+      case LPX_FX:
+	lpx_set_col_bnds(lp, i, LPX_LO, lo, up);
+	break;
+      default: ;
+	//FIXME error
+      }
+    } else {
+      switch (b) {
+      case LPX_FR:
+	lpx_set_col_bnds(lp, i, LPX_UP, lo, up);
+	break;
+      case LPX_UP:
+	lpx_set_col_bnds(lp, i, LPX_UP, lo, up);
+	break;
+      case LPX_LO:
+      case LPX_DB:
+      case LPX_FX:
+	if (lo==up) 
+	  lpx_set_col_bnds(lp, i, LPX_FX, lo, up);
+	else 
+	  lpx_set_col_bnds(lp, i, LPX_DB, lo, up);
+	break;
+      default: ;
+	//FIXME error
+      }
+    }
+  }
+  
+  void LpGlpk::_setRowLowerBound(int i, Value lo)
+  {
+    if (lo==INF) {
+      //FIXME error
+    }
     int b=lpx_get_row_type(lp, i);
-    double lo=lpx_get_row_lb(lp, i);
-    if (up==INF) {
-      switch (b) {
-      case LPX_FR:
-      case LPX_LO:
-	break;
-      case LPX_UP:
+    double up=lpx_get_row_ub(lp, i);	
+    if (lo==-INF) {
+      switch (b) {
+      case LPX_FR:
+      case LPX_LO:
 	lpx_set_row_bnds(lp, i, LPX_FR, lo, up);
 	break;
-      case LPX_DB:
-      case LPX_FX:
+      case LPX_UP:
+	break;
+      case LPX_DB:
+      case LPX_FX:
+	lpx_set_row_bnds(lp, i, LPX_UP, lo, up);
+	break;
+      default: ;
+	//FIXME error
+      }
+    } else {
+      switch (b) {
+      case LPX_FR:
+      case LPX_LO:
 	lpx_set_row_bnds(lp, i, LPX_LO, lo, up);
 	break;
-      default: ;
-	//FIXME error
-      }
-    } else {
-      switch (b) {
-      case LPX_FR:
-	lpx_set_row_bnds(lp, i, LPX_UP, lo, up);
-	break;
-      case LPX_UP:
-	lpx_set_row_bnds(lp, i, LPX_UP, lo, up);
-	break;
-      case LPX_LO:
+      case LPX_UP:	  
       case LPX_DB:
       case LPX_FX:
@@ -233,4 +198,48 @@
   }
   
+  void LpGlpk::_setRowUpperBound(int i, Value up)
+  {
+    if (up==-INF) {
+      //FIXME error
+    }
+    int b=lpx_get_row_type(lp, i);
+    double lo=lpx_get_row_lb(lp, i);
+    if (up==INF) {
+      switch (b) {
+      case LPX_FR:
+      case LPX_LO:
+	break;
+      case LPX_UP:
+	lpx_set_row_bnds(lp, i, LPX_FR, lo, up);
+	break;
+      case LPX_DB:
+      case LPX_FX:
+	lpx_set_row_bnds(lp, i, LPX_LO, lo, up);
+	break;
+      default: ;
+	//FIXME error
+      }
+    } else {
+      switch (b) {
+      case LPX_FR:
+	lpx_set_row_bnds(lp, i, LPX_UP, lo, up);
+	break;
+      case LPX_UP:
+	lpx_set_row_bnds(lp, i, LPX_UP, lo, up);
+	break;
+      case LPX_LO:
+      case LPX_DB:
+      case LPX_FX:
+	if (lo==up) 
+	  lpx_set_row_bnds(lp, i, LPX_FX, lo, up);
+	else 
+	  lpx_set_row_bnds(lp, i, LPX_DB, lo, up);
+	break;
+      default: ;
+	//FIXME error
+      }
+    }
+  }
+  
   void LpGlpk::_setObjCoeff(int i, Value obj_coef)
   {
@@ -291,10 +300,17 @@
   void LpGlpk::_setMax()
   {
-      lpx_set_obj_dir(lp, LPX_MAX);
-   }
+    lpx_set_obj_dir(lp, LPX_MAX);
+  }
+
   void LpGlpk::_setMin()
   {
-      lpx_set_obj_dir(lp, LPX_MIN);
-   }
+    lpx_set_obj_dir(lp, LPX_MIN);
+  }
+
+ 
+  void LpGlpk::messageLevel(int m)
+  {
+    lpx_set_int_parm(lp, LPX_K_MSGLEV, m);
+  }
 
  
Index: src/lemon/lp_glpk.h
===================================================================
--- src/lemon/lp_glpk.h	(revision 1312)
+++ src/lemon/lp_glpk.h	(revision 1321)
@@ -33,22 +33,14 @@
   /// This class implements a lemon wrapper for GLPK.
   class LpGlpk : public LpSolverBase {
-
+  protected:
+    LPX* lp;
+    
   public:
-
+    
     typedef LpSolverBase Parent;
     
-    /// \e
-    LPX* lp;
-
-    /// \e
-    LpGlpk() : Parent(), 
-			lp(lpx_create_prob()) {
-      lpx_set_int_parm(lp, LPX_K_DUAL, 1);
-    }
-    /// \e
-    ~LpGlpk() {
-      lpx_delete_prob(lp);
-    }
-
+    LpGlpk();
+    ~LpGlpk();
+    
   protected:
     virtual int _addCol();
@@ -69,34 +61,28 @@
     ///\e
     
-    ///\bug Unimplemented
+    ///\todo It should be clarified
     ///
     virtual SolveExitStatus _solve();
-    ///\e
-    
-    ///\bug Unimplemented
-    ///
     virtual Value _getPrimal(int i);
-    ///\e
-    
-    ///\bug Unimplemented
-    ///
     virtual Value _getPrimalValue();
     ///\e
     
-    ///\bug Unimplemented
+    ///\todo It should be clarified
     ///
     virtual SolutionStatus _getPrimalStatus();
+    virtual void _setMax();
+    virtual void _setMin();
 
-    ///\e
+  public:
+    ///Set the verbosity of the messages
+
+    ///\param m is the level of the messages output by the solver routines.
+    ///The possible values are:
+    ///- 0 --- no output (default value)
+    ///- 1 --- error messages only
+    ///- 2 --- normal output
+    ///- 3 --- full output (includes informational messages)
+    void messageLevel(int m);
     
-    ///\bug Unimplemented
-    ///
-    virtual void _setMax();
-    ///\e
-    
-    ///\bug Unimplemented
-    ///
-    virtual void _setMin();
-  
   };
 } //END OF NAMESPACE LEMON
