52 return marginalFactor;
65 Vector vResult(key.second);
66 for (
size_t state = 0; state < key.second ; ++ state) {
68 values[key.first] = state;
69 vResult(state) = (*marginalFactor)(
values);
Vector marginalProbabilities(const DiscreteKey &key) const
boost::shared_ptr< BayesTreeType > eliminateMultifrontal(OptionalOrderingType orderingType=boost::none, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex=boost::none) const
NonlinearFactorGraph graph
std::pair< Key, size_t > DiscreteKey
DiscreteMarginals(const DiscreteFactorGraph &graph)
Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree.
std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > EliminateDiscrete(const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
boost::shared_ptr< DiscreteFactor > shared_ptr
shared_ptr to this class
typedef and functions to augment Eigen's VectorXd
boost::shared_ptr< This > shared_ptr
std::uint64_t Key
Integer nonlinear key type.
DiscreteFactor::shared_ptr operator()(Key variable) const
DiscreteBayesTree::shared_ptr bayesTree_