From 41fdeb6c04908be7b52bc099f734d2221d0fba19 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Mon, 27 Jan 2025 14:51:16 -0500 Subject: [PATCH] Export --- gtsam/discrete/DiscreteSearch.cpp | 2 ++ gtsam/discrete/DiscreteSearch.h | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/gtsam/discrete/DiscreteSearch.cpp b/gtsam/discrete/DiscreteSearch.cpp index d151e7a6f..c5941862d 100644 --- a/gtsam/discrete/DiscreteSearch.cpp +++ b/gtsam/discrete/DiscreteSearch.cpp @@ -20,6 +20,8 @@ namespace gtsam { +using Solution = DiscreteSearch::Solution; + /** * @brief Represents a node in the search tree for discrete search algorithms. * diff --git a/gtsam/discrete/DiscreteSearch.h b/gtsam/discrete/DiscreteSearch.h index 78558a127..6202880b2 100644 --- a/gtsam/discrete/DiscreteSearch.h +++ b/gtsam/discrete/DiscreteSearch.h @@ -23,25 +23,25 @@ namespace gtsam { -/** - * @brief A solution to a discrete search problem. - */ -struct Solution { - double error; - DiscreteValues assignment; - Solution(double err, const DiscreteValues& assign) - : error(err), assignment(assign) {} - friend std::ostream& operator<<(std::ostream& os, const Solution& sn) { - os << "[ error=" << sn.error << " assignment={" << sn.assignment << "}]"; - return os; - } -}; - /** * DiscreteSearch: Search for the K best solutions. */ -class DiscreteSearch { +class GTSAM_EXPORT DiscreteSearch { public: + /** + * @brief A solution to a discrete search problem. + */ + struct Solution { + double error; + DiscreteValues assignment; + Solution(double err, const DiscreteValues& assign) + : error(err), assignment(assign) {} + friend std::ostream& operator<<(std::ostream& os, const Solution& sn) { + os << "[ error=" << sn.error << " assignment={" << sn.assignment << "}]"; + return os; + } + }; + /** * Construct from a DiscreteBayesNet and K. */