mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
the default implementation should really call evalTo
This commit is contained in:
@@ -61,7 +61,8 @@ template<typename Derived> struct AnyMatrixBase
|
|||||||
{
|
{
|
||||||
// This is the default implementation,
|
// This is the default implementation,
|
||||||
// derived class can reimplement it in a more optimized way.
|
// 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;
|
dst += res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,7 +71,8 @@ template<typename Derived> struct AnyMatrixBase
|
|||||||
{
|
{
|
||||||
// This is the default implementation,
|
// This is the default implementation,
|
||||||
// derived class can reimplement it in a more optimized way.
|
// 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;
|
dst -= res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,9 +100,9 @@ template<typename Derived> struct AnyMatrixBase
|
|||||||
|
|
||||||
/** \brief Copies the generic expression \a other into *this.
|
/** \brief Copies the generic expression \a other into *this.
|
||||||
*
|
*
|
||||||
* \details The expression must provide a (templated) evalTo(Derived& dst) const
|
* \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
|
* function which does the actual job. In practice, this allows any user to write
|
||||||
* its own special matrix without having to modify MatrixBase
|
* its own special matrix without having to modify MatrixBase
|
||||||
*
|
*
|
||||||
* \returns a reference to *this.
|
* \returns a reference to *this.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user