44 using shared_ptr = std::shared_ptr<This>;
55 const ADT& potentials)
72 const std::string& s =
"Discrete Lookup Table: ",
94 using shared_ptr = std::shared_ptr<This>;
111 bool equals(
const This& bn,
double tol = 1e-9)
const;
119 template <
typename... Args>
120 void add(Args&&... args) {
139#if GTSAM_ENABLE_BOOST_SERIALIZATION
141 friend class boost::serialization::access;
142 template <
class ARCHIVE>
143 void serialize(ARCHIVE& ar,
const unsigned int ) {
144 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
Global functions in a separate testing namespace.
Definition chartTesting.h:28
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Definition Key.cpp:30
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:143
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 Group.h:37
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:152
DecisionTreeFactor toDecisionTreeFactor() const override
Convert into a decision tree.
Definition DecisionTreeFactor.h:194
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:41
DiscreteLookupTable(size_t nFrontals, const DiscreteKeys &keys, const ADT &potentials)
Construct a new Discrete Lookup Table object.
Definition DiscreteLookupDAG.h:54
DiscreteLookupTable(size_t nFrontals, const DiscreteKeys &keys, const TableFactor &potentials)
Construct a new Discrete Lookup Table object.
Definition DiscreteLookupDAG.h:65
A DAG made from lookup tables, as defined above.
Definition DiscreteLookupDAG.h:90
bool equals(const This &bn, double tol=1e-9) const
Check equality.
DiscreteLookupDAG()
Construct empty DAG.
Definition DiscreteLookupDAG.h:100
void add(Args &&... args)
Add a DiscreteLookupTable.
Definition DiscreteLookupDAG.h:120
A map from keys to values.
Definition DiscreteValues.h:34
A discrete probabilistic factor optimized for sparsity.
Definition TableFactor.h:51
BayesNet()
Definition BayesNet.h:48
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&... args)
Emplace a shared pointer to factor of given type.
Definition FactorGraph.h:153
Definition Conditional.h:64
const KeyVector & keys() const
Access the factor's involved variable keys.
Definition Factor.h:143