WPILibC++ 2023.4.3-108-ge5452e3
Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > Class Template Reference

Represents a diagonal matrix with its storage. More...

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

Inheritance diagram for Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >:
Eigen::DiagonalBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > > Eigen::EigenBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >

Public Types

typedef internal::traits< DiagonalMatrix >::DiagonalVectorType DiagonalVectorType
 
typedef const DiagonalMatrixNested
 
typedef _Scalar Scalar
 
typedef internal::traits< DiagonalMatrix >::StorageKind StorageKind
 
typedef internal::traits< DiagonalMatrix >::StorageIndex StorageIndex
 
- Public Types inherited from Eigen::DiagonalBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >
enum  
 
typedef internal::traits< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >::DiagonalVectorType DiagonalVectorType
 
typedef DiagonalVectorType::Scalar Scalar
 
typedef DiagonalVectorType::RealScalar RealScalar
 
typedef internal::traits< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >::StorageKind StorageKind
 
typedef internal::traits< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >::StorageIndex StorageIndex
 
typedef Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime, 0, MaxRowsAtCompileTime, MaxColsAtCompileTimeDenseMatrixType
 
typedef DenseMatrixType DenseType
 
typedef DiagonalMatrix< Scalar, DiagonalVectorType::SizeAtCompileTime, DiagonalVectorType::MaxSizeAtCompileTime > PlainObject
 
typedef DiagonalWrapper< const CwiseUnaryOp< internal::scalar_inverse_op< Scalar >, const DiagonalVectorType > > InverseReturnType
 
- Public Types inherited from Eigen::EigenBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >
typedef Eigen::Index Index
 The interface type of indices. More...
 
typedef internal::traits< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >::StorageKind StorageKind
 

Public Member Functions

EIGEN_DEVICE_FUNC const DiagonalVectorTypediagonal () const
 const version of diagonal(). More...
 
EIGEN_DEVICE_FUNC DiagonalVectorTypediagonal ()
 
EIGEN_DEVICE_FUNC DiagonalMatrix ()
 Default constructor without initialization. More...
 
EIGEN_DEVICE_FUNC DiagonalMatrix (Index dim)
 Constructs a diagonal matrix with given dimension
More...
 
EIGEN_DEVICE_FUNC DiagonalMatrix (const Scalar &x, const Scalar &y)
 2D constructor. More...
 
EIGEN_DEVICE_FUNC DiagonalMatrix (const Scalar &x, const Scalar &y, const Scalar &z)
 3D constructor. More...
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC DiagonalMatrix (const DiagonalBase< OtherDerived > &other)
 Copy constructor. More...
 
 DiagonalMatrix (const DiagonalMatrix &other)
 copy constructor. More...
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC DiagonalMatrix (const MatrixBase< OtherDerived > &other)
 generic constructor from expression of the diagonal coefficients More...
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC DiagonalMatrixoperator= (const DiagonalBase< OtherDerived > &other)
 Copy operator. More...
 
EIGEN_DEVICE_FUNC DiagonalMatrixoperator= (const DiagonalMatrix &other)
 This is a special case of the templated operator=. More...
 
EIGEN_DEVICE_FUNC void resize (Index size)
 Resizes to given size. More...
 
EIGEN_DEVICE_FUNC void setZero ()
 Sets all coefficients to zero. More...
 
EIGEN_DEVICE_FUNC void setZero (Index size)
 Resizes and sets all coefficients to zero. More...
 
EIGEN_DEVICE_FUNC void setIdentity ()
 Sets this matrix to be the identity matrix of the current size. More...
 
EIGEN_DEVICE_FUNC void setIdentity (Index size)
 Sets this matrix to be the identity matrix of the given size. More...
 
- Public Member Functions inherited from Eigen::DiagonalBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >
EIGEN_DEVICE_FUNC const DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > & derived () const
 
EIGEN_DEVICE_FUNC DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > & derived ()
 
EIGEN_DEVICE_FUNC DenseMatrixType toDenseMatrix () const
 
EIGEN_DEVICE_FUNC const DiagonalVectorTypediagonal () const
 
EIGEN_DEVICE_FUNC DiagonalVectorTypediagonal ()
 
EIGEN_DEVICE_FUNC Index rows () const
 
EIGEN_DEVICE_FUNC Index cols () const
 
EIGEN_DEVICE_FUNC const Product< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >, MatrixDerived, LazyProduct > operator* (const MatrixBase< MatrixDerived > &matrix) const
 
EIGEN_DEVICE_FUNC const DiagonalWrapper< const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DiagonalVectorType, Scalar, product) > operator* (const Scalar &scalar) const
 
EIGEN_DEVICE_FUNC const InverseReturnType inverse () const
 
EIGEN_DEVICE_FUNC const DiagonalWrapper< const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType, typename OtherDerived::DiagonalVectorType, sum) > operator+ (const DiagonalBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC const DiagonalWrapper< const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType, typename OtherDerived::DiagonalVectorType, difference) > operator- (const DiagonalBase< OtherDerived > &other) const
 
- Public Member Functions inherited from Eigen::EigenBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >
EIGEN_DEVICE_FUNC DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > & derived ()
 
EIGEN_DEVICE_FUNC const DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > & derived () const
 
EIGEN_DEVICE_FUNC DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > & const_cast_derived () const
 
EIGEN_DEVICE_FUNC const DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > & 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
 
EIGEN_DEVICE_FUNC void evalTo (Dest &dst) const
 
EIGEN_DEVICE_FUNC void addTo (Dest &dst) const
 
EIGEN_DEVICE_FUNC void subTo (Dest &dst) const
 
EIGEN_DEVICE_FUNC void applyThisOnTheRight (Dest &dst) const
 
EIGEN_DEVICE_FUNC void applyThisOnTheLeft (Dest &dst) const
 

Protected Attributes

DiagonalVectorType m_diagonal
 

Detailed Description

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
class Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >

Represents a diagonal matrix with its storage.

Parameters
_Scalarthe type of coefficients
SizeAtCompileTimethe dimension of the matrix, or Dynamic
MaxSizeAtCompileTimethe dimension of the matrix, or Dynamic. This parameter is optional and defaults to SizeAtCompileTime. Most of the time, you do not need to specify it.
See also
class DiagonalWrapper

Member Typedef Documentation

◆ DiagonalVectorType

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef internal::traits<DiagonalMatrix>::DiagonalVectorType Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalVectorType

◆ Nested

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef const DiagonalMatrix& Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::Nested

◆ Scalar

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef _Scalar Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::Scalar

◆ StorageIndex

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef internal::traits<DiagonalMatrix>::StorageIndex Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::StorageIndex

◆ StorageKind

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef internal::traits<DiagonalMatrix>::StorageKind Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::StorageKind

Constructor & Destructor Documentation

◆ DiagonalMatrix() [1/7]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( )
inline

Default constructor without initialization.

◆ DiagonalMatrix() [2/7]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( Index  dim)
inlineexplicit

Constructs a diagonal matrix with given dimension

◆ DiagonalMatrix() [3/7]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const Scalar x,
const Scalar y 
)
inline

2D constructor.

◆ DiagonalMatrix() [4/7]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const Scalar x,
const Scalar y,
const Scalar z 
)
inline

3D constructor.

◆ DiagonalMatrix() [5/7]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const DiagonalBase< OtherDerived > &  other)
inline

Copy constructor.

◆ DiagonalMatrix() [6/7]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > &  other)
inline

copy constructor.

prevent a default copy constructor from hiding the other templated constructor

◆ DiagonalMatrix() [7/7]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const MatrixBase< OtherDerived > &  other)
inlineexplicit

generic constructor from expression of the diagonal coefficients

Member Function Documentation

◆ diagonal() [1/2]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC DiagonalVectorType & Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::diagonal ( )
inline
Returns
a reference to the stored vector of diagonal coefficients.

◆ diagonal() [2/2]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC const DiagonalVectorType & Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::diagonal ( ) const
inline

const version of diagonal().

◆ operator=() [1/2]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC DiagonalMatrix & Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::operator= ( const DiagonalBase< OtherDerived > &  other)
inline

Copy operator.

◆ operator=() [2/2]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC DiagonalMatrix & Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::operator= ( const DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > &  other)
inline

This is a special case of the templated operator=.

Its purpose is to prevent a default operator= from hiding the templated operator=.

◆ resize()

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC void Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::resize ( Index  size)
inline

Resizes to given size.

◆ setIdentity() [1/2]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC void Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity ( )
inline

Sets this matrix to be the identity matrix of the current size.

◆ setIdentity() [2/2]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC void Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity ( Index  size)
inline

Sets this matrix to be the identity matrix of the given size.

◆ setZero() [1/2]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC void Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero ( )
inline

Sets all coefficients to zero.

◆ setZero() [2/2]

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC void Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero ( Index  size)
inline

Resizes and sets all coefficients to zero.

Member Data Documentation

◆ m_diagonal

template<typename _Scalar , int SizeAtCompileTime, int MaxSizeAtCompileTime>
DiagonalVectorType Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal
protected

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