test/max_clique_test.cc
changeset 1092 dceba191c00d
parent 918 8583fb74238c
     1.1 --- a/test/max_clique_test.cc	Fri Aug 09 14:07:27 2013 +0200
     1.2 +++ b/test/max_clique_test.cc	Fri Aug 09 11:28:17 2013 +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 @@ -54,7 +54,7 @@
    1.13    "5 6    13\n"
    1.14    "5 7    14\n"
    1.15    "6 7    15\n";
    1.16 -      
    1.17 +
    1.18  
    1.19  // Check with general graphs
    1.20  template <typename Param>
    1.21 @@ -62,7 +62,7 @@
    1.22    typedef ListGraph GR;
    1.23    typedef GrossoLocatelliPullanMc<GR> McAlg;
    1.24    typedef McAlg::CliqueNodeIt CliqueIt;
    1.25 -  
    1.26 +
    1.27    // Basic tests
    1.28    {
    1.29      GR g;
    1.30 @@ -81,7 +81,7 @@
    1.31      CliqueIt it1(mc);
    1.32      check(static_cast<GR::Node>(it1) == u && ++it1 == INVALID,
    1.33            "Wrong CliqueNodeIt");
    1.34 -    
    1.35 +
    1.36      GR::Node v = g.addNode();
    1.37      check(mc.run(rule) == McAlg::ITERATION_LIMIT, "Wrong termination cause");
    1.38      check(mc.cliqueSize() == 1, "Wrong clique size");
    1.39 @@ -109,7 +109,7 @@
    1.40      graphReader(g, input)
    1.41        .nodeMap("max_clique", max_clique)
    1.42        .run();
    1.43 -    
    1.44 +
    1.45      McAlg mc(g);
    1.46      mc.iterationLimit(50);
    1.47      check(mc.run(rule) == McAlg::ITERATION_LIMIT, "Wrong termination cause");
    1.48 @@ -133,7 +133,7 @@
    1.49    typedef FullGraph GR;
    1.50    typedef GrossoLocatelliPullanMc<FullGraph> McAlg;
    1.51    typedef McAlg::CliqueNodeIt CliqueIt;
    1.52 -  
    1.53 +
    1.54    for (int size = 0; size <= 40; size = size * 3 + 1) {
    1.55      GR g(size);
    1.56      GR::NodeMap<bool> map(g);
    1.57 @@ -156,7 +156,7 @@
    1.58    GridGraph g(5, 7);
    1.59    GridGraph::NodeMap<char> map(g);
    1.60    GrossoLocatelliPullanMc<GridGraph> mc(g);
    1.61 -  
    1.62 +
    1.63    mc.iterationLimit(100);
    1.64    check(mc.run(rule) == mc.ITERATION_LIMIT, "Wrong termination cause");
    1.65    check(mc.cliqueSize() == 2, "Wrong clique size");
    1.66 @@ -179,10 +179,10 @@
    1.67    checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::RANDOM);
    1.68    checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::DEGREE_BASED);
    1.69    checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::PENALTY_BASED);
    1.70 -                       
    1.71 +
    1.72    checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::RANDOM);
    1.73    checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::DEGREE_BASED);
    1.74    checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::PENALTY_BASED);
    1.75 -                       
    1.76 +
    1.77    return 0;
    1.78  }