Skip to content

Commit

Permalink
fix which conditional is getting pruned
Browse files Browse the repository at this point in the history
  • Loading branch information
varunagrawal committed Jan 25, 2025
1 parent 1d807db commit d2b9eb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gtsam/hybrid/HybridBayesNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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!
Expand Down

0 comments on commit d2b9eb5

Please sign in to comment.