COIN-OR::LEMON - Graph Library

Changeset 1840:173b53b28d7c in lemon-0.x


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

max flow with lp column generation

Location:
lemon
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • lemon/lp_base.h

    r1810 r1840  
    596596    virtual Value _getDual(int i) = 0;
    597597    virtual Value _getPrimalValue() = 0;
     598    virtual bool _isBasicCol(int i) = 0;
    598599    virtual SolutionStatus _getPrimalStatus() = 0;
    599600    virtual SolutionStatus _getDualStatus() = 0;
     
    10011002
    10021003    ///\e
     1004    bool isBasicCol(Col c) { return _isBasicCol(cols.floatingId(c.id)); }
     1005
     1006    ///\e
    10031007
    10041008    ///\return
  • lemon/lp_cplex.cc

    r1798 r1840  
    285285    return objval;
    286286  }
    287  
     287  bool LpCplex::_isBasicCol(int i) {
     288    int* cstat=new int[CPXgetnumcols(env, lp)];
     289    return CPXgetbase(env, lp, cstat, NULL);
     290    bool result=(cstat[i]==CPX_BASIC);
     291    delete[] cstat;
     292    return result;
     293  } 
    288294
    289295//7.5-os cplex statusai (Vigyazat: a 9.0-asei masok!)
  • lemon/lp_cplex.h

    r1787 r1840  
    7777   
    7878    virtual SolveExitStatus _solve();
    79 
    8079    virtual Value _getPrimal(int i);
    8180    virtual Value _getDual(int i);
    82    
    8381    virtual Value _getPrimalValue();
     82    virtual bool _isBasicCol(int i);
    8483   
    8584    virtual SolutionStatus _getPrimalStatus();
  • lemon/lp_glpk.cc

    r1787 r1840  
    419419  {
    420420    return lpx_get_obj_val(lp);
     421  }
     422  bool LpGlpk::_isBasicCol(int i) {
     423    return (lpx_get_col_stat(lp, i)==LPX_BS);
    421424  }
    422425 
  • lemon/lp_glpk.h

    r1787 r1840  
    8282    virtual Value _getDual(int i);
    8383    virtual Value _getPrimalValue();
     84    virtual bool _isBasicCol(int i);
    8485    ///\e
    8586   
Note: See TracChangeset for help on using the changeset viewer.