diff --git a/gtsam/base/Vector.h b/gtsam/base/Vector.h index 2ebb63f47..7b8404289 100644 --- a/gtsam/base/Vector.h +++ b/gtsam/base/Vector.h @@ -34,6 +34,7 @@ namespace gtsam { typedef Eigen::VectorXd Vector; // Commonly used fixed size vectors +typedef Eigen::Vector2d Vector2; typedef Eigen::Vector3d Vector3; typedef Eigen::Matrix Vector6; diff --git a/gtsam/geometry/Point2.h b/gtsam/geometry/Point2.h index 31d89a39f..5067dc405 100644 --- a/gtsam/geometry/Point2.h +++ b/gtsam/geometry/Point2.h @@ -180,7 +180,7 @@ public: double y() const {return y_;} /// return vectorized form (column-wise). TODO: why does this function exist? - Vector vector() const { return Vector_(2, x_, y_); } + Vector2 vector() const { return Vector2(x_, y_); } /// @} /// @name Deprecated (non-const, non-functional style. Do not use).