proxsuite-nlp  0.11.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
 
Loading...
Searching...
No Matches
fmt-hessian-approx.hpp
Go to the documentation of this file.
1
3#pragma once
4
5#include <fmt/ostream.h>
6#include <fmt/ranges.h>
7
8namespace fmt {
9template <> struct formatter<proxsuite::nlp::HessianApprox> {
10 template <typename ParseContext> constexpr auto parse(ParseContext &ctx) {
11 return ctx.begin();
12 }
13
14 template <typename FormatContext>
15 auto format(const proxsuite::nlp::HessianApprox &hessian_approx,
16 FormatContext &ctx) const {
17 std::string name;
18 switch (hessian_approx) {
20 name = "EXACT";
21 break;
23 name = "GAUSS_NEWTON";
24 break;
26 name = "BFGS";
27 break;
29 name = "IDENTITY";
30 break;
31 }
32 return format_to(ctx.out(), "{}", name);
33 }
34};
35} // namespace fmt
Main package namespace.
Definition bcl-params.hpp:5
@ GAUSS_NEWTON
Gauss-Newton (or rather SCQP) approximation.
@ BFGS
BFGS approximation.
@ EXACT
Exact Hessian construction from provided function Hessians.