release/4.3a0
Frank Dellaert 2025-01-27 14:51:16 -05:00
parent 16131fe8c9
commit 41fdeb6c04
2 changed files with 17 additions and 15 deletions

View File

@ -20,6 +20,8 @@
namespace gtsam { namespace gtsam {
using Solution = DiscreteSearch::Solution;
/** /**
* @brief Represents a node in the search tree for discrete search algorithms. * @brief Represents a node in the search tree for discrete search algorithms.
* *

View File

@ -24,9 +24,14 @@
namespace gtsam { namespace gtsam {
/** /**
* DiscreteSearch: Search for the K best solutions.
*/
class GTSAM_EXPORT DiscreteSearch {
public:
/**
* @brief A solution to a discrete search problem. * @brief A solution to a discrete search problem.
*/ */
struct Solution { struct Solution {
double error; double error;
DiscreteValues assignment; DiscreteValues assignment;
Solution(double err, const DiscreteValues& assign) Solution(double err, const DiscreteValues& assign)
@ -35,13 +40,8 @@ struct Solution {
os << "[ error=" << sn.error << " assignment={" << sn.assignment << "}]"; os << "[ error=" << sn.error << " assignment={" << sn.assignment << "}]";
return os; return os;
} }
}; };
/**
* DiscreteSearch: Search for the K best solutions.
*/
class DiscreteSearch {
public:
/** /**
* Construct from a DiscreteBayesNet and K. * Construct from a DiscreteBayesNet and K.
*/ */