1.1 --- a/demo/lp_demo.cc Mon Feb 19 12:11:41 2007 +0000
1.2 +++ b/demo/lp_demo.cc Mon Feb 19 18:21:28 2007 +0000
1.3 @@ -65,7 +65,7 @@
1.4 lp.colLowerBound(x2, 0);
1.5 lp.colLowerBound(x3, 0);
1.6 //Objective function
1.7 - lp.setObj(10*x1+6*x2+4*x3);
1.8 + lp.obj(10*x1+6*x2+4*x3);
1.9
1.10 //Call the routine of the underlying LP solver
1.11 lp.solve();
2.1 --- a/demo/lp_maxflow_demo.cc Mon Feb 19 12:11:41 2007 +0000
2.2 +++ b/demo/lp_maxflow_demo.cc Mon Feb 19 18:21:28 2007 +0000
2.3 @@ -74,7 +74,7 @@
2.4 Lp::Expr obj;
2.5 for(InEdgeIt e(g,t);e!=INVALID;++e) obj+=x[e];
2.6 for(OutEdgeIt e(g,t);e!=INVALID;++e) obj-=x[e];
2.7 - lp.setObj(obj);
2.8 + lp.obj(obj);
2.9
2.10
2.11 //Maximization
3.1 --- a/demo/mip_demo.cc Mon Feb 19 12:11:41 2007 +0000
3.2 +++ b/demo/mip_demo.cc Mon Feb 19 18:21:28 2007 +0000
3.3 @@ -31,7 +31,7 @@
3.4 ilp.colLowerBound(x2, 0);
3.5 ilp.colLowerBound(x3, 0);
3.6 //Objective function
3.7 - ilp.setObj(10*x1+6*x2+4*x3);
3.8 + ilp.obj(10*x1+6*x2+4*x3);
3.9
3.10 //Call the routine of the underlying LP solver
3.11 ilp.solve();
4.1 --- a/lemon/lp_base.h Mon Feb 19 12:11:41 2007 +0000
4.2 +++ b/lemon/lp_base.h Mon Feb 19 18:21:28 2007 +0000
4.3 @@ -972,7 +972,7 @@
4.4 ///\param l is lower bound (-\ref INF means no bound)
4.5 ///\param e is a linear expression (see \ref Expr)
4.6 ///\param u is the upper bound (\ref INF means no bound)
4.7 - ///\bug This is a temportary function. The interface will change to
4.8 + ///\bug This is a temporary function. The interface will change to
4.9 ///a better one.
4.10 ///\todo Option to control whether a constraint with a single variable is
4.11 ///added or not.
4.12 @@ -1009,7 +1009,7 @@
4.13 ///\param e is a linear expression (see \ref Expr)
4.14 ///\param u is the upper bound (\ref INF means no bound)
4.15 ///\return The created row.
4.16 - ///\bug This is a temportary function. The interface will change to
4.17 + ///\bug This is a temporary function. The interface will change to
4.18 ///a better one.
4.19 Row addRow(Value l,const Expr &e, Value u) {
4.20 Row r=addRow();
4.21 @@ -1284,8 +1284,7 @@
4.22 ///Set the objective function
4.23
4.24 ///\param e is a linear expression of type \ref Expr.
4.25 - ///\bug Is should be called obj()
4.26 - void setObj(Expr e) {
4.27 + void obj(Expr e) {
4.28 _clearObj();
4.29 for (Expr::iterator i=e.begin(); i!=e.end(); ++i)
4.30 objCoeff((*i).first,(*i).second);
4.31 @@ -1313,10 +1312,10 @@
4.32 void min() { _setMin(); }
4.33
4.34 ///Query function: is this a maximization problem?
4.35 - bool is_max() const {return _isMax(); }
4.36 + bool isMax() const {return _isMax(); }
4.37
4.38 ///Query function: is this a minimization problem?
4.39 - bool is_min() const {return !is_max(); }
4.40 + bool isMin() const {return !isMax(); }
4.41
4.42 ///@}
4.43
5.1 --- a/lemon/lp_utils.h Mon Feb 19 12:11:41 2007 +0000
5.2 +++ b/lemon/lp_utils.h Mon Feb 19 18:21:28 2007 +0000
5.3 @@ -432,7 +432,7 @@
5.4 LpSolverBase::Expr expr;
5.5 is >> std::ws;
5.6 readExpression(is, expr);
5.7 - lp.setObj(expr);
5.8 + lp.obj(expr);
5.9 if (sense == "min") {
5.10 lp.min();
5.11 } else {
5.12 @@ -943,7 +943,7 @@
5.13
5.14 os << "objective" << std::endl;
5.15 os << " ";
5.16 - if (lp.is_min()) {
5.17 + if (lp.isMin()) {
5.18 os << "min ";
5.19 } else {
5.20 os << "max ";
6.1 --- a/test/lp_test.cc Mon Feb 19 12:11:41 2007 +0000
6.2 +++ b/test/lp_test.cc Mon Feb 19 18:21:28 2007 +0000
6.3 @@ -291,14 +291,14 @@
6.4 lp.colLowerBound(x1, 0);
6.5 lp.colLowerBound(x2, 0);
6.6 //Objective function
6.7 - lp.setObj(x1+x2);
6.8 + lp.obj(x1+x2);
6.9
6.10 lp.max();
6.11
6.12
6.13 //Testing the problem retrieving routines
6.14 check(lp.objCoeff(x1)==1,"First term should be 1 in the obj function!");
6.15 - check(lp.is_max(),"This is a maximization!");
6.16 + check(lp.isMax(),"This is a maximization!");
6.17 check(lp.coeff(upright,x1)==1,"The coefficient in question is 1!");
6.18 // std::cout<<lp.colLowerBound(x1)<<std::endl;
6.19 check( lp.colLowerBound(x1)==0,"The lower bound for variable x1 should be 0.");
7.1 --- a/test/mip_test.cc Mon Feb 19 12:11:41 2007 +0000
7.2 +++ b/test/mip_test.cc Mon Feb 19 18:21:28 2007 +0000
7.3 @@ -52,7 +52,7 @@
7.4
7.5
7.6 //Objective function
7.7 - mip.setObj(x1);
7.8 + mip.obj(x1);
7.9
7.10 mip.max();
7.11