template<typename _DiagonalVectorType>
Eigen::DiagonalWrapper class

Expression of a diagonal matrix.

This class is an expression of a diagonal matrix, but not storing its own vector of diagonal coefficients, instead wrapping an existing vector expression. It is the return type of MatrixBase::asDiagonal() and most of the time this is the only way that it is used.

Constructors, destructors, conversion operators

DiagonalWrapper(DiagonalVectorType& a_diagonal) explicit

Public functions

auto diagonal() const -> const DiagonalVectorType&

Function documentation

template<typename _DiagonalVectorType>
Eigen::DiagonalWrapper<_DiagonalVectorType>::DiagonalWrapper(DiagonalVectorType& a_diagonal) explicit

Constructor from expression of diagonal coefficients to wrap.

template<typename _DiagonalVectorType>
const DiagonalVectorType& Eigen::DiagonalWrapper<_DiagonalVectorType>::diagonal() const

Returns a const reference to the wrapped expression of diagonal coefficients.