Changeset 1270:dceba191c00d in lemon for test/max_clique_test.cc
- Timestamp:
- 08/09/13 11:28:17 (11 years ago)
- Branch:
- default
- Children:
- 1271:fb1c7da561ce, 1381:e0ccc1f0268f
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/max_clique_test.cc
r1022 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 55 55 "5 7 14\n" 56 56 "6 7 15\n"; 57 57 58 58 59 59 // Check with general graphs … … 63 63 typedef GrossoLocatelliPullanMc<GR> McAlg; 64 64 typedef McAlg::CliqueNodeIt CliqueIt; 65 65 66 66 // Basic tests 67 67 { … … 82 82 check(static_cast<GR::Node>(it1) == u && ++it1 == INVALID, 83 83 "Wrong CliqueNodeIt"); 84 84 85 85 GR::Node v = g.addNode(); 86 86 check(mc.run(rule) == McAlg::ITERATION_LIMIT, "Wrong termination cause"); … … 110 110 .nodeMap("max_clique", max_clique) 111 111 .run(); 112 112 113 113 McAlg mc(g); 114 114 mc.iterationLimit(50); … … 134 134 typedef GrossoLocatelliPullanMc<FullGraph> McAlg; 135 135 typedef McAlg::CliqueNodeIt CliqueIt; 136 136 137 137 for (int size = 0; size <= 40; size = size * 3 + 1) { 138 138 GR g(size); … … 157 157 GridGraph::NodeMap<char> map(g); 158 158 GrossoLocatelliPullanMc<GridGraph> mc(g); 159 159 160 160 mc.iterationLimit(100); 161 161 check(mc.run(rule) == mc.ITERATION_LIMIT, "Wrong termination cause"); … … 180 180 checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::DEGREE_BASED); 181 181 checkMaxCliqueFullGraph(GrossoLocatelliPullanMc<FullGraph>::PENALTY_BASED); 182 182 183 183 checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::RANDOM); 184 184 checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::DEGREE_BASED); 185 185 checkMaxCliqueGridGraph(GrossoLocatelliPullanMc<GridGraph>::PENALTY_BASED); 186 186 187 187 return 0; 188 188 }
Note: See TracChangeset
for help on using the changeset viewer.