mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-03 02:30:38 +08:00
Merged in rutishauser/eigen/default (pull request PR-170)
Inline dot operator and eval* methods in the DiagonalMatrix
This commit is contained in:
commit
04d9fe13c6
@ -44,10 +44,10 @@ class DiagonalBase : public EigenBase<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 addTo(MatrixBase<DenseDerived> &other) const
|
inline void addTo(MatrixBase<DenseDerived> &other) const
|
||||||
{ other.diagonal() += diagonal(); }
|
{ other.diagonal() += diagonal(); }
|
||||||
template<typename DenseDerived>
|
template<typename DenseDerived>
|
||||||
void subTo(MatrixBase<DenseDerived> &other) const
|
inline 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(); }
|
||||||
@ -98,7 +98,7 @@ class DiagonalBase : public EigenBase<Derived>
|
|||||||
|
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<typename DenseDerived>
|
template<typename DenseDerived>
|
||||||
void DiagonalBase<Derived>::evalTo(MatrixBase<DenseDerived> &other) const
|
inline void DiagonalBase<Derived>::evalTo(MatrixBase<DenseDerived> &other) const
|
||||||
{
|
{
|
||||||
other.setZero();
|
other.setZero();
|
||||||
other.diagonal() = diagonal();
|
other.diagonal() = diagonal();
|
||||||
|
@ -59,7 +59,7 @@ struct dot_nocheck<T, U, true>
|
|||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
typename internal::scalar_product_traits<typename internal::traits<Derived>::Scalar,typename internal::traits<OtherDerived>::Scalar>::ReturnType
|
inline typename internal::scalar_product_traits<typename internal::traits<Derived>::Scalar,typename internal::traits<OtherDerived>::Scalar>::ReturnType
|
||||||
MatrixBase<Derived>::dot(const MatrixBase<OtherDerived>& other) const
|
MatrixBase<Derived>::dot(const MatrixBase<OtherDerived>& other) const
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user