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
Public Member Functions |
| const DiagonalVectorType & | diagonal () const |
| | const version of diagonal().
|
| DiagonalVectorType & | diagonal () |
| | DiagonalMatrix () |
| | Default constructor without initialization.
|
| | DiagonalMatrix (Index dim) |
| | Constructs a diagonal matrix with given dimension.
|
| | DiagonalMatrix (const Scalar &x, const Scalar &y) |
| | 2D constructor.
|
| | DiagonalMatrix (const Scalar &x, const Scalar &y, const Scalar &z) |
| | 3D constructor.
|
| template<typename OtherDerived > |
| | DiagonalMatrix (const DiagonalBase< OtherDerived > &other) |
| | Copy constructor.
|
| template<typename OtherDerived > |
| | DiagonalMatrix (const MatrixBase< OtherDerived > &other) |
| | generic constructor from expression of the diagonal coefficients
|
| template<typename OtherDerived > |
| DiagonalMatrix & | operator= (const DiagonalBase< OtherDerived > &other) |
| | Copy operator.
|
| void | resize (Index size) |
| | Resizes to given size.
|
| void | setZero () |
| | Sets all coefficients to zero.
|
| void | setZero (Index size) |
| | Resizes and sets all coefficients to zero.
|
| void | setIdentity () |
| | Sets this matrix to be the identity matrix of the current size.
|
| void | setIdentity (Index size) |
| | Sets this matrix to be the identity matrix of the given size.
|
Protected Attributes |
| DiagonalVectorType | m_diagonal |