Public Types | 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 >:
DiagonalBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > > EigenBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >

List of all members.

Public Types

typedef internal::traits
< DiagonalMatrix >
::DiagonalVectorType 
DiagonalVectorType
typedef const DiagonalMatrixNested
typedef _Scalar Scalar
typedef internal::traits
< DiagonalMatrix >
::StorageKind 
StorageKind
typedef internal::traits
< DiagonalMatrix >::Index 
Index

Public Member Functions

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

Protected Attributes

DiagonalVectorType m_diagonal

Detailed Description

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
class 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

Member Typedef Documentation

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef internal::traits<DiagonalMatrix>::DiagonalVectorType DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalVectorType
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef internal::traits<DiagonalMatrix>::Index DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::Index
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef const DiagonalMatrix& DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::Nested
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef _Scalar DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::Scalar
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef internal::traits<DiagonalMatrix>::StorageKind DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::StorageKind

Constructor & Destructor Documentation

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix (  )  [inline]

Default constructor without initialization

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( Index  dim  )  [inline]

Constructs a diagonal matrix with given dimension

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const Scalar x,
const Scalar y 
) [inline]

2D constructor.

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const Scalar x,
const Scalar y,
const Scalar z 
) [inline]

3D constructor.

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const DiagonalBase< OtherDerived > &  other  )  [inline]

Copy constructor.

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
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

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const MatrixBase< OtherDerived > &  other  )  [inline, explicit]

generic constructor from expression of the diagonal coefficients


Member Function Documentation

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
const DiagonalVectorType& DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::diagonal (  )  const [inline]
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
DiagonalVectorType& DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::diagonal (  )  [inline]
Returns:
a reference to the stored vector of diagonal coefficients.

Reimplemented from DiagonalBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >.

template<typename _Scalar, int SizeAtCompileTime, int 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=.

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
DiagonalMatrix& DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::operator= ( const DiagonalBase< OtherDerived > &  other  )  [inline]

Copy operator.

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::resize ( Index  size  )  [inline]

Resizes to given size.

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity (  )  [inline]

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

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity ( Index  size  )  [inline]

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

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero ( Index  size  )  [inline]

Resizes and sets all coefficients to zero.

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero (  )  [inline]

Sets all coefficients to zero.


Member Data Documentation

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
DiagonalVectorType DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal [protected]

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