44class GTSAM_EXPORT HybridBayesTreeClique
46 HybridGaussianFactorGraph> {
48 typedef HybridBayesTreeClique This;
51 typedef std::shared_ptr<This> shared_ptr;
52 typedef std::weak_ptr<This> weak_ptr;
53 HybridBayesTreeClique() {}
68 typedef std::shared_ptr<This> shared_ptr;
76 bool equals(
const This& other,
double tol = 1e-9)
const;
121 void prune(
const size_t maxNumberLeaves);
130#if GTSAM_ENABLE_BOOST_SERIALIZATION
132 friend class boost::serialization::access;
133 template <
class ARCHIVE>
134 void serialize(ARCHIVE& ar,
const unsigned int ) {
135 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
164 std::shared_ptr<CliqueType> clique;
175 this->
keys_.assign(clique->conditional()->beginParents(),
176 clique->conditional()->endParents());
177 this->discreteKeys_.assign(clique->conditional()->discreteKeys().begin(),
178 clique->conditional()->discreteKeys().end());
183 const std::string& s =
"",
185 clique->print(s +
" stored clique ", formatter);
Linearized Hybrid factor graph that uses type erasure.
A Bayes net of Gaussian Conditionals indexed by discrete keys.
Base class for cliques of a BayesTree.
Bayes Tree is a tree of cliques of a Bayes Chain.
Base class for conditional densities.
Gaussian Bayes Tree, the result of eliminating a GaussianJunctionTree.
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
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition Group.h:37
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:152
A Discrete Factor Graph is a factor graph where all factors are Discrete, i.e.
Definition DiscreteFactorGraph.h:100
A map from keys to values.
Definition DiscreteValues.h:34
A clique in a HybridBayesTree which is a HybridConditional internally.
Definition HybridBayesTree.h:46
HybridBayesTreeClique(const std::shared_ptr< HybridConditional > &conditional)
Copy constructor.
Definition HybridBayesTree.h:54
A Bayes tree representing a Hybrid density.
Definition HybridBayesTree.h:62
double error(const HybridValues &values) const
Error for all conditionals.
Definition HybridBayesTree.cpp:180
DiscreteValues mpe() const
Compute the Most Probable Explanation (MPE) of the discrete variables.
Definition HybridBayesTree.cpp:56
void prune(const size_t maxNumberLeaves)
Prune the underlying Bayes tree.
Definition HybridBayesTree.cpp:198
HybridValues optimize() const
Optimize the hybrid Bayes tree by computing the MPE for the current set of discrete variables and usi...
Definition HybridBayesTree.cpp:77
GaussianBayesTree choose(const DiscreteValues &assignment) const
Get the Gaussian Bayes Tree which corresponds to a specific discrete value assignment.
Definition HybridBayesTree.cpp:160
HybridBayesTree()=default
Default constructor, creates an empty Bayes tree.
bool equals(const This &other, double tol=1e-9) const
Check equality.
Definition HybridBayesTree.cpp:41
BayesTreeOrphanWrapper(const std::shared_ptr< CliqueType > &clique)
Construct a new Bayes Tree Orphan Wrapper object.
Definition HybridBayesTree.h:171
void print(const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print utility
Definition HybridBayesTree.h:182
Hybrid Conditional Density.
Definition HybridConditional.h:62
HybridConditional()=default
Default constructor needed for serialization.
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:37
BayesTree()
Definition BayesTree.h:119
BayesTreeCliqueBase()
Definition BayesTreeCliqueBase.h:73
const sharedConditional & conditional() const
Definition BayesTreeCliqueBase.h:140
KeyVector keys_
The keys involved in this factor.
Definition Factor.h:88
A Bayes tree representing a Gaussian density.
Definition GaussianBayesTree.h:53
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:73