Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Public Types | Public Member Functions | Protected Attributes
Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > Class Template Reference

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

#include <DiagonalMatrix.h>

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

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 Types inherited from Eigen::DiagonalBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >
enum  
 
typedef internal::traits< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >::DiagonalVectorType DiagonalVectorType
 
typedef DiagonalVectorType::Scalar Scalar
 
typedef DiagonalVectorType::RealScalar RealScalar
 
typedef internal::traits< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >::StorageKind StorageKind
 
typedef internal::traits< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >::Index Index
 
typedef Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime, 0, MaxRowsAtCompileTime, MaxColsAtCompileTime > DenseMatrixType
 
typedef DenseMatrixType DenseType
 
typedef DiagonalMatrix< Scalar, DiagonalVectorType::SizeAtCompileTime, DiagonalVectorType::MaxSizeAtCompileTime > PlainObject
 
- Public Types inherited from Eigen::EigenBase< Derived >
typedef internal::traits< Derived >::StorageKind StorageKind
 
typedef internal::traits< Derived >::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 >
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)
 
- Public Member Functions inherited from Eigen::DiagonalBase< DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > >
const DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > & derived () const
 
DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime > & derived ()
 
DenseMatrixType toDenseMatrix () const
 
void evalTo (MatrixBase< DenseDerived > &other) const
 
void addTo (MatrixBase< DenseDerived > &other) const
 
void subTo (MatrixBase< DenseDerived > &other) const
 
const DiagonalVectorType & diagonal () const
 
DiagonalVectorType & diagonal ()
 
Index rows () const
 
Index cols () const
 
const DiagonalProduct< MatrixDerived, DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >, OnTheLeft > operator* (const MatrixBase< MatrixDerived > &matrix) const
 
const DiagonalWrapper< const CwiseUnaryOp< internal::scalar_multiple_op< Scalar >, const DiagonalVectorType > > operator* (const Scalar &scalar) const
 
const DiagonalWrapper< const CwiseUnaryOp< internal::scalar_inverse_op< Scalar >, const DiagonalVectorType > > inverse () const
 
- Public Member Functions inherited from Eigen::EigenBase< Derived >
Derived & derived ()
 
const Derived & derived () const
 
Derived & const_cast_derived () const
 
const Derived & const_derived () const
 
Index rows () const
 
Index cols () const
 
Index size () const
 
template<typename Dest >
void evalTo (Dest &dst) const
 
template<typename Dest >
void addTo (Dest &dst) const
 
template<typename Dest >
void subTo (Dest &dst) const
 
template<typename Dest >
void applyThisOnTheRight (Dest &dst) const
 
template<typename Dest >
void applyThisOnTheLeft (Dest &dst) const
 

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

Definition at line 135 of file DiagonalMatrix.h.

Constructor & Destructor Documentation

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

Default constructor without initialization

Definition at line 159 of file DiagonalMatrix.h.

159 {}
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( Index  dim)
inline

Constructs a diagonal matrix with given dimension

Definition at line 162 of file DiagonalMatrix.h.

162 : m_diagonal(dim) {}
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const Scalar &  x,
const Scalar &  y 
)
inline

2D constructor.

Definition at line 165 of file DiagonalMatrix.h.

165 : m_diagonal(x,y) {}
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const Scalar &  x,
const Scalar &  y,
const Scalar &  z 
)
inline

3D constructor.

Definition at line 168 of file DiagonalMatrix.h.

168 : m_diagonal(x,y,z) {}
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const DiagonalBase< OtherDerived > &  other)
inline

Copy constructor.

Definition at line 172 of file DiagonalMatrix.h.

172 : m_diagonal(other.diagonal()) {}
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
Eigen::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

Definition at line 176 of file DiagonalMatrix.h.

176 : m_diagonal(other.diagonal()) {}
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const MatrixBase< OtherDerived > &  other)
inlineexplicit

generic constructor from expression of the diagonal coefficients

Definition at line 181 of file DiagonalMatrix.h.

181  : m_diagonal(other)
182  {}

Member Function Documentation

template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
const DiagonalVectorType& Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::diagonal ( ) const
inline

const version of diagonal().

Definition at line 154 of file DiagonalMatrix.h.

154 { return m_diagonal; }
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
DiagonalVectorType& Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::diagonal ( )
inline
Returns
a reference to the stored vector of diagonal coefficients.

Definition at line 156 of file DiagonalMatrix.h.

156 { return m_diagonal; }
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
DiagonalMatrix& Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::operator= ( const DiagonalBase< OtherDerived > &  other)
inline

Copy operator.

Definition at line 186 of file DiagonalMatrix.h.

187  {
188  m_diagonal = other.diagonal();
189  return *this;
190  }
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
DiagonalMatrix& Eigen::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=.

Definition at line 196 of file DiagonalMatrix.h.

197  {
198  m_diagonal = other.diagonal();
199  return *this;
200  }
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::resize ( Index  size)
inline

Resizes to given size.

Definition at line 204 of file DiagonalMatrix.h.

204 { m_diagonal.resize(size); }
Index size() const
Definition: EigenBase.h:49
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity ( )
inline

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

Definition at line 210 of file DiagonalMatrix.h.

210 { m_diagonal.setOnes(); }
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity ( Index  size)
inline

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

Definition at line 212 of file DiagonalMatrix.h.

212 { m_diagonal.setOnes(size); }
Index size() const
Definition: EigenBase.h:49
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero ( )
inline

Sets all coefficients to zero.

Definition at line 206 of file DiagonalMatrix.h.

206 { m_diagonal.setZero(); }
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
void Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero ( Index  size)
inline

Resizes and sets all coefficients to zero.

Definition at line 208 of file DiagonalMatrix.h.

208 { m_diagonal.setZero(size); }
Index size() const
Definition: EigenBase.h:49

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