223 {
"panoc", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::LBFGSDirection<config_t>>>,
"PANOC + LBFGS solver (default)"}},
224 {
"panoc.lbfgs", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::LBFGSDirection<config_t>>>,
"PANOC + LBFGS solver"}},
225 {
"panoc.struclbfgs", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::StructuredLBFGSDirection<config_t>>>,
"PANOC + Structured LBFGS solver"}},
226 {
"panoc.anderson", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::AndersonDirection<config_t>>>,
"PANOC + Anderson acceleration solver"}},
227 {
"panoc.convex-newton", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::ConvexNewtonDirection<config_t>>>,
"PANOC + Newton (for convex problems)"}},
228 {
"zerofpr", {get_results_panoc_like<alpaqa::ZeroFPRSolver<alpaqa::LBFGSDirection<config_t>>>,
"ZeroFPR + LBFGS solver"}},
229 {
"zerofpr.lbfgs", {get_results_panoc_like<alpaqa::ZeroFPRSolver<alpaqa::LBFGSDirection<config_t>>>,
"ZeroFPR + LBFGS solver"}},
230 {
"zerofpr.struclbfgs", {get_results_panoc_like<alpaqa::ZeroFPRSolver<alpaqa::StructuredLBFGSDirection<config_t>>>,
"ZeroFPR + Structured LBFGS solver"}},
231 {
"zerofpr.anderson", {get_results_panoc_like<alpaqa::ZeroFPRSolver<alpaqa::AndersonDirection<config_t>>>,
"ZeroFPR + Anderson acceleration solver"}},
232 {
"zerofpr.convex-newton", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::ConvexNewtonDirection<config_t>>>,
"ZeroFPR + Newton (for convex problems)"}},
233 {
"pantr", {get_results_panoc_like<alpaqa::PANTRSolver<alpaqa::NewtonTRDirection<config_t>>>,
"PANTR solver"}},
234 {
"fista", {get_results_fista_like<alpaqa::FISTASolver<config_t>>,
"FISTA solver"}},
235 {
"ipopt", {alpaqa::params::get_members<void>,
"Ipopt solver"}},
236 {
"qpalm", {alpaqa::params::get_members<void>,
"QPALM solver"}},
241 if (s.
key ==
"method") {
242 auto members = std::views::transform(
methods, [](
const auto &e) {
243 return Result::Member{
246 .suffix = std::nullopt,
252 .members = {members.begin(), members.end()},
259 const auto &m =
methods.at(method);
260 auto result = m.func(s);
261 if (result.members.empty())
262 result = get_members<alpaqa::params::RootOpts>(s);
263 else if (result.prefix.empty())
266 }
catch (std::out_of_range &) {
267 return get_members<alpaqa::params::RootOpts>(s);
273 bool has_value = key.end() != params.end();
277 .value = has_value ? std::make_optional(value) : std::nullopt,
280 if (!result.members.empty()) {
281 std::cout <<
"_prefix:" << result.prefix;
282 if (!result.prefix.empty() && result.prefix.back() !=
'.')
283 std::cout << (result.leaf ?
'=' :
'.');
284 std::cout <<
"\n_suffix:";
289 std::accumulate(result.members.begin(), result.members.end(),
290 size_t{0}, [](
size_t acc,
const auto &m) {
291 return std::max(acc, m.name.size());
293 for (
const auto &member : result.members) {
294 auto name = member.name;
295 std::string padding(max_len - std::min(max_len, name.size()),
' ');
298 std::cout << *member.suffix;
299 std::cout <<
':' << name;
301 auto doc = member.doc->empty() ?
"(undocumented)" : *member.doc;
302 std::cout << padding <<
" -- " << doc <<
" ";