MatrixBase::diagonalView issue 604

Description

Added compile time and dynamically indexed MatrixBase::diagonalView methods, each with a const overload.

As given in the comments on the issue, the correct behavior was expected to match .diagonal().asDiagonal(), which returns a DiagonalWrapper.

I created a new testing file and example to go with these.

Reference issue

Fixes #604 (closed)

Additional information

Merge request reports

Loading