From d2b9eb5df6c111ba4dd035254cba18a76094bbe0 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Fri, 24 Jan 2025 20:19:59 -0500 Subject: [PATCH] fix which conditional is getting pruned --- gtsam/hybrid/HybridBayesNet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtsam/hybrid/HybridBayesNet.cpp b/gtsam/hybrid/HybridBayesNet.cpp index d21387312..e9583b845 100644 --- a/gtsam/hybrid/HybridBayesNet.cpp +++ b/gtsam/hybrid/HybridBayesNet.cpp @@ -63,7 +63,7 @@ HybridBayesNet HybridBayesNet::prune(size_t maxNrLeaves, bool removeDeadModes, // Prune the joint. NOTE: imperative and, again, possibly quite expensive. DiscreteConditional pruned = joint; - joint.prune(maxNrLeaves); + pruned.prune(maxNrLeaves); DiscreteValues deadModesValues; if (removeDeadModes) { @@ -115,7 +115,7 @@ HybridBayesNet HybridBayesNet::prune(size_t maxNrLeaves, bool removeDeadModes, */ // Go through all the Gaussian conditionals in the Bayes Net and prune them as - // per pruned Discrete joint. + // per pruned discrete joint. for (auto &&conditional : *this) { if (auto hgc = conditional->asHybrid()) { // Prune the hybrid Gaussian conditional!