diff --git a/gtsam/inference/BayesTreeCliqueBase.h b/gtsam/inference/BayesTreeCliqueBase.h index b2da252e6..4841f6669 100644 --- a/gtsam/inference/BayesTreeCliqueBase.h +++ b/gtsam/inference/BayesTreeCliqueBase.h @@ -201,8 +201,7 @@ namespace gtsam { void deleteCachedShortcuts(); const boost::optional >& cachedSeparatorMarginal() const { - return cachedSeparatorMarginal_; - } + return cachedSeparatorMarginal_; } friend class BayesTree ; @@ -225,6 +224,9 @@ namespace gtsam { std::vector shortcut_indices(derived_ptr B, const FactorGraph& p_Cp_B) const; + /** Non-recursive delete cached shortcuts and marginals - internal only. */ + void deleteCachedShortcutsNonRecursive() { cachedSeparatorMarginal_ = boost::none; } + private: /**