diff --git a/gtsam/inference/ISAM.h b/gtsam/inference/ISAM.h index ca4ec5bc0..78307c177 100644 --- a/gtsam/inference/ISAM.h +++ b/gtsam/inference/ISAM.h @@ -16,17 +16,22 @@ */ // \callgraph - #pragma once #include namespace gtsam { + /** + * A Bayes tree with an update methods that implements the iSAM algorithm. + * Given a set of new factors, it re-eliminates the invalidated part of the tree. + */ template class ISAM: public BayesTree { + private: - typedef BayesTree Base; + + typedef BayesTree Base; public: @@ -36,23 +41,29 @@ namespace gtsam { /** Create a Bayes Tree from a Bayes Net */ ISAM(const BayesNet& bayesNet); - /** Create a Bayes Tree from a Bayes Tree */ - ISAM(const Base& bayesTree) : Base(bayesTree) {} - - typedef typename BayesTree::sharedClique sharedClique; - - typedef typename BayesTree::Cliques Cliques; + /** Copy constructor */ + ISAM(const Base& bayesTree) : + Base(bayesTree) { + } /** - * iSAM. (update_internal provides access to list of orphans for drawing purposes) + * update the Bayes tree with a set of new factors, typically derived from measurements + * @param newFactors is a factor graph that contains the new factors + * @param function an elimination routine */ template + void update(const FG& newFactors, typename FG::Eliminate function); + + /** advanced interface */ + + typedef typename BayesTree::sharedClique sharedClique; + typedef typename BayesTree::Cliques Cliques; + + /** update_internal provides access to list of orphans for drawing purposes */ + template void update_internal(const FG& newFactors, Cliques& orphans, typename FG::Eliminate function); - template - void update(const FG& newFactors, typename FG::Eliminate function); + }; - }; // ISAM - -} /// namespace gtsam +}/// namespace gtsam