template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
DiagonalMatrix class
Represents a diagonal matrix with its storage.
Contents
Constructors, destructors, conversion operators
- DiagonalMatrix()
- DiagonalMatrix(Index dim) explicit
- 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)
-
template<typename OtherDerived>DiagonalMatrix(const MatrixBase<OtherDerived>& other) explicit
Public functions
- auto diagonal() const -> const DiagonalVectorType&
- auto diagonal() -> DiagonalVectorType&
-
template<typename OtherDerived>auto operator=(const DiagonalBase<OtherDerived>& other) -> DiagonalMatrix&
- void resize(Index size)
- void setIdentity()
- void setIdentity(Index size)
- void setZero()
- void setZero(Index size)
Function documentation
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
Eigen:: DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>:: DiagonalMatrix()
Default constructor without initialization
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
Eigen:: DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>:: DiagonalMatrix(Index dim) explicit
Constructs a diagonal matrix with given dimension
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
Eigen:: DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>:: DiagonalMatrix(const Scalar& x,
const Scalar& y)
2D constructor.
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
Eigen:: DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>:: DiagonalMatrix(const Scalar& x,
const Scalar& y,
const Scalar& z)
3D constructor.
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived>
Eigen:: DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>:: DiagonalMatrix(const DiagonalBase<OtherDerived>& other)
Copy constructor.
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived>
Eigen:: DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>:: DiagonalMatrix(const MatrixBase<OtherDerived>& other) explicit
generic constructor from expression of the diagonal coefficients
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
const DiagonalVectorType& Eigen:: DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>:: diagonal() const
const version of diagonal().
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
DiagonalVectorType& Eigen:: DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>:: diagonal()
Returns | a reference to the stored vector of diagonal coefficients. |
---|
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived>
DiagonalMatrix& Eigen:: DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>:: operator=(const DiagonalBase<OtherDerived>& other)
Copy operator.
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void Eigen:: DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>:: setIdentity()
Sets this matrix to be the identity matrix of the current size.
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void Eigen:: DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>:: setIdentity(Index size)
Sets this matrix to be the identity matrix of the given size.
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void Eigen:: DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>:: setZero()
Sets all coefficients to zero.