COIN-OR::LEMON - Graph Library

Changeset 1012:21a9f829ab68 in lemon-main for test


Ignore:
Timestamp:
11/15/12 07:05:29 (12 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Optional iteration limit in HowardMmc? (#438)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/min_mean_cycle_test.cc

    r877 r1012  
    111111                 int cost, int size) {
    112112  MMC alg(gr, lm);
    113   alg.findCycleMean();
     113  check(alg.findCycleMean(), "Wrong result");
    114114  check(alg.cycleMean() == static_cast<double>(cost) / size,
    115115        "Wrong cycle mean");
     
    211211    checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l3, c3,  0, 1);
    212212    checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l4, c4, -1, 1);
     213   
     214    // Howard with iteration limit
     215    HowardMmc<GR, IntArcMap> mmc(gr, l1);
     216    check((mmc.findCycleMean(2) == HowardMmc<GR, IntArcMap>::ITERATION_LIMIT),
     217      "Wrong termination cause");
     218    check((mmc.findCycleMean(4) == HowardMmc<GR, IntArcMap>::OPTIMAL),
     219      "Wrong termination cause");
    213220  }
    214221
Note: See TracChangeset for help on using the changeset viewer.