COIN-OR::LEMON - Graph Library

Ticket #203: 939d0f436ebe_lp.patch

File 939d0f436ebe_lp.patch, 1.5 KB (added by Tapolcai János, 10 years ago)
  • lemon/lp_base.h

    # HG changeset patch
    # User "Janos Tapolcai <tapolcai@tmit.bme.hu>"
    # Date 1232728834 -3600
    # Node ID 939d0f436ebe9e8c5f1d5468b004b6f1ab34c1f7
    # Parent  d07596b0afb57ac5274a7e8c3d7f05a143621e84
    bugfix in _addRow(ExprIterator,ExprIterator)
    
    diff --git a/lemon/lp_base.h b/lemon/lp_base.h
    a b  
    12001200    ///\param u is the upper bound (\ref INF means no bound)
    12011201    ///\return The created row.
    12021202    Row addRow(Value l,const Expr &e, Value u) {
    1203       Row r;
     1203      Row r;     
    12041204      e.simplify();
    12051205      int id=_addRow(ExprIterator(e.comps.begin(), cols),
    12061206                    ExprIterator(e.comps.end(), cols));
    1207       _setRowLowerBound(id,l - *e);
    1208       _setRowUpperBound(id,u - *e);
    1209       r._id=id;
     1207      r._id=_addRowId(id);
     1208      _setRowLowerBound(r._id,l - *e);
     1209      _setRowUpperBound(r._id,u - *e);   
    12101210      return r;
    12111211    }
    12121212
  • lemon/lp_skeleton.cc

    diff --git a/lemon/lp_skeleton.cc b/lemon/lp_skeleton.cc
    a b  
    4343  void SkeletonSolverBase::_setRowName(int, const std::string &) {}
    4444  int SkeletonSolverBase::_rowByName(const std::string&) const { return -1; }
    4545
    46   int SkeletonSolverBase::_addRow(ExprIterator, ExprIterator) { return -1; }
     46  int SkeletonSolverBase::_addRow(ExprIterator, ExprIterator) { return ++row_num; }
    4747  void SkeletonSolverBase::_setRowCoeffs(int, ExprIterator, ExprIterator) {}
    4848  void SkeletonSolverBase::_getRowCoeffs(int, InsertIterator) const {}
    4949