fix which conditional is getting pruned
parent
1d807db0a4
commit
d2b9eb5df6
|
@ -63,7 +63,7 @@ HybridBayesNet HybridBayesNet::prune(size_t maxNrLeaves, bool removeDeadModes,
|
||||||
|
|
||||||
// Prune the joint. NOTE: imperative and, again, possibly quite expensive.
|
// Prune the joint. NOTE: imperative and, again, possibly quite expensive.
|
||||||
DiscreteConditional pruned = joint;
|
DiscreteConditional pruned = joint;
|
||||||
joint.prune(maxNrLeaves);
|
pruned.prune(maxNrLeaves);
|
||||||
|
|
||||||
DiscreteValues deadModesValues;
|
DiscreteValues deadModesValues;
|
||||||
if (removeDeadModes) {
|
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
|
// 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) {
|
for (auto &&conditional : *this) {
|
||||||
if (auto hgc = conditional->asHybrid()) {
|
if (auto hgc = conditional->asHybrid()) {
|
||||||
// Prune the hybrid Gaussian conditional!
|
// Prune the hybrid Gaussian conditional!
|
||||||
|
|
Loading…
Reference in New Issue