gtsam  3.2.1
gtsam
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gtsam::ClusterTree< BAYESTREE, GRAPH > Class Template Reference

Detailed Description

template<class BAYESTREE, class GRAPH>
class gtsam::ClusterTree< BAYESTREE, GRAPH >

A cluster-tree is associated with a factor graph and is defined as in Koller-Friedman: each node k represents a subset \( C_k \sub X \), and the tree is family preserving, in that each factor \( f_i \) is associated with a single cluster and \( scope(f_i) \sub C_k \).

+ Inheritance diagram for gtsam::ClusterTree< BAYESTREE, GRAPH >:

Standard Constructors

 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. More...
 

Testable

void print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
 Print the cluster tree.
 

Standard Interface

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. More...
 

Advanced Interface

const FastVector< sharedNode > & roots () const
 Return the set of roots (one for a tree, multiple for a forest)
 
const FastVector< sharedFactor > & remainingFactors () const
 Return the remaining factors that are not pulled into elimination.
 

Details

Thisoperator= (const This &other)
 Assignment operator - makes a deep copy of the tree structure, but only pointers to factors are copied, factors are not cloned. More...
 
 ClusterTree ()
 Default constructor to be used in derived classes.
 

Public Member Functions

 GTSAM_CONCEPT_TESTABLE_TYPE (FactorType)
 concept check
 

Public Types

typedef GRAPH FactorGraphType
 The factor graph type.
 
typedef GRAPH::FactorType FactorType
 The type of factors.
 
typedef ClusterTree< BAYESTREE,
GRAPH > 
This
 This class.
 
typedef boost::shared_ptr< Thisshared_ptr
 Shared pointer to this class.
 
typedef boost::shared_ptr
< FactorType
sharedFactor
 Shared pointer to a factor.
 
typedef BAYESTREE BayesTreeType
 The BayesTree type produced by elimination.
 
typedef
BayesTreeType::ConditionalType 
ConditionalType
 The type of conditionals.
 
typedef boost::shared_ptr
< ConditionalType
sharedConditional
 Shared pointer to a conditional.
 
typedef FactorGraphType::Eliminate Eliminate
 Typedef for an eliminate subroutine.
 
typedef boost::shared_ptr
< Cluster
sharedCluster
 Shared pointer to Cluster.
 
typedef Cluster Node
 Define Node=Cluster for compatibility with tree traversal functions.
 
typedef sharedCluster sharedNode
 Define Node=Cluster for compatibility with tree traversal functions.
 

Classes

struct  Cluster
 

Protected Attributes

FastVector< sharedNoderoots_
 
FastVector< sharedFactorremainingFactors_
 

Constructor & Destructor Documentation

template<class BAYESTREE, class GRAPH>
gtsam::ClusterTree< BAYESTREE, GRAPH >::ClusterTree ( const This other)
inlineprotected

Copy constructor - makes a deep copy of the tree structure, but only pointers to factors are copied, factors are not cloned.

Member Function Documentation

template<class BAYESTREE , class GRAPH >
std::pair< boost::shared_ptr< BAYESTREE >, boost::shared_ptr< GRAPH > > gtsam::ClusterTree< BAYESTREE, GRAPH >::eliminate ( const Eliminate function) const

Eliminate the factors to a Bayes tree and remaining factor graph.

Parameters
functionThe function to use to eliminate, see the namespace functions in GaussianFactorGraph.h
Returns
The Bayes tree and factor graph resulting from elimination
template<class BAYESTREE , class GRAPH >
ClusterTree< BAYESTREE, GRAPH > & gtsam::ClusterTree< BAYESTREE, GRAPH >::operator= ( const This other)
protected

Assignment operator - makes a deep copy of the tree structure, but only pointers to factors are copied, factors are not cloned.


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