Loading...
Searching...
No Matches
gtsam::DiscreteMarginals Class Reference
Discrete

## Detailed Description

A class for computing marginals of variables in a DiscreteFactorGraph.

## Public Member Functions

| DiscreteMarginals (const DiscreteFactorGraph &graph)
| Construct a marginals class.
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.

## Protected Attributes

DiscreteBayesTree::shared_ptr | bayesTree_

## Constructor & Destructor Documentation

## DiscreteMarginals()

gtsam::DiscreteMarginals::DiscreteMarginals | ( | const DiscreteFactorGraph & | graph | ) |

inline

Construct a marginals class.

Parameters

  graph | The 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

  key | DiscreteKey of the Variable

Returns
  Vector of marginal probabilities

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

- /build/gtsam-RkN8wG/gtsam-4.2.2+dfsg/gtsam/discrete/DiscreteMarginals.h