Eigen::DiagonalWrapper< DiagonalVectorType_ > Class Template Reference

Expression of a diagonal matrix. More...

#include <DiagonalMatrix.h>

+ Inheritance diagram for Eigen::DiagonalWrapper< DiagonalVectorType_ >:

Public Types

typedef DiagonalVectorType_ DiagonalVectorType
 
typedef DiagonalWrapper Nested
 
- Public Types inherited from Eigen::DiagonalBase< DiagonalWrapper< DiagonalVectorType_ > >
enum  
 
typedef internal::traits< DiagonalWrapper< DiagonalVectorType_ > >::DiagonalVectorType DiagonalVectorType
 
typedef DiagonalVectorType::Scalar Scalar
 
typedef DiagonalVectorType::RealScalar RealScalar
 
typedef internal::traits< DiagonalWrapper< DiagonalVectorType_ > >::StorageKind StorageKind
 
typedef internal::traits< DiagonalWrapper< DiagonalVectorType_ > >::StorageIndex StorageIndex
 
typedef Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime, 0, MaxRowsAtCompileTime, MaxColsAtCompileTimeDenseMatrixType
 
typedef DenseMatrixType DenseType
 
typedef DiagonalMatrix< Scalar, DiagonalVectorType::SizeAtCompileTime, DiagonalVectorType::MaxSizeAtCompileTime > PlainObject
 
using DiagonalProductReturnType = DiagonalWrapper< const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType, typename OtherDerived::DiagonalVectorType, product)>
 
using DiagonalInverseReturnType = DiagonalWrapper< const CwiseUnaryOp< internal::scalar_inverse_op< Scalar >, const DiagonalVectorType > >
 
using DiagonalScaleReturnType = DiagonalWrapper< const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DiagonalVectorType, Scalar, product)>
 
using ScaleDiagonalReturnType = DiagonalWrapper< const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar, DiagonalVectorType, product)>
 
using DiagonalSumReturnType = DiagonalWrapper< const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType, typename OtherDerived::DiagonalVectorType, sum)>
 
using DiagonalDifferenceReturnType = DiagonalWrapper< const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType, typename OtherDerived::DiagonalVectorType, difference)>
 
- Public Types inherited from Eigen::EigenBase< Derived >
typedef Eigen::Index Index
 The interface type of indices. More...
 
typedef internal::traits< Derived >::StorageKind StorageKind
 

Public Member Functions

EIGEN_DEVICE_FUNC DiagonalWrapper (DiagonalVectorType &a_diagonal)
 
EIGEN_DEVICE_FUNC const DiagonalVectorTypediagonal () const
 
- Public Member Functions inherited from Eigen::DiagonalBase< DiagonalWrapper< DiagonalVectorType_ > >
EIGEN_DEVICE_FUNC const DiagonalWrapper< DiagonalVectorType_ > & derived () const
 
EIGEN_DEVICE_FUNC DiagonalWrapper< DiagonalVectorType_ > & derived ()
 
EIGEN_DEVICE_FUNC DenseMatrixType toDenseMatrix () const
 
EIGEN_DEVICE_FUNC const DiagonalVectorTypediagonal () const
 
EIGEN_DEVICE_FUNC DiagonalVectorTypediagonal ()
 
EIGEN_DEVICE_FUNC Scalar coeff (Index row, Index col) const
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows () const
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols () const
 
EIGEN_DEVICE_FUNC const Product< DiagonalWrapper< DiagonalVectorType_ >, MatrixDerived, LazyProduct > operator* (const MatrixBase< MatrixDerived > &matrix) const
 
EIGEN_DEVICE_FUNC const DiagonalProductReturnType< OtherDerived > operator* (const DiagonalBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC const DiagonalScaleReturnType operator* (const Scalar &scalar) const
 
EIGEN_DEVICE_FUNC const DiagonalInverseReturnType inverse () const
 
EIGEN_DEVICE_FUNC const DiagonalSumReturnType< OtherDerived > operator+ (const DiagonalBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC const DiagonalDifferenceReturnType< OtherDerived > operator- (const DiagonalBase< OtherDerived > &other) const
 
- Public Member Functions inherited from Eigen::EigenBase< Derived >
constexpr EIGEN_DEVICE_FUNC Derived & derived ()
 
constexpr EIGEN_DEVICE_FUNC const Derived & derived () const
 
EIGEN_DEVICE_FUNC Derived & const_cast_derived () const
 
EIGEN_DEVICE_FUNC const Derived & const_derived () const
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index size () const EIGEN_NOEXCEPT
 
template<typename Dest >
EIGEN_DEVICE_FUNC void evalTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void addTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void subTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void applyThisOnTheRight (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void applyThisOnTheLeft (Dest &dst) const
 
template<typename Device >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< Derived, Device > device (Device &device)
 
template<typename Device >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< const Derived, Device > device (Device &device) const
 

Protected Attributes

DiagonalVectorType::Nested m_diagonal
 

Detailed Description

template<typename DiagonalVectorType_>
class Eigen::DiagonalWrapper< DiagonalVectorType_ >

Expression of a diagonal matrix.

Template Parameters
DiagonalVectorType_the type of the vector of diagonal coefficients

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.

See also
class DiagonalMatrix, class DiagonalBase, MatrixBase::asDiagonal()

Member Typedef Documentation

◆ DiagonalVectorType

template<typename DiagonalVectorType_ >
typedef DiagonalVectorType_ Eigen::DiagonalWrapper< DiagonalVectorType_ >::DiagonalVectorType

◆ Nested

template<typename DiagonalVectorType_ >
typedef DiagonalWrapper Eigen::DiagonalWrapper< DiagonalVectorType_ >::Nested

Constructor & Destructor Documentation

◆ DiagonalWrapper()

template<typename DiagonalVectorType_ >
EIGEN_DEVICE_FUNC Eigen::DiagonalWrapper< DiagonalVectorType_ >::DiagonalWrapper ( DiagonalVectorType a_diagonal)
inlineexplicit

Constructor from expression of diagonal coefficients to wrap.

328 : m_diagonal(a_diagonal) {}
DiagonalVectorType::Nested m_diagonal
Definition: DiagonalMatrix.h:334

Member Function Documentation

◆ diagonal()

template<typename DiagonalVectorType_ >
EIGEN_DEVICE_FUNC const DiagonalVectorType& Eigen::DiagonalWrapper< DiagonalVectorType_ >::diagonal ( ) const
inline
Returns
a const reference to the wrapped expression of diagonal coefficients.
331 { return m_diagonal; }

References Eigen::DiagonalWrapper< DiagonalVectorType_ >::m_diagonal.

Member Data Documentation

◆ m_diagonal

template<typename DiagonalVectorType_ >
DiagonalVectorType::Nested Eigen::DiagonalWrapper< DiagonalVectorType_ >::m_diagonal
protected

The documentation for this class was generated from the following file: