220 {
"panoc", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::LBFGSDirection<config_t>>>,
"PANOC + LBFGS solver (default)"}},
221 {
"panoc.lbfgs", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::LBFGSDirection<config_t>>>,
"PANOC + LBFGS solver"}},
222 {
"panoc.struclbfgs", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::StructuredLBFGSDirection<config_t>>>,
"PANOC + Structured LBFGS solver"}},
223 {
"panoc.anderson", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::AndersonDirection<config_t>>>,
"PANOC + Anderson acceleration solver"}},
224 {
"panoc.convex-newton", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::ConvexNewtonDirection<config_t>>>,
"PANOC + Newton (for convex problems)"}},
225 {
"zerofpr", {get_results_panoc_like<alpaqa::ZeroFPRSolver<alpaqa::LBFGSDirection<config_t>>>,
"ZeroFPR + LBFGS solver"}},
226 {
"zerofpr.lbfgs", {get_results_panoc_like<alpaqa::ZeroFPRSolver<alpaqa::LBFGSDirection<config_t>>>,
"ZeroFPR + LBFGS solver"}},
227 {
"zerofpr.struclbfgs", {get_results_panoc_like<alpaqa::ZeroFPRSolver<alpaqa::StructuredLBFGSDirection<config_t>>>,
"ZeroFPR + Structured LBFGS solver"}},
228 {
"zerofpr.anderson", {get_results_panoc_like<alpaqa::ZeroFPRSolver<alpaqa::AndersonDirection<config_t>>>,
"ZeroFPR + Anderson acceleration solver"}},
229 {
"zerofpr.convex-newton", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::ConvexNewtonDirection<config_t>>>,
"ZeroFPR + Newton (for convex problems)"}},
230 {
"pantr", {get_results_panoc_like<alpaqa::PANTRSolver<alpaqa::NewtonTRDirection<config_t>>>,
"PANTR solver"}},
231 {
"fista", {get_results_fista_like<alpaqa::FISTASolver<config_t>>,
"FISTA solver"}},
232 {
"ipopt", {alpaqa::params::get_members<void>,
"Ipopt solver"}},
233 {
"qpalm", {alpaqa::params::get_members<void>,
"QPALM solver"}},
238 if (s.
key ==
"method") {
239 auto members = std::views::transform(
methods, [](
const auto &e) {
240 return Result::Member{
243 .suffix = std::nullopt,
249 .members = {members.begin(), members.end()},
256 const auto &m =
methods.at(method);
257 auto result = m.func(s);
258 if (result.members.empty())
259 result = get_members<alpaqa::params::RootOpts>(s);
260 else if (result.prefix.empty())
263 }
catch (std::out_of_range &) {
264 return get_members<alpaqa::params::RootOpts>(s);
270 bool has_value = key.end() != params.end();
274 .value = has_value ? std::make_optional(value) : std::nullopt,
277 if (!result.members.empty()) {
278 std::cout <<
"_prefix:" << result.prefix;
279 if (!result.prefix.empty() && result.prefix.back() !=
'.')
280 std::cout << (result.leaf ?
'=' :
'.');
281 std::cout <<
"\n_suffix:";
286 std::accumulate(result.members.begin(), result.members.end(),
287 size_t{0}, [](
size_t acc,
const auto &m) {
288 return std::max(acc, m.name.size());
290 for (
const auto &member : result.members) {
291 auto name = member.name;
292 std::string padding(max_len - std::min(max_len, name.size()),
' ');
295 std::cout << *member.suffix;
296 std::cout <<
':' << name;
298 auto doc = member.doc->empty() ?
"(undocumented)" : *member.doc;
299 std::cout << padding <<
" -- " << doc <<
" ";