lemon/lp_base.h
changeset 2368 6b2e8b734ae7
parent 2366 bfbdded3763a
child 2369 6ae1a97055a2
     1.1 --- a/lemon/lp_base.h	Mon Feb 19 09:55:43 2007 +0000
     1.2 +++ b/lemon/lp_base.h	Mon Feb 19 12:11:41 2007 +0000
     1.3 @@ -1060,6 +1060,15 @@
     1.4      void colName(Col c, const std::string& name) {
     1.5        _setColName(_lpId(c), name);
     1.6      }
     1.7 +
     1.8 +    /// Get the column by its name
     1.9 +    
    1.10 +    ///\param name The name of the column
    1.11 +    ///\return the proper column or \c INVALID
    1.12 +    Col colByName(const std::string& name) const {
    1.13 +      int k = _colByName(name);
    1.14 +      return k != -1 ? Col(cols.fixId(k)) : Col(INVALID);
    1.15 +    }
    1.16      
    1.17      /// Set an element of the coefficient matrix of the LP
    1.18