Minor change
authoralpar
Wed, 20 Jul 2005 08:02:11 +0000
changeset 157168ce4302fb0b
parent 1570 da93692e6537
child 1572 ce52ee162ec0
Minor change
demo/lp_maxflow_demo.cc
     1.1 --- a/demo/lp_maxflow_demo.cc	Wed Jul 20 08:01:16 2005 +0000
     1.2 +++ b/demo/lp_maxflow_demo.cc	Wed Jul 20 08:02:11 2005 +0000
     1.3 @@ -82,12 +82,11 @@
     1.4    }
     1.5    
     1.6    //Objective function: the flow value entering 't'
     1.7 -  {
     1.8 -    LpDefault::Expr ex;
     1.9 -    for(InEdgeIt  e(g,t);e!=INVALID;++e) ex+=x[e];
    1.10 -    for(OutEdgeIt e(g,t);e!=INVALID;++e) ex-=x[e];
    1.11 -    lp.setObj(ex);
    1.12 -  }
    1.13 +  LpDefault::Expr obj;
    1.14 +  for(InEdgeIt  e(g,t);e!=INVALID;++e) obj+=x[e];
    1.15 +  for(OutEdgeIt e(g,t);e!=INVALID;++e) obj-=x[e];
    1.16 +  lp.setObj(obj);
    1.17 +
    1.18  
    1.19    //Maximization
    1.20    lp.max();