Address comments in #1991

release/4.3a0
Frank Dellaert 2025-01-24 14:15:21 -05:00
parent 21cb31e519
commit 92496dc886
2 changed files with 5 additions and 3 deletions

View File

@ -338,6 +338,7 @@ namespace gtsam {
/* ************************************************************************* */ /* ************************************************************************* */
// Find the lowest common ancestor of two cliques // Find the lowest common ancestor of two cliques
// TODO(Varun): consider implementing this as a Range Minimum Query
template <class CLIQUE> template <class CLIQUE>
static std::shared_ptr<CLIQUE> findLowestCommonAncestor( static std::shared_ptr<CLIQUE> findLowestCommonAncestor(
const std::shared_ptr<CLIQUE>& C1, const std::shared_ptr<CLIQUE>& C2) { const std::shared_ptr<CLIQUE>& C1, const std::shared_ptr<CLIQUE>& C2) {
@ -360,7 +361,7 @@ namespace gtsam {
/* ************************************************************************* */ /* ************************************************************************* */
// Given the clique P(F:S) and the ancestor clique B // Given the clique P(F:S) and the ancestor clique B
// Return the Bayes tree P(S\B | S \cap B) // Return the Bayes tree P(S\B | S \cap B), where \cap is intersection
template <class CLIQUE> template <class CLIQUE>
static auto factorInto( static auto factorInto(
const std::shared_ptr<CLIQUE>& p_F_S, const std::shared_ptr<CLIQUE>& B, const std::shared_ptr<CLIQUE>& p_F_S, const std::shared_ptr<CLIQUE>& B,

View File

@ -107,7 +107,7 @@ namespace gtsam {
// The shortcut density is a conditional P(S|B) of the separator of this // The shortcut density is a conditional P(S|B) of the separator of this
// clique on the root or common ancestor B. We can compute it recursively from // clique on the root or common ancestor B. We can compute it recursively from
// the parent shortcut P(Sp|B) as \int P(Fp|Sp) P(Sp|B), where Fp are the // the parent shortcut P(Sp|B) as \int P(Fp|Sp) P(Sp|B), where Fp are the
// frontal nodes in p // frontal nodes in pthe parent p, and Sp the separator of the parent.
/* ************************************************************************* /* *************************************************************************
*/ */
template <class DERIVED, class FACTORGRAPH> template <class DERIVED, class FACTORGRAPH>
@ -141,7 +141,8 @@ namespace gtsam {
/* *********************************************************************** */ /* *********************************************************************** */
// Separator marginal, uses separator marginal of parent recursively // Separator marginal, uses separator marginal of parent recursively
// Calculates P(S) = \int P(Cp) = \int P(Fp|Sp) P(Sp) // Calculates P(S) = \int P(Cp) = \int P(Fp|Sp) P(Sp)
// if P(Sp) is not cached, it will call separatorMarginal on the parent // if P(Sp) is not cached, it will call separatorMarginal on the parent.
// Here again, Fp and Sp are the frontal nodes and separator in the parent p.
/* *********************************************************************** */ /* *********************************************************************** */
template <class DERIVED, class FACTORGRAPH> template <class DERIVED, class FACTORGRAPH>
typename BayesTreeCliqueBase<DERIVED, FACTORGRAPH>::FactorGraphType typename BayesTreeCliqueBase<DERIVED, FACTORGRAPH>::FactorGraphType