18template <
template <
class Direction>
class Solver>
20 [[maybe_unused]]
Options &opts) {
22 auto builder = []<
class Direction>(
tag_t<Direction>) {
24 auto inner_solver = make_inner_solver<Solver<Direction>>(opts);
28 return [solver{std::move(solver)},
36 std::map<std::string_view, solver_builder_func_t> builders{
44 if (direction.empty())
46 auto builder_it = builders.find(direction);
47 if (builder_it != builders.end())
48 return builder_it->second(direction, opts);
50 throw std::invalid_argument(
51 "Unknown direction '" + std::string(direction) +
"'\n" +
52 " Available directions: " +
54 [](
const auto &x) {
return x.first; }));
60 return make_panoc_like_driver<alpaqa::PANOCSolver>(direction, opts);
64 return make_panoc_like_driver<alpaqa::ZeroFPRSolver>(direction, opts);
SolverResults run_alm_solver(LoadedProblem &problem, Solver &solver, std::ostream &os, unsigned N_exp)
auto make_alm_solver(InnerSolver &&inner_solver, Options &opts)
#define USING_ALPAQA_CONFIG(Conf)
auto attach_cancellation(Solver &solver)
Attach SIGINT and SIGTERM handlers to stop the given solver.
solver_func_t make_panoc_like_driver(std::string_view direction, Options &opts)
decltype(auto) set_params(T &t, std::string_view prefix, Options &opts)
solver_func_t make_panoc_driver(std::string_view direction, Options &opts)
solver_func_t make_zerofpr_driver(std::string_view direction, Options &opts)
std::function< solver_free_func_t > solver_func_t
Double-precision double configuration.
std::string format_string_list(const auto &container, const auto &proj=[](const auto &x) -> decltype(auto) { return x;})