From e1c984f2b490e983419a5ccce4b559776f207985 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Wed, 26 Oct 2011 02:11:00 +0000 Subject: [PATCH] NonlinearFactorGraph::linearize returns GaussianFactorGraph instead of FactorGraph --- gtsam/nonlinear/NonlinearFactorGraph-inl.h | 4 ++-- gtsam/nonlinear/NonlinearFactorGraph.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gtsam/nonlinear/NonlinearFactorGraph-inl.h b/gtsam/nonlinear/NonlinearFactorGraph-inl.h index a6f2bddb3..4704b26e9 100644 --- a/gtsam/nonlinear/NonlinearFactorGraph-inl.h +++ b/gtsam/nonlinear/NonlinearFactorGraph-inl.h @@ -125,11 +125,11 @@ namespace gtsam { /* ************************************************************************* */ template - typename FactorGraph::shared_ptr NonlinearFactorGraph::linearize( + typename GaussianFactorGraph::shared_ptr NonlinearFactorGraph::linearize( const VALUES& config, const Ordering& ordering) const { // create an empty linear FG - typename FactorGraph::shared_ptr linearFG(new FactorGraph); + typename GaussianFactorGraph::shared_ptr linearFG(new GaussianFactorGraph); linearFG->reserve(this->size()); // linearize all factors diff --git a/gtsam/nonlinear/NonlinearFactorGraph.h b/gtsam/nonlinear/NonlinearFactorGraph.h index 5a13a982f..c7f10475a 100644 --- a/gtsam/nonlinear/NonlinearFactorGraph.h +++ b/gtsam/nonlinear/NonlinearFactorGraph.h @@ -85,7 +85,7 @@ namespace gtsam { /** * linearize a nonlinear factor graph */ - boost::shared_ptr > + boost::shared_ptr linearize(const VALUES& config, const Ordering& ordering) const; private: