mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-02-23 18:20:47 +08:00
addToDense ---> addTo
subToDense ---> subTo
This commit is contained in:
parent
07412b2075
commit
984c000778
@ -52,7 +52,7 @@ template<typename Derived> struct AnyMatrixBase
|
||||
{ derived().evalTo(dst); }
|
||||
|
||||
/** \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,
|
||||
// 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 */
|
||||
template<typename Dest> inline void subToDense(Dest& dst) const
|
||||
template<typename Dest> inline void subTo(Dest& dst) const
|
||||
{
|
||||
// This is the default implementation,
|
||||
// derived class can reimplement it in a more optimized way.
|
||||
@ -109,7 +109,7 @@ template<typename Derived>
|
||||
template<typename OtherDerived>
|
||||
Derived& MatrixBase<Derived>::operator+=(const AnyMatrixBase<OtherDerived> &other)
|
||||
{
|
||||
other.derived().addToDense(derived());
|
||||
other.derived().addTo(derived());
|
||||
return derived();
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ template<typename Derived>
|
||||
template<typename OtherDerived>
|
||||
Derived& MatrixBase<Derived>::operator-=(const AnyMatrixBase<OtherDerived> &other)
|
||||
{
|
||||
other.derived().subToDense(derived());
|
||||
other.derived().subTo(derived());
|
||||
return derived();
|
||||
}
|
||||
|
||||
|
@ -52,10 +52,10 @@ class DiagonalBase : public AnyMatrixBase<Derived>
|
||||
template<typename DenseDerived>
|
||||
void evalTo(MatrixBase<DenseDerived> &other) const;
|
||||
template<typename DenseDerived>
|
||||
void addToDense(MatrixBase<DenseDerived> &other) const
|
||||
void addTo(MatrixBase<DenseDerived> &other) const
|
||||
{ other.diagonal() += diagonal(); }
|
||||
template<typename DenseDerived>
|
||||
void subToDense(MatrixBase<DenseDerived> &other) const
|
||||
void subTo(MatrixBase<DenseDerived> &other) const
|
||||
{ other.diagonal() -= diagonal(); }
|
||||
|
||||
inline const DiagonalVectorType& diagonal() const { return derived().diagonal(); }
|
||||
|
Loading…
Reference in New Issue
Block a user