lemon/lp_base.h
changeset 1493 94535d1833b5
parent 1484 a3484f00a5f0
child 1508 389a94a1d9eb
equal deleted inserted replaced
8:6e5b651876cb 9:ef9d467b45a4
   486       ///\e
   486       ///\e
   487       DualExpr(const Key &v) {
   487       DualExpr(const Key &v) {
   488 	Base::insert(std::make_pair(v, 1));
   488 	Base::insert(std::make_pair(v, 1));
   489       }
   489       }
   490       ///\e
   490       ///\e
   491       DualExpr(const Value &v) {}
       
   492       ///\e
       
   493       void set(const Key &v,const Value &c) {
   491       void set(const Key &v,const Value &c) {
   494 	Base::insert(std::make_pair(v, c));
   492 	Base::insert(std::make_pair(v, c));
   495       }
   493       }
   496       
   494       
   497       ///Removes the components with zero coefficient.
   495       ///Removes the components with zero coefficient.
   704     ///\param obj is the corresponding component of the objective
   702     ///\param obj is the corresponding component of the objective
   705     ///function. It is 0 by default.
   703     ///function. It is 0 by default.
   706     ///\return The created column.
   704     ///\return The created column.
   707     ///\bug This is a temportary function. The interface will change to
   705     ///\bug This is a temportary function. The interface will change to
   708     ///a better one.
   706     ///a better one.
   709     Col addCol(Value l,const DualExpr &e, Value obj=0) {
   707     Col addCol(const DualExpr &e, Value obj=0) {
   710       Col c=addCol();
   708       Col c=addCol();
   711       setCol(c,e);
   709       setCol(c,e);
   712       objCoeff(c,0);
   710       objCoeff(c,obj);
   713       return c;
   711       return c;
   714     }
   712     }
   715 
   713 
   716     ///Add a new empty row (i.e a new constraint) to the LP
   714     ///Add a new empty row (i.e a new constraint) to the LP
   717 
   715