mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Adapted mean to work with complex numbers.
Added regression test.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user