Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions gtsam/nonlinear/Marginals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ VectorValues Marginals::optimize() const {
return bayesTree_.optimize();
}

/* ************************************************************************* */
void Marginals::deleteCachedShortcuts() {
bayesTree_.deleteCachedShortcuts();
}

/* ************************************************************************* */
void JointMarginal::print(const std::string& s, const KeyFormatter& formatter) const {
cout << s << "Joint marginal on keys ";
Expand Down
3 changes: 3 additions & 0 deletions gtsam/nonlinear/Marginals.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ class GTSAM_EXPORT Marginals {
/** Compute the joint marginal information of several variables */
JointMarginal jointMarginalInformation(const KeyVector& variables) const;

/** Delete cached Bayes tree shortcuts created while computing marginals */
void deleteCachedShortcuts();

/** Optimize the bayes tree */
VectorValues optimize() const;

Expand Down
1 change: 1 addition & 0 deletions gtsam/nonlinear/nonlinear.i
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ class Marginals {
const gtsam::KeyVector& variables) const;
gtsam::JointMarginal jointMarginalInformation(
const gtsam::KeyVector& variables) const;
void deleteCachedShortcuts();
};

class JointMarginal {
Expand Down
Loading