fix which conditional is getting pruned

release/4.3a0
Varun Agrawal 2025-01-24 20:19:59 -05:00
parent 1d807db0a4
commit d2b9eb5df6
1 changed files with 2 additions and 2 deletions

View File

@ -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!