Pressio / pressio

core C++ library
Other
45 stars 7 forks source link

expressions: Eigen `as_diagonal_matrix` not compliant with matrix interface #532

Closed mzuzek closed 6 months ago

mzuzek commented 1 year ago

@fnrizzi

Consider proper matrix interface for Eigen expressions::impl::AsDiagonalMatrixExpr<T> returned by as_diagonal_matrix(). At present it only returns diagonal values (m(i,j) fails for i != j). If it returned zeros for non-diagonal elements, it could be used as a regular matrix (e.g. in ops::product()).

related to #304