- setCol() -> col()
authoralpar
Wed, 18 Jan 2006 09:42:59 +0000
changeset 18992d4835f5a86a
parent 1898 f030c01e6173
child 1900 b16ca599472f
- setCol() -> col()
- better doc.
lemon/lp_base.h
     1.1 --- a/lemon/lp_base.h	Wed Jan 18 09:42:08 2006 +0000
     1.2 +++ b/lemon/lp_base.h	Wed Jan 18 09:42:59 2006 +0000
     1.3 @@ -701,15 +701,14 @@
     1.4  
     1.5      ///\param c is the column to be modified
     1.6      ///\param e is a dual linear expression (see \ref DualExpr)
     1.7 -    ///\bug This is a temporary function. The interface will change to
     1.8      ///a better one.
     1.9 -    void setCol(Col c,const DualExpr &e) {
    1.10 +    void col(Col c,const DualExpr &e) {
    1.11        std::vector<int> indices;
    1.12        std::vector<Value> values;
    1.13        indices.push_back(0);
    1.14        values.push_back(0);
    1.15        for(DualExpr::const_iterator i=e.begin(); i!=e.end(); ++i)
    1.16 -	if((*i).second!=0) { ///\bug EPSILON would be necessary here!!!
    1.17 +	if((*i).second!=0) {
    1.18  	  indices.push_back(rows.floatingId((*i).first.id));
    1.19  	  values.push_back((*i).second);
    1.20  	}
    1.21 @@ -723,11 +722,9 @@
    1.22      ///\param obj is the corresponding component of the objective
    1.23      ///function. It is 0 by default.
    1.24      ///\return The created column.
    1.25 -    ///\bug This is a temportary function. The interface will change to
    1.26 -    ///a better one.
    1.27      Col addCol(const DualExpr &e, Value obj=0) {
    1.28        Col c=addCol();
    1.29 -      setCol(c,e);
    1.30 +      col(c,e);
    1.31        objCoeff(c,obj);
    1.32        return c;
    1.33      }