Clarify choose method

release/4.3a0
Frank Dellaert 2024-09-29 23:58:21 -07:00
parent d042359a99
commit 5b909e3c29
2 changed files with 3 additions and 1 deletions

View File

@ -206,7 +206,7 @@ GaussianBayesNet HybridBayesNet::choose(
for (auto &&conditional : *this) { for (auto &&conditional : *this) {
if (auto gm = conditional->asHybrid()) { if (auto gm = conditional->asHybrid()) {
// If conditional is hybrid, select based on assignment. // If conditional is hybrid, select based on assignment.
gbn.push_back((*gm)(assignment)); gbn.push_back(gm->choose(assignment));
} else if (auto gc = conditional->asGaussian()) { } else if (auto gc = conditional->asGaussian()) {
// If continuous only, add Gaussian conditional. // If continuous only, add Gaussian conditional.
gbn.push_back(gc); gbn.push_back(gc);

View File

@ -127,6 +127,8 @@ class GTSAM_EXPORT HybridBayesNet : public BayesNet<HybridConditional> {
* @brief Get the Gaussian Bayes Net which corresponds to a specific discrete * @brief Get the Gaussian Bayes Net which corresponds to a specific discrete
* value assignment. * value assignment.
* *
* @note Any pure discrete factors are ignored.
*
* @param assignment The discrete value assignment for the discrete keys. * @param assignment The discrete value assignment for the discrete keys.
* @return GaussianBayesNet * @return GaussianBayesNet
*/ */