choose docs

release/4.3a0
Frank Dellaert 2024-09-30 14:42:33 -07:00
parent 78b47770c0
commit d054a041ed
3 changed files with 19 additions and 4 deletions

View File

@ -128,7 +128,7 @@ class GTSAM_EXPORT HybridBayesNet : public BayesNet<HybridConditional> {
* value assignment. Note this corresponds to the Gaussian posterior p(X|M=m)
* of the continuous variables given the discrete assignment M=m.
*
* @note Any pure discrete factors are ignored.
* @note Be careful, as any factors not Gaussian are ignored.
*
* @param assignment The discrete value assignment for the discrete keys.
* @return Gaussian posterior as a GaussianBayesNet

View File

@ -542,7 +542,7 @@ AlgebraicDecisionTree<Key> HybridGaussianFactorGraph::discretePosterior(
}
/* ************************************************************************ */
GaussianFactorGraph HybridGaussianFactorGraph::operator()(
GaussianFactorGraph HybridGaussianFactorGraph::choose(
const DiscreteValues &assignment) const {
GaussianFactorGraph gfg;
for (auto &&f : *this) {

View File

@ -230,8 +230,23 @@ class GTSAM_EXPORT HybridGaussianFactorGraph
eliminate(const Ordering& keys) const;
/// @}
/// Get the GaussianFactorGraph at a given discrete assignment.
GaussianFactorGraph operator()(const DiscreteValues& assignment) const;
/**
@brief Get the GaussianFactorGraph at a given discrete assignment. Note this
* corresponds to the Gaussian posterior p(X|M=m, Z=z) of the continuous
* variables X given the discrete assignment M=m and whatever measurements z
* where assumed in the creation of the factor Graph.
*
* @note Be careful, as any factors not Gaussian are ignored.
*
* @param assignment The discrete value assignment for the discrete keys.
* @return Gaussian factors as a GaussianFactorGraph
*/
GaussianFactorGraph choose(const DiscreteValues& assignment) const;
/// Syntactic sugar for choose
GaussianFactorGraph operator()(const DiscreteValues& assignment) const {
return choose(assignment);
}
};
// traits