mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 19:59:05 +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
|
||||
MatrixBase<Derived>::trace() const
|
||||
{
|
||||
return diagonal().sum();
|
||||
return derived().diagonal().sum();
|
||||
}
|
||||
|
||||
#endif // EIGEN_REDUX_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user