Eigen  3.4.90 (git rev 67eeba6e720c5745abc77ae6c92ce0a44aa7b7ae)
Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime > Class Template Reference

Detailed Description

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

Represents a diagonal matrix with its storage.

Template Parameters
Scalar_the 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

Inherits DiagonalBase< DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime > >.

Public Member Functions

DiagonalVectorType & diagonal ()
 
const DiagonalVectorType & diagonal () const
 
 DiagonalMatrix ()
 
template<typename OtherDerived >
 DiagonalMatrix (const DiagonalBase< OtherDerived > &other)
 
template<typename OtherDerived >
 DiagonalMatrix (const MatrixBase< OtherDerived > &other)
 
template<typename... ArgTypes>
 DiagonalMatrix (const Scalar &a0, const Scalar &a1, const Scalar &a2, const ArgTypes &... args)
 Construct a diagonal matrix with fixed size from an arbitrary number of coefficients. More...
 
 DiagonalMatrix (const Scalar &x, const Scalar &y)
 
 DiagonalMatrix (const Scalar &x, const Scalar &y, const Scalar &z)
 
 DiagonalMatrix (const std::initializer_list< std::initializer_list< Scalar >> &list)
 Constructs a DiagonalMatrix and initializes it by elements given by an initializer list of initializer lists [c++11]
 
 DiagonalMatrix (DiagonalVectorType &&diag)
 Constructs a DiagonalMatrix from an r-value diagonal vector type.
 
 DiagonalMatrix (Index dim)
 
template<typename OtherDerived >
DiagonalMatrixoperator= (const DiagonalBase< OtherDerived > &other)
 
void resize (Index size)
 
void setIdentity ()
 
void setIdentity (Index size)
 
void setZero ()
 
void setZero (Index size)
 

Constructor & Destructor Documentation

◆ DiagonalMatrix() [1/7]

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

Default constructor without initialization

◆ DiagonalMatrix() [2/7]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
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::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::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... ArgTypes>
Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const Scalar &  a0,
const Scalar &  a1,
const Scalar &  a2,
const ArgTypes &...  args 
)
inline

Construct a diagonal matrix with fixed size from an arbitrary number of coefficients.

Warning
To construct a diagonal matrix of fixed size, the number of values passed to this constructor must match the fixed dimension of *this.
See also
DiagonalMatrix(const Scalar&, const Scalar&)
DiagonalMatrix(const Scalar&, const Scalar&, const Scalar&)

◆ DiagonalMatrix() [6/7]

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

Copy constructor.

◆ DiagonalMatrix() [7/7]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
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>
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>
const DiagonalVectorType& Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::diagonal ( ) const
inline

const version of diagonal().

◆ operator=()

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

Copy operator.

◆ resize()

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

Resizes to given size.

◆ setIdentity() [1/2]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
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>
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>
void Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero ( )
inline

Sets all coefficients to zero.

◆ setZero() [2/2]

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

Resizes and sets all coefficients to zero.


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