From a923c8f1b3c4af29fa579f1b5651e57a1bcf3c74 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Mon, 21 Mar 2011 15:03:03 +0000 Subject: [PATCH] re-format + comments only --- gtsam/inference/GenericSequentialSolver.h | 95 ++++++++++++----------- 1 file changed, 50 insertions(+), 45 deletions(-) diff --git a/gtsam/inference/GenericSequentialSolver.h b/gtsam/inference/GenericSequentialSolver.h index fda17197d..4f017e48a 100644 --- a/gtsam/inference/GenericSequentialSolver.h +++ b/gtsam/inference/GenericSequentialSolver.h @@ -26,62 +26,67 @@ namespace gtsam { -template -class GenericSequentialSolver { + template + class GenericSequentialSolver { -protected: + protected: - // Store the original factors for computing marginals - typename FactorGraph::shared_ptr factors_; + // Store the original factors for computing marginals + typename FactorGraph::shared_ptr factors_; - // Column structure of the factor graph - VariableIndex::shared_ptr structure_; + // Column structure of the factor graph + VariableIndex::shared_ptr structure_; - // Elimination tree that performs elimination. - typename EliminationTree::shared_ptr eliminationTree_; + // Elimination tree that performs elimination. + typename EliminationTree::shared_ptr eliminationTree_; -public: + public: - /** - * Construct the solver for a factor graph. This builds the elimination - * tree, which already does some of the work of elimination. - */ - GenericSequentialSolver(const FactorGraph& factorGraph); + /** + * Construct the solver for a factor graph. This builds the elimination + * tree, which already does some of the work of elimination. + */ + GenericSequentialSolver(const FactorGraph& factorGraph); - /** - * Construct the solver with a shared pointer to a factor graph and to a - * VariableIndex. The solver will store these pointers, so this constructor - * is the fastest. - */ - GenericSequentialSolver(const typename FactorGraph::shared_ptr& factorGraph, const VariableIndex::shared_ptr& variableIndex); + /** + * Construct the solver with a shared pointer to a factor graph and to a + * VariableIndex. The solver will store these pointers, so this constructor + * is the fastest. + */ + GenericSequentialSolver( + const typename FactorGraph::shared_ptr& factorGraph, + const VariableIndex::shared_ptr& variableIndex); - /** - * Replace the factor graph with a new one having the same structure. The - * This function can be used if the numerical part of the factors changes, - * such as during relinearization or adjusting of noise models. - */ - void replaceFactors(const typename FactorGraph::shared_ptr& factorGraph); + /** + * Replace the factor graph with a new one having the same structure. The + * This function can be used if the numerical part of the factors changes, + * such as during relinearization or adjusting of noise models. + */ + void replaceFactors( + const typename FactorGraph::shared_ptr& factorGraph); - /** - * Eliminate the factor graph sequentially. Uses a column elimination tree - * to recursively eliminate. - */ - typename BayesNet::shared_ptr eliminate() const; + /** + * Eliminate the factor graph sequentially. Uses a column elimination tree + * to recursively eliminate. + */ + typename BayesNet::shared_ptr + eliminate() const; - /** - * Compute the marginal joint over a set of variables, by integrating out - * all of the other variables. This function returns the result as a factor - * graph. - */ - typename FactorGraph::shared_ptr jointFactorGraph(const std::vector& js) const; + /** + * Compute the marginal joint over a set of variables, by integrating out + * all of the other variables. This function returns the result as a factor + * graph. + */ + typename FactorGraph::shared_ptr jointFactorGraph( + const std::vector& js) const; - /** - * Compute the marginal Gaussian density over a variable, by integrating out - * all of the other variables. This function returns the result as a factor. - */ - typename FACTOR::shared_ptr marginalFactor(Index j) const; + /** + * Compute the marginal Gaussian density over a variable, by integrating out + * all of the other variables. This function returns the result as a factor. + */ + typename FACTOR::shared_ptr marginalFactor(Index j) const; -}; + }; // GenericSequentialSolver -} +} // namespace gtsam