24#include <boost/shared_ptr.hpp>
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>;
101 bool equals(
const This& bn,
double tol = 1e-9)
const;
109 template <
typename... Args>
110 void add(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
DiscreteConditional()
Default constructor needed for serialization.
Definition DiscreteConditional.h:55
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition DiscreteKey.h:39
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
BayesNet()
Definition BayesNet.h:48
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&... args)
Emplace a shared pointer to factor of given type.
Definition FactorGraph.h:192
Definition Conditional.h:64
const KeyVector & keys() const
Access the factor's involved variable keys.
Definition Factor.h:140