[Lemon-commits] [lemon_svn] athos: r3025 - in hugo/trunk: lemon test

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 21:51:55 CET 2006


Author: athos
Date: Mon Oct 30 12:32:19 2006
New Revision: 3025

Modified:
   hugo/trunk/lemon/lp_base.h
   hugo/trunk/lemon/mip_cplex.cc
   hugo/trunk/lemon/mip_glpk.cc
   hugo/trunk/test/mip_test.cc

Log:
LEMON_INTEGER -> INT

Modified: hugo/trunk/lemon/lp_base.h
==============================================================================
--- hugo/trunk/lemon/lp_base.h	(original)
+++ hugo/trunk/lemon/lp_base.h	Mon Oct 30 12:32:19 2006
@@ -1174,7 +1174,7 @@
 
       ///Unfortunately, cplex 7.5 somewhere writes something like
       ///#define INTEGER 'I'
-      LEMON_INTEGER = 1
+      INT = 1
       ///\todo No support for other types yet.
     };
 
@@ -1197,7 +1197,7 @@
     ///Sets the type of the given Col to integer or remove that property.
     void integer(Col c, bool enable) {
       if (enable)
-	colType(c,LEMON_INTEGER);
+	colType(c,INT);
       else
 	colType(c,REAL);
     }
@@ -1207,7 +1207,7 @@
     ///Gives back the type of the column.
     ///\return true if the column has integer type and false if not.
     bool integer(Col c){
-      return (colType(c)==LEMON_INTEGER);
+      return (colType(c)==INT);
     }
 
     /// The status of the MIP problem

Modified: hugo/trunk/lemon/mip_cplex.cc
==============================================================================
--- hugo/trunk/lemon/mip_cplex.cc	(original)
+++ hugo/trunk/lemon/mip_cplex.cc	Mon Oct 30 12:32:19 2006
@@ -46,7 +46,7 @@
     indices[0]=i;
     char ctype[1];
     switch (col_type){
-      case LEMON_INTEGER:
+      case INT:
 	ctype[0]=CPX_INTEGER;//'I'
 	break;
       case REAL:
@@ -65,7 +65,7 @@
     switch (ctype[0]){
 
     case CPX_INTEGER:
-      return LEMON_INTEGER;
+      return INT;
     case CPX_CONTINUOUS:
       return REAL;
     default:

Modified: hugo/trunk/lemon/mip_glpk.cc
==============================================================================
--- hugo/trunk/lemon/mip_glpk.cc	(original)
+++ hugo/trunk/lemon/mip_glpk.cc	Mon Oct 30 12:32:19 2006
@@ -29,7 +29,7 @@
 
   void MipGlpk::_colType(int i, MipGlpk::ColTypes col_type){
     switch (col_type){
-      case LEMON_INTEGER:
+      case INT:
 	lpx_set_col_kind(lp,i,LPX_IV);
 	break;
       case REAL:
@@ -43,7 +43,7 @@
   MipGlpk::ColTypes MipGlpk::_colType(int i){
     switch (lpx_get_col_kind(lp,i)){
     case LPX_IV:
-      return LEMON_INTEGER;//Or binary
+      return INT;//Or binary
     case LPX_CV:
       return REAL;
     default:

Modified: hugo/trunk/test/mip_test.cc
==============================================================================
--- hugo/trunk/test/mip_test.cc	(original)
+++ hugo/trunk/test/mip_test.cc	Mon Oct 30 12:32:19 2006
@@ -76,13 +76,13 @@
   solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt);
 
   //Restrict x2 to integer
-  mip.colType(x2,MipSolverBase::LEMON_INTEGER);  
+  mip.colType(x2,MipSolverBase::INT);  
   expected_opt=1.0/2.0;
   solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt);
 
 
   //Restrict both to integer
-  mip.colType(x1,MipSolverBase::LEMON_INTEGER);  
+  mip.colType(x1,MipSolverBase::INT);  
   expected_opt=0;
   solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt);
 



More information about the Lemon-commits mailing list