mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 20:26:03 +08:00
make sure the correct diagoanl() function is called in trace()
This commit is contained in:
parent
73eb0e633c
commit
52167be4c8
@ -382,7 +382,7 @@ template<typename Derived>
|
|||||||
EIGEN_STRONG_INLINE typename ei_traits<Derived>::Scalar
|
EIGEN_STRONG_INLINE typename ei_traits<Derived>::Scalar
|
||||||
MatrixBase<Derived>::trace() const
|
MatrixBase<Derived>::trace() const
|
||||||
{
|
{
|
||||||
return diagonal().sum();
|
return derived().diagonal().sum();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // EIGEN_REDUX_H
|
#endif // EIGEN_REDUX_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user