Skip to content

Commit

Permalink
allow for only continuous variables in HybridBayesTree
Browse files Browse the repository at this point in the history
  • Loading branch information
varunagrawal committed Jan 26, 2025
1 parent 655f57e commit 087c0cc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gtsam/hybrid/HybridBayesTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ VectorValues HybridBayesTree::optimize(const DiscreteValues& assignment) const {

/* ************************************************************************* */
void HybridBayesTree::prune(const size_t maxNrLeaves) {
if (!this->roots_.at(0)->conditional()->asDiscrete()) {
// Root of the BayesTree is not a discrete clique, so we do nothing.
return;
}

auto prunedDiscreteProbs =
this->roots_.at(0)->conditional()->asDiscrete<TableDistribution>();

Expand Down

0 comments on commit 087c0cc

Please sign in to comment.