test/circulation_test.cc
changeset 822 6cab2ab9d8e7
parent 632 65fbcf2f978a
parent 657 dacc2cee2b4c
child 736 86c49553fea5
child 1081 f1398882a928
child 1171 7e368d9b67f7
equal deleted inserted replaced
3:4e6c1f73af2b 5:c6eafc5cc36e
    55   typedef concepts::Digraph Digraph;
    55   typedef concepts::Digraph Digraph;
    56 
    56 
    57   typedef Digraph::Node Node;
    57   typedef Digraph::Node Node;
    58   typedef Digraph::Arc Arc;
    58   typedef Digraph::Arc Arc;
    59   typedef concepts::ReadMap<Arc,VType> CapMap;
    59   typedef concepts::ReadMap<Arc,VType> CapMap;
    60   typedef concepts::ReadMap<Node,VType> DeltaMap;
    60   typedef concepts::ReadMap<Node,VType> SupplyMap;
    61   typedef concepts::ReadWriteMap<Arc,VType> FlowMap;
    61   typedef concepts::ReadWriteMap<Arc,VType> FlowMap;
    62   typedef concepts::WriteMap<Node,bool> BarrierMap;
    62   typedef concepts::WriteMap<Node,bool> BarrierMap;
    63 
    63 
    64   typedef Elevator<Digraph, Digraph::Node> Elev;
    64   typedef Elevator<Digraph, Digraph::Node> Elev;
    65   typedef LinkedElevator<Digraph, Digraph::Node> LinkedElev;
    65   typedef LinkedElevator<Digraph, Digraph::Node> LinkedElev;
    66 
    66 
    67   Digraph g;
    67   Digraph g;
    68   Node n;
    68   Node n;
    69   Arc a;
    69   Arc a;
    70   CapMap lcap, ucap;
    70   CapMap lcap, ucap;
    71   DeltaMap delta;
    71   SupplyMap supply;
    72   FlowMap flow;
    72   FlowMap flow;
    73   BarrierMap bar;
    73   BarrierMap bar;
    74   VType v;
    74   VType v;
    75   bool b;
    75   bool b;
    76 
    76 
    77   typedef Circulation<Digraph, CapMap, CapMap, DeltaMap>
    77   typedef Circulation<Digraph, CapMap, CapMap, SupplyMap>
    78             ::SetFlowMap<FlowMap>
    78             ::SetFlowMap<FlowMap>
    79             ::SetElevator<Elev>
    79             ::SetElevator<Elev>
    80             ::SetStandardElevator<LinkedElev>
    80             ::SetStandardElevator<LinkedElev>
    81             ::Create CirculationType;
    81             ::Create CirculationType;
    82   CirculationType circ_test(g, lcap, ucap, delta);
    82   CirculationType circ_test(g, lcap, ucap, supply);
    83   const CirculationType& const_circ_test = circ_test;
    83   const CirculationType& const_circ_test = circ_test;
    84    
    84    
    85   circ_test
    85   circ_test
    86     .lowerCapMap(lcap)
    86     .lowerMap(lcap)
    87     .upperCapMap(ucap)
    87     .upperMap(ucap)
    88     .deltaMap(delta)
    88     .supplyMap(supply)
    89     .flowMap(flow);
    89     .flowMap(flow);
    90 
    90 
    91   circ_test.init();
    91   circ_test.init();
    92   circ_test.greedyInit();
    92   circ_test.greedyInit();
    93   circ_test.start();
    93   circ_test.start();