gtsam 4.1.1
gtsam
gtsam::DiscreteMarginals Class Reference

Detailed Description

A class for computing marginals of variables in a DiscreteFactorGraph.

Public Member Functions

 DiscreteMarginals (const DiscreteFactorGraph &graph)
 Construct a marginals class. More...
 
DiscreteFactor::shared_ptr operator() (Key variable) const
 Compute the marginal of a single variable.
 
Vector marginalProbabilities (const DiscreteKey &key) const
 Compute the marginal of a single variable. More...
 

Protected Attributes

DiscreteBayesTree::shared_ptr bayesTree_
 

Constructor & Destructor Documentation

◆ DiscreteMarginals()

gtsam::DiscreteMarginals::DiscreteMarginals ( const DiscreteFactorGraph graph)
inline

Construct a marginals class.

Parameters
graphThe factor graph defining the full joint density on all variables.

Member Function Documentation

◆ marginalProbabilities()

Vector gtsam::DiscreteMarginals::marginalProbabilities ( const DiscreteKey key) const
inline

Compute the marginal of a single variable.

Parameters
keyDiscreteKey of the Variable
Returns
Vector of marginal probabilities

The documentation for this class was generated from the following file: