diff --git a/slam/LinearApproxFactor.h b/slam/LinearApproxFactor.h index 5786e5e37..ac23183f2 100644 --- a/slam/LinearApproxFactor.h +++ b/slam/LinearApproxFactor.h @@ -19,15 +19,18 @@ namespace gtsam { * A dummy factor that takes a linearized factor and inserts it into * a nonlinear graph. This version uses exactly one type of variable. */ -template +template class LinearApproxFactor : public NonlinearFactor { public: + /** type for the variable */ + typedef typename Key::Value_t X; + /** base type */ typedef NonlinearFactor Base; /** shared pointer for convenience */ - typedef boost::shared_ptr > shared_ptr; + typedef boost::shared_ptr > shared_ptr; /** typedefs for key vectors */ typedef std::vector KeyVector; diff --git a/tests/testLinearApproxFactor.cpp b/tests/testLinearApproxFactor.cpp index 8e9456cfc..c6a1ef387 100644 --- a/tests/testLinearApproxFactor.cpp +++ b/tests/testLinearApproxFactor.cpp @@ -14,7 +14,7 @@ using namespace std; using namespace gtsam; -typedef LinearApproxFactor ApproxFactor; +typedef LinearApproxFactor ApproxFactor; /* ************************************************************************* */ TEST ( LinearApproxFactor, basic ) {