COIN-OR::LEMON - Graph Library

Changeset 830:75c97c3786d6 in lemon-1.2 for test/min_cost_flow_test.cc


Ignore:
Timestamp:
02/10/10 19:05:20 (10 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Handle graph changes in the MCF algorithms (#327)

The reset() functions are renamed to resetParams() and the new reset()
functions handle the graph chnages, as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/min_cost_flow_test.cc

    r819 r830  
    158158      const MCF& const_mcf = mcf;
    159159
    160       b = mcf.reset()
     160      b = mcf.reset().resetParams()
    161161             .lowerMap(me.lower)
    162162             .upperMap(me.upper)
     
    347347  checkMcf(mcf1, mcf1.run(param), gr, l2, u, c, s2,
    348348           mcf1.OPTIMAL, true,     8010, test_str + "-4");
    349   mcf1.reset().supplyMap(s1);
     349  mcf1.resetParams().supplyMap(s1);
    350350  checkMcf(mcf1, mcf1.run(param), gr, l1, cu, cc, s1,
    351351           mcf1.OPTIMAL, true,       74, test_str + "-5");
     
    364364
    365365  // Tests for the GEQ form
    366   mcf1.reset().upperMap(u).costMap(c).supplyMap(s5);
     366  mcf1.resetParams().upperMap(u).costMap(c).supplyMap(s5);
    367367  checkMcf(mcf1, mcf1.run(param), gr, l1, u, c, s5,
    368368           mcf1.OPTIMAL, true,     3530, test_str + "-10", GEQ);
     
    381381  checkMcf(mcf2, mcf2.run(param), neg1_gr, neg1_l1, neg1_u2, neg1_c, neg1_s,
    382382           mcf2.OPTIMAL, true,   -40000, test_str + "-14");
    383   mcf2.reset().lowerMap(neg1_l2).costMap(neg1_c).supplyMap(neg1_s);
     383  mcf2.resetParams().lowerMap(neg1_l2).costMap(neg1_c).supplyMap(neg1_s);
    384384  checkMcf(mcf2, mcf2.run(param), neg1_gr, neg1_l2, neg1_u1, neg1_c, neg1_s,
    385385           mcf2.UNBOUNDED, false,     0, test_str + "-15");
Note: See TracChangeset for help on using the changeset viewer.