diff options
author | Gael Guennebaud <g.gael@free.fr> | 2010-02-15 11:01:55 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2010-02-15 11:01:55 +0100 |
commit | 21d0eb3f1146a3aa801b77374cf47bdae0ba5c77 (patch) | |
tree | e12e7c28e56997cfe5dfb2377ea766ed4ee564c9 | |
parent | d00bff91ad8a98ef03024b1e9b862519db3f9566 (diff) |
the default implementation should really call evalTo
-rw-r--r-- | Eigen/src/Core/AnyMatrixBase.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Eigen/src/Core/AnyMatrixBase.h b/Eigen/src/Core/AnyMatrixBase.h index e56b56deb..a5d1cfe9f 100644 --- a/Eigen/src/Core/AnyMatrixBase.h +++ b/Eigen/src/Core/AnyMatrixBase.h @@ -61,7 +61,8 @@ template<typename Derived> struct AnyMatrixBase { // This is the default implementation, // derived class can reimplement it in a more optimized way. - typename Dest::PlainMatrixType res(*this); + typename Dest::PlainMatrixType res(rows(),cols()); + evalTo(res); dst += res; } @@ -70,7 +71,8 @@ template<typename Derived> struct AnyMatrixBase { // This is the default implementation, // derived class can reimplement it in a more optimized way. - typename Dest::PlainMatrixType res(*this); + typename Dest::PlainMatrixType res(rows(),cols()); + evalTo(res); dst -= res; } @@ -98,9 +100,9 @@ template<typename Derived> struct AnyMatrixBase /** \brief Copies the generic expression \a other into *this. * - * \details The expression must provide a (templated) evalTo(Derived& dst) const - * function which does the actual job. In practice, this allows any user to write - * its own special matrix without having to modify MatrixBase + * \details The expression must provide a (templated) evalTo(Derived& dst) const + * function which does the actual job. In practice, this allows any user to write + * its own special matrix without having to modify MatrixBase * * \returns a reference to *this. */ |