Public Types | Private Types | List of all members
gtsam::HybridBayesTree Class Reference

#include <HybridBayesTree.h>

Inheritance diagram for gtsam::HybridBayesTree:
Inheritance graph
[legend]

Public Types

typedef std::shared_ptr< Thisshared_ptr
 
typedef HybridBayesTree This
 
- Public Types inherited from gtsam::BayesTree< HybridBayesTreeClique >
typedef HybridBayesTreeClique ::BayesNetType BayesNetType
 
typedef HybridBayesTreeClique Clique
 The clique type, normally BayesTreeClique. More...
 
typedef FastList< sharedCliqueCliques
 
typedef HybridBayesTreeClique ::ConditionalType ConditionalType
 
typedef FactorGraphType::Eliminate Eliminate
 
typedef HybridBayesTreeClique ::EliminationTraitsType EliminationTraitsType
 
typedef HybridBayesTreeClique ::FactorGraphType FactorGraphType
 
typedef HybridBayesTreeClique ::FactorType FactorType
 
typedef Clique Node
 Synonym for Clique (TODO: remove) More...
 
typedef ConcurrentMap< Key, sharedCliqueNodes
 
typedef FastVector< sharedCliqueRoots
 
typedef std::shared_ptr< BayesNetTypesharedBayesNet
 
typedef std::shared_ptr< CliquesharedClique
 Shared pointer to a clique. More...
 
typedef std::shared_ptr< ConditionalTypesharedConditional
 
typedef std::shared_ptr< FactorTypesharedFactor
 
typedef std::shared_ptr< FactorGraphTypesharedFactorGraph
 
typedef sharedClique sharedNode
 Synonym for sharedClique (TODO: remove) More...
 

Public Member Functions

Standard interface
 HybridBayesTree ()=default
 
bool equals (const This &other, double tol=1e-9) const
 
GaussianBayesTree choose (const DiscreteValues &assignment) const
 Get the Gaussian Bayes Tree which corresponds to a specific discrete value assignment. More...
 
double error (const HybridValues &values) const
 
HybridValues optimize () const
 Optimize the hybrid Bayes tree by computing the MPE for the current set of discrete variables and using it to compute the best continuous update delta. More...
 
VectorValues optimize (const DiscreteValues &assignment) const
 Recursively optimize the BayesTree to produce a vector solution. More...
 
void prune (const size_t maxNumberLeaves)
 Prune the underlying Bayes tree. More...
 
- Public Member Functions inherited from gtsam::BayesTree< HybridBayesTreeClique >
size_t size () const
 
bool empty () const
 
const Nodesnodes () const
 
sharedClique operator[] (Key j) const
 
const Rootsroots () const
 
const sharedCliqueclique (Key j) const
 
BayesTreeCliqueData getCliqueData () const
 
size_t numCachedSeparatorMarginals () const
 
sharedConditional marginalFactor (Key j, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
 
sharedFactorGraph joint (Key j1, Key j2, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
 
sharedBayesNet jointBayesNet (Key j1, Key j2, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
 
void dot (std::ostream &os, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
 Output to graphviz format, stream version. More...
 
std::string dot (const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
 Output to graphviz format string. More...
 
void saveGraph (const std::string &filename, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
 output to file with graphviz format. More...
 
Key findParentClique (const CONTAINER &parents) const
 
void clear ()
 
void deleteCachedShortcuts ()
 
void removePath (sharedClique clique, BayesNetType *bn, Cliques *orphans)
 
void removeTop (const KeyVector &keys, BayesNetType *bn, Cliques *orphans)
 
Cliques removeSubtree (const sharedClique &subtree)
 
void insertRoot (const sharedClique &subtree)
 
void addClique (const sharedClique &clique, const sharedClique &parent_clique=sharedClique())
 
void addFactorsToGraph (FactorGraph< FactorType > *graph) const
 
void print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
 

Private Types

typedef BayesTree< HybridBayesTreeCliqueBase
 

Additional Inherited Members

- Protected Types inherited from gtsam::BayesTree< HybridBayesTreeClique >
typedef std::shared_ptr< Thisshared_ptr
 
typedef BayesTree< HybridBayesTreeCliqueThis
 
- Protected Member Functions inherited from gtsam::BayesTree< HybridBayesTreeClique >
Thisoperator= (const This &other)
 
 ~BayesTree ()
 
 BayesTree ()
 
 BayesTree (const This &other)
 
void getCliqueData (sharedClique clique, BayesTreeCliqueData *stats) const
 
void dot (std::ostream &s, sharedClique clique, const KeyFormatter &keyFormatter, int parentnum=0) const
 
void removeClique (sharedClique clique)
 
void fillNodesIndex (const sharedClique &subtree)
 
bool equals (const This &other, double tol=1e-9) const
 
- Protected Attributes inherited from gtsam::BayesTree< HybridBayesTreeClique >
Nodes nodes_
 
Roots roots_
 

Detailed Description

A Bayes tree representing a Hybrid density

Definition at line 62 of file HybridBayesTree.h.

Member Typedef Documentation

◆ Base

Definition at line 64 of file HybridBayesTree.h.

◆ shared_ptr

typedef std::shared_ptr<This> gtsam::HybridBayesTree::shared_ptr

Definition at line 68 of file HybridBayesTree.h.

◆ This

Definition at line 67 of file HybridBayesTree.h.

Constructor & Destructor Documentation

◆ HybridBayesTree()

gtsam::HybridBayesTree::HybridBayesTree ( )
default

Default constructor, creates an empty Bayes tree

Member Function Documentation

◆ choose()

GaussianBayesTree gtsam::HybridBayesTree::choose ( const DiscreteValues assignment) const

Get the Gaussian Bayes Tree which corresponds to a specific discrete value assignment.

Parameters
assignmentThe discrete value assignment for the discrete keys.
Returns
GaussianBayesTree

Definition at line 143 of file HybridBayesTree.cpp.

◆ equals()

bool gtsam::HybridBayesTree::equals ( const This other,
double  tol = 1e-9 
) const

Check equality

Definition at line 40 of file HybridBayesTree.cpp.

◆ error()

double gtsam::HybridBayesTree::error ( const HybridValues values) const

Error for all conditionals.

Definition at line 163 of file HybridBayesTree.cpp.

◆ optimize() [1/2]

HybridValues gtsam::HybridBayesTree::optimize ( ) const

Optimize the hybrid Bayes tree by computing the MPE for the current set of discrete variables and using it to compute the best continuous update delta.

Returns
HybridValues

Definition at line 45 of file HybridBayesTree.cpp.

◆ optimize() [2/2]

VectorValues gtsam::HybridBayesTree::optimize ( const DiscreteValues assignment) const

Recursively optimize the BayesTree to produce a vector solution.

Parameters
assignmentThe discrete values assignment to select the hybrid conditional.
Returns
VectorValues

Definition at line 168 of file HybridBayesTree.cpp.

◆ prune()

void gtsam::HybridBayesTree::prune ( const size_t  maxNumberLeaves)

Prune the underlying Bayes tree.

Parameters
maxNumberLeavesThe max number of leaf nodes to keep.

Helper struct for pruning the hybrid bayes tree.

The discrete decision tree after pruning.

A function used during tree traversal that operates on each node before visiting the node's children.

Parameters
nodeThe current node being visited.
parentDataThe data from the parent node.
Returns
HybridPrunerData which is passed to the children.

Definition at line 181 of file HybridBayesTree.cpp.


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


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:23:54