test/circulation_test.cc
changeset 591 f63e87b9748e
parent 440 88ed40ad0d4f
child 603 85cb3aa71cce
equal deleted inserted replaced
2:e9bcf5542a9a 3:4e6c1f73af2b
    69   Arc a;
    69   Arc a;
    70   CapMap lcap, ucap;
    70   CapMap lcap, ucap;
    71   DeltaMap delta;
    71   DeltaMap delta;
    72   FlowMap flow;
    72   FlowMap flow;
    73   BarrierMap bar;
    73   BarrierMap bar;
       
    74   VType v;
       
    75   bool b;
    74 
    76 
    75   Circulation<Digraph, CapMap, CapMap, DeltaMap>
    77   typedef Circulation<Digraph, CapMap, CapMap, DeltaMap>
    76     ::SetFlowMap<FlowMap>
    78             ::SetFlowMap<FlowMap>
    77     ::SetElevator<Elev>
    79             ::SetElevator<Elev>
    78     ::SetStandardElevator<LinkedElev>
    80             ::SetStandardElevator<LinkedElev>
    79     ::Create circ_test(g,lcap,ucap,delta);
    81             ::Create CirculationType;
    80 
    82   CirculationType circ_test(g, lcap, ucap, delta);
    81   circ_test.lowerCapMap(lcap);
    83   const CirculationType& const_circ_test = circ_test;
    82   circ_test.upperCapMap(ucap);
    84    
    83   circ_test.deltaMap(delta);
    85   circ_test
    84   flow = circ_test.flowMap();
    86     .lowerCapMap(lcap)
    85   circ_test.flowMap(flow);
    87     .upperCapMap(ucap)
       
    88     .deltaMap(delta)
       
    89     .flowMap(flow);
    86 
    90 
    87   circ_test.init();
    91   circ_test.init();
    88   circ_test.greedyInit();
    92   circ_test.greedyInit();
    89   circ_test.start();
    93   circ_test.start();
    90   circ_test.run();
    94   circ_test.run();
    91 
    95 
    92   circ_test.barrier(n);
    96   v = const_circ_test.flow(a);
    93   circ_test.barrierMap(bar);
    97   const FlowMap& fm = const_circ_test.flowMap();
    94   circ_test.flow(a);
    98   b = const_circ_test.barrier(n);
       
    99   const_circ_test.barrierMap(bar);
       
   100   
       
   101   ignore_unused_variable_warning(fm);
    95 }
   102 }
    96 
   103 
    97 template <class G, class LM, class UM, class DM>
   104 template <class G, class LM, class UM, class DM>
    98 void checkCirculation(const G& g, const LM& lm, const UM& um,
   105 void checkCirculation(const G& g, const LM& lm, const UM& um,
    99                       const DM& dm, bool find)
   106                       const DM& dm, bool find)