diff --git a/cpp/simulated2D.h b/cpp/simulated2D.h index 1e1cccaba..97191090a 100644 --- a/cpp/simulated2D.h +++ b/cpp/simulated2D.h @@ -52,13 +52,13 @@ namespace gtsam { /** * Unary factor encoding a soft prior on a vector */ - template - struct GenericPrior: public NonlinearFactor1 { + template + struct GenericPrior: public NonlinearFactor1 { Point2 z_; - GenericPrior(const Point2& z, const SharedGaussian& model, const PoseKey& key) : - NonlinearFactor1 (model, key), z_(z) { + GenericPrior(const Point2& z, const SharedGaussian& model, const Key& key) : + NonlinearFactor1 (model, key), z_(z) { } Vector evaluateError(const Point2& x, boost::optional H = @@ -71,14 +71,14 @@ namespace gtsam { /** * Binary factor simulating "odometry" between two Vectors */ - template - struct GenericOdometry: public NonlinearFactor2 + struct GenericOdometry: public NonlinearFactor2 { Point2 z_; - GenericOdometry(const Point2& z, const SharedGaussian& model, const PoseKey& j1, - const PoseKey& j2) : - z_(z), NonlinearFactor2 ( + GenericOdometry(const Point2& z, const SharedGaussian& model, const Key& j1, + const Key& j2) : + z_(z), NonlinearFactor2 ( model, j1, j2) { } @@ -92,16 +92,15 @@ namespace gtsam { /** * Binary factor simulating "measurement" between two Vectors */ - template - class GenericMeasurement: public NonlinearFactor2 { + template + class GenericMeasurement: public NonlinearFactor2 { public: Point2 z_; GenericMeasurement(const Point2& z, const SharedGaussian& model, - const PoseKey& j1, const PointKey& j2) : - z_(z), NonlinearFactor2 ( + const XKey& j1, const LKey& j2) : + z_(z), NonlinearFactor2 ( model, j1, j2) { } @@ -113,9 +112,9 @@ namespace gtsam { }; /** Typedefs for regular use */ - typedef GenericPrior Prior; - typedef GenericOdometry Odometry; - typedef GenericMeasurement Measurement; + typedef GenericPrior Prior; + typedef GenericOdometry Odometry; + typedef GenericMeasurement Measurement; } // namespace simulated2D } // namespace gtsam