Added function to manually clear shortcut caches in a bayes tree
parent
db22753767
commit
684af98249
5
gtsam.h
5
gtsam.h
|
@ -914,6 +914,7 @@ virtual class BayesTree {
|
||||||
size_t size();
|
size_t size();
|
||||||
CLIQUE* root() const;
|
CLIQUE* root() const;
|
||||||
void clear();
|
void clear();
|
||||||
|
void deleteCachedShorcuts();
|
||||||
void insert(const CLIQUE* subtree);
|
void insert(const CLIQUE* subtree);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -944,10 +945,6 @@ virtual class BayesTreeClique {
|
||||||
// FactorGraph<FactorType> marginal(derived_ptr root, Eliminate function) const;
|
// FactorGraph<FactorType> marginal(derived_ptr root, Eliminate function) const;
|
||||||
// FactorGraph<FactorType> joint(derived_ptr C2, derived_ptr root, Eliminate function) const;
|
// FactorGraph<FactorType> joint(derived_ptr C2, derived_ptr root, Eliminate function) const;
|
||||||
|
|
||||||
/**
|
|
||||||
* This deletes the cached shortcuts of all cliques (subtree) below this clique.
|
|
||||||
* This is performed when the bayes tree is modified.
|
|
||||||
*/
|
|
||||||
void deleteCachedShorcuts();
|
void deleteCachedShorcuts();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -212,6 +212,9 @@ namespace gtsam {
|
||||||
/** Remove all nodes */
|
/** Remove all nodes */
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
|
/** Clear all shortcut caches - use before timing on marginal calculation to avoid residual cache data */
|
||||||
|
inline void deleteCachedShorcuts() { root_->deleteCachedShorcuts(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove path from clique to root and return that path as factors
|
* Remove path from clique to root and return that path as factors
|
||||||
* plus a list of orphaned subtree roots. Used in removeTop below.
|
* plus a list of orphaned subtree roots. Used in removeTop below.
|
||||||
|
|
Loading…
Reference in New Issue