22#include <boost/shared_ptr.hpp>
37 typedef boost::shared_ptr<This> shared_ptr;
38 typedef boost::shared_ptr<ConditionalType> sharedConditional;
47 template<
typename ITERATOR>
48 DiscreteBayesNet(ITERATOR firstConditional, ITERATOR lastConditional) :
Base(firstConditional, lastConditional) {}
51 template<
class CONTAINER>
55 template<
class DERIVEDCONDITIONAL>
67 bool equals(
const This& bn,
double tol = 1e-9)
const;
86 DiscreteFactor::sharedValues
optimize()
const;
89 DiscreteFactor::sharedValues sample()
const;
95 friend class boost::serialization::access;
96 template<
class ARCHIVE>
97 void serialize(ARCHIVE & ar,
const unsigned int ) {
98 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Base);
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
std::string serialize(const T &input)
serializes to a string
Definition: serialization.h:112
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
Optimize for triangulation.
Definition: triangulation.cpp:73
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
Template to create a binary predicate.
Definition: Testable.h:111
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:151
An assignment from labels to value index (size_t).
Definition: Assignment.h:34
A Bayes net made from linear-Discrete densities.
Definition: DiscreteBayesNet.h:31
DiscreteBayesNet(ITERATOR firstConditional, ITERATOR lastConditional)
Construct from iterator over conditionals.
Definition: DiscreteBayesNet.h:48
DiscreteBayesNet(const FactorGraph< DERIVEDCONDITIONAL > &graph)
Implicit copy/downcast constructor to override explicit template container constructor.
Definition: DiscreteBayesNet.h:56
DiscreteBayesNet(const CONTAINER &conditionals)
Construct from container of factors (shared_ptr or plain objects)
Definition: DiscreteBayesNet.h:52
DiscreteBayesNet()
Construct empty factor graph.
Definition: DiscreteBayesNet.h:44
virtual ~DiscreteBayesNet()
Destructor.
Definition: DiscreteBayesNet.h:59
Discrete Conditional Density Derives from DecisionTreeFactor.
Definition: DiscreteConditional.h:36
Signature for a discrete conditional density, used to construct conditionals.
Definition: Signature.h:52
A BayesNet is a tree of conditionals, stored in elimination order.
Definition: BayesNet.h:34