From d78edb4ff7a168bae37c593ea42edaf01e1d517d Mon Sep 17 00:00:00 2001 From: Michael McLeod Date: Thu, 25 Jul 2024 11:08:25 +0100 Subject: [PATCH] MSSL compilation fixes --- cpp/sopt/config.in.h | 1 + cpp/sopt/relative_variation.h | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cpp/sopt/config.in.h b/cpp/sopt/config.in.h index d7f8ff047..ae35b655b 100644 --- a/cpp/sopt/config.in.h +++ b/cpp/sopt/config.in.h @@ -24,6 +24,7 @@ #include #include +#include namespace sopt { diff --git a/cpp/sopt/relative_variation.h b/cpp/sopt/relative_variation.h index 0f9a15029..6dd7a3b38 100644 --- a/cpp/sopt/relative_variation.h +++ b/cpp/sopt/relative_variation.h @@ -40,7 +40,7 @@ class RelativeVariation { } //! Name that gets interpolated into the log's output std::string const &name() const { return name_; } - RelativeVariation const &name(std::string const &name) const { + RelativeVariation const &name(std::string const &name) { name_ = name; return *this; } @@ -78,21 +78,21 @@ class ScalarRelativeVariation { //! Allowed variation Real relative_tolerance() const { return relative_tolerance_; } //! Allowed variation - RelativeVariation &relative_tolerance(Real &e) const { + RelativeVariation &relative_tolerance(Real &e) { relative_tolerance_ = e; return *this; } //! Allowed variation Real absolute_tolerance() const { return relative_tolerance_; } //! Allowed variation - RelativeVariation &absolute_tolerance(Real &e) const { + RelativeVariation &absolute_tolerance(Real &e) { absolute_tolerance_ = e; return *this; } //! Name that gets interpolated into the log's output std::string const &name() const { return name_; } - ScalarRelativeVariation const &name(std::string const &name) const { + ScalarRelativeVariation const &name(std::string const &name) { name_ = name; return *this; } @@ -116,7 +116,7 @@ bool RelativeVariation::operator()(Eigen::ArrayBase const &input) { } auto const norm = (input - previous_).matrix().squaredNorm(); previous_ = input; - SOPT_LOW_LOG(" - {} relative variation: {}