Public Member Functions | Protected Attributes | List of all members
gtsam::DiscreteMarginals Class Reference

#include <DiscreteMarginals.h>

Public Member Functions

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

Protected Attributes

DiscreteBayesTree::shared_ptr bayesTree_
 

Detailed Description

A class for computing marginals of variables in a DiscreteFactorGraph

Definition at line 33 of file DiscreteMarginals.h.

Constructor & Destructor Documentation

◆ DiscreteMarginals() [1/2]

gtsam::DiscreteMarginals::DiscreteMarginals ( )
inline

Definition at line 41 of file DiscreteMarginals.h.

◆ DiscreteMarginals() [2/2]

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

Construct a marginals class.

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

Definition at line 46 of file DiscreteMarginals.h.

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

Definition at line 62 of file DiscreteMarginals.h.

◆ operator()()

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

Compute the marginal of a single variable

Definition at line 51 of file DiscreteMarginals.h.

Member Data Documentation

◆ bayesTree_

DiscreteBayesTree::shared_ptr gtsam::DiscreteMarginals::bayesTree_
protected

Definition at line 37 of file DiscreteMarginals.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:46:17