W3cubDocs

/Eigen3

Eigen::DiagonalMatrix

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

Represents a diagonal matrix with its storage.

Parameters
_Scalar the type of coefficients
SizeAtCompileTime the dimension of the matrix, or Dynamic
MaxSizeAtCompileTime the 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 > >.

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. [c++11] 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 (Index dim)
template<typename OtherDerived >
DiagonalMatrix & operator= (const DiagonalBase< OtherDerived > &other)
void resize (Index size)
void setIdentity ()
void setIdentity (Index size)
void setZero ()
void setZero (Index size)

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. [c++11]

There exists C++98 anologue constructors for fixed-size diagonal matrices having 2 or 3 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

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:

© Eigen.
Licensed under the MPL2 License.
https://eigen.tuxfamily.org/dox/classEigen_1_1DiagonalMatrix.html