GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Member Functions | Protected Attributes | List of all members
gtsam::DiscreteMarginals Class Reference

#include <DiscreteMarginals.h>

Public Member Functions

 DiscreteMarginals (const DiscreteFactorGraph &graph)
 
DiscreteFactor::shared_ptr operator() (Key variable) const
 
Vector marginalProbabilities (const DiscreteKey &key) const
 

Protected Attributes

DiscreteBayesTree::shared_ptr bayesTree_
 

Detailed Description

A class for computing marginals of variables in a DiscreteFactorGraph

Constructor & Destructor Documentation

◆ DiscreteMarginals()

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

Construct a marginals class.

Parameters
graphThe factor graph defining the full joint distribution 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

◆ operator()()

DiscreteFactor::shared_ptr gtsam::DiscreteMarginals::operator() ( Key  variable) const
inline

Compute the marginal of a single variable


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