Skip to content

Commit

Permalink
Simplify move generators class
Browse files Browse the repository at this point in the history
  • Loading branch information
acco93 committed Nov 24, 2024
1 parent dea3043 commit 292c3c1
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 500 deletions.
13 changes: 2 additions & 11 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,7 @@ int main(int argc, char* argv[]) {
timer.reset();
#endif

auto knn_view = cobra::KNeighborsMoveGeneratorsView(instance, k);

auto views = std::vector<cobra::AbstractMoveGeneratorsView*>();
views.push_back(&knn_view);

auto move_generators = cobra::MoveGenerators(instance, views);
auto move_generators = cobra::MoveGenerators(instance, k);

#ifdef VERBOSE
std::cout << "Done in " << timer.elapsed_time<std::chrono::seconds>() << " seconds.\n";
Expand All @@ -88,12 +83,8 @@ int main(int argc, char* argv[]) {
std::cout << "Using at most " << move_generators.size() << " move-generators out of " << tot_arcs << " total arcs ";
std::cout << std::fixed;
std::cout << std::setprecision(5);
std::cout << "(approx. " << move_gen_perc << "%):\n";
std::cout << std::setprecision(10);
std::cout << "(approx. " << move_gen_perc << "%)\n\n";
std::cout << std::defaultfloat;
std::cout << std::setw(10);
std::cout << knn_view.size() << " k=" << k << " nearest-neighbors arcs\n";
std::cout << "\n";
#endif


Expand Down
Loading

0 comments on commit 292c3c1

Please sign in to comment.