1.1 --- a/test/min_mean_cycle_test.cc Mon Aug 10 14:50:57 2009 +0200
1.2 +++ b/test/min_mean_cycle_test.cc Tue Aug 11 20:55:40 2009 +0200
1.3 @@ -21,11 +21,13 @@
1.4
1.5 #include <lemon/smart_graph.h>
1.6 #include <lemon/lgf_reader.h>
1.7 -#include <lemon/howard.h>
1.8 #include <lemon/path.h>
1.9 #include <lemon/concepts/digraph.h>
1.10 #include <lemon/concept_check.h>
1.11
1.12 +#include <lemon/karp.h>
1.13 +#include <lemon/howard.h>
1.14 +
1.15 #include "test_tools.h"
1.16
1.17 using namespace lemon;
1.18 @@ -141,16 +143,23 @@
1.19 // Check the interface
1.20 {
1.21 typedef concepts::Digraph GR;
1.22 - typedef Howard<GR, concepts::ReadMap<GR::Arc, int> > IntMmcAlg;
1.23 - typedef Howard<GR, concepts::ReadMap<GR::Arc, float> > FloatMmcAlg;
1.24 +
1.25 + // Karp
1.26 + checkConcept< MmcClassConcept<GR, int>,
1.27 + Karp<GR, concepts::ReadMap<GR::Arc, int> > >();
1.28 + checkConcept< MmcClassConcept<GR, float>,
1.29 + Karp<GR, concepts::ReadMap<GR::Arc, float> > >();
1.30
1.31 - checkConcept<MmcClassConcept<GR, int>, IntMmcAlg>();
1.32 - checkConcept<MmcClassConcept<GR, float>, FloatMmcAlg>();
1.33 -
1.34 - if (IsSameType<IntMmcAlg::LargeValue, long_int>::result == 0)
1.35 - check(false, "Wrong LargeValue type");
1.36 - if (IsSameType<FloatMmcAlg::LargeValue, double>::result == 0)
1.37 - check(false, "Wrong LargeValue type");
1.38 + // Howard
1.39 + checkConcept< MmcClassConcept<GR, int>,
1.40 + Howard<GR, concepts::ReadMap<GR::Arc, int> > >();
1.41 + checkConcept< MmcClassConcept<GR, float>,
1.42 + Howard<GR, concepts::ReadMap<GR::Arc, float> > >();
1.43 +
1.44 + if (IsSameType<Howard<GR, concepts::ReadMap<GR::Arc, int> >::LargeValue,
1.45 + long_int>::result == 0) check(false, "Wrong LargeValue type");
1.46 + if (IsSameType<Howard<GR, concepts::ReadMap<GR::Arc, float> >::LargeValue,
1.47 + double>::result == 0) check(false, "Wrong LargeValue type");
1.48 }
1.49
1.50 // Run various tests
1.51 @@ -174,6 +183,13 @@
1.52 arcMap("c4", c4).
1.53 run();
1.54
1.55 + // Karp
1.56 + checkMmcAlg<Karp<GR, IntArcMap> >(gr, l1, c1, 6, 3);
1.57 + checkMmcAlg<Karp<GR, IntArcMap> >(gr, l2, c2, 5, 2);
1.58 + checkMmcAlg<Karp<GR, IntArcMap> >(gr, l3, c3, 0, 1);
1.59 + checkMmcAlg<Karp<GR, IntArcMap> >(gr, l4, c4, -1, 1);
1.60 +
1.61 + // Howard
1.62 checkMmcAlg<Howard<GR, IntArcMap> >(gr, l1, c1, 6, 3);
1.63 checkMmcAlg<Howard<GR, IntArcMap> >(gr, l2, c2, 5, 2);
1.64 checkMmcAlg<Howard<GR, IntArcMap> >(gr, l3, c3, 0, 1);