21#include <boost/shared_ptr.hpp>
33 template<
class CONDITIONAL>
51 template<
typename ITERATOR>
52 BayesNet(ITERATOR firstConditional, ITERATOR lastConditional) :
Base(firstConditional, lastConditional) {}
62 const std::string& s =
"BayesNet",
63 const KeyFormatter& formatter = DefaultKeyFormatter)
const override;
70 void saveGraph(
const std::string& s,
71 const KeyFormatter& keyFormatter = DefaultKeyFormatter)
const;
76#include <gtsam/inference/BayesNet-inst.h>
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 BayesNet is a tree of conditionals, stored in elimination order.
Definition: BayesNet.h:34
void print(const std::string &s="BayesNet", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print out graph
Definition: BayesNet-inst.h:31
boost::shared_ptr< CONDITIONAL > sharedConditional
A shared pointer to a conditional.
Definition: BayesNet.h:41
BayesNet(ITERATOR firstConditional, ITERATOR lastConditional)
Construct from iterator over conditionals.
Definition: BayesNet.h:52
BayesNet()
Default constructor as an empty BayesNet.
Definition: BayesNet.h:48
A factor graph is a bipartite graph with factor nodes connected to variable nodes.
Definition: FactorGraph.h:93