From 72f1e5339012636d1b53605360415de0b4521f34 Mon Sep 17 00:00:00 2001 From: Charlie Vanaret Date: Fri, 29 Nov 2024 00:12:20 +0100 Subject: [PATCH] Forgot EvaluationErrors.hpp --- uno/optimization/EvaluationErrors.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/uno/optimization/EvaluationErrors.hpp b/uno/optimization/EvaluationErrors.hpp index e83189cb..ee91d4bf 100644 --- a/uno/optimization/EvaluationErrors.hpp +++ b/uno/optimization/EvaluationErrors.hpp @@ -9,15 +9,21 @@ namespace uno { [[nodiscard]] const char* what() const noexcept override = 0; }; + struct FunctionEvaluationError : EvaluationError { + [[nodiscard]] const char* what() const noexcept override { + return "A numerical error was encountered while evaluating a function\n"; + } + }; + struct GradientEvaluationError : EvaluationError { [[nodiscard]] const char* what() const noexcept override { return "A numerical error was encountered while evaluating a gradient\n"; } }; - struct FunctionEvaluationError : EvaluationError { + struct HessianEvaluationError : EvaluationError { [[nodiscard]] const char* what() const noexcept override { - return "A numerical error was encountered while evaluating a function\n"; + return "A numerical error was encountered while evaluating the Lagrangian Hessian\n"; } }; } // namespace