Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
gtsam::ClusterTree< GRAPH > Class Template Reference

#include <ClusterTree.h>

Classes

struct  Cluster
 A Cluster is just a collection of factors. More...
 

Public Types

typedef GRAPH FactorGraphType
 The factor graph type. More...
 
typedef GRAPH::FactorType FactorType
 The type of factors. More...
 
typedef Cluster Node
 
typedef std::shared_ptr< Thisshared_ptr
 Shared pointer to this class. More...
 
typedef std::shared_ptr< ClustersharedCluster
 Shared pointer to Cluster. More...
 
typedef std::shared_ptr< FactorTypesharedFactor
 Shared pointer to a factor. More...
 
typedef sharedCluster sharedNode
 
typedef ClusterTree< GRAPH > This
 This class. More...
 

Public Member Functions

 ClusterTree ()
 Default constructor. More...
 
 ~ClusterTree ()
 

Protected Attributes

FastVector< sharedNoderoots_
 

Standard Constructors

 ClusterTree (const This &other)
 

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 Clusteroperator[] (size_t i) const
 

Details

Thisoperator= (const This &other)
 

Detailed Description

template<class GRAPH>
class gtsam::ClusterTree< 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 $.

Definition at line 25 of file ClusterTree.h.

Member Typedef Documentation

◆ FactorGraphType

template<class GRAPH >
typedef GRAPH gtsam::ClusterTree< GRAPH >::FactorGraphType

The factor graph type.

Definition at line 27 of file ClusterTree.h.

◆ FactorType

template<class GRAPH >
typedef GRAPH::FactorType gtsam::ClusterTree< GRAPH >::FactorType

The type of factors.

Definition at line 31 of file ClusterTree.h.

◆ Node

template<class GRAPH >
typedef Cluster gtsam::ClusterTree< GRAPH >::Node

Definition at line 109 of file ClusterTree.h.

◆ shared_ptr

template<class GRAPH >
typedef std::shared_ptr<This> gtsam::ClusterTree< GRAPH >::shared_ptr

Shared pointer to this class.

Definition at line 29 of file ClusterTree.h.

◆ sharedCluster

template<class GRAPH >
typedef std::shared_ptr<Cluster> gtsam::ClusterTree< GRAPH >::sharedCluster

Shared pointer to Cluster.

Definition at line 106 of file ClusterTree.h.

◆ sharedFactor

template<class GRAPH >
typedef std::shared_ptr<FactorType> gtsam::ClusterTree< GRAPH >::sharedFactor

Shared pointer to a factor.

Definition at line 32 of file ClusterTree.h.

◆ sharedNode

template<class GRAPH >
typedef sharedCluster gtsam::ClusterTree< GRAPH >::sharedNode

Definition at line 110 of file ClusterTree.h.

◆ This

template<class GRAPH >
typedef ClusterTree<GRAPH> gtsam::ClusterTree< GRAPH >::This

This class.

Definition at line 28 of file ClusterTree.h.

Constructor & Destructor Documentation

◆ ClusterTree() [1/2]

template<class GRAPH >
gtsam::ClusterTree< 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.

Definition at line 123 of file ClusterTree.h.

◆ ClusterTree() [2/2]

template<class GRAPH >
gtsam::ClusterTree< GRAPH >::ClusterTree ( )
inline

Default constructor.

Definition at line 132 of file ClusterTree.h.

◆ ~ClusterTree()

template<class GRAPH >
gtsam::ClusterTree< GRAPH >::~ClusterTree

Definition at line 111 of file ClusterTree-inst.h.

Member Function Documentation

◆ addChildrenAsRoots()

template<class GRAPH >
void gtsam::ClusterTree< GRAPH >::addChildrenAsRoots ( const std::shared_ptr< Cluster > &  cluster)
inline

Definition at line 149 of file ClusterTree.h.

◆ addRoot()

template<class GRAPH >
void gtsam::ClusterTree< GRAPH >::addRoot ( const std::shared_ptr< Cluster > &  cluster)
inline

Definition at line 145 of file ClusterTree.h.

◆ nrRoots()

template<class GRAPH >
size_t gtsam::ClusterTree< GRAPH >::nrRoots ( ) const
inline

Definition at line 154 of file ClusterTree.h.

◆ operator=()

template<class GRAPH >
ClusterTree< GRAPH > & gtsam::ClusterTree< 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.

Definition at line 140 of file ClusterTree-inst.h.

◆ operator[]()

template<class GRAPH >
const Cluster& gtsam::ClusterTree< GRAPH >::operator[] ( size_t  i) const
inline

Definition at line 163 of file ClusterTree.h.

◆ print()

template<class GRAPH >
void gtsam::ClusterTree< GRAPH >::print ( const std::string &  s = "",
const KeyFormatter keyFormatter = DefaultKeyFormatter 
) const

Print the cluster tree

Definition at line 99 of file ClusterTree-inst.h.

◆ roots()

template<class GRAPH >
const FastVector<sharedNode>& gtsam::ClusterTree< GRAPH >::roots ( ) const
inline

Return the set of roots (one for a tree, multiple for a forest)

Definition at line 159 of file ClusterTree.h.

Member Data Documentation

◆ roots_

template<class GRAPH >
FastVector<sharedNode> gtsam::ClusterTree< GRAPH >::roots_
protected

concept check

Definition at line 116 of file ClusterTree.h.


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


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:15:19