COIN-OR::LEMON - Graph Library

Changeset 1787:932b8490caf0 in lemon-0.x


Ignore:
Timestamp:
11/13/05 21:01:17 (18 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2325
Message:

bugfix in setCol, getting dual values

Location:
lemon
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • lemon/lp_base.h

    r1771 r1787  
    3737  class _FixId
    3838  {
     39  protected:
    3940    std::vector<int> index;
    4041    std::vector<int> cross;
     
    593594    virtual SolveExitStatus _solve() = 0;
    594595    virtual Value _getPrimal(int i) = 0;
     596    virtual Value _getDual(int i) = 0;
    595597    virtual Value _getPrimalValue() = 0;
    596598    virtual SolutionStatus _getPrimalStatus() = 0;
     
    709711      for(DualExpr::const_iterator i=e.begin(); i!=e.end(); ++i)
    710712        if((*i).second!=0) { ///\bug EPSILON would be necessary here!!!
    711           indices.push_back(cols.floatingId((*i).first.id));
     713          indices.push_back(rows.floatingId((*i).first.id));
    712714          values.push_back((*i).second);
    713715        }
     
    10021004
    10031005    ///\e
     1006    Value dual(Row r) { return _getDual(rows.floatingId(r.id)); }
     1007
     1008    ///\e
    10041009
    10051010    ///\return
  • lemon/lp_cplex.cc

    r1542 r1787  
    267267    CPXgetx(env, lp, &x, i, i);
    268268    return x;
     269  }
     270
     271  LpCplex::Value LpCplex::_getDual(int i)
     272  {
     273    Value y;
     274    CPXgety(env, lp, &y, i, i);
     275    return y;
    269276  }
    270277 
  • lemon/lp_cplex.h

    r1460 r1787  
    7979
    8080    virtual Value _getPrimal(int i);
    81 
     81    virtual Value _getDual(int i);
    8282   
    8383    virtual Value _getPrimalValue();
  • lemon/lp_glpk.cc

    r1540 r1787  
    409409  {
    410410    return lpx_get_col_prim(lp,i);
     411  }
     412
     413  LpGlpk::Value LpGlpk::_getDual(int i)
     414  {
     415    return lpx_get_row_dual(lp,i);
    411416  }
    412417 
  • lemon/lp_glpk.h

    r1460 r1787  
    8080    virtual SolveExitStatus _solve();
    8181    virtual Value _getPrimal(int i);
     82    virtual Value _getDual(int i);
    8283    virtual Value _getPrimalValue();
    8384    ///\e
Note: See TracChangeset for help on using the changeset viewer.