COIN-OR::LEMON - Graph Library

Ticket #334: 207ba6c0f2e4.patch

File 207ba6c0f2e4.patch, 1017 bytes (added by Balazs Dezso, 15 years ago)

Fix addRow

  • lemon/lp_base.h

    # HG changeset patch
    # User Balazs Dezso <deba@inf.elte.hu>
    # Date 1260432548 -3600
    # Node ID 207ba6c0f2e478ad0014c1b1b23aac6b0979a8fa
    # Parent  6be1f9bd2ac079ce3a039f0aefc4747c5a2a8f2f
    Fix LpBase::addRow(Constr) (#334)
    
    diff -r 6be1f9bd2ac0 -r 207ba6c0f2e4 lemon/lp_base.h
    a b  
    12291229    Row addRow(const Constr &c) {
    12301230      Row r;
    12311231      c.expr().simplify();
    1232       r._id = _addRowId(_addRow(c.lowerBounded()?c.lowerBound():-INF,
     1232      r._id = _addRowId(_addRow(c.lowerBounded()?c.lowerBound()-*c.expr():-INF,
    12331233                                ExprIterator(c.expr().comps.begin(), cols),
    12341234                                ExprIterator(c.expr().comps.end(), cols),
    1235                                 c.upperBounded()?c.upperBound():INF));
     1235                                c.upperBounded()?c.upperBound()-*c.expr():INF));
    12361236      return r;
    12371237    }
    12381238    ///Erase a column (i.e a variable) from the LP