diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-03-15 11:05:38 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-03-15 11:05:38 +0000 |
commit | 29184ad27df1b398d4619dea78d0fb8aee445c1f (patch) | |
tree | 71600836aa627db8e1c6700bf37661f9af4be19d /Eigen/src/Core/Dot.h | |
parent | fb3438e609be743c066af9167e6ed83cd17af394 (diff) |
- introduce sum() returning the sum of the coeffs of a vector
- reimplement trace() as just diagonal().sum()
- apidoc fixes
Diffstat (limited to 'Eigen/src/Core/Dot.h')
-rw-r--r-- | Eigen/src/Core/Dot.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index 4147dee56..33f69f987 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -82,12 +82,12 @@ MatrixBase<Derived>::dot(const MatrixBase<OtherDerived>& other) const ei_dot_unroller<SizeAtCompileTime-1, SizeAtCompileTime <= EIGEN_UNROLLING_LIMIT ? SizeAtCompileTime : Dynamic, Derived, MatrixBase<OtherDerived> > - ::run(*static_cast<const Derived*>(this), other, res); + ::run(derived(), other, res); else { - res = (*this).coeff(0) * ei_conj(other.coeff(0)); + res = coeff(0) * ei_conj(other.coeff(0)); for(int i = 1; i < size(); i++) - res += (*this).coeff(i)* ei_conj(other.coeff(i)); + res += coeff(i)* ei_conj(other.coeff(i)); } return res; } |