1.1 --- a/test/min_mean_cycle_test.cc Mon Jul 16 16:21:40 2018 +0200
1.2 +++ b/test/min_mean_cycle_test.cc Wed Oct 17 19:14:07 2018 +0200
1.3 @@ -2,7 +2,7 @@
1.4 *
1.5 * This file is a part of LEMON, a generic C++ optimization library.
1.6 *
1.7 - * Copyright (C) 2003-2010
1.8 + * Copyright (C) 2003-2013
1.9 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.10 * (Egervary Research Group on Combinatorial Optimization, EGRES).
1.11 *
1.12 @@ -110,7 +110,7 @@
1.13 const SmartDigraph::ArcMap<int>& cm,
1.14 int cost, int size) {
1.15 MMC alg(gr, lm);
1.16 - alg.findCycleMean();
1.17 + check(alg.findCycleMean(), "Wrong result");
1.18 check(alg.cycleMean() == static_cast<double>(cost) / size,
1.19 "Wrong cycle mean");
1.20 alg.findCycle();
1.21 @@ -210,6 +210,13 @@
1.22 checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l2, c2, 5, 2);
1.23 checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l3, c3, 0, 1);
1.24 checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l4, c4, -1, 1);
1.25 +
1.26 + // Howard with iteration limit
1.27 + HowardMmc<GR, IntArcMap> mmc(gr, l1);
1.28 + check((mmc.findCycleMean(2) == HowardMmc<GR, IntArcMap>::ITERATION_LIMIT),
1.29 + "Wrong termination cause");
1.30 + check((mmc.findCycleMean(4) == HowardMmc<GR, IntArcMap>::OPTIMAL),
1.31 + "Wrong termination cause");
1.32 }
1.33
1.34 return 0;