# HG changeset patch # User alpar # Date 1118830388 0 # Node ID 94535d1833b56ac3bebca4ee4be906210c5e2445 # Parent 0d58f0301923ea1b061d3665e18fbdd302f107b9 Bugfixes related to DualExpr. diff -r 0d58f0301923 -r 94535d1833b5 lemon/lp_base.h --- a/lemon/lp_base.h Wed Jun 15 10:10:59 2005 +0000 +++ b/lemon/lp_base.h Wed Jun 15 10:13:08 2005 +0000 @@ -488,8 +488,6 @@ Base::insert(std::make_pair(v, 1)); } ///\e - DualExpr(const Value &v) {} - ///\e void set(const Key &v,const Value &c) { Base::insert(std::make_pair(v, c)); } @@ -706,10 +704,10 @@ ///\return The created column. ///\bug This is a temportary function. The interface will change to ///a better one. - Col addCol(Value l,const DualExpr &e, Value obj=0) { + Col addCol(const DualExpr &e, Value obj=0) { Col c=addCol(); setCol(c,e); - objCoeff(c,0); + objCoeff(c,obj); return c; } diff -r 0d58f0301923 -r 94535d1833b5 test/lp_test.cc --- a/test/lp_test.cc Wed Jun 15 10:10:59 2005 +0000 +++ b/test/lp_test.cc Wed Jun 15 10:13:08 2005 +0000 @@ -164,7 +164,7 @@ e/=2; e/=2.2; - e=((p1+p2)+(p1-p2)+(p1+12)+(12+p1)+(p1-12)+(12-p1)+ + e=((p1+p2)+(p1-p2)+ (p1+f)+(f+p1)+(f+g)+ (p1-f)+(f-p1)+(f-g)+ 2.2*f+f*2.2+f/2.2+