gtsam  4.0.0
gtsam
gtsam::DiscreteEliminationTree Class Reference
+ Inheritance diagram for gtsam::DiscreteEliminationTree:

Public Member Functions

 DiscreteEliminationTree (const DiscreteFactorGraph &factorGraph, const VariableIndex &structure, const Ordering &order)
 Build the elimination tree of a factor graph using pre-computed column structure. More...
 
 DiscreteEliminationTree (const DiscreteFactorGraph &factorGraph, const Ordering &order)
 Build the elimination tree of a factor graph. More...
 
bool equals (const This &other, double tol=1e-9) const
 Test whether the tree is equal to another.
 
- Public Member Functions inherited from gtsam::EliminationTree< DiscreteBayesNet, DiscreteFactorGraph >
std::pair< boost::shared_ptr< BayesNetType >, boost::shared_ptr< FactorGraphType > > eliminate (Eliminate function) const
 Eliminate the factors to a Bayes net and remaining factor graph. More...
 
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.
 
void swap (This &other)
 Swap the data of this tree with another one, this operation is very fast. More...
 
void print (const std::string &name="EliminationTree: ", const KeyFormatter &formatter=DefaultKeyFormatter) const
 Print the tree to cout.
 

Public Types

typedef EliminationTree< DiscreteBayesNet, DiscreteFactorGraphBase
 Base class.
 
typedef DiscreteEliminationTree This
 This class.
 
typedef boost::shared_ptr< Thisshared_ptr
 Shared pointer to this class.
 
- Public Types inherited from gtsam::EliminationTree< DiscreteBayesNet, DiscreteFactorGraph >
typedef DiscreteFactorGraph FactorGraphType
 The factor graph type.
 
typedef DiscreteFactorGraph ::FactorType FactorType
 The type of factors.
 
typedef boost::shared_ptr< FactorTypesharedFactor
 Shared pointer to a factor.
 
typedef DiscreteBayesNet BayesNetType
 The BayesNet corresponding to FACTOR.
 
typedef BayesNetType::ConditionalType ConditionalType
 The type of conditionals.
 
typedef boost::shared_ptr< ConditionalTypesharedConditional
 Shared pointer to a conditional.
 
typedef DiscreteFactorGraph ::Eliminate Eliminate
 
typedef boost::shared_ptr< Node > sharedNode
 Shared pointer to Node.
 

Friends

class ::EliminationTreeTester
 

Additional Inherited Members

- Protected Types inherited from gtsam::EliminationTree< DiscreteBayesNet, DiscreteFactorGraph >
typedef EliminationTree< DiscreteBayesNet, DiscreteFactorGraphThis
 This class.
 
typedef boost::shared_ptr< Thisshared_ptr
 Shared pointer to this class.
 
- Protected Member Functions inherited from gtsam::EliminationTree< DiscreteBayesNet, DiscreteFactorGraph >
 GTSAM_CONCEPT_TESTABLE_TYPE (FactorType)
 concept check
 
 EliminationTree (const FactorGraphType &factorGraph, const VariableIndex &structure, const Ordering &order)
 Build the elimination tree of a factor graph using pre-computed column structure. More...
 
 EliminationTree (const FactorGraphType &factorGraph, const Ordering &order)
 Build the elimination tree of a factor graph. More...
 
 EliminationTree (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...
 
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...
 
 EliminationTree ()
 Protected default constructor.
 
bool equals (const This &other, double tol=1e-9) const
 Test whether the tree is equal to another.
 
- Protected Attributes inherited from gtsam::EliminationTree< DiscreteBayesNet, DiscreteFactorGraph >
FastVector< sharedNoderoots_
 
FastVector< sharedFactorremainingFactors_
 

Constructor & Destructor Documentation

◆ DiscreteEliminationTree() [1/2]

gtsam::DiscreteEliminationTree::DiscreteEliminationTree ( const DiscreteFactorGraph 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

◆ DiscreteEliminationTree() [2/2]

gtsam::DiscreteEliminationTree::DiscreteEliminationTree ( const DiscreteFactorGraph 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

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