Public Member Functions | Protected Attributes
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > Class Template Reference

Represents a diagonal matrix with its storage. More...

#include <DiagonalMatrix.h>

+ Inheritance diagram for DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >:

List of all members.

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)
template<typename OtherDerived >
 DiagonalMatrix (const MatrixBase< OtherDerived > &other)
template<typename OtherDerived >
DiagonalMatrixoperator= (const DiagonalBase< OtherDerived > &other)
void resize (Index size)
void setIdentity ()
void setIdentity (Index size)
void setZero ()
void setZero (Index size)

Protected Attributes

DiagonalVectorType m_diagonal

Detailed Description

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

Represents a diagonal matrix with its storage.

Parameters:
_Scalarthe 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

Constructor & Destructor Documentation

DiagonalMatrix ( ) [inline]

Default constructor without initialization

DiagonalMatrix ( Index  dim) [inline]

Constructs a diagonal matrix with given dimension

DiagonalMatrix ( const Scalar &  x,
const Scalar &  y 
) [inline]

2D constructor.

DiagonalMatrix ( const Scalar &  x,
const Scalar &  y,
const Scalar &  z 
) [inline]

3D constructor.

DiagonalMatrix ( const DiagonalBase< OtherDerived > &  other) [inline]

Copy constructor.

DiagonalMatrix ( const MatrixBase< OtherDerived > &  other) [inline, explicit]

generic constructor from expression of the diagonal coefficients


Member Function Documentation

const DiagonalVectorType& diagonal ( ) const [inline]
DiagonalVectorType& diagonal ( ) [inline]
Returns:
a reference to the stored vector of diagonal coefficients.

References DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal.

DiagonalMatrix& operator= ( const DiagonalBase< OtherDerived > &  other) [inline]
void resize ( Index  size) [inline]
void setIdentity ( ) [inline]

Sets this matrix to be the identity matrix of the current size.

References DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal.

void setIdentity ( Index  size) [inline]

Sets this matrix to be the identity matrix of the given size.

References DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal.

void setZero ( ) [inline]
void setZero ( Index  size) [inline]

Resizes and sets all coefficients to zero.

References DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal.


Member Data Documentation

DiagonalVectorType m_diagonal [protected]

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