/** * @file BayesChain * @brief Bayes Chain, the result of eliminating a factor graph * @author Frank Dellaert */ // \callgraph #pragma once #include #include #include #include "Testable.h" namespace gtsam { /** * Bayes Chain, the result of eliminating a factor graph * This is the base class for SymbolicBayesChain, DiscreteBayesChain, and GaussianBayesChain * Corresponding to what is used for the "Conditional" template argument: * a ConditionalProbabilityTable, a ConditionalGaussian, or a SymbolicConditional. */ template class BayesChain: public Testable > { protected: /** nodes keys stored in topological sort order, i.e. from parents to children */ std::list keys_; /** nodes stored on key */ typedef typename std::map > Nodes; Nodes nodes_; typedef typename Nodes::const_iterator const_iterator; public: /** print */ void print(const std::string& s = "") const; /** check equality */ bool equals(const BayesChain& other, double tol = 1e-9) const; }; } /// namespace gtsam