aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Redux.h
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-01-29 12:12:02 +0100
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-01-29 12:12:02 +0100
commit6dee5440e4971781077769913586e9748b1d6dbf (patch)
tree06641abffa1adb278a3bf78c8d1c067e84666863 /Eigen/src/Core/Redux.h
parent42b88983ff846624ff335e2a60f7435acb7cb9cf (diff)
Adapted mean to work with complex numbers.
Added regression test.
Diffstat (limited to 'Eigen/src/Core/Redux.h')
-rw-r--r--Eigen/src/Core/Redux.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/Redux.h b/Eigen/src/Core/Redux.h
index 1643f13b2..09538a3bd 100644
--- a/Eigen/src/Core/Redux.h
+++ b/Eigen/src/Core/Redux.h
@@ -356,7 +356,7 @@ template<typename Derived>
EIGEN_STRONG_INLINE typename ei_traits<Derived>::Scalar
DenseBase<Derived>::mean() const
{
- return this->redux(Eigen::ei_scalar_sum_op<Scalar>()) / this->size();
+ return this->redux(Eigen::ei_scalar_sum_op<Scalar>()) / Scalar(this->size());
}
/** \returns the product of all coefficients of *this