Loading...
Searching...
No Matches
gtsam::DiscreteJunctionTree Class Reference
Solving by multifrontal variable elimination (QR and Cholesky) | Discrete

## Detailed Description

An EliminatableClusterTree, i.e., a set of variable clusters with factors, arranged in a tree, with the additional property that it represents the clique tree associated with a Bayes net.

In GTSAM a junction tree is an intermediate data structure in multifrontal variable elimination. Each node is a cluster of factors, along with a clique of variables that are eliminated all at once. In detail, every node k represents a clique (maximal fully connected subset) of an associated chordal graph, such as a chordal Bayes net resulting from elimination.

The difference with the BayesTree is that a JunctionTree stores factors, whereas a BayesTree stores conditionals, that are the product of eliminating the factors in the corresponding JunctionTree cliques.

The tree structure and elimination method are exactly analogous to the EliminationTree, except that in the JunctionTree, at each node multiple variables are eliminated at a time.

Inheritance diagram for gtsam::DiscreteJunctionTree:

## Public Member Functions

| DiscreteJunctionTree (const DiscreteEliminationTree &eliminationTree)
| Build the elimination tree of a factor graph using precomputed column structure.
Public Member Functions inherited from gtsam::EliminatableClusterTree< BAYESTREE, GRAPH >
std::pair< boost::shared_ptr< BayesTreeType >, boost::shared_ptr< FactorGraphType > > | eliminate (const Eliminate &function) const
| Eliminate the factors to a Bayes tree and remaining factor graph.
const FastVector< sharedFactor > & | remainingFactors () const
| Return the remaining factors that are not pulled into elimination.
Public Member Functions inherited from gtsam::ClusterTree< GRAPH >
| ClusterTree ()
| Default constructor.
void | print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
| Print the cluster tree.
void | addRoot (const boost::shared_ptr< Cluster > &cluster)
void | addChildrenAsRoots (const boost::shared_ptr< Cluster > &cluster)
size_t | nrRoots () const
const FastVector< sharedNode > & | roots () const
| Return the set of roots (one for a tree, multiple for a forest).
const Cluster & | operator[] (size_t i) const

## Public Types

typedef JunctionTree< DiscreteBayesTree, DiscreteFactorGraph > | Base
| Base class.
typedef DiscreteJunctionTree | This
| This class.
typedef boost::shared_ptr< This > | shared_ptr
| Shared pointer to this class.
Public Types inherited from gtsam::JunctionTree< DiscreteBayesTree, DiscreteFactorGraph >
typedef JunctionTree< DiscreteBayesTree, DiscreteFactorGraph > | This
| This class.
typedef boost::shared_ptr< This > | shared_ptr
| Shared pointer to this class.
typedef EliminatableClusterTree< DiscreteBayesTree, DiscreteFactorGraph > | Base
| Our base class.
Public Types inherited from gtsam::EliminatableClusterTree< BAYESTREE, GRAPH >
typedef BAYESTREE | BayesTreeType
| The BayesTree type produced by elimination.
typedef GRAPH | FactorGraphType
| The factor graph type.
typedef EliminatableClusterTree< BAYESTREE, GRAPH > | This
| This class.
typedef boost::shared_ptr< This > | shared_ptr
| Shared pointer to this class.
typedef BAYESTREE::ConditionalType | ConditionalType
| The type of conditionals.
typedef boost::shared_ptr< ConditionalType > | sharedConditional
| Shared pointer to a conditional.
typedef GRAPH::Eliminate | Eliminate
| Typedef for an eliminate subroutine.
typedef GRAPH::FactorType | FactorType
| The type of factors.
typedef boost::shared_ptr< FactorType > | sharedFactor
| Shared pointer to a factor.
Public Types inherited from gtsam::ClusterTree< GRAPH >
typedef GRAPH | FactorGraphType
| The factor graph type.
typedef ClusterTree< GRAPH > | This
| This class.
typedef boost::shared_ptr< This > | shared_ptr
| Shared pointer to this class.
typedef GRAPH::FactorType | FactorType
| The type of factors.
typedef boost::shared_ptr< FactorType > | sharedFactor
| Shared pointer to a factor.
typedef boost::shared_ptr< Cluster > | sharedCluster
| Shared pointer to Cluster.
typedef Cluster | Node
typedef sharedCluster | sharedNode

## Additional Inherited Members

| JunctionTree (const EliminationTree< ETREE_BAYESNET, ETREE_GRAPH > &eliminationTree)
| Build the junction tree from an elimination tree.
Protected Member Functions inherited from gtsam::EliminatableClusterTree< BAYESTREE, GRAPH >
| EliminatableClusterTree (const This &other)
| Copy constructor - makes a deep copy of the tree structure, but only pointers to factors are copied, factors are not cloned.
This & | operator= (const This &other)
| Assignment operator - makes a deep copy of the tree structure, but only pointers to factors are copied, factors are not cloned.
| EliminatableClusterTree ()
| Default constructor to be used in derived classes.
| ClusterTree (const This &other)
| Copy constructor - makes a deep copy of the tree structure, but only pointers to factors are copied, factors are not cloned.
This & | operator= (const This &other)
| Assignment operator - makes a deep copy of the tree structure, but only pointers to factors are copied, factors are not cloned.
static This | FromEliminationTree (const ETREE &eliminationTree)
| Build the junction tree from an elimination tree.
Protected Attributes inherited from gtsam::EliminatableClusterTree< BAYESTREE, GRAPH >
FastVector< sharedFactor > | remainingFactors_
Protected Attributes inherited from gtsam::ClusterTree< GRAPH >
FastVector< sharedNode > | roots_
| concept check

## Constructor & Destructor Documentation

## DiscreteJunctionTree()

gtsam::DiscreteJunctionTree::DiscreteJunctionTree | ( | const DiscreteEliminationTree & | eliminationTree | ) |

Build the elimination tree of a factor graph using precomputed column structure.

Parameters

  factorGraph | The factor graph for which to build the elimination tree
  structure | The set of factors involving each variable. If this is not precomputed, you can call the Create(const FactorGraph<DERIVEDFACTOR>&) named constructor instead.

Returns
  The elimination tree

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

- /build/gtsam-RkN8wG/gtsam-4.2.2+dfsg/gtsam/discrete/DiscreteJunctionTree.h
- /build/gtsam-RkN8wG/gtsam-4.2.2+dfsg/gtsam/discrete/DiscreteJunctionTree.cpp