From 0e0680d3c967982bacc925e866fb8e5a7ce46873 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Tue, 15 May 2012 14:35:40 +0000 Subject: [PATCH] Templated version of skewSymmetric to work with fixed-size matrices --- gtsam/base/Matrix.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtsam/base/Matrix.h b/gtsam/base/Matrix.h index 693f1e3da..3a70d9b76 100644 --- a/gtsam/base/Matrix.h +++ b/gtsam/base/Matrix.h @@ -398,7 +398,8 @@ Matrix vector_scale(const Matrix& A, const Vector& v, bool inf_mask = false); // * @return a 3*3 skew symmetric matrix */ Matrix3 skewSymmetric(double wx, double wy, double wz); -inline Matrix3 skewSymmetric(const Vector& w) { return skewSymmetric(w(0),w(1),w(2));} +template +inline Matrix3 skewSymmetric(const Eigen::MatrixBase& w) { return skewSymmetric(w(0),w(1),w(2));} /** Use SVD to calculate inverse square root of a matrix */ Matrix inverse_square_root(const Matrix& A);