Eigen  3.4.90 (git rev 5a9f66fb35d03a4da9ef8976e67a61b30aa16dcf)
 
Loading...
Searching...
No Matches
Eigen::DiagonalBase< Derived > Class Template Reference

Detailed Description

template<typename Derived>
class Eigen::DiagonalBase< Derived >

Base class for diagonal matrices and expressions.

This is the base class that is inherited by diagonal matrix and related expression types, which internally use a vector for storing the diagonal entries. Diagonal types always represent square matrices.

Template Parameters
Derivedis the derived type, a DiagonalMatrix or DiagonalWrapper.
See also
class DiagonalMatrix, class DiagonalWrapper
+ Inheritance diagram for Eigen::DiagonalBase< Derived >:

Public Member Functions

Scalar coeff (Index row, Index col) const
 
EIGEN_CONSTEXPR Index cols () const
 
Derived & derived ()
 
const Derived & derived () const
 
DiagonalVectorType & diagonal ()
 
const DiagonalVectorType & diagonal () const
 
const DiagonalInverseReturnType inverse () const
 
template<typename OtherDerived >
const DiagonalProductReturnType< OtherDerived > operator* (const DiagonalBase< OtherDerived > &other) const
 
template<typename MatrixDerived >
const Product< Derived, MatrixDerived, LazyProduct > operator* (const MatrixBase< MatrixDerived > &matrix) const
 
const DiagonalScaleReturnType operator* (const Scalar &scalar) const
 
template<typename OtherDerived >
const DiagonalSumReturnType< OtherDerived > operator+ (const DiagonalBase< OtherDerived > &other) const
 
template<typename OtherDerived >
const DiagonalDifferenceReturnType< OtherDerived > operator- (const DiagonalBase< OtherDerived > &other) const
 
EIGEN_CONSTEXPR Index rows () const
 
DenseMatrixType toDenseMatrix () const
 
- Public Member Functions inherited from Eigen::EigenBase< Derived >
EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
Derived & derived ()
 
const Derived & derived () const
 
EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_CONSTEXPR Index size () const EIGEN_NOEXCEPT
 

Additional Inherited Members

- Public Types inherited from Eigen::EigenBase< Derived >
typedef Eigen::Index Index
 The interface type of indices.
 

Member Function Documentation

◆ coeff()

template<typename Derived >
Scalar Eigen::DiagonalBase< Derived >::coeff ( Index row,
Index col ) const
inline
Returns
the value of the coefficient as if *this was a dense matrix.

◆ cols()

template<typename Derived >
EIGEN_CONSTEXPR Index Eigen::DiagonalBase< Derived >::cols ( ) const
inline
Returns
the number of columns.

◆ derived() [1/2]

template<typename Derived >
Derived & Eigen::DiagonalBase< Derived >::derived ( )
inline
Returns
a const reference to the derived object.

◆ derived() [2/2]

template<typename Derived >
const Derived & Eigen::DiagonalBase< Derived >::derived ( ) const
inline
Returns
a reference to the derived object.

◆ diagonal() [1/2]

template<typename Derived >
DiagonalVectorType & Eigen::DiagonalBase< Derived >::diagonal ( )
inline
Returns
a const reference to the derived object's vector of diagonal coefficients.

◆ diagonal() [2/2]

template<typename Derived >
const DiagonalVectorType & Eigen::DiagonalBase< Derived >::diagonal ( ) const
inline
Returns
a reference to the derived object's vector of diagonal coefficients.

◆ inverse()

template<typename Derived >
const DiagonalInverseReturnType Eigen::DiagonalBase< Derived >::inverse ( ) const
inline
Returns
the inverse *this. Computed as the coefficient-wise inverse of the diagonal.

◆ operator*() [1/3]

template<typename Derived >
template<typename OtherDerived >
const DiagonalProductReturnType< OtherDerived > Eigen::DiagonalBase< Derived >::operator* ( const DiagonalBase< OtherDerived > & other) const
inline
Returns
the diagonal matrix product of *this by the diagonal matrix other

◆ operator*() [2/3]

template<typename Derived >
template<typename MatrixDerived >
const Product< Derived, MatrixDerived, LazyProduct > Eigen::DiagonalBase< Derived >::operator* ( const MatrixBase< MatrixDerived > & matrix) const
inline
Returns
the diagonal matrix product of *this by the dense matrix, matrix

◆ operator*() [3/3]

template<typename Derived >
const DiagonalScaleReturnType Eigen::DiagonalBase< Derived >::operator* ( const Scalar & scalar) const
inline
Returns
the product of *this by the scalar scalar

◆ operator+()

template<typename Derived >
template<typename OtherDerived >
const DiagonalSumReturnType< OtherDerived > Eigen::DiagonalBase< Derived >::operator+ ( const DiagonalBase< OtherDerived > & other) const
inline
Returns
the sum of *this and the diagonal matrix other

◆ operator-()

template<typename Derived >
template<typename OtherDerived >
const DiagonalDifferenceReturnType< OtherDerived > Eigen::DiagonalBase< Derived >::operator- ( const DiagonalBase< OtherDerived > & other) const
inline
Returns
the difference of *this and the diagonal matrix other

◆ rows()

template<typename Derived >
EIGEN_CONSTEXPR Index Eigen::DiagonalBase< Derived >::rows ( ) const
inline
Returns
the number of rows.

◆ toDenseMatrix()

template<typename Derived >
DenseMatrixType Eigen::DiagonalBase< Derived >::toDenseMatrix ( ) const
inline

Constructs a dense matrix from *this. Note, this directly returns a dense matrix type, not an expression.

Returns
A dense matrix, with its diagonal entries set from the the derived object.

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