COIN-OR::LEMON - Graph Library

Changeset 2324:18fc834761d9 in lemon-0.x for lemon/lp_base.h


Ignore:
Timestamp:
12/04/06 17:48:13 (13 years ago)
Author:
athos
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3100
Message:

Some query functions got implemented, but only for GLPK.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/lp_base.h

    r2312 r2324  
    704704    virtual void _setColCoeffs(int i, LpColIterator b, LpColIterator e) = 0;
    705705    virtual void _setCoeff(int row, int col, Value value) = 0;
     706    virtual Value _getCoeff(int row, int col) = 0;
     707
    706708    virtual void _setColLowerBound(int i, Value value) = 0;
    707709    virtual void _setColUpperBound(int i, Value value) = 0;
     
    710712    virtual void _setRowBounds(int i, Value lower, Value upper) = 0;
    711713    virtual void _setObjCoeff(int i, Value obj_coef) = 0;
     714    virtual Value _getObjCoeff(int i) = 0;
    712715    virtual void _clearObj()=0;
    713716
     
    726729    virtual void _setMin() = 0;
    727730   
     731
     732    virtual bool _isMax() = 0;
     733
    728734    //Own protected stuff
    729735   
     
    10011007    }
    10021008
     1009    /// Get an element of the coefficient matrix of the LP
     1010
     1011    ///\param r is the row of the element in question
     1012    ///\param c is the coloumn of the element in question
     1013    ///\return the corresponding coefficient
     1014
     1015    Value coeff(Row r, Col c){
     1016      return _getCoeff(_lpId(r),_lpId(c));
     1017    }
     1018
    10031019    /// Set the lower bound of a column (i.e a variable)
    10041020
     
    11721188    ///Set an element of the objective function
    11731189    void objCoeff(Col c, Value v) {_setObjCoeff(_lpId(c),v); };
     1190
     1191    ///Get an element of the objective function
     1192    Value objCoeff(Col c) {return _getObjCoeff(_lpId(c)); };
     1193
    11741194    ///Set the objective function
    1175    
     1195
    11761196    ///\param e is a linear expression of type \ref Expr.
    11771197    ///\bug Is should be called obj()
     
    11881208    void min() { _setMin(); }
    11891209
     1210    ///Query function: is this a maximization problem?
     1211    bool is_max() {return _isMax(); }
     1212
     1213    ///Query function: is this a minimization problem?
     1214    bool is_min() {return !is_max(); }
    11901215   
    11911216    ///@}
Note: See TracChangeset for help on using the changeset viewer.