Nonconvex constrained optimization
Loading...
Searching...
No Matches
solver-driver.hpp
Go to the documentation of this file.
1#pragma once
2
4
6#include <functional>
7#include <memory>
8
9namespace alpaqa::driver {
10
12 std::ostream &);
13using solver_func_t = std::function<solver_free_func_t>;
14
16 virtual ~SolverWrapper() = default;
17 [[nodiscard]] virtual bool has_statistics() const { return false; }
18 virtual void write_statistics_to_stream(std::ostream &) const {}
21};
22
23using SharedSolverWrapper = std::shared_ptr<SolverWrapper>;
24
26 std::function<SharedSolverWrapper(std::string_view, alpaqa::Options &)>;
27
28} // namespace alpaqa::driver
std::function< solver_free_func_t > solver_func_t
SolverResults(alpaqa::LoadedProblem &, std::ostream &) solver_free_func_t
std::function< SharedSolverWrapper(std::string_view, alpaqa::Options &)> solver_builder_func
std::shared_ptr< SolverWrapper > SharedSolverWrapper
SolverWrapper(solver_func_t run)
virtual void write_statistics_to_stream(std::ostream &) const
virtual ~SolverWrapper()=default
virtual bool has_statistics() const