From 4bf0765d7126a8601e42b02cdbadf08c5efe4bb9 Mon Sep 17 00:00:00 2001 From: Simon Rutishauser Date: Tue, 15 Mar 2016 09:38:01 +0100 Subject: [PATCH] Inline dot operator and eval* methods in the DiagonalMatrix --- Eigen/src/Core/DiagonalMatrix.h | 6 +++--- Eigen/src/Core/Dot.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h index e6c220f41..53c757bef 100644 --- a/Eigen/src/Core/DiagonalMatrix.h +++ b/Eigen/src/Core/DiagonalMatrix.h @@ -44,10 +44,10 @@ class DiagonalBase : public EigenBase template void evalTo(MatrixBase &other) const; template - void addTo(MatrixBase &other) const + inline void addTo(MatrixBase &other) const { other.diagonal() += diagonal(); } template - void subTo(MatrixBase &other) const + inline void subTo(MatrixBase &other) const { other.diagonal() -= diagonal(); } inline const DiagonalVectorType& diagonal() const { return derived().diagonal(); } @@ -98,7 +98,7 @@ class DiagonalBase : public EigenBase template template -void DiagonalBase::evalTo(MatrixBase &other) const +inline void DiagonalBase::evalTo(MatrixBase &other) const { other.setZero(); other.diagonal() = diagonal(); diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index 9d7651f1f..23aab831b 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -59,7 +59,7 @@ struct dot_nocheck */ template template -typename internal::scalar_product_traits::Scalar,typename internal::traits::Scalar>::ReturnType +inline typename internal::scalar_product_traits::Scalar,typename internal::traits::Scalar>::ReturnType MatrixBase::dot(const MatrixBase& other) const { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)