Skip to content
Snippets Groups Projects
Commit 3013c10b authored by Kilian Verhetsel's avatar Kilian Verhetsel
Browse files

Add preprocessing guards to switch implementation of mwis.hpp

parent e89845c2
No related branches found
No related tags found
No related merge requests found
...@@ -1015,6 +1015,7 @@ void maximum_weight_independent_set(const Graph &graph, WeightMap weight_map, ...@@ -1015,6 +1015,7 @@ void maximum_weight_independent_set(const Graph &graph, WeightMap weight_map,
// for (vertex v : visitor.best_solution) // for (vertex v : visitor.best_solution)
// *out++ = v; // *out++ = v;
#ifdef MWIS_MCTS
auto vs = vertices(graph); auto vs = vertices(graph);
weight root_bound(bound(vs.second, vs.second, vs.first, vs.second)); weight root_bound(bound(vs.second, vs.second, vs.first, vs.second));
...@@ -1029,20 +1030,21 @@ void maximum_weight_independent_set(const Graph &graph, WeightMap weight_map, ...@@ -1029,20 +1030,21 @@ void maximum_weight_independent_set(const Graph &graph, WeightMap weight_map,
for (vertex v : state.solution) for (vertex v : state.solution)
*out++ = v; *out++ = v;
#else
mwis::evaluator<Graph, WeightMap> eval(cliques.begin(), cliques.end(), 5);
// mwis::evaluator<Graph, WeightMap> eval(cliques.begin(), cliques.end(), 5); visitor(state);
search::greedy_search(state, successor, eval);
// visitor(state); mwis::lns_state<Graph, WeightMap> l_state(graph, weight_map, state.solution);
// search::greedy_search(state, successor, eval); mwis::lns_fragment<Graph> (*l_selector)(const decltype(l_state)&) =
mwis::fragment_selector<Graph, WeightMap>;
mwis::lns_search<Graph, WeightMap> l_search(cliques.begin(), cliques.end());
// mwis::lns_state<Graph, WeightMap> l_state(graph, weight_map, state.solution); search::large_neighborhood_search(l_state, l_selector, l_search, 300);
// mwis::lns_fragment<Graph> (*l_selector)(const decltype(l_state)&) = std::cout << "\n";
// mwis::fragment_selector<Graph, WeightMap>;
// mwis::lns_search<Graph, WeightMap> l_search(cliques.begin(), cliques.end());
// search::large_neighborhood_search(l_state, l_selector, l_search, 300);
// std::cout << "\n";
// for (vertex v : l_state.solution) for (vertex v : l_state.solution)
// *out++ = v; *out++ = v;
#endif
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment