Go to the documentation of this file.
25 using namespace gtsam;
29 using namespace asia_example;
48 auto solutions = search.
run(3);
59 auto solutions = search.
run(3);
70 auto fromJunctionTree =
76 {fromETree, fromJunctionTree, fromBayesNet, fromBayesTree}) {
78 auto mpe = search.run();
84 auto slots = search.slots();
85 double previousHeuristic = search.lowerBound();
86 for (
auto&& slot : slots) {
87 EXPECT(slot.heuristic <= previousHeuristic);
88 previousHeuristic = slot.heuristic;
99 auto solutions = search.run(4);
static int runAllTests(TestResult &result)
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
static const DiscreteBayesNet bayesNet
Array< double, 1, 3 > e(1./3., 0.5, 2.)
#define EXPECT_LONGS_EQUAL(expected, actual)
Concept check for values that can be used in unit tests.
#define EXPECT(condition)
std::vector< Solution > run(size_t K=1) const
Search for the K best solutions.
DiscreteSearch: Search for the K best solutions.
static const DiscreteBayesTree bayesTree
Eigen::Triplet< double > T
static DiscreteSearch FromFactorGraph(const DiscreteFactorGraph &factorGraph, const Ordering &ordering, bool buildJunctionTree=false)
static const DiscreteFactorGraph factorGraph(bayesNet)
std::shared_ptr< BayesTreeType > eliminateMultifrontal(OptionalOrderingType orderingType={}, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
static const Ordering ordering
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
static const DiscreteValues mpe
#define EXPECT_DOUBLES_EQUAL(expected, actual, threshold)
static enum @1096 ordering
DiscreteBayesNet createAsiaExample()
TEST(SmartFactorBase, Pinhole)
Defines the DiscreteSearch class for discrete search algorithms.
A Bayes tree representing a Discrete distribution.
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
DiscreteValues optimize(OptionalOrderingType orderingType={}) const
Find the maximum probable explanation (MPE) by doing max-product.
gtsam
Author(s):
autogenerated on Wed Mar 19 2025 03:06:33