23 #include <boost/make_shared.hpp> 24 #include <boost/range/adaptor/reversed.hpp> 29 template class FactorGraph<DiscreteConditional>;
44 push_back(boost::make_shared<DiscreteConditional>(s));
52 result *= (*conditional)(
values);
61 conditional->solveInPlace(*result);
70 conditional->sampleInPlace(*result);
DiscreteFactor::sharedValues sample() const
bool equals(const This &bn, double tol=1e-9) const
void add(const Signature &s)
IsDerived< DERIVEDFACTOR > push_back(boost::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
bool equals(const This &fg, double tol=1e-9) const
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
void reverse(const MatrixType &m)
boost::shared_ptr< Values > sharedValues
DiscreteFactor::sharedValues optimize() const
double evaluate(const DiscreteConditional::Values &values) const