Changeset 2369:6ae1a97055a2 in lemon-0.x
- Timestamp:
- 02/19/07 19:21:28 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3184
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/lp_demo.cc
r1956 r2369 66 66 lp.colLowerBound(x3, 0); 67 67 //Objective function 68 lp. setObj(10*x1+6*x2+4*x3);68 lp.obj(10*x1+6*x2+4*x3); 69 69 70 70 //Call the routine of the underlying LP solver -
demo/lp_maxflow_demo.cc
r1956 r2369 75 75 for(InEdgeIt e(g,t);e!=INVALID;++e) obj+=x[e]; 76 76 for(OutEdgeIt e(g,t);e!=INVALID;++e) obj-=x[e]; 77 lp. setObj(obj);77 lp.obj(obj); 78 78 79 79 -
demo/mip_demo.cc
r2148 r2369 32 32 ilp.colLowerBound(x3, 0); 33 33 //Objective function 34 ilp. setObj(10*x1+6*x2+4*x3);34 ilp.obj(10*x1+6*x2+4*x3); 35 35 36 36 //Call the routine of the underlying LP solver -
lemon/lp_base.h
r2368 r2369 973 973 ///\param e is a linear expression (see \ref Expr) 974 974 ///\param u is the upper bound (\ref INF means no bound) 975 ///\bug This is a tempor tary function. The interface will change to975 ///\bug This is a temporary function. The interface will change to 976 976 ///a better one. 977 977 ///\todo Option to control whether a constraint with a single variable is … … 1010 1010 ///\param u is the upper bound (\ref INF means no bound) 1011 1011 ///\return The created row. 1012 ///\bug This is a tempor tary function. The interface will change to1012 ///\bug This is a temporary function. The interface will change to 1013 1013 ///a better one. 1014 1014 Row addRow(Value l,const Expr &e, Value u) { … … 1285 1285 1286 1286 ///\param e is a linear expression of type \ref Expr. 1287 ///\bug Is should be called obj() 1288 void setObj(Expr e) { 1287 void obj(Expr e) { 1289 1288 _clearObj(); 1290 1289 for (Expr::iterator i=e.begin(); i!=e.end(); ++i) … … 1314 1313 1315 1314 ///Query function: is this a maximization problem? 1316 bool is _max() const {return _isMax(); }1315 bool isMax() const {return _isMax(); } 1317 1316 1318 1317 ///Query function: is this a minimization problem? 1319 bool is _min() const {return !is_max(); }1318 bool isMin() const {return !isMax(); } 1320 1319 1321 1320 ///@} -
lemon/lp_utils.h
r2368 r2369 433 433 is >> std::ws; 434 434 readExpression(is, expr); 435 lp. setObj(expr);435 lp.obj(expr); 436 436 if (sense == "min") { 437 437 lp.min(); … … 944 944 os << "objective" << std::endl; 945 945 os << " "; 946 if (lp.is _min()) {946 if (lp.isMin()) { 947 947 os << "min "; 948 948 } else { -
test/lp_test.cc
r2363 r2369 292 292 lp.colLowerBound(x2, 0); 293 293 //Objective function 294 lp. setObj(x1+x2);294 lp.obj(x1+x2); 295 295 296 296 lp.max(); … … 299 299 //Testing the problem retrieving routines 300 300 check(lp.objCoeff(x1)==1,"First term should be 1 in the obj function!"); 301 check(lp.is _max(),"This is a maximization!");301 check(lp.isMax(),"This is a maximization!"); 302 302 check(lp.coeff(upright,x1)==1,"The coefficient in question is 1!"); 303 303 // std::cout<<lp.colLowerBound(x1)<<std::endl; -
test/mip_test.cc
r2267 r2369 53 53 54 54 //Objective function 55 mip. setObj(x1);55 mip.obj(x1); 56 56 57 57 mip.max();
Note: See TracChangeset
for help on using the changeset viewer.