COIN-OR::LEMON - Graph Library

Changeset 2369:6ae1a97055a2 in lemon-0.x


Ignore:
Timestamp:
02/19/07 19:21:28 (13 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3184
Message:

Naming convention changes

setObj => obj
is_min => isMin
is_max => isMax

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • demo/lp_demo.cc

    r1956 r2369  
    6666  lp.colLowerBound(x3, 0);
    6767  //Objective function
    68   lp.setObj(10*x1+6*x2+4*x3);
     68  lp.obj(10*x1+6*x2+4*x3);
    6969 
    7070  //Call the routine of the underlying LP solver
  • demo/lp_maxflow_demo.cc

    r1956 r2369  
    7575  for(InEdgeIt  e(g,t);e!=INVALID;++e) obj+=x[e];
    7676  for(OutEdgeIt e(g,t);e!=INVALID;++e) obj-=x[e];
    77   lp.setObj(obj);
     77  lp.obj(obj);
    7878
    7979
  • demo/mip_demo.cc

    r2148 r2369  
    3232  ilp.colLowerBound(x3, 0);
    3333  //Objective function
    34   ilp.setObj(10*x1+6*x2+4*x3);
     34  ilp.obj(10*x1+6*x2+4*x3);
    3535 
    3636  //Call the routine of the underlying LP solver
  • lemon/lp_base.h

    r2368 r2369  
    973973    ///\param e is a linear expression (see \ref Expr)
    974974    ///\param u is the upper bound (\ref INF means no bound)
    975     ///\bug This is a temportary function. The interface will change to
     975    ///\bug This is a temporary function. The interface will change to
    976976    ///a better one.
    977977    ///\todo Option to control whether a constraint with a single variable is
     
    10101010    ///\param u is the upper bound (\ref INF means no bound)
    10111011    ///\return The created row.
    1012     ///\bug This is a temportary function. The interface will change to
     1012    ///\bug This is a temporary function. The interface will change to
    10131013    ///a better one.
    10141014    Row addRow(Value l,const Expr &e, Value u) {
     
    12851285
    12861286    ///\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) {
    12891288      _clearObj();
    12901289      for (Expr::iterator i=e.begin(); i!=e.end(); ++i)
     
    13141313
    13151314    ///Query function: is this a maximization problem?
    1316     bool is_max() const {return _isMax(); }
     1315    bool isMax() const {return _isMax(); }
    13171316
    13181317    ///Query function: is this a minimization problem?
    1319     bool is_min() const {return !is_max(); }
     1318    bool isMin() const {return !isMax(); }
    13201319   
    13211320    ///@}
  • lemon/lp_utils.h

    r2368 r2369  
    433433      is >> std::ws;
    434434      readExpression(is, expr);
    435       lp.setObj(expr);
     435      lp.obj(expr);
    436436      if (sense == "min") {
    437437        lp.min();
     
    944944      os << "objective" << std::endl;
    945945      os << "   ";
    946       if (lp.is_min()) {
     946      if (lp.isMin()) {
    947947        os << "min ";
    948948      } else {
  • test/lp_test.cc

    r2363 r2369  
    292292  lp.colLowerBound(x2, 0);
    293293  //Objective function
    294   lp.setObj(x1+x2);
     294  lp.obj(x1+x2);
    295295
    296296  lp.max();
     
    299299  //Testing the problem retrieving routines
    300300  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!");
    302302  check(lp.coeff(upright,x1)==1,"The coefficient in question is 1!");
    303303  //  std::cout<<lp.colLowerBound(x1)<<std::endl;
  • test/mip_test.cc

    r2267 r2369  
    5353
    5454  //Objective function
    55   mip.setObj(x1);
     55  mip.obj(x1);
    5656
    5757  mip.max();
Note: See TracChangeset for help on using the changeset viewer.