GTSAM
4.0.2
C++ library for smoothing and mapping (SAM)
|
#include <HybridJunctionTree.h>
Public Types | |
typedef JunctionTree< HybridBayesTree, HybridGaussianFactorGraph > | Base |
Base class. | |
typedef HybridJunctionTree | This |
This class. | |
typedef std::shared_ptr< This > | shared_ptr |
Shared pointer to this class. | |
typedef HybridBayesTree | BayesTreeType |
The BayesTree type produced by elimination. | |
typedef HybridGaussianFactorGraph | FactorGraphType |
The factor graph type. | |
typedef HybridBayesTree ::ConditionalType | ConditionalType |
The type of conditionals. | |
typedef std::shared_ptr< ConditionalType > | sharedConditional |
Shared pointer to a conditional. | |
typedef HybridGaussianFactorGraph ::Eliminate | Eliminate |
Typedef for an eliminate subroutine. | |
typedef HybridGaussianFactorGraph ::FactorType | FactorType |
The type of factors. | |
typedef std::shared_ptr< FactorType > | sharedFactor |
Shared pointer to a factor. | |
typedef std::shared_ptr< Cluster > | sharedCluster |
Shared pointer to Cluster. | |
typedef Cluster | Node |
typedef sharedCluster | sharedNode |
Public Member Functions | |
HybridJunctionTree (const HybridEliminationTree &eliminationTree) | |
Protected Attributes | |
FastVector< sharedFactor > | remainingFactors_ |
FastVector< sharedNode > | roots_ |
Testable | |
void | print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
Advanced Interface | |
void | addRoot (const std::shared_ptr< Cluster > &cluster) |
void | addChildrenAsRoots (const std::shared_ptr< Cluster > &cluster) |
size_t | nrRoots () const |
const FastVector< sharedNode > & | roots () const |
const Cluster & | operator[] (size_t i) const |
Standard Interface | |
std::pair< std::shared_ptr< BayesTreeType >, std::shared_ptr< FactorGraphType > > | eliminate (const Eliminate &function) const |
Advanced Interface | |
const FastVector< sharedFactor > & | remainingFactors () const |
Standard Constructors | |
static This | FromEliminationTree (const ETREE &eliminationTree) |
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.
gtsam::HybridJunctionTree::HybridJunctionTree | ( | const HybridEliminationTree & | eliminationTree | ) |
Build the elimination tree of a factor graph using precomputed column structure.
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. |
|
inherited |
Eliminate the factors to a Bayes tree and remaining factor graph
function | The function to use to eliminate, see the namespace functions in GaussianFactorGraph.h |
|
inlinestaticprotectedinherited |
Build the junction tree from an elimination tree.
|
inherited |
Print the cluster tree
|
inlineinherited |
Return the remaining factors that are not pulled into elimination
|
inlineinherited |
Return the set of roots (one for a tree, multiple for a forest)
|
protectedinherited |
concept check