template<class DERIVED, class FACTORGRAPH>
class gtsam::BayesTreeCliqueBase< DERIVED, FACTORGRAPH >
This is the base class for BayesTree cliques.
The default and standard derived type is BayesTreeClique, but some algorithms, like iSAM2, use a different clique type in order to store extra data along with the clique.
This class is templated on the derived class (i.e. the curiously recursive template pattern). The advantage of this over using virtual classes is that it avoids the need for casting to get the derived type. This is possible because all cliques in a BayesTree are the same type - if they were not then we'd need a virtual class.
- Template Parameters
-
DERIVED | The derived clique type. |
CONDITIONAL | The conditional type. |
|
class | BayesTree< DerivedType > |
|
class | boost::serialization::access |
| Serialization function.
|
|
KeyVector | separator_setminus_B (const derived_ptr &B) const |
| Calculate set \( S \setminus B \) for shortcut calculations.
|
|
KeyVector | shortcut_indices (const derived_ptr &B, const FactorGraphType &p_Cp_B) const |
| Determine variable indices to keep in recursive separator shortcut calculation The factor graph p_Cp_B has keys from the parent clique Cp and from B.
|
|
void | deleteCachedShortcutsNonRecursive () |
| Non-recursive delete cached shortcuts and marginals - internal only.
|
|
BayesNetType | shortcut (const derived_ptr &root, Eliminate function=EliminationTraitsType::DefaultEliminate) const |
| return the conditional P(S|Root) on the separator given the root
|
|
FactorGraphType | separatorMarginal (Eliminate function=EliminationTraitsType::DefaultEliminate) const |
| return the marginal P(S) on the separator
|
|
FactorGraphType | marginal2 (Eliminate function=EliminationTraitsType::DefaultEliminate) const |
| return the marginal P(C) of the clique, using marginal caching
|
|
void | deleteCachedShortcuts () |
| This deletes the cached shortcuts of all cliques (subtree) below this clique.
|
|
const boost::optional< FactorGraphType > & | cachedSeparatorMarginal () const |
|
|
const sharedConditional & | conditional () const |
| Access the conditional.
|
|
bool | isRoot () const |
| Return true if this clique is the root of a Bayes tree.
|
|
size_t | nrChildren () const |
| Return the number of children.
|
|
const derived_ptr | operator[] (size_t i) const |
| Return the child at index i.
|
|
size_t | treeSize () const |
| The size of subtree rooted at this clique, i.e., nr of Cliques.
|
|
size_t | numCachedSeparatorMarginals () const |
| Collect number of cliques with cached separator marginals.
|
|
derived_ptr | parent () const |
| return a shared_ptr to the parent clique
|
|
int | problemSize () const |
| Problem size (used for parallel traversal)
|
|