aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/DiagonalProduct.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-02-18 10:52:26 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-02-18 10:52:26 +0100
commit551bf5c66a3f29c8ac1f24f8439a6b85d0da79ac (patch)
treee7c6aee28a115b28775a575cd35c65aa48edccbd /Eigen/src/Core/DiagonalProduct.h
parent2d136d3d7f0623189e42be44d45e1353d1cde93e (diff)
Get rid of DiagonalProduct
Diffstat (limited to 'Eigen/src/Core/DiagonalProduct.h')
-rw-r--r--Eigen/src/Core/DiagonalProduct.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Eigen/src/Core/DiagonalProduct.h b/Eigen/src/Core/DiagonalProduct.h
index c03a0c2e1..f5539df13 100644
--- a/Eigen/src/Core/DiagonalProduct.h
+++ b/Eigen/src/Core/DiagonalProduct.h
@@ -13,6 +13,7 @@
namespace Eigen {
+#ifndef EIGEN_TEST_EVALUATORS
namespace internal {
template<typename MatrixType, typename DiagonalType, int ProductOrder>
struct traits<DiagonalProduct<MatrixType, DiagonalType, ProductOrder> >
@@ -124,6 +125,17 @@ MatrixBase<Derived>::operator*(const DiagonalBase<DiagonalDerived> &a_diagonal)
{
return DiagonalProduct<Derived, DiagonalDerived, OnTheRight>(derived(), a_diagonal.derived());
}
+#else // EIGEN_TEST_EVALUATORS
+/** \returns the diagonal matrix product of \c *this by the diagonal matrix \a diagonal.
+ */
+template<typename Derived>
+template<typename DiagonalDerived>
+inline const Product<Derived, DiagonalDerived, LazyProduct>
+MatrixBase<Derived>::operator*(const DiagonalBase<DiagonalDerived> &a_diagonal) const
+{
+ return Product<Derived, DiagonalDerived, LazyProduct>(derived(),a_diagonal.derived());
+}
+#endif // EIGEN_TEST_EVALUATORS
} // end namespace Eigen