COIN-OR::LEMON - Graph Library

Ticket #44: 473d56c5aec8.patch

File 473d56c5aec8.patch, 46.9 KB (added by Balazs Dezso, 10 years ago)

Documentation improvements

  • lemon/lp_base.h

    # HG changeset patch
    # User Balazs Dezso <deba@inf.elte.hu>
    # Date 1228725809 -3600
    # Node ID 473d56c5aec86b15eea488c31d84a060426a40d1
    # Parent  9347462c31067ff85c7691347bb28585967daf09
    Documentation improvements, minor bug fix and renaming
     - Lot of documentation improvements
     - Rename shiftIndexes() to shiftIndices()
     - Remove redundant column type settings
     - Fix row status retrieval in LP
    
    diff -r 9347462c3106 -r 473d56c5aec8 lemon/lp_base.h
    a b  
    3838
    3939  ///Common base class for LP and MIP solvers
    4040
    41   ///\todo Much more docs
     41  ///Usually this class is not used directly, please use one of the concrete
     42  ///implementations of the solver interface.
    4243  ///\ingroup lp_group
    4344  class LpBase {
    4445
     
    8788    ///Its value remains valid and correct even after the addition or erase of
    8889    ///other columns.
    8990    ///
    90     ///\todo Document what can one do with a Col (INVALID, comparing,
    91     ///it is similar to Node/Edge)
     91    ///\note This class is similar to other Item types in LEMON, like
     92    ///Node and Arc types in digraph.
    9293    class Col {
    9394      friend class LpBase;
    9495    protected:
     
    9697      explicit Col(int id) : _id(id) {}
    9798    public:
    9899      typedef Value ExprValue;
    99       typedef True LpSolverCol;
     100      typedef True LpCol;
     101      /// Default constructor
     102     
     103      /// \warning The default constructor sets the Col to an
     104      /// undefined value.
    100105      Col() {}
     106      /// Invalid constructor \& conversion.
     107     
     108      /// This constructor initializes the Col to be invalid.
     109      /// \sa Invalid for more details.     
    101110      Col(const Invalid&) : _id(-1) {}
     111      /// Equality operator
     112
     113      /// Two \ref Col "Col"s are equal if and only if they point to
     114      /// the same LP column or both are invalid.
     115      bool operator==(Col c) const  {return _id == c._id;}
     116      /// Inequality operator
     117
     118      /// \sa operator==(Col c)
     119      ///
     120      bool operator!=(Col c) const  {return _id != c._id;}
     121      /// Artificial ordering operator.
     122
     123      /// To allow the use of this object in std::map or similar
     124      /// associative container we require this.
     125      ///
     126      /// \note This operator only have to define some strict ordering of
     127      /// the items; this order has nothing to do with the iteration
     128      /// ordering of the items.
    102129      bool operator<(Col c) const  {return _id < c._id;}
    103       bool operator==(Col c) const  {return _id == c._id;}
    104       bool operator!=(Col c) const  {return _id != c._id;}
    105130    };
    106131
     132    ///Iterator for iterate over the columns of an LP problem
     133
     134    /// Its usage is quite simple, for example you can count the number
     135    /// of columns in an LP \c lp:
     136    ///\code
     137    /// int count=0;
     138    /// for (LpBase::ColIt c(lp); c!=INVALID; ++c) ++count;
     139    ///\endcode
    107140    class ColIt : public Col {
    108141      const LpBase *_solver;
    109142    public:
     143      /// Default constructor
     144     
     145      /// \warning The default constructor sets the iterator
     146      /// to an undefined value.
    110147      ColIt() {}
     148      /// Sets the iterator to the first Col
     149     
     150      /// Sets the iterator to the first Col.
     151      ///
    111152      ColIt(const LpBase &solver) : _solver(&solver)
    112153      {
    113154        _solver->cols.firstItem(_id);
    114155      }
     156      /// Invalid constructor \& conversion
     157     
     158      /// Initialize the iterator to be invalid.
     159      /// \sa Invalid for more details.
    115160      ColIt(const Invalid&) : Col(INVALID) {}
     161      /// Next column
     162     
     163      /// Assign the iterator to the next column.
     164      ///
    116165      ColIt &operator++()
    117166      {
    118167        _solver->cols.nextItem(_id);
     
    120169      }
    121170    };
    122171
     172    /// \brief Returns the ID of the column.
    123173    static int id(const Col& col) { return col._id; }
     174    /// \brief Returns the column with the given ID.
     175    ///
     176    /// \pre The argument should be a valid column ID in the LP problem.
    124177    static Col colFromId(int id) { return Col(id); }
    125178
    126179    ///Refer to a row of the LP.
     
    130183    ///Its value remains valid and correct even after the addition or erase of
    131184    ///other rows.
    132185    ///
    133     ///\todo Document what can one do with a Row (INVALID, comparing,
    134     ///it is similar to Node/Edge)
     186    ///\note This class is similar to other Item types in LEMON, like
     187    ///Node and Arc types in digraph.
    135188    class Row {
    136189      friend class LpBase;
    137190    protected:
     
    139192      explicit Row(int id) : _id(id) {}
    140193    public:
    141194      typedef Value ExprValue;
    142       typedef True LpSolverRow;
     195      typedef True LpRow;
     196      /// Default constructor
     197     
     198      /// \warning The default constructor sets the Row to an
     199      /// undefined value.
    143200      Row() {}
     201      /// Invalid constructor \& conversion.
     202     
     203      /// This constructor initializes the Row to be invalid.
     204      /// \sa Invalid for more details.     
    144205      Row(const Invalid&) : _id(-1) {}
     206      /// Equality operator
    145207
    146       bool operator<(Row c) const  {return _id < c._id;}
    147       bool operator==(Row c) const  {return _id == c._id;}
    148       bool operator!=(Row c) const  {return _id != c._id;}
     208      /// Two \ref Row "Row"s are equal if and only if they point to
     209      /// the same LP row or both are invalid.
     210      bool operator==(Row r) const  {return _id == r._id;}
     211      /// Inequality operator
     212     
     213      /// \sa operator==(Row r)
     214      ///
     215      bool operator!=(Row r) const  {return _id != r._id;}
     216      /// Artificial ordering operator.
     217
     218      /// To allow the use of this object in std::map or similar
     219      /// associative container we require this.
     220      ///
     221      /// \note This operator only have to define some strict ordering of
     222      /// the items; this order has nothing to do with the iteration
     223      /// ordering of the items.
     224      bool operator<(Row r) const  {return _id < r._id;}
    149225    };
    150226
     227    ///Iterator for iterate over the rows of an LP problem
     228
     229    /// Its usage is quite simple, for example you can count the number
     230    /// of rows in an LP \c lp:
     231    ///\code
     232    /// int count=0;
     233    /// for (LpBase::RowIt c(lp); c!=INVALID; ++c) ++count;
     234    ///\endcode
    151235    class RowIt : public Row {
    152236      const LpBase *_solver;
    153237    public:
     238      /// Default constructor
     239     
     240      /// \warning The default constructor sets the iterator
     241      /// to an undefined value.
    154242      RowIt() {}
     243      /// Sets the iterator to the first Row
     244     
     245      /// Sets the iterator to the first Row.
     246      ///
    155247      RowIt(const LpBase &solver) : _solver(&solver)
    156248      {
    157249        _solver->rows.firstItem(_id);
    158250      }
     251      /// Invalid constructor \& conversion
     252     
     253      /// Initialize the iterator to be invalid.
     254      /// \sa Invalid for more details.
    159255      RowIt(const Invalid&) : Row(INVALID) {}
     256      /// Next row
     257     
     258      /// Assign the iterator to the next row.
     259      ///
    160260      RowIt &operator++()
    161261      {
    162262        _solver->rows.nextItem(_id);
     
    164264      }
    165265    };
    166266
     267    /// \brief Returns the ID of the row.
    167268    static int id(const Row& row) { return row._id; }
     269    /// \brief Returns the row with the given ID.
     270    ///
     271    /// \pre The argument should be a valid row ID in the LP problem.
    168272    static Row rowFromId(int id) { return Row(id); }
    169273
    170274  public:
     
    196300    ///2*v-3.12*(v-w/2)+2
    197301    ///v*2.1+(3*v+(v*12+w+6)*3)/2
    198302    ///\endcode
    199     ///are valid \ref Expr "Expr"essions.
     303    ///are valid expressions.
    200304    ///The usual assignment operations are also defined.
    201305    ///\code
    202306    ///e=v+w;
     
    204308    ///e*=3.4;
    205309    ///e/=5;
    206310    ///\endcode
    207     ///- The constant member can be set and read by \ref operator*()
     311    ///- The constant member can be set and read by dereference
     312    ///  operator (unary *)
     313    ///
    208314    ///\code
    209315    ///*e=12;
    210316    ///double c=*e;
    211317    ///\endcode
    212318    ///
    213     ///\note \ref clear() not only sets all coefficients to 0 but also
    214     ///clears the constant components.
    215     ///
    216319    ///\sa Constr
    217     ///
    218320    class Expr {
    219321      friend class LpBase;
    220322    public:
     323      /// The key type of the expression
    221324      typedef LpBase::Col Key;
     325      /// The value type of the expression
    222326      typedef LpBase::Value Value;
    223327
    224328    protected:
     
    227331
    228332    public:
    229333      typedef True SolverExpr;
    230       ///\e
     334      /// Default constructor
     335     
     336      /// Construct an empty expression, the coefficients and
     337      /// the constant component are initialized to zero.
    231338      Expr() : const_comp(0) {}
    232       ///\e
    233       Expr(const Key &k) : const_comp(0) {
     339      /// Construct an expression from a column
     340
     341      /// Construct an expression, which has a term with \c c variable
     342      /// and 1.0 coefficient.
     343      Expr(const Col &c) : const_comp(0) {
    234344        typedef std::map<int, Value>::value_type pair_type;
    235         comps.insert(pair_type(id(k), 1));
     345        comps.insert(pair_type(id(c), 1));
    236346      }
    237       ///\e
     347      /// Construct an expression from a constant
     348
     349      /// Construct an expression, which's constant component is \c v.
     350      ///
    238351      Expr(const Value &v) : const_comp(v) {}
    239       ///\e
    240       Value operator[](const Key& k) const {
    241         std::map<int, Value>::const_iterator it=comps.find(id(k));
     352      /// Returns the coefficient of the column
     353      Value operator[](const Col& c) const {
     354        std::map<int, Value>::const_iterator it=comps.find(id(c));
    242355        if (it != comps.end()) {
    243356          return it->second;
    244357        } else {
    245358          return 0;
    246359        }
    247360      }
    248       ///\e
    249       Value& operator[](const Key& k) {
    250         return comps[id(k)];
     361      /// Returns the coefficient of the column
     362      Value& operator[](const Col& c) {
     363        return comps[id(c)];
    251364      }
    252       ///\e
    253       void set(const Key &k, const Value &v) {
     365      /// Sets the coefficient of the column
     366      void set(const Col &c, const Value &v) {
    254367        if (v != 0.0) {
    255368          typedef std::map<int, Value>::value_type pair_type;
    256           comps.insert(pair_type(id(k), v));
     369          comps.insert(pair_type(id(c), v));
    257370        } else {
    258           comps.erase(id(k));
     371          comps.erase(id(c));
    259372        }
    260373      }
    261 
    262       ///\e
     374      /// Returns the constant component of the expression
    263375      Value& operator*() { return const_comp; }
    264       ///\e
     376      /// Returns the constant component of the expression
    265377      const Value& operator*() const { return const_comp; }
    266 
    267       ///Removes the coefficients closer to zero than \c epsilon.
     378      /// \brief Removes the coefficients which's absolute value does
     379      /// not exceed \c epsilon. It also sets to zero the constant
     380      /// component, if it does not exceed epsilon in absolute value.
    268381      void simplify(Value epsilon = 0.0) {
    269382        std::map<int, Value>::iterator it=comps.begin();
    270383        while (it != comps.end()) {
     
    286399        const_comp=0;
    287400      }
    288401
    289       ///\e
     402      ///Compound assignment
    290403      Expr &operator+=(const Expr &e) {
    291404        for (std::map<int, Value>::const_iterator it=e.comps.begin();
    292405             it!=e.comps.end(); ++it)
     
    294407        const_comp+=e.const_comp;
    295408        return *this;
    296409      }
    297       ///\e
     410      ///Compound assignment
    298411      Expr &operator-=(const Expr &e) {
    299412        for (std::map<int, Value>::const_iterator it=e.comps.begin();
    300413             it!=e.comps.end(); ++it)
     
    302415        const_comp-=e.const_comp;
    303416        return *this;
    304417      }
    305       ///\e
    306       Expr &operator*=(const Value &c) {
     418      ///Multiply with a constant
     419      Expr &operator*=(const Value &v) {
    307420        for (std::map<int, Value>::iterator it=comps.begin();
    308421             it!=comps.end(); ++it)
    309           it->second*=c;
    310         const_comp*=c;
     422          it->second*=v;
     423        const_comp*=v;
    311424        return *this;
    312425      }
    313       ///\e
     426      ///Division with a constant
    314427      Expr &operator/=(const Value &c) {
    315428        for (std::map<int, Value>::iterator it=comps.begin();
    316429             it!=comps.end(); ++it)
     
    319432        return *this;
    320433      }
    321434
     435      ///Iterator over the expression
     436     
     437      ///The iterator iterates over the terms of the expression.
     438      ///
     439      ///\code
     440      ///double s=0;
     441      ///for(LpBase::Expr::CoeffIt i(e);i!=INVALID;++i)
     442      ///  s+= *i * primal(i);
     443      ///\endcode
    322444      class CoeffIt {
    323445      private:
    324446
     
    326448
    327449      public:
    328450
     451        /// Sets the iterator to the first term
     452       
     453        /// Sets the iterator to the first term of the expression.
     454        ///
    329455        CoeffIt(Expr& e)
    330456          : _it(e.comps.begin()), _end(e.comps.end()){}
    331457
     458        /// Convert the iterator to the column of the term
    332459        operator Col() const {
    333460          return colFromId(_it->first);
    334461        }
    335462
     463        /// Returns the coefficient of the term
    336464        Value& operator*() { return _it->second; }
     465
     466        /// Returns the coefficient of the term
    337467        const Value& operator*() const { return _it->second; }
    338 
     468        /// Next term
     469       
     470        /// Assign the iterator to the next term.
     471        ///
    339472        CoeffIt& operator++() { ++_it; return *this; }
    340473
     474        /// Equality operator
    341475        bool operator==(Invalid) const { return _it == _end; }
     476        /// Inequality operator
    342477        bool operator!=(Invalid) const { return _it != _end; }
    343478      };
    344479
     480      /// Const iterator over the expression
     481     
     482      ///The iterator iterates over the terms of the expression.
     483      ///
     484      ///\code
     485      ///double s=0;
     486      ///for(LpBase::Expr::ConstCoeffIt i(e);i!=INVALID;++i)
     487      ///  s+=*i * primal(i);
     488      ///\endcode
    345489      class ConstCoeffIt {
    346490      private:
    347491
     
    349493
    350494      public:
    351495
     496        /// Sets the iterator to the first term
     497       
     498        /// Sets the iterator to the first term of the expression.
     499        ///
    352500        ConstCoeffIt(const Expr& e)
    353501          : _it(e.comps.begin()), _end(e.comps.end()){}
    354502
     503        /// Convert the iterator to the column of the term
    355504        operator Col() const {
    356505          return colFromId(_it->first);
    357506        }
    358507
     508        /// Returns the coefficient of the term
    359509        const Value& operator*() const { return _it->second; }
    360510
     511        /// Next term
     512       
     513        /// Assign the iterator to the next term.
     514        ///
    361515        ConstCoeffIt& operator++() { ++_it; return *this; }
    362516
     517        /// Equality operator
    363518        bool operator==(Invalid) const { return _it == _end; }
     519        /// Inequality operator
    364520        bool operator!=(Invalid) const { return _it != _end; }
    365521      };
    366522
     
    478634    ///2*v-3.12*(v-w/2)
    479635    ///v*2.1+(3*v+(v*12+w)*3)/2
    480636    ///\endcode
    481     ///are valid \ref DualExpr "DualExpr"essions.
     637    ///are valid \ref DualExpr dual expressions.
    482638    ///The usual assignment operations are also defined.
    483639    ///\code
    484640    ///e=v+w;
     
    488644    ///\endcode
    489645    ///
    490646    ///\sa Expr
    491     ///
    492647    class DualExpr {
    493648      friend class LpBase;
    494649    public:
     650      /// The key type of the expression
    495651      typedef LpBase::Row Key;
     652      /// The value type of the expression
    496653      typedef LpBase::Value Value;
    497654
    498655    protected:
     
    500657
    501658    public:
    502659      typedef True SolverExpr;
    503       ///\e
     660      /// Default constructor
     661     
     662      /// Construct an empty expression, the coefficients are
     663      /// initialized to zero.
    504664      DualExpr() {}
    505       ///\e
    506       DualExpr(const Key &k) {
     665      /// Construct an expression from a row
     666
     667      /// Construct an expression, which has a term with \c r dual
     668      /// variable and 1.0 coefficient.
     669      DualExpr(const Row &r) {
    507670        typedef std::map<int, Value>::value_type pair_type;
    508         comps.insert(pair_type(id(k), 1));
     671        comps.insert(pair_type(id(r), 1));
    509672      }
    510       ///\e
    511       Value operator[](const Key& k) const {
    512         std::map<int, Value>::const_iterator it = comps.find(id(k));
     673      /// Returns the coefficient of the row
     674      Value operator[](const Row& r) const {
     675        std::map<int, Value>::const_iterator it = comps.find(id(r));
    513676        if (it != comps.end()) {
    514677          return it->second;
    515678        } else {
    516679          return 0;
    517680        }
    518681      }
    519       ///\e
    520       Value& operator[](const Key& k) {
    521         return comps[id(k)];
     682      /// Returns the coefficient of the row
     683      Value& operator[](const Row& r) {
     684        return comps[id(r)];
    522685      }
    523       ///\e
    524       void set(const Key &k, const Value &v) {
     686      /// Sets the coefficient of the row
     687      void set(const Row &r, const Value &v) {
    525688        if (v != 0.0) {
    526689          typedef std::map<int, Value>::value_type pair_type;
    527           comps.insert(pair_type(id(k), v));
     690          comps.insert(pair_type(id(r), v));
    528691        } else {
    529           comps.erase(id(k));
     692          comps.erase(id(r));
    530693        }
    531694      }
    532 
    533       ///Removes the coefficients closer to zero than \c epsilon.
     695      /// \brief Removes the coefficients which's absolute value does
     696      /// not exceed \c epsilon.
    534697      void simplify(Value epsilon = 0.0) {
    535698        std::map<int, Value>::iterator it=comps.begin();
    536699        while (it != comps.end()) {
     
    549712      void clear() {
    550713        comps.clear();
    551714      }
    552 
    553       ///\e
     715      ///Compound assignment
    554716      DualExpr &operator+=(const DualExpr &e) {
    555717        for (std::map<int, Value>::const_iterator it=e.comps.begin();
    556718             it!=e.comps.end(); ++it)
    557719          comps[it->first]+=it->second;
    558720        return *this;
    559721      }
    560       ///\e
     722      ///Compound assignment
    561723      DualExpr &operator-=(const DualExpr &e) {
    562724        for (std::map<int, Value>::const_iterator it=e.comps.begin();
    563725             it!=e.comps.end(); ++it)
    564726          comps[it->first]-=it->second;
    565727        return *this;
    566728      }
    567       ///\e
    568       DualExpr &operator*=(const Value &c) {
     729      ///Multiply with a constant
     730      DualExpr &operator*=(const Value &v) {
    569731        for (std::map<int, Value>::iterator it=comps.begin();
    570732             it!=comps.end(); ++it)
    571           it->second*=c;
     733          it->second*=v;
    572734        return *this;
    573735      }
    574       ///\e
    575       DualExpr &operator/=(const Value &c) {
     736      ///Division with a constant
     737      DualExpr &operator/=(const Value &v) {
    576738        for (std::map<int, Value>::iterator it=comps.begin();
    577739             it!=comps.end(); ++it)
    578           it->second/=c;
     740          it->second/=v;
    579741        return *this;
    580742      }
    581743
     744      ///Iterator over the expression
     745     
     746      ///The iterator iterates over the terms of the expression.
     747      ///
     748      ///\code
     749      ///double s=0;
     750      ///for(LpBase::DualExpr::CoeffIt i(e);i!=INVALID;++i)
     751      ///  s+= *i * dual(i);
     752      ///\endcode
    582753      class CoeffIt {
    583754      private:
    584755
     
    586757
    587758      public:
    588759
     760        /// Sets the iterator to the first term
     761       
     762        /// Sets the iterator to the first term of the expression.
     763        ///
    589764        CoeffIt(DualExpr& e)
    590765          : _it(e.comps.begin()), _end(e.comps.end()){}
    591766
     767        /// Convert the iterator to the row of the term
    592768        operator Row() const {
    593769          return rowFromId(_it->first);
    594770        }
    595771
     772        /// Returns the coefficient of the term
    596773        Value& operator*() { return _it->second; }
     774
     775        /// Returns the coefficient of the term
    597776        const Value& operator*() const { return _it->second; }
    598777
     778        /// Next term
     779       
     780        /// Assign the iterator to the next term.
     781        ///
    599782        CoeffIt& operator++() { ++_it; return *this; }
    600783
     784        /// Equality operator
    601785        bool operator==(Invalid) const { return _it == _end; }
     786        /// Inequality operator
    602787        bool operator!=(Invalid) const { return _it != _end; }
    603788      };
    604789
     790      ///Iterator over the expression
     791     
     792      ///The iterator iterates over the terms of the expression.
     793      ///
     794      ///\code
     795      ///double s=0;
     796      ///for(LpBase::DualExpr::ConstCoeffIt i(e);i!=INVALID;++i)
     797      ///  s+= *i * dual(i);
     798      ///\endcode
    605799      class ConstCoeffIt {
    606800      private:
    607801
     
    609803
    610804      public:
    611805
     806        /// Sets the iterator to the first term
     807       
     808        /// Sets the iterator to the first term of the expression.
     809        ///
    612810        ConstCoeffIt(const DualExpr& e)
    613811          : _it(e.comps.begin()), _end(e.comps.end()){}
    614812
     813        /// Convert the iterator to the row of the term
    615814        operator Row() const {
    616815          return rowFromId(_it->first);
    617816        }
    618817
     818        /// Returns the coefficient of the term
    619819        const Value& operator*() const { return _it->second; }
    620820
     821        /// Next term
     822       
     823        /// Assign the iterator to the next term.
     824        ///
    621825        ConstCoeffIt& operator++() { ++_it; return *this; }
    622826
     827        /// Equality operator
    623828        bool operator==(Invalid) const { return _it == _end; }
     829        /// Inequality operator
    624830        bool operator!=(Invalid) const { return _it != _end; }
    625831      };
    626832    };
     
    774980    //Constant component of the objective function
    775981    Value obj_const_comp;
    776982
     983    LpBase() : rows(), cols(), obj_const_comp(0) {}
     984
    777985  public:
    778986
    779     ///\e
    780     LpBase() : rows(), cols(), obj_const_comp(0) {
    781     }
    782 
    783     ///\e
     987    /// Virtual destructor
    784988    virtual ~LpBase() {}
    785989
    786990    ///Creates a new LP problem
     
    7981002    ///Add a new empty column (i.e a new variable) to the LP
    7991003    Col addCol() { Col c; c._id = _addColId(_addCol()); return c;}
    8001004
    801     ///\brief Adds several new columns
    802     ///(i.e a variables) at once
     1005    ///\brief Adds several new columns (i.e variables) at once
    8031006    ///
    804     ///This magic function takes a container as its argument
    805     ///and fills its elements
    806     ///with new columns (i.e. variables)
     1007    ///This magic function takes a container as its argument and fills
     1008    ///its elements with new columns (i.e. variables)
    8071009    ///\param t can be
    8081010    ///- a standard STL compatible iterable container with
    809     ///\ref Col as its \c values_type
    810     ///like
     1011    ///\ref Col as its \c values_type like
    8111012    ///\code
    8121013    ///std::vector<LpBase::Col>
    8131014    ///std::list<LpBase::Col>
    8141015    ///\endcode
    8151016    ///- a standard STL compatible iterable container with
    816     ///\ref Col as its \c mapped_type
    817     ///like
     1017    ///\ref Col as its \c mapped_type like
    8181018    ///\code
    8191019    ///std::map<AnyType,LpBase::Col>
    8201020    ///\endcode
     
    8291029    int addColSet(T &t) { return 0;}
    8301030#else
    8311031    template<class T>
    832     typename enable_if<typename T::value_type::LpSolverCol,int>::type
     1032    typename enable_if<typename T::value_type::LpCol,int>::type
    8331033    addColSet(T &t,dummy<0> = 0) {
    8341034      int s=0;
    8351035      for(typename T::iterator i=t.begin();i!=t.end();++i) {*i=addCol();s++;}
    8361036      return s;
    8371037    }
    8381038    template<class T>
    839     typename enable_if<typename T::value_type::second_type::LpSolverCol,
     1039    typename enable_if<typename T::value_type::second_type::LpCol,
    8401040                       int>::type
    8411041    addColSet(T &t,dummy<1> = 1) {
    8421042      int s=0;
     
    8471047      return s;
    8481048    }
    8491049    template<class T>
    850     typename enable_if<typename T::MapIt::Value::LpSolverCol,
     1050    typename enable_if<typename T::MapIt::Value::LpCol,
    8511051                       int>::type
    8521052    addColSet(T &t,dummy<2> = 2) {
    8531053      int s=0;
     
    8731073
    8741074    ///Get a column (i.e a dual constraint) of the LP
    8751075
    876     ///\param r is the column to get
     1076    ///\param c is the column to get
    8771077    ///\return the dual expression associated to the column
    8781078    DualExpr col(Col c) const {
    8791079      DualExpr e;
     
    8841084    ///Add a new column to the LP
    8851085
    8861086    ///\param e is a dual linear expression (see \ref DualExpr)
    887     ///\param obj is the corresponding component of the objective
     1087    ///\param o is the corresponding component of the objective
    8881088    ///function. It is 0 by default.
    8891089    ///\return The created column.
    8901090    Col addCol(const DualExpr &e, Value o = 0) {
     
    9001100    ///\return The created row
    9011101    Row addRow() { Row r; r._id = _addRowId(_addRow()); return r;}
    9021102
    903     ///\brief Add several new rows
    904     ///(i.e a constraints) at once
     1103    ///\brief Add several new rows (i.e constraints) at once
    9051104    ///
    906     ///This magic function takes a container as its argument
    907     ///and fills its elements
    908     ///with new row (i.e. variables)
     1105    ///This magic function takes a container as its argument and fills
     1106    ///its elements with new row (i.e. variables)
    9091107    ///\param t can be
    9101108    ///- a standard STL compatible iterable container with
    911     ///\ref Row as its \c values_type
    912     ///like
     1109    ///\ref Row as its \c values_type like
    9131110    ///\code
    9141111    ///std::vector<LpBase::Row>
    9151112    ///std::list<LpBase::Row>
    9161113    ///\endcode
    9171114    ///- a standard STL compatible iterable container with
    918     ///\ref Row as its \c mapped_type
    919     ///like
     1115    ///\ref Row as its \c mapped_type like
    9201116    ///\code
    9211117    ///std::map<AnyType,LpBase::Row>
    9221118    ///\endcode
     
    9311127    int addRowSet(T &t) { return 0;}
    9321128#else
    9331129    template<class T>
    934     typename enable_if<typename T::value_type::LpSolverRow,int>::type
     1130    typename enable_if<typename T::value_type::LpRow,int>::type
    9351131    addRowSet(T &t, dummy<0> = 0) {
    9361132      int s=0;
    9371133      for(typename T::iterator i=t.begin();i!=t.end();++i) {*i=addRow();s++;}
    9381134      return s;
    9391135    }
    9401136    template<class T>
    941     typename enable_if<typename T::value_type::second_type::LpSolverRow,
    942                        int>::type
     1137    typename enable_if<typename T::value_type::second_type::LpRow, int>::type
    9431138    addRowSet(T &t, dummy<1> = 1) {
    9441139      int s=0;
    9451140      for(typename T::iterator i=t.begin();i!=t.end();++i) {
     
    9491144      return s;
    9501145    }
    9511146    template<class T>
    952     typename enable_if<typename T::MapIt::Value::LpSolverRow,
    953                        int>::type
     1147    typename enable_if<typename T::MapIt::Value::LpRow, int>::type
    9541148    addRowSet(T &t, dummy<2> = 2) {
    9551149      int s=0;
    9561150      for(typename T::MapIt i(t); i!=INVALID; ++i)
     
    10201214    ///Erase a column (i.e a variable) from the LP
    10211215
    10221216    ///\param c is the column to be deleted
    1023     ///\todo Please check this
    10241217    void erase(Col c) {
    10251218      _eraseCol(cols(id(c)));
    10261219      _eraseColId(cols(id(c)));
     
    10281221    ///Erase a row (i.e a constraint) from the LP
    10291222
    10301223    ///\param r is the row to be deleted
    1031     ///\todo Please check this
    10321224    void erase(Row r) {
    10331225      _eraseRow(rows(id(r)));
    10341226      _eraseRowId(rows(id(r)));
     
    10991291
    11001292    /// Get an element of the coefficient matrix of the LP
    11011293
    1102     ///\param r is the row of the element in question
    1103     ///\param c is the column of the element in question
     1294    ///\param r is the row of the element
     1295    ///\param c is the column of the element
    11041296    ///\return the corresponding coefficient
    11051297    Value coeff(Row r, Col c) const {
    11061298      return _getCoeff(rows(id(r)),cols(id(c)));
     
    11171309
    11181310    /// Get the lower bound of a column (i.e a variable)
    11191311
    1120     /// This function returns the lower bound for column (variable) \t c
     1312    /// This function returns the lower bound for column (variable) \c c
    11211313    /// (this might be -\ref INF as well).
    1122     ///\return The lower bound for column \t c
     1314    ///\return The lower bound for column \c c
    11231315    Value colLowerBound(Col c) const {
    11241316      return _getColLowerBound(cols(id(c)));
    11251317    }
    11261318
    11271319    ///\brief Set the lower bound of  several columns
    1128     ///(i.e a variables) at once
     1320    ///(i.e variables) at once
    11291321    ///
    11301322    ///This magic function takes a container as its argument
    11311323    ///and applies the function on all of its elements.
    1132     /// The lower bound of a variable (column) has to be given by an
    1133     /// extended number of type Value, i.e. a finite number of type
    1134     /// Value or -\ref INF.
     1324    ///The lower bound of a variable (column) has to be given by an
     1325    ///extended number of type Value, i.e. a finite number of type
     1326    ///Value or -\ref INF.
    11351327#ifdef DOXYGEN
    11361328    template<class T>
    11371329    void colLowerBound(T &t, Value value) { return 0;}
    11381330#else
    11391331    template<class T>
    1140     typename enable_if<typename T::value_type::LpSolverCol,void>::type
     1332    typename enable_if<typename T::value_type::LpCol,void>::type
    11411333    colLowerBound(T &t, Value value,dummy<0> = 0) {
    11421334      for(typename T::iterator i=t.begin();i!=t.end();++i) {
    11431335        colLowerBound(*i, value);
    11441336      }
    11451337    }
    11461338    template<class T>
    1147     typename enable_if<typename T::value_type::second_type::LpSolverCol,
     1339    typename enable_if<typename T::value_type::second_type::LpCol,
    11481340                       void>::type
    11491341    colLowerBound(T &t, Value value,dummy<1> = 1) {
    11501342      for(typename T::iterator i=t.begin();i!=t.end();++i) {
     
    11521344      }
    11531345    }
    11541346    template<class T>
    1155     typename enable_if<typename T::MapIt::Value::LpSolverCol,
     1347    typename enable_if<typename T::MapIt::Value::LpCol,
    11561348                       void>::type
    11571349    colLowerBound(T &t, Value value,dummy<2> = 2) {
    11581350      for(typename T::MapIt i(t); i!=INVALID; ++i){
     
    11721364
    11731365    /// Get the upper bound of a column (i.e a variable)
    11741366
    1175     /// This function returns the upper bound for column (variable) \t c
     1367    /// This function returns the upper bound for column (variable) \c c
    11761368    /// (this might be \ref INF as well).
    1177     ///\return The upper bound for column \t c
     1369    /// \return The upper bound for column \c c
    11781370    Value colUpperBound(Col c) const {
    11791371      return _getColUpperBound(cols(id(c)));
    11801372    }
    11811373
    11821374    ///\brief Set the upper bound of  several columns
    1183     ///(i.e a variables) at once
     1375    ///(i.e variables) at once
    11841376    ///
    11851377    ///This magic function takes a container as its argument
    11861378    ///and applies the function on all of its elements.
    1187     /// The upper bound of a variable (column) has to be given by an
    1188     /// extended number of type Value, i.e. a finite number of type
    1189     /// Value or \ref INF.
     1379    ///The upper bound of a variable (column) has to be given by an
     1380    ///extended number of type Value, i.e. a finite number of type
     1381    ///Value or \ref INF.
    11901382#ifdef DOXYGEN
    11911383    template<class T>
    11921384    void colUpperBound(T &t, Value value) { return 0;}
    11931385#else
    11941386    template<class T>
    1195     typename enable_if<typename T::value_type::LpSolverCol,void>::type
     1387    typename enable_if<typename T::value_type::LpCol,void>::type
    11961388    colUpperBound(T &t, Value value,dummy<0> = 0) {
    11971389      for(typename T::iterator i=t.begin();i!=t.end();++i) {
    11981390        colUpperBound(*i, value);
    11991391      }
    12001392    }
    12011393    template<class T>
    1202     typename enable_if<typename T::value_type::second_type::LpSolverCol,
     1394    typename enable_if<typename T::value_type::second_type::LpCol,
    12031395                       void>::type
    12041396    colUpperBound(T &t, Value value,dummy<1> = 1) {
    12051397      for(typename T::iterator i=t.begin();i!=t.end();++i) {
     
    12071399      }
    12081400    }
    12091401    template<class T>
    1210     typename enable_if<typename T::MapIt::Value::LpSolverCol,
     1402    typename enable_if<typename T::MapIt::Value::LpCol,
    12111403                       void>::type
    12121404    colUpperBound(T &t, Value value,dummy<2> = 2) {
    12131405      for(typename T::MapIt i(t); i!=INVALID; ++i){
     
    12281420    }
    12291421
    12301422    ///\brief Set the lower and the upper bound of several columns
    1231     ///(i.e a variables) at once
     1423    ///(i.e variables) at once
    12321424    ///
    12331425    ///This magic function takes a container as its argument
    12341426    ///and applies the function on all of its elements.
     
    12411433    void colBounds(T &t, Value lower, Value upper) { return 0;}
    12421434#else
    12431435    template<class T>
    1244     typename enable_if<typename T::value_type::LpSolverCol,void>::type
     1436    typename enable_if<typename T::value_type::LpCol,void>::type
    12451437    colBounds(T &t, Value lower, Value upper,dummy<0> = 0) {
    12461438      for(typename T::iterator i=t.begin();i!=t.end();++i) {
    12471439        colBounds(*i, lower, upper);
    12481440      }
    12491441    }
    12501442    template<class T>
    1251     typename enable_if<typename T::value_type::second_type::LpSolverCol,
    1252                        void>::type
     1443    typename enable_if<typename T::value_type::second_type::LpCol, void>::type
    12531444    colBounds(T &t, Value lower, Value upper,dummy<1> = 1) {
    12541445      for(typename T::iterator i=t.begin();i!=t.end();++i) {
    12551446        colBounds(i->second, lower, upper);
    12561447      }
    12571448    }
    12581449    template<class T>
    1259     typename enable_if<typename T::MapIt::Value::LpSolverCol,
    1260                        void>::type
     1450    typename enable_if<typename T::MapIt::Value::LpCol, void>::type
    12611451    colBounds(T &t, Value lower, Value upper,dummy<2> = 2) {
    12621452      for(typename T::MapIt i(t); i!=INVALID; ++i){
    12631453        colBounds(*i, lower, upper);
     
    12761466
    12771467    /// Get the lower bound of a row (i.e a constraint)
    12781468
    1279     /// This function returns the lower bound for row (constraint) \t c
     1469    /// This function returns the lower bound for row (constraint) \c c
    12801470    /// (this might be -\ref INF as well).
    1281     ///\return The lower bound for row \t r
     1471    ///\return The lower bound for row \c r
    12821472    Value rowLowerBound(Row r) const {
    12831473      return _getRowLowerBound(rows(id(r)));
    12841474    }
     
    12941484
    12951485    /// Get the upper bound of a row (i.e a constraint)
    12961486
    1297     /// This function returns the upper bound for row (constraint) \t c
     1487    /// This function returns the upper bound for row (constraint) \c c
    12981488    /// (this might be -\ref INF as well).
    1299     ///\return The upper bound for row \t r
     1489    ///\return The upper bound for row \c r
    13001490    Value rowUpperBound(Row r) const {
    13011491      return _getRowUpperBound(rows(id(r)));
    13021492    }
     
    13101500    ///Set the objective function
    13111501
    13121502    ///\param e is a linear expression of type \ref Expr.
     1503    ///
    13131504    void obj(const Expr& e) {
    13141505      _setObjCoeffs(ExprIterator(e.comps.begin(), cols),
    13151506                    ExprIterator(e.comps.end(), cols));
     
    13181509
    13191510    ///Get the objective function
    13201511
    1321     ///\return the objective function as a linear expression of type \ref Expr.
     1512    ///\return the objective function as a linear expression of type
     1513    ///Expr.
    13221514    Expr obj() const {
    13231515      Expr e;
    13241516      _getObjCoeffs(InsertIterator(e.comps, cols));
     
    13461538
    13471539  };
    13481540
     1541  /// Addition
     1542
    13491543  ///\relates LpBase::Expr
    13501544  ///
    1351   inline LpBase::Expr operator+(const LpBase::Expr &a,
    1352                                 const LpBase::Expr &b) {
     1545  inline LpBase::Expr operator+(const LpBase::Expr &a, const LpBase::Expr &b) {
    13531546    LpBase::Expr tmp(a);
    13541547    tmp+=b;
    13551548    return tmp;
    13561549  }
    1357   ///\e
     1550  ///Substraction
    13581551
    13591552  ///\relates LpBase::Expr
    13601553  ///
    1361   inline LpBase::Expr operator-(const LpBase::Expr &a,
    1362                                 const LpBase::Expr &b) {
     1554  inline LpBase::Expr operator-(const LpBase::Expr &a, const LpBase::Expr &b) {
    13631555    LpBase::Expr tmp(a);
    13641556    tmp-=b;
    13651557    return tmp;
    13661558  }
    1367   ///\e
     1559  ///Multiply with constant
    13681560
    13691561  ///\relates LpBase::Expr
    13701562  ///
    1371   inline LpBase::Expr operator*(const LpBase::Expr &a,
    1372                                 const LpBase::Value &b) {
     1563  inline LpBase::Expr operator*(const LpBase::Expr &a, const LpBase::Value &b) {
    13731564    LpBase::Expr tmp(a);
    13741565    tmp*=b;
    13751566    return tmp;
    13761567  }
    13771568
    1378   ///\e
     1569  ///Multiply with constant
    13791570
    13801571  ///\relates LpBase::Expr
    13811572  ///
    1382   inline LpBase::Expr operator*(const LpBase::Value &a,
    1383                                 const LpBase::Expr &b) {
     1573  inline LpBase::Expr operator*(const LpBase::Value &a, const LpBase::Expr &b) {
    13841574    LpBase::Expr tmp(b);
    13851575    tmp*=a;
    13861576    return tmp;
    13871577  }
    1388   ///\e
     1578  ///Divide with constant
    13891579
    13901580  ///\relates LpBase::Expr
    13911581  ///
    1392   inline LpBase::Expr operator/(const LpBase::Expr &a,
    1393                                 const LpBase::Value &b) {
     1582  inline LpBase::Expr operator/(const LpBase::Expr &a, const LpBase::Value &b) {
    13941583    LpBase::Expr tmp(a);
    13951584    tmp/=b;
    13961585    return tmp;
    13971586  }
    13981587
    1399   ///\e
     1588  ///Create constraint
    14001589
    14011590  ///\relates LpBase::Constr
    14021591  ///
     
    14051594    return LpBase::Constr(0, f - e, LpBase::INF);
    14061595  }
    14071596
    1408   ///\e
     1597  ///Create constraint
    14091598
    14101599  ///\relates LpBase::Constr
    14111600  ///
     
    14141603    return LpBase::Constr(e, f, LpBase::NaN);
    14151604  }
    14161605
    1417   ///\e
     1606  ///Create constraint
    14181607
    14191608  ///\relates LpBase::Constr
    14201609  ///
     
    14231612    return LpBase::Constr(- LpBase::INF, e, f);
    14241613  }
    14251614
    1426   ///\e
     1615  ///Create constraint
    14271616
    14281617  ///\relates LpBase::Constr
    14291618  ///
     
    14331622  }
    14341623
    14351624
    1436   ///\e
     1625  ///Create constraint
    14371626
    14381627  ///\relates LpBase::Constr
    14391628  ///
     
    14431632  }
    14441633
    14451634
    1446   ///\e
     1635  ///Create constraint
    14471636
    14481637  ///\relates LpBase::Constr
    14491638  ///
     
    14521641    return LpBase::Constr(f, e, LpBase::INF);
    14531642  }
    14541643
    1455   ///\e
     1644  ///Create constraint
    14561645
    14571646  ///\relates LpBase::Constr
    14581647  ///
     
    14611650    return LpBase::Constr(f, e, f);
    14621651  }
    14631652
    1464   ///\e
     1653  ///Create constraint
    14651654
    14661655  ///\relates LpBase::Constr
    14671656  ///
     
    14701659    return LpBase::Constr(0, f - e, 0);
    14711660  }
    14721661
    1473   ///\e
     1662  ///Create constraint
    14741663
    14751664  ///\relates LpBase::Constr
    14761665  ///
     
    14811670    tmp.lowerBound()=n;
    14821671    return tmp;
    14831672  }
    1484   ///\e
     1673  ///Create constraint
    14851674
    14861675  ///\relates LpBase::Constr
    14871676  ///
     
    14941683    return tmp;
    14951684  }
    14961685
    1497   ///\e
     1686  ///Create constraint
    14981687
    14991688  ///\relates LpBase::Constr
    15001689  ///
     
    15051694    tmp.upperBound()=n;
    15061695    return tmp;
    15071696  }
    1508   ///\e
     1697  ///Create constraint
    15091698
    15101699  ///\relates LpBase::Constr
    15111700  ///
     
    15181707    return tmp;
    15191708  }
    15201709
    1521   ///\e
     1710  ///Addition
    15221711
    15231712  ///\relates LpBase::DualExpr
    15241713  ///
     
    15281717    tmp+=b;
    15291718    return tmp;
    15301719  }
    1531   ///\e
     1720  ///Substraction
    15321721
    15331722  ///\relates LpBase::DualExpr
    15341723  ///
     
    15381727    tmp-=b;
    15391728    return tmp;
    15401729  }
    1541   ///\e
     1730  ///Multiply with constant
    15421731
    15431732  ///\relates LpBase::DualExpr
    15441733  ///
     
    15491738    return tmp;
    15501739  }
    15511740
    1552   ///\e
     1741  ///Multiply with constant
    15531742
    15541743  ///\relates LpBase::DualExpr
    15551744  ///
     
    15591748    tmp*=a;
    15601749    return tmp;
    15611750  }
    1562   ///\e
     1751  ///Divide with constant
    15631752
    15641753  ///\relates LpBase::DualExpr
    15651754  ///
     
    15731762  /// \ingroup lp_group
    15741763  ///
    15751764  /// \brief Common base class for LP solvers
    1576   /// \todo Much more docs
     1765  ///
     1766  /// This class is an abstract base class for LP solvers. This class
     1767  /// provides a full interface for set and modify an LP problem,
     1768  /// solve it and retrieve the solution. You can use one of the
     1769  /// descendants as a concrete implementation, or the \c Lp
     1770  /// default LP solver. However, if you would like to handle LP
     1771  /// solvers as reference or pointer in a generic way, you can use
     1772  /// this class directly.
    15771773  class LpSolver : virtual public LpBase {
    15781774  public:
    15791775
    1580     ///\e
     1776    /// The problem types for primal and dual problems
    15811777    enum ProblemType {
    15821778      ///Feasible solution hasn't been found (but may exist).
    15831779      UNDEFINED = 0,
     
    15911787      UNBOUNDED = 4
    15921788    };
    15931789
    1594     ///\e
     1790    ///The basis status of variables
    15951791    enum VarStatus {
    15961792      /// The variable is in the basis
    15971793      BASIC,
     
    16341830    ///\return The result of the optimization procedure. Possible
    16351831    ///values and their meanings can be found in the documentation of
    16361832    ///\ref SolveExitStatus.
    1637     ///
    1638     ///\todo Which method is used to solve the problem
    16391833    SolveExitStatus solve() { return _solve(); }
    16401834
    16411835    ///@}
     
    16541848      return _getDualType();
    16551849    }
    16561850
    1657     ///\e
     1851    /// Return the primal value of the column
     1852
     1853    /// Return the primal value of the column.
     1854    /// \pre The problem is solved.
    16581855    Value primal(Col c) const { return _getPrimal(cols(id(c))); }
    1659     ///\e
     1856
     1857    /// Return the primal value of the expression
     1858
     1859    /// Return the primal value of the expression, i.e. the dot
     1860    /// product of the primal solution and the expression.
     1861    /// \pre The problem is solved.
    16601862    Value primal(const Expr& e) const {
    16611863      double res = *e;
    16621864      for (Expr::ConstCoeffIt c(e); c != INVALID; ++c) {
     
    16641866      }
    16651867      return res;
    16661868    }
    1667     ///\e
     1869    /// Returns a component of the primal ray
     1870   
     1871    /// The primal ray is solution of the modified primal problem,
     1872    /// where we change each finite bound to 0, and we looking for a
     1873    /// negative objective value in case of minimization, and positive
     1874    /// objective value for maximization. If there is such solution,
     1875    /// that proofs the unsolvability of the dual problem, and if a
     1876    /// feasible primal solution exists, then the unboundness of
     1877    /// primal problem.
     1878    ///
     1879    /// \pre The problem is solved and the dual problem is infeasible.
     1880    /// \note Some solvers does not provide primal ray calculation
     1881    /// functions.
    16681882    Value primalRay(Col c) const { return _getPrimalRay(cols(id(c))); }
    16691883
    1670     ///\e
     1884    /// Return the dual value of the row
     1885
     1886    /// Return the dual value of the row.
     1887    /// \pre The problem is solved.
    16711888    Value dual(Row r) const { return _getDual(rows(id(r))); }
    1672     ///\e
     1889
     1890    /// Return the dual value of the dual expression
     1891
     1892    /// Return the dual value of the dual expression, i.e. the dot
     1893    /// product of the dual solution and the dual expression.
     1894    /// \pre The problem is solved.
    16731895    Value dual(const DualExpr& e) const {
    16741896      double res = 0.0;
    16751897      for (DualExpr::ConstCoeffIt r(e); r != INVALID; ++r) {
     
    16771899      }
    16781900      return res;
    16791901    }
    1680     ///\e
     1902
     1903    /// Returns a component of the dual ray
     1904   
     1905    /// The dual ray is solution of the modified primal problem, where
     1906    /// we change each finite bound to 0 (i.e. the objective function
     1907    /// coefficients in the primal problem), and we looking for a
     1908    /// ositive objective value. If there is such solution, that
     1909    /// proofs the unsolvability of the primal problem, and if a
     1910    /// feasible dual solution exists, then the unboundness of
     1911    /// dual problem.
     1912    ///
     1913    /// \pre The problem is solved and the primal problem is infeasible.
     1914    /// \note Some solvers does not provide dual ray calculation
     1915    /// functions.
    16811916    Value dualRay(Row r) const { return _getDualRay(rows(id(r))); }
    16821917
    1683     ///\e
     1918    /// Return the basis status of the column
     1919
     1920    /// \see VarStatus
    16841921    VarStatus colStatus(Col c) const { return _getColStatus(cols(id(c))); }
    16851922
    1686     ///\e
    1687     VarStatus rowStatus(Col c) const { return _getRowStatus(cols(id(c))); }
     1923    /// Return the basis status of the row
    16881924
    1689     ///\e
     1925    /// \see VarStatus
     1926    VarStatus rowStatus(Row r) const { return _getRowStatus(rows(id(r))); }
     1927
     1928    ///The value of the objective function
    16901929
    16911930    ///\return
    16921931    ///- \ref INF or -\ref INF means either infeasibility or unboundedness
     
    17091948  /// \ingroup lp_group
    17101949  ///
    17111950  /// \brief Common base class for MIP solvers
    1712   /// \todo Much more docs
     1951  ///
     1952  /// This class is an abstract base class for MIP solvers. This class
     1953  /// provides a full interface for set and modify an MIP problem,
     1954  /// solve it and retrieve the solution. You can use one of the
     1955  /// descendants as a concrete implementation, or the \c Lp
     1956  /// default MIP solver. However, if you would like to handle MIP
     1957  /// solvers as reference or pointer in a generic way, you can use
     1958  /// this class directly.
    17131959  class MipSolver : virtual public LpBase {
    17141960  public:
    17151961
    1716     ///\e
     1962    /// The problem types for MIP problems
    17171963    enum ProblemType {
    17181964      ///Feasible solution hasn't been found (but may exist).
    17191965      UNDEFINED = 0,
     
    17331979
    17341980    ///@{
    17351981
    1736     ///\e Solve the MIP problem at hand
     1982    /// Solve the MIP problem at hand
    17371983    ///
    17381984    ///\return The result of the optimization procedure. Possible
    17391985    ///values and their meanings can be found in the documentation of
    17401986    ///\ref SolveExitStatus.
    1741     ///
    1742     ///\todo Which method is used to solve the problem
    17431987    SolveExitStatus solve() { return _solve(); }
    17441988
    17451989    ///@}
     
    17562000    };
    17572001
    17582002    ///Sets the type of the given column to the given type
     2003
     2004    ///Sets the type of the given column to the given type.
    17592005    ///
    1760     ///Sets the type of the given column to the given type.
    17612006    void colType(Col c, ColTypes col_type) {
    17622007      _setColType(cols(id(c)),col_type);
    17632008    }
    17642009
    17652010    ///Gives back the type of the column.
     2011
     2012    ///Gives back the type of the column.
    17662013    ///
    1767     ///Gives back the type of the column.
    17682014    ColTypes colType(Col c) const {
    17692015      return _getColType(cols(id(c)));
    1770     }
    1771 
    1772     ///Sets the type of the given Col to integer.
    1773     ///
    1774     ///Sets the type of the given Col to integer.
    1775     void integer(Col c) {
    1776       colType(c, INTEGER);
    1777     }
    1778 
    1779     ///Gives back whether the type of the column is integer or not.
    1780     ///
    1781     ///Gives back the type of the column.
    1782     ///\return true if the column has integer type and false if not.
    1783     bool integer(Col c) const {
    1784       return (colType(c) == INTEGER);
    1785     }
    1786 
    1787     ///Sets the type of the given Col to continuous.
    1788     ///
    1789     ///Sets the type of the given Col to continuous.
    1790     void real(Col c) {
    1791       colType(c, REAL);
    1792     }
    1793 
    1794     ///Gives back whether the type of the column is continuous or not.
    1795     ///
    1796     ///Gives back the type of the column.
    1797     ///\return true if the column has continuous type and false if not.
    1798     bool real(Col c) const {
    1799       return (colType(c) == REAL);
    18002016    }
    18012017    ///@}
    18022018
     
    18092025      return _getType();
    18102026    }
    18112027
    1812     ///\e
     2028    /// Return the value of the row in the solution
     2029
     2030    ///  Return the value of the row in the solution.
     2031    /// \pre The problem is solved.
    18132032    Value sol(Col c) const { return _getSol(cols(id(c))); }
    1814     ///\e
     2033
     2034    /// Return the value of the expression in the solution
     2035
     2036    /// Return the value of the expression in the solution, i.e. the
     2037    /// dot product of the solution and the expression.
     2038    /// \pre The problem is solved.
    18152039    Value sol(const Expr& e) const {
    18162040      double res = *e;
    18172041      for (Expr::ConstCoeffIt c(e); c != INVALID; ++c) {
     
    18192043      }
    18202044      return res;
    18212045    }
     2046    ///The value of the objective function
     2047   
    18222048    ///\return
    18232049    ///- \ref INF or -\ref INF means either infeasibility or unboundedness
    18242050    /// of the problem, depending on whether we minimize or maximize.
  • lemon/lp_clp.cc

    diff -r 9347462c3106 -r 473d56c5aec8 lemon/lp_clp.cc
    a b  
    9191
    9292  void LpClp::_eraseColId(int i) {
    9393    cols.eraseIndex(i);
    94     cols.shiftIndexes(i);
     94    cols.shiftIndices(i);
    9595  }
    9696
    9797  void LpClp::_eraseRowId(int i) {
    9898    rows.eraseIndex(i);
    99     rows.shiftIndexes(i);
     99    rows.shiftIndices(i);
    100100  }
    101101
    102102  void LpClp::_getColName(int c, std::string& name) const {
  • lemon/lp_cplex.cc

    diff -r 9347462c3106 -r 473d56c5aec8 lemon/lp_cplex.cc
    a b  
    119119
    120120  void CplexBase::_eraseColId(int i) {
    121121    cols.eraseIndex(i);
    122     cols.shiftIndexes(i);
     122    cols.shiftIndices(i);
    123123  }
    124124  void CplexBase::_eraseRowId(int i) {
    125125    rows.eraseIndex(i);
    126     rows.shiftIndexes(i);
     126    rows.shiftIndices(i);
    127127  }
    128128
    129129  void CplexBase::_getColName(int col, std::string &name) const {
     
    395395    }
    396396  }
    397397
    398   void CplexBase::_setObjCoeff(int i, CplexBase::Value obj_coef)
     398  void CplexBase::_setObjCoeff(int i, Value obj_coef)
    399399  {
    400400    CPXchgobj(cplexEnv(), _prob, 1, &i, &obj_coef);
    401401  }
  • lemon/lp_glpk.cc

    diff -r 9347462c3106 -r 473d56c5aec8 lemon/lp_glpk.cc
    a b  
    7171
    7272  void GlpkBase::_eraseColId(int i) {
    7373    cols.eraseIndex(i);
    74     cols.shiftIndexes(i);
     74    cols.shiftIndices(i);
    7575  }
    7676
    7777  void GlpkBase::_eraseRowId(int i) {
    7878    rows.eraseIndex(i);
    79     rows.shiftIndexes(i);
     79    rows.shiftIndices(i);
    8080  }
    8181
    8282  void GlpkBase::_getColName(int c, std::string& name) const {