gtsam  4.0.0
gtsam
gtsam::SymbolicBayesTree Class Reference

Detailed Description

A Bayes tree that represents the connectivity between variables but is not associated with any probability functions.

+ Inheritance diagram for gtsam::SymbolicBayesTree:

Public Member Functions

 SymbolicBayesTree ()
 Default constructor, creates an empty Bayes tree.
 
bool equals (const This &other, double tol=1e-9) const
 check equality
 
- Public Member Functions inherited from gtsam::BayesTree< SymbolicBayesTreeClique >
size_t size () const
 number of cliques
 
bool empty () const
 Check if there are any cliques in the tree.
 
const Nodesnodes () const
 return nodes
 
const sharedNode operator[] (Key j) const
 Access node by variable.
 
const Rootsroots () const
 return root cliques
 
const sharedCliqueclique (Key j) const
 alternate syntax for matlab: find the clique that contains the variable with Key j
 
BayesTreeCliqueData getCliqueData () const
 Gather data on all cliques.
 
size_t numCachedSeparatorMarginals () const
 Collect number of cliques with cached separator marginals.
 
sharedConditional marginalFactor (Key j, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
 Return marginal on any variable. More...
 
sharedFactorGraph joint (Key j1, Key j2, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
 return joint on two variables Limitation: can only calculate joint if cliques are disjoint or one of them is root
 
sharedBayesNet jointBayesNet (Key j1, Key j2, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
 return joint on two variables as a BayesNet Limitation: can only calculate joint if cliques are disjoint or one of them is root
 
void saveGraph (const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
 Read only with side effects. More...
 
Key findParentClique (const CONTAINER &parents) const
 Find parent clique of a conditional. More...
 
void clear ()
 Remove all nodes.
 
void deleteCachedShortcuts ()
 Clear all shortcut caches - use before timing on marginal calculation to avoid residual cache data.
 
void removePath (sharedClique clique, BayesNetType &bn, Cliques &orphans)
 Remove path from clique to root and return that path as factors plus a list of orphaned subtree roots. More...
 
void removeTop (const KeyVector &keys, BayesNetType &bn, Cliques &orphans)
 Given a list of indices, turn "contaminated" part of the tree back into a factor graph. More...
 
Cliques removeSubtree (const sharedClique &subtree)
 Remove the requested subtree. More...
 
void insertRoot (const sharedClique &subtree)
 Insert a new subtree with known parent clique. More...
 
void addClique (const sharedClique &clique, const sharedClique &parent_clique=sharedClique())
 add a clique (top down)
 
void addFactorsToGraph (FactorGraph< FactorType > &graph) const
 Add all cliques in this BayesTree to the specified factor graph.
 
void print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
 print
 

Public Types

typedef SymbolicBayesTree This
 
typedef boost::shared_ptr< Thisshared_ptr
 
- Public Types inherited from gtsam::BayesTree< SymbolicBayesTreeClique >
typedef SymbolicBayesTreeClique Clique
 The clique type, normally BayesTreeClique.
 
typedef boost::shared_ptr< CliquesharedClique
 Shared pointer to a clique.
 
typedef Clique Node
 Synonym for Clique (TODO: remove)
 
typedef sharedClique sharedNode
 Synonym for sharedClique (TODO: remove)
 
typedef SymbolicBayesTreeClique ::ConditionalType ConditionalType
 
typedef boost::shared_ptr< ConditionalType > sharedConditional
 
typedef SymbolicBayesTreeClique ::BayesNetType BayesNetType
 
typedef boost::shared_ptr< BayesNetType > sharedBayesNet
 
typedef SymbolicBayesTreeClique ::FactorType FactorType
 
typedef boost::shared_ptr< FactorType > sharedFactor
 
typedef SymbolicBayesTreeClique ::FactorGraphType FactorGraphType
 
typedef boost::shared_ptr< FactorGraphType > sharedFactorGraph
 
typedef FactorGraphType::Eliminate Eliminate
 
typedef SymbolicBayesTreeClique ::EliminationTraitsType EliminationTraitsType
 
typedef FastList< sharedCliqueCliques
 A convenience class for a list of shared cliques.
 
typedef ConcurrentMap< Key, sharedCliqueNodes
 Map from keys to Clique.
 

Friends

class boost::serialization::access
 Serialization function.
 

Additional Inherited Members

- Protected Types inherited from gtsam::BayesTree< SymbolicBayesTreeClique >
typedef BayesTree< SymbolicBayesTreeCliqueThis
 
typedef boost::shared_ptr< Thisshared_ptr
 
typedef FastVector< sharedCliqueRoots
 Root cliques.
 
- Protected Member Functions inherited from gtsam::BayesTree< SymbolicBayesTreeClique >
Thisoperator= (const This &other)
 Assignment operator.
 
 BayesTree ()
 Create an empty Bayes Tree.
 
 BayesTree (const This &other)
 Copy constructor.
 
void getCliqueData (BayesTreeCliqueData &stats, sharedClique clique) const
 Gather data on a single clique.
 
void saveGraph (std::ostream &s, sharedClique clique, const KeyFormatter &keyFormatter, int parentnum=0) const
 private helper method for saving the Tree to a text file in GraphViz format
 
void removeClique (sharedClique clique)
 remove a clique: warning, can result in a forest
 
void fillNodesIndex (const sharedClique &subtree)
 Fill the nodes index for a subtree.
 
bool equals (const This &other, double tol=1e-9) const
 check equality
 
- Protected Attributes inherited from gtsam::BayesTree< SymbolicBayesTreeClique >
Nodes nodes_
 Map from indices to Clique.
 
Roots roots_
 Root cliques.
 

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