addToDense ---> addTo

subToDense ---> subTo
This commit is contained in:
Benoit Jacob 2009-11-16 21:33:41 -05:00
parent 07412b2075
commit 984c000778
2 changed files with 6 additions and 6 deletions

View File

@ -52,7 +52,7 @@ template<typename Derived> struct AnyMatrixBase
{ derived().evalTo(dst); } { derived().evalTo(dst); }
/** \internal Don't use it, but do the equivalent: \code dst += *this; \endcode */ /** \internal Don't use it, but do the equivalent: \code dst += *this; \endcode */
template<typename Dest> inline void addToDense(Dest& dst) const template<typename Dest> inline void addTo(Dest& dst) const
{ {
// 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.
@ -62,7 +62,7 @@ template<typename Derived> struct AnyMatrixBase
} }
/** \internal Don't use it, but do the equivalent: \code dst -= *this; \endcode */ /** \internal Don't use it, but do the equivalent: \code dst -= *this; \endcode */
template<typename Dest> inline void subToDense(Dest& dst) const template<typename Dest> inline void subTo(Dest& dst) const
{ {
// 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.
@ -109,7 +109,7 @@ template<typename Derived>
template<typename OtherDerived> template<typename OtherDerived>
Derived& MatrixBase<Derived>::operator+=(const AnyMatrixBase<OtherDerived> &other) Derived& MatrixBase<Derived>::operator+=(const AnyMatrixBase<OtherDerived> &other)
{ {
other.derived().addToDense(derived()); other.derived().addTo(derived());
return derived(); return derived();
} }
@ -117,7 +117,7 @@ template<typename Derived>
template<typename OtherDerived> template<typename OtherDerived>
Derived& MatrixBase<Derived>::operator-=(const AnyMatrixBase<OtherDerived> &other) Derived& MatrixBase<Derived>::operator-=(const AnyMatrixBase<OtherDerived> &other)
{ {
other.derived().subToDense(derived()); other.derived().subTo(derived());
return derived(); return derived();
} }

View File

@ -52,10 +52,10 @@ class DiagonalBase : public AnyMatrixBase<Derived>
template<typename DenseDerived> template<typename DenseDerived>
void evalTo(MatrixBase<DenseDerived> &other) const; void evalTo(MatrixBase<DenseDerived> &other) const;
template<typename DenseDerived> template<typename DenseDerived>
void addToDense(MatrixBase<DenseDerived> &other) const void addTo(MatrixBase<DenseDerived> &other) const
{ other.diagonal() += diagonal(); } { other.diagonal() += diagonal(); }
template<typename DenseDerived> template<typename DenseDerived>
void subToDense(MatrixBase<DenseDerived> &other) const void subTo(MatrixBase<DenseDerived> &other) const
{ other.diagonal() -= diagonal(); } { other.diagonal() -= diagonal(); }
inline const DiagonalVectorType& diagonal() const { return derived().diagonal(); } inline const DiagonalVectorType& diagonal() const { return derived().diagonal(); }