WPILibC++ 2023.4.3
Eigen::Diagonal< MatrixType, _DiagIndex > Class Template Reference

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

#include </home/runner/work/allwpilib/allwpilib/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/Diagonal.h>

Inheritance diagram for Eigen::Diagonal< MatrixType, _DiagIndex >:

Public Types

enum  { DiagIndex = _DiagIndex }
 
typedef internal::dense_xpr_base< Diagonal >::type Base
 
typedef internal::conditional< internal::is_lvalue< MatrixType >::value, Scalar, constScalar >::type ScalarWithConstIfNotLvalue
 

Public Member Functions

EIGEN_DEVICE_FUNC Diagonal (MatrixType &matrix, Index a_index=DiagIndex)
 
EIGEN_DEVICE_FUNC Index rows () const
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerStride () const EIGEN_NOEXCEPT
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride () const EIGEN_NOEXCEPT
 
EIGEN_DEVICE_FUNC ScalarWithConstIfNotLvaluedata ()
 
EIGEN_DEVICE_FUNC const Scalar * data () const
 
EIGEN_DEVICE_FUNC Scalar & coeffRef (Index row, Index)
 
EIGEN_DEVICE_FUNC const Scalar & coeffRef (Index row, Index) const
 
EIGEN_DEVICE_FUNC CoeffReturnType coeff (Index row, Index) const
 
EIGEN_DEVICE_FUNC Scalar & coeffRef (Index idx)
 
EIGEN_DEVICE_FUNC const Scalar & coeffRef (Index idx) const
 
EIGEN_DEVICE_FUNC CoeffReturnType coeff (Index idx) const
 
EIGEN_DEVICE_FUNC const internal::remove_all< typenameMatrixType::Nested >::typenestedExpression () const
 
EIGEN_DEVICE_FUNC Index index () const
 

Protected Attributes

internal::ref_selector< MatrixType >::non_const_type m_matrix
 
const internal::variable_if_dynamicindex< Index, DiagIndexm_index
 

Detailed Description

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

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

Parameters
MatrixTypethe type of the object in which we are taking a sub/main/super diagonal
DiagIndexthe index of the sub/super diagonal. The default is 0 and it means the main diagonal. A positive value means a superdiagonal, a negative value means a subdiagonal. You can also use DynamicIndex so the index can be set at runtime.

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.

See also
MatrixBase::diagonal(), MatrixBase::diagonal(Index)

Member Typedef Documentation

◆ Base

template<typename MatrixType , int _DiagIndex>
typedef internal::dense_xpr_base<Diagonal>::type Eigen::Diagonal< MatrixType, _DiagIndex >::Base

◆ ScalarWithConstIfNotLvalue

template<typename MatrixType , int _DiagIndex>
typedef internal::conditional<internal::is_lvalue<MatrixType>::value,Scalar,constScalar>::type Eigen::Diagonal< MatrixType, _DiagIndex >::ScalarWithConstIfNotLvalue

Member Enumeration Documentation

◆ anonymous enum

template<typename MatrixType , int _DiagIndex>
anonymous enum
Enumerator
DiagIndex 

Constructor & Destructor Documentation

◆ Diagonal()

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC Eigen::Diagonal< MatrixType, _DiagIndex >::Diagonal ( MatrixType &  matrix,
Index  a_index = DiagIndex 
)
inlineexplicit

Member Function Documentation

◆ coeff() [1/2]

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC CoeffReturnType Eigen::Diagonal< MatrixType, _DiagIndex >::coeff ( Index  idx) const
inline

◆ coeff() [2/2]

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC CoeffReturnType Eigen::Diagonal< MatrixType, _DiagIndex >::coeff ( Index  row,
Index   
) const
inline

◆ coeffRef() [1/4]

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC Scalar & Eigen::Diagonal< MatrixType, _DiagIndex >::coeffRef ( Index  idx)
inline

◆ coeffRef() [2/4]

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC const Scalar & Eigen::Diagonal< MatrixType, _DiagIndex >::coeffRef ( Index  idx) const
inline

◆ coeffRef() [3/4]

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC Scalar & Eigen::Diagonal< MatrixType, _DiagIndex >::coeffRef ( Index  row,
Index   
)
inline

◆ coeffRef() [4/4]

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC const Scalar & Eigen::Diagonal< MatrixType, _DiagIndex >::coeffRef ( Index  row,
Index   
) const
inline

◆ cols()

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index Eigen::Diagonal< MatrixType, _DiagIndex >::cols ( void  ) const
inline

◆ data() [1/2]

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC ScalarWithConstIfNotLvalue * Eigen::Diagonal< MatrixType, _DiagIndex >::data ( )
inline

◆ data() [2/2]

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC const Scalar * Eigen::Diagonal< MatrixType, _DiagIndex >::data ( ) const
inline

◆ index()

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC Index Eigen::Diagonal< MatrixType, _DiagIndex >::index ( ) const
inline

◆ innerStride()

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index Eigen::Diagonal< MatrixType, _DiagIndex >::innerStride ( ) const
inline

◆ nestedExpression()

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC const internal::remove_all< typenameMatrixType::Nested >::type & Eigen::Diagonal< MatrixType, _DiagIndex >::nestedExpression ( ) const
inline

◆ outerStride()

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index Eigen::Diagonal< MatrixType, _DiagIndex >::outerStride ( ) const
inline

◆ rows()

template<typename MatrixType , int _DiagIndex>
EIGEN_DEVICE_FUNC Index Eigen::Diagonal< MatrixType, _DiagIndex >::rows ( void  ) const
inline

Member Data Documentation

◆ m_index

template<typename MatrixType , int _DiagIndex>
const internal::variable_if_dynamicindex<Index, DiagIndex> Eigen::Diagonal< MatrixType, _DiagIndex >::m_index
protected

◆ m_matrix

template<typename MatrixType , int _DiagIndex>
internal::ref_selector<MatrixType>::non_const_type Eigen::Diagonal< MatrixType, _DiagIndex >::m_matrix
protected

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