alpaqa 0.0.1
Nonconvex constrained optimization
solverstatus.cpp
Go to the documentation of this file.
2
3#include <ostream>
4#include <stdexcept>
5
6namespace alpaqa {
7
8const char *enum_name(SolverStatus s) {
9 using Status = SolverStatus;
10 switch (s) {
11 case Status::Unknown: return "Unknown";
12 case Status::Converged: return "Converged";
13 case Status::MaxTime: return "MaxTime";
14 case Status::MaxIter: return "MaxIter";
15 case Status::NotFinite: return "NotFinite";
16 case Status::NoProgress: return "NoProgress";
17 case Status::Interrupted: return "Interrupted";
18 }
19 throw std::out_of_range("invalid value for alpaqa::SolverStatus");
20}
21
22std::ostream &operator<<(std::ostream &os, SolverStatus s) {
23 return os << enum_name(s);
24}
25
26} // namespace alpaqa
SolverStatus
Exit status of a numerical solver such as ALM or PANOC.
Definition: solverstatus.hpp:7
const char * enum_name(PANOCStopCrit s)
std::ostream & operator<<(std::ostream &os, PANOCStopCrit s)