24#include <boost/shared_ptr.hpp>
31class DiscreteBayesNet;
43 using shared_ptr = boost::shared_ptr<This>;
54 const ADT& potentials)
59 const std::string& s =
"Discrete Lookup Table: ",
60 const KeyFormatter& formatter = DefaultKeyFormatter)
const override;
81 using shared_ptr = boost::shared_ptr<This>;
109 template <
typename... Args>
110 void add(Args&&... args) {
111 emplace_shared<DiscreteLookupTable>(std::forward<Args>(args)...);
130 friend class boost::serialization::access;
131 template <
class ARCHIVE>
132 void serialize(ARCHIVE& ar,
const unsigned int ) {
133 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Base);
Global functions in a separate testing namespace.
Definition chartTesting.h:28
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
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 Bayes net made from discrete conditional distributions.
Definition DiscreteBayesNet.h:38
Discrete Conditional Density Derives from DecisionTreeFactor.
Definition DiscreteConditional.h:40
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition DiscreteKey.h:39
DiscreteLookupTable table for max-product.
Definition DiscreteLookupDAG.h:40
DiscreteLookupTable(size_t nFrontals, const DiscreteKeys &keys, const ADT &potentials)
Construct a new Discrete Lookup Table object.
Definition DiscreteLookupDAG.h:53
A DAG made from lookup tables, as defined above.
Definition DiscreteLookupDAG.h:77
bool equals(const This &bn, double tol=1e-9) const
Check equality.
DiscreteLookupDAG()
Construct empty DAG.
Definition DiscreteLookupDAG.h:87
void add(Args &&... args)
Add a DiscreteLookupTable.
Definition DiscreteLookupDAG.h:110
virtual ~DiscreteLookupDAG()
Destructor.
Definition DiscreteLookupDAG.h:93
A map from keys to values.
Definition DiscreteValues.h:34
A BayesNet is a tree of conditionals, stored in elimination order.
Definition BayesNet.h:35
Definition Conditional.h:64