218 {
"panoc", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::LBFGSDirection<config_t>>>,
"PANOC + LBFGS solver (default)"}},
219 {
"panoc.lbfgs", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::LBFGSDirection<config_t>>>,
"PANOC + LBFGS solver"}},
220 {
"panoc.struclbfgs", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::StructuredLBFGSDirection<config_t>>>,
"PANOC + Structured LBFGS solver"}},
221 {
"panoc.anderson", {get_results_panoc_like<alpaqa::PANOCSolver<alpaqa::AndersonDirection<config_t>>>,
"PANOC + Anderson acceleration solver"}},
222 {
"zerofpr", {get_results_panoc_like<alpaqa::ZeroFPRSolver<alpaqa::LBFGSDirection<config_t>>>,
"ZeroFPR + LBFGS solver"}},
223 {
"zerofpr.lbfgs", {get_results_panoc_like<alpaqa::ZeroFPRSolver<alpaqa::LBFGSDirection<config_t>>>,
"ZeroFPR + LBFGS solver"}},
224 {
"zerofpr.struclbfgs", {get_results_panoc_like<alpaqa::ZeroFPRSolver<alpaqa::StructuredLBFGSDirection<config_t>>>,
"ZeroFPR + Structured LBFGS solver"}},
225 {
"zerofpr.anderson", {get_results_panoc_like<alpaqa::ZeroFPRSolver<alpaqa::AndersonDirection<config_t>>>,
"ZeroFPR + Anderson acceleration solver"}},
226 {
"pantr", {get_results_panoc_like<alpaqa::PANTRSolver<alpaqa::NewtonTRDirection<config_t>>>,
"PANTR solver"}},
227 {
"fista", {get_results_fista_like<alpaqa::FISTASolver<config_t>>,
"FISTA solver"}},
228 {
"ipopt", {alpaqa::params::get_members<void>,
"Ipopt solver"}},
229 {
"qpalm", {alpaqa::params::get_members<void>,
"QPALM solver"}},
234 if (s.
key ==
"method") {
235 auto members = std::views::transform(
methods, [](
const auto &e) {
236 return Result::Member{
239 .suffix = std::nullopt,
245 .members = {members.begin(), members.end()},
252 const auto &m =
methods.at(method);
253 auto result = m.func(s);
254 if (result.members.empty())
255 result = get_members<alpaqa::params::RootOpts>(s);
256 else if (result.prefix.empty())
259 }
catch (std::out_of_range &) {
260 return get_members<alpaqa::params::RootOpts>(s);
266 bool has_value = key.end() != params.end();
270 .value = has_value ? std::make_optional(value) : std::nullopt,
273 if (!result.members.empty()) {
274 std::cout <<
"_prefix:" << result.prefix;
275 if (!result.prefix.empty() && result.prefix.back() !=
'.')
276 std::cout << (result.leaf ?
'=' :
'.');
277 std::cout <<
"\n_suffix:";
282 std::accumulate(result.members.begin(), result.members.end(),
283 size_t{0}, [](
size_t acc,
const auto &m) {
284 return std::max(acc, m.name.size());
286 for (
const auto &member : result.members) {
287 auto name = member.name;
288 std::string padding(max_len - std::min(max_len, name.size()),
' ');
291 std::cout << *member.suffix;
292 std::cout <<
':' << name;
294 auto doc = member.doc->empty() ?
"(undocumented)" : *member.doc;
295 std::cout << padding <<
" -- " << doc <<
" ";