44class GTSAM_EXPORT HybridBayesTreeClique
46 HybridGaussianFactorGraph> {
48 typedef HybridBayesTreeClique This;
51 typedef boost::shared_ptr<This> shared_ptr;
52 typedef boost::weak_ptr<This> weak_ptr;
53 HybridBayesTreeClique() {}
59 virtual ~HybridBayesTreeClique() {}
70 typedef boost::shared_ptr<This> shared_ptr;
78 bool equals(
const This& other,
double tol = 1e-9)
const;
112 void prune(
const size_t maxNumberLeaves);
118 friend class boost::serialization::access;
119 template <
class ARCHIVE>
120 void serialize(ARCHIVE& ar,
const unsigned int ) {
121 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
145 boost::shared_ptr<CliqueType> clique;
156 this->
keys_.assign(clique->conditional()->beginParents(),
157 clique->conditional()->endParents());
158 this->discreteKeys_.assign(clique->conditional()->discreteKeys().begin(),
159 clique->conditional()->discreteKeys().end());
164 const std::string& s =
"",
165 const KeyFormatter& formatter = DefaultKeyFormatter)
const override {
166 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
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 concepts.h:30
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
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 boost::shared_ptr< HybridConditional > &conditional)
Copy constructor.
Definition HybridBayesTree.h:54
A Bayes tree representing a Hybrid density.
Definition HybridBayesTree.h:64
void prune(const size_t maxNumberLeaves)
Prune the underlying Bayes tree.
Definition HybridBayesTree.cpp:175
HybridValues optimize() const
Optimize the hybrid Bayes tree by computing the MPE for the current set of discrete variables and usi...
Definition HybridBayesTree.cpp:42
GaussianBayesTree choose(const DiscreteValues &assignment) const
Get the Gaussian Bayes Tree which corresponds to a specific discrete value assignment.
Definition HybridBayesTree.cpp:141
HybridBayesTree()=default
Default constructor, creates an empty Bayes tree.
bool equals(const This &other, double tol=1e-9) const
Check equality.
Definition HybridBayesTree.cpp:37
BayesTreeOrphanWrapper(const boost::shared_ptr< CliqueType > &clique)
Construct a new Bayes Tree Orphan Wrapper object.
Definition HybridBayesTree.h:152
void print(const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print utility
Definition HybridBayesTree.h:163
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:38
BayesTree()
Definition BayesTree.h:109
BayesTreeCliqueBase()
Definition BayesTreeCliqueBase.h:74
const sharedConditional & conditional() const
Definition BayesTreeCliqueBase.h:141
KeyVector keys_
The keys involved in this factor.
Definition Factor.h:85
A Bayes tree representing a Gaussian density.
Definition GaussianBayesTree.h:52
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74