Removed extraneous template parameter for LinearApproxFactor

release/4.3a0
Alex Cunningham 2010-09-22 13:29:29 +00:00
parent 92539ed08c
commit b09b7fffbb
2 changed files with 6 additions and 3 deletions

View File

@ -19,15 +19,18 @@ namespace gtsam {
* A dummy factor that takes a linearized factor and inserts it into * A dummy factor that takes a linearized factor and inserts it into
* a nonlinear graph. This version uses exactly one type of variable. * a nonlinear graph. This version uses exactly one type of variable.
*/ */
template <class Config, class Key, class X> template <class Config, class Key>
class LinearApproxFactor : public NonlinearFactor<Config> { class LinearApproxFactor : public NonlinearFactor<Config> {
public: public:
/** type for the variable */
typedef typename Key::Value_t X;
/** base type */ /** base type */
typedef NonlinearFactor<Config> Base; typedef NonlinearFactor<Config> Base;
/** shared pointer for convenience */ /** shared pointer for convenience */
typedef boost::shared_ptr<LinearApproxFactor<Config,Key,X> > shared_ptr; typedef boost::shared_ptr<LinearApproxFactor<Config,Key> > shared_ptr;
/** typedefs for key vectors */ /** typedefs for key vectors */
typedef std::vector<Key> KeyVector; typedef std::vector<Key> KeyVector;

View File

@ -14,7 +14,7 @@
using namespace std; using namespace std;
using namespace gtsam; using namespace gtsam;
typedef LinearApproxFactor<planarSLAM::Config,planarSLAM::PointKey,Point2> ApproxFactor; typedef LinearApproxFactor<planarSLAM::Config,planarSLAM::PointKey> ApproxFactor;
/* ************************************************************************* */ /* ************************************************************************* */
TEST ( LinearApproxFactor, basic ) { TEST ( LinearApproxFactor, basic ) {