Skip to content

Commit

Permalink
Address comments in #1991
Browse files Browse the repository at this point in the history
  • Loading branch information
dellaert committed Jan 24, 2025
1 parent 21cb31e commit 92496dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion gtsam/inference/BayesTree-inst.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ namespace gtsam {

/* ************************************************************************* */
// Find the lowest common ancestor of two cliques
// TODO(Varun): consider implementing this as a Range Minimum Query
template <class CLIQUE>
static std::shared_ptr<CLIQUE> findLowestCommonAncestor(
const std::shared_ptr<CLIQUE>& C1, const std::shared_ptr<CLIQUE>& C2) {
Expand All @@ -360,7 +361,7 @@ namespace gtsam {

/* ************************************************************************* */
// 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>
static auto factorInto(
const std::shared_ptr<CLIQUE>& p_F_S, const std::shared_ptr<CLIQUE>& B,
Expand Down
5 changes: 3 additions & 2 deletions gtsam/inference/BayesTreeCliqueBase-inst.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace gtsam {
// 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
// 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>
Expand Down Expand Up @@ -141,7 +141,8 @@ namespace gtsam {
/* *********************************************************************** */
// Separator marginal, uses separator marginal of parent recursively
// 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>
typename BayesTreeCliqueBase<DERIVED, FACTORGRAPH>::FactorGraphType
Expand Down

0 comments on commit 92496dc

Please sign in to comment.