From 352c7f2efad1103982e701843b73b4ad88df10fe Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Sat, 1 Feb 2025 02:25:54 -0500 Subject: [PATCH] ReInitialize --- gtsam/hybrid/HybridSmoother.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gtsam/hybrid/HybridSmoother.h b/gtsam/hybrid/HybridSmoother.h index 12da3b0af..c626d00a3 100644 --- a/gtsam/hybrid/HybridSmoother.h +++ b/gtsam/hybrid/HybridSmoother.h @@ -27,7 +27,6 @@ namespace gtsam { class GTSAM_EXPORT HybridSmoother { private: HybridBayesNet hybridBayesNet_; - HybridGaussianFactorGraph remainingFactorGraph_; /// The threshold above which we make a decision about a mode. std::optional marginalThreshold_; @@ -44,6 +43,16 @@ class GTSAM_EXPORT HybridSmoother { HybridSmoother(const std::optional marginalThreshold = {}) : marginalThreshold_(marginalThreshold) {} + /// Return fixed values: + const DiscreteValues& fixedValues() const { return fixedValues_; } + + /** + * Re-initialize the smoother from a new hybrid Bayes Net. + */ + void reInitialize(HybridBayesNet&& hybridBayesNet) { + hybridBayesNet_ = std::move(hybridBayesNet); + } + /** * Given new factors, perform an incremental update. * The relevant densities in the `hybridBayesNet` will be added to the input