34class GTSAM_EXPORT DiscreteMarginals {
36 DiscreteBayesTree::shared_ptr bayesTree_;
39 DiscreteMarginals() {}
57 void print(
const std::string& s =
"",
typedef and functions to augment Eigen's VectorXd
Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree.
std::pair< Key, size_t > DiscreteKey
Key type for discrete variables.
Definition DiscreteKey.h:38
Global functions in a separate testing namespace.
Definition chartTesting.h:28
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Definition Key.cpp:30
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition Key.h:35
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:43
std::shared_ptr< DiscreteFactor > shared_ptr
shared_ptr to this class
Definition DiscreteFactor.h:46
A Discrete Factor Graph is a factor graph where all factors are Discrete, i.e.
Definition DiscreteFactorGraph.h:100
Vector marginalProbabilities(const DiscreteKey &key) const
Compute the marginal of a single variable.
Definition DiscreteMarginals.cpp:40
DiscreteFactor::shared_ptr operator()(Key variable) const
Compute the marginal of a single variable.
Definition DiscreteMarginals.cpp:32
void print(const std::string &s="", const KeyFormatter formatter=DefaultKeyFormatter) const
Print details.
Definition DiscreteMarginals.cpp:55