COIN-OR::LEMON - Graph Library

Changeset 585:65fbcf2f978a in lemon-1.2 for test/preflow_test.cc


Ignore:
Timestamp:
04/15/09 03:26:45 (11 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Improve test files for some algorithms (#263)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/preflow_test.cc

    r440 r585  
    8585  FlowMap flow;
    8686  CutMap cut;
    87 
    88   Preflow<Digraph, CapMap>
    89     ::SetFlowMap<FlowMap>
    90     ::SetElevator<Elev>
    91     ::SetStandardElevator<LinkedElev>
    92     ::Create preflow_test(g,cap,n,n);
    93 
    94   preflow_test.capacityMap(cap);
    95   flow = preflow_test.flowMap();
    96   preflow_test.flowMap(flow);
    97   preflow_test.source(n);
    98   preflow_test.target(n);
     87  VType v;
     88  bool b;
     89
     90  typedef Preflow<Digraph, CapMap>
     91            ::SetFlowMap<FlowMap>
     92            ::SetElevator<Elev>
     93            ::SetStandardElevator<LinkedElev>
     94            ::Create PreflowType;
     95  PreflowType preflow_test(g, cap, n, n);
     96  const PreflowType& const_preflow_test = preflow_test;
     97
     98  preflow_test
     99    .capacityMap(cap)
     100    .flowMap(flow)
     101    .source(n)
     102    .target(n);
    99103
    100104  preflow_test.init();
     
    105109  preflow_test.runMinCut();
    106110
    107   preflow_test.flowValue();
    108   preflow_test.minCut(n);
    109   preflow_test.minCutMap(cut);
    110   preflow_test.flow(e);
    111 
     111  v = const_preflow_test.flowValue();
     112  v = const_preflow_test.flow(e);
     113  const FlowMap& fm = const_preflow_test.flowMap();
     114  b = const_preflow_test.minCut(n);
     115  const_preflow_test.minCutMap(cut);
     116 
     117  ignore_unused_variable_warning(fm);
    112118}
    113119
Note: See TracChangeset for help on using the changeset viewer.