template<typename MatrixType, int _DiagIndex>
Eigen::Diagonal class

Expression of a diagonal/subdiagonal/superdiagonal in a matrix.

The matrix is not required to be square.

This class represents an expression of the main diagonal, or any sub/super diagonal of a square matrix. It is the return type of MatrixBase::diagonal() and MatrixBase::diagonal(Index) and most of the time this is the only way it is used.