24 auto builder = []<
class Direction>(
tag_t<Direction>) {
27 std::shared_ptr<collector_t> collector;
28 auto inner_solver = make_inner_solver<Solver<Direction>>(opts);
29 bool extra_stats =
false;
32 collector = std::make_shared<collector_t>();
33 inner_solver.set_progress_callback(
34 [collector](
const auto &progress_info) {
35 collector->update_iter(progress_info);
41 auto run = [solver{std::move(solver)},
47 return std::make_shared<AlpaqaSolverWrapperStats<config_t>>(
48 std::move(run), std::move(collector));
51 std::map<std::string_view, solver_builder_func> builders{
61 if (direction.empty())
63 auto builder_it = builders.find(direction);
64 if (builder_it != builders.end())
65 return builder_it->second(direction, opts);
67 throw std::invalid_argument(
68 "Unknown direction '" + std::string(direction) +
"'\n" +
69 " Available directions: " +