Returning fixed-size vector from Point2::vector()

release/4.3a0
Richard Roberts 2013-06-21 15:23:00 +00:00
parent 003954425a
commit 680d4a6a94
2 changed files with 2 additions and 1 deletions

View File

@ -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<double, 6, 1> Vector6;

View File

@ -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).