Represents a diagonal matrix with its storage. More...
#include <DiagonalMatrix.h>
Public Types | |
typedef internal::traits < DiagonalMatrix > ::DiagonalVectorType | DiagonalVectorType |
typedef const DiagonalMatrix & | Nested |
typedef _Scalar | Scalar |
typedef internal::traits < DiagonalMatrix > ::StorageKind | StorageKind |
typedef internal::traits < DiagonalMatrix >::Index | Index |
Public Member Functions | |
const DiagonalVectorType & | diagonal () const |
DiagonalVectorType & | diagonal () |
DiagonalMatrix () | |
DiagonalMatrix (Index dim) | |
DiagonalMatrix (const Scalar &x, const Scalar &y) | |
DiagonalMatrix (const Scalar &x, const Scalar &y, const Scalar &z) | |
template<typename OtherDerived > | |
DiagonalMatrix (const DiagonalBase< OtherDerived > &other) | |
DiagonalMatrix (const DiagonalMatrix &other) | |
template<typename OtherDerived > | |
DiagonalMatrix (const MatrixBase< OtherDerived > &other) | |
template<typename OtherDerived > | |
DiagonalMatrix & | operator= (const DiagonalBase< OtherDerived > &other) |
DiagonalMatrix & | operator= (const DiagonalMatrix &other) |
void | resize (Index size) |
void | setZero () |
void | setZero (Index size) |
void | setIdentity () |
void | setIdentity (Index size) |
Protected Attributes | |
DiagonalVectorType | m_diagonal |
Represents a diagonal matrix with its storage.
_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. |
typedef internal::traits<DiagonalMatrix>::DiagonalVectorType DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalVectorType |
typedef internal::traits<DiagonalMatrix>::Index DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::Index |
typedef const DiagonalMatrix& DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::Nested |
typedef _Scalar DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::Scalar |
typedef internal::traits<DiagonalMatrix>::StorageKind DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::StorageKind |
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix | ( | ) | [inline] |
Default constructor without initialization
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix | ( | Index | dim | ) | [inline] |
Constructs a diagonal matrix with given dimension
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix | ( | const Scalar & | x, | |
const Scalar & | y | |||
) | [inline] |
2D constructor.
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix | ( | const Scalar & | x, | |
const Scalar & | y, | |||
const Scalar & | z | |||
) | [inline] |
3D constructor.
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix | ( | const DiagonalBase< OtherDerived > & | other | ) | [inline] |
Copy constructor.
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< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix | ( | const MatrixBase< OtherDerived > & | other | ) | [inline, explicit] |
generic constructor from expression of the diagonal coefficients
const DiagonalVectorType& DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::diagonal | ( | ) | const [inline] |
const version of diagonal().
Reimplemented from DiagonalBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >.
DiagonalVectorType& DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::diagonal | ( | ) | [inline] |
Reimplemented from DiagonalBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >.
DiagonalMatrix& 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=.
DiagonalMatrix& DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::operator= | ( | const DiagonalBase< OtherDerived > & | other | ) | [inline] |
Copy operator.
void DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::resize | ( | Index | size | ) | [inline] |
Resizes to given size.
void DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity | ( | ) | [inline] |
Sets this matrix to be the identity matrix of the current size.
void DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity | ( | Index | size | ) | [inline] |
Sets this matrix to be the identity matrix of the given size.
void DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero | ( | Index | size | ) | [inline] |
Resizes and sets all coefficients to zero.
void DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero | ( | ) | [inline] |
Sets all coefficients to zero.
DiagonalVectorType DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal [protected] |