GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
gtsam::SymbolicEliminationTree Class Reference
Inheritance diagram for gtsam::SymbolicEliminationTree:
Inheritance graph
[legend]
Collaboration diagram for gtsam::SymbolicEliminationTree:
Collaboration graph
[legend]

Public Types

typedef EliminationTree< SymbolicBayesNet, SymbolicFactorGraphBase
 Base class.
 
typedef SymbolicEliminationTree This
 This class.
 
typedef std::shared_ptr< Thisshared_ptr
 Shared pointer to this class.
 
typedef SymbolicFactorGraph FactorGraphType
 The factor graph type.
 
typedef SymbolicFactorGraph ::FactorType FactorType
 The type of factors.
 
typedef std::shared_ptr< FactorTypesharedFactor
 Shared pointer to a factor.
 
typedef SymbolicBayesNet BayesNetType
 The BayesNet corresponding to FACTOR.
 
typedef BayesNetType::ConditionalType ConditionalType
 The type of conditionals.
 
typedef std::shared_ptr< ConditionalTypesharedConditional
 Shared pointer to a conditional.
 
typedef SymbolicFactorGraph ::Eliminate Eliminate
 
typedef std::shared_ptr< Node > sharedNode
 Shared pointer to Node.
 

Public Member Functions

 SymbolicEliminationTree (const SymbolicFactorGraph &factorGraph, const VariableIndex &structure, const Ordering &order)
 
 SymbolicEliminationTree (const SymbolicFactorGraph &factorGraph, const Ordering &order)
 
bool equals (const This &other, double tol=1e-9) const
 
Standard Interface
std::pair< std::shared_ptr< BayesNetType >, std::shared_ptr< FactorGraphType > > eliminate (Eliminate function) const
 
Advanced Interface
const FastVector< sharedNode > & roots () const
 
const FastVector< sharedFactor > & remainingFactors () const
 
void swap (This &other)
 

Protected Attributes

FastVector< sharedNoderoots_
 
FastVector< sharedFactorremainingFactors_
 

Friends

class ::EliminationTreeTester
 

Testable

void print (const std::string &name="EliminationTree: ", const KeyFormatter &formatter=DefaultKeyFormatter) const
 
bool equals (const This &other, double tol=1e-9) const
 

Constructor & Destructor Documentation

◆ SymbolicEliminationTree() [1/2]

gtsam::SymbolicEliminationTree::SymbolicEliminationTree ( const SymbolicFactorGraph factorGraph,
const VariableIndex structure,
const Ordering order 
)

Build the elimination tree of a factor graph using pre-computed column structure.

Parameters
factorGraphThe factor graph for which to build the elimination tree
structureThe set of factors involving each variable. If this is not precomputed, you can call the Create(const FactorGraph<DERIVEDFACTOR>&) named constructor instead.
Returns
The elimination tree

◆ SymbolicEliminationTree() [2/2]

gtsam::SymbolicEliminationTree::SymbolicEliminationTree ( const SymbolicFactorGraph factorGraph,
const Ordering order 
)

Build the elimination tree of a factor graph. Note that this has to compute the column structure as a VariableIndex, so if you already have this precomputed, use the other constructor instead.

Parameters
factorGraphThe factor graph for which to build the elimination tree

Member Function Documentation

◆ eliminate()

std::pair< std::shared_ptr< SymbolicBayesNet >, std::shared_ptr< SymbolicFactorGraph > > gtsam::EliminationTree< SymbolicBayesNet , SymbolicFactorGraph >::eliminate ( Eliminate  function) const
inherited

Eliminate the factors to a Bayes net and remaining factor graph

Parameters
functionThe function to use to eliminate, see the namespace functions in GaussianFactorGraph.h
Returns
The Bayes net and factor graph resulting from elimination

◆ equals() [1/2]

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

Test whether the tree is equal to another

◆ equals() [2/2]

bool gtsam::EliminationTree< SymbolicBayesNet , SymbolicFactorGraph >::equals ( const This other,
double  tol = 1e-9 
) const
protectedinherited

Test whether the tree is equal to another

◆ print()

void gtsam::EliminationTree< SymbolicBayesNet , SymbolicFactorGraph >::print ( const std::string &  name = "EliminationTree< SymbolicBayesNetSymbolicFactorGraph >: ",
const KeyFormatter formatter = DefaultKeyFormatter 
) const
inherited

Print the tree to cout

◆ remainingFactors()

const FastVector<sharedFactor>& gtsam::EliminationTree< SymbolicBayesNet , SymbolicFactorGraph >::remainingFactors ( ) const
inlineinherited

Return the remaining factors that are not pulled into elimination

◆ roots()

const FastVector<sharedNode>& gtsam::EliminationTree< SymbolicBayesNet , SymbolicFactorGraph >::roots ( ) const
inlineinherited

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

◆ swap()

void gtsam::EliminationTree< SymbolicBayesNet , SymbolicFactorGraph >::swap ( This other)
inherited

Swap the data of this tree with another one, this operation is very fast.

Member Data Documentation

◆ roots_

concept check


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