release/4.3a0
Frank Dellaert 2025-01-28 15:57:56 -05:00
parent 1afb089143
commit 19773153bc
2 changed files with 27 additions and 0 deletions

View File

@ -161,4 +161,6 @@ class GTSAM_EXPORT DiscreteSearch {
double lowerBound_; ///< Lower bound on the cost-to-go for the entire search.
std::vector<Slot> slots_; ///< The slots to fill in the search.
};
using DiscreteSearchSolution = DiscreteSearch::Solution; // for wrapping
} // namespace gtsam

View File

@ -464,4 +464,29 @@ class DiscreteJunctionTree {
const gtsam::DiscreteCluster& operator[](size_t i) const;
};
#include <gtsam/discrete/DiscreteSearch.h>
class DiscreteSearchSolution {
double error;
gtsam::DiscreteValues assignment;
DiscreteSearchSolution(double error, const gtsam::DiscreteValues& assignment);
};
class DiscreteSearch {
static DiscreteSearch FromFactorGraph(const gtsam::DiscreteFactorGraph& factorGraph,
const gtsam::Ordering& ordering,
bool buildJunctionTree = false);
DiscreteSearch(const gtsam::DiscreteEliminationTree& etree);
DiscreteSearch(const gtsam::DiscreteJunctionTree& junctionTree);
DiscreteSearch(const gtsam::DiscreteBayesNet& bayesNet);
DiscreteSearch(const gtsam::DiscreteBayesTree& bayesTree);
void print(string name = "DiscreteSearch: ",
const gtsam::KeyFormatter& formatter = gtsam::DefaultKeyFormatter) const;
double lowerBound() const;
std::vector<gtsam::DiscreteSearchSolution> run(size_t K = 1) const;
};
} // namespace gtsam