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

Public Types

typedef internal::traits< DiagonalMatrix >::DiagonalVectorType DiagonalVectorType
 
typedef const DiagonalMatrixNested
 
typedef Scalar_ Scalar
 
typedef internal::traits< DiagonalMatrix >::StorageKind StorageKind
 
typedef internal::traits< DiagonalMatrix >::StorageIndex StorageIndex
 
typedef DiagonalWrapper< const CwiseNullaryOp< internal::scalar_constant_op< Scalar >, DiagonalVectorType > > InitializeReturnType
 
typedef DiagonalWrapper< const CwiseNullaryOp< internal::scalar_zero_op< Scalar >, DiagonalVectorType > > ZeroInitializeReturnType
 
- 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 > >::StorageIndex StorageIndex
 
typedef Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime, 0, MaxRowsAtCompileTime, MaxColsAtCompileTimeDenseMatrixType
 
typedef DenseMatrixType DenseType
 
typedef DiagonalMatrix< Scalar, DiagonalVectorType::SizeAtCompileTime, DiagonalVectorType::MaxSizeAtCompileTime > PlainObject
 
using DiagonalProductReturnType = DiagonalWrapper< const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType, typename OtherDerived::DiagonalVectorType, product)>
 
using DiagonalInverseReturnType = DiagonalWrapper< const CwiseUnaryOp< internal::scalar_inverse_op< Scalar >, const DiagonalVectorType > >
 
using DiagonalScaleReturnType = DiagonalWrapper< const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DiagonalVectorType, Scalar, product)>
 
using ScaleDiagonalReturnType = DiagonalWrapper< const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar, DiagonalVectorType, product)>
 
using DiagonalSumReturnType = DiagonalWrapper< const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType, typename OtherDerived::DiagonalVectorType, sum)>
 
using DiagonalDifferenceReturnType = DiagonalWrapper< const EIGEN_CWISE_BINARY_RETURN_TYPE(DiagonalVectorType, typename OtherDerived::DiagonalVectorType, difference)>
 
- Public Types inherited from Eigen::EigenBase< Derived >
typedef Eigen::Index Index
 The interface type of indices. More...
 
typedef internal::traits< Derived >::StorageKind StorageKind
 

Public Member Functions

EIGEN_DEVICE_FUNC const DiagonalVectorTypediagonal () const
 
EIGEN_DEVICE_FUNC DiagonalVectorTypediagonal ()
 
EIGEN_DEVICE_FUNC DiagonalMatrix ()
 
EIGEN_DEVICE_FUNC DiagonalMatrix (Index dim)
 
EIGEN_DEVICE_FUNC DiagonalMatrix (const Scalar &x, const Scalar &y)
 
EIGEN_DEVICE_FUNC DiagonalMatrix (const Scalar &x, const Scalar &y, const Scalar &z)
 
template<typename... ArgTypes>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DiagonalMatrix (const Scalar &a0, const Scalar &a1, const Scalar &a2, const ArgTypes &... args)
 Construct a diagonal matrix with fixed size from an arbitrary number of coefficients. More...
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DiagonalMatrix (const std::initializer_list< std::initializer_list< Scalar >> &list)
 Constructs a DiagonalMatrix and initializes it by elements given by an initializer list of initializer lists \cpp11. More...
 
EIGEN_DEVICE_FUNC DiagonalMatrix (DiagonalVectorType &&diag)
 Constructs a DiagonalMatrix from an r-value diagonal vector type. More...
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC DiagonalMatrix (const DiagonalBase< OtherDerived > &other)
 
 DiagonalMatrix (const DiagonalMatrix &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC DiagonalMatrix (const MatrixBase< OtherDerived > &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC DiagonalMatrixoperator= (const DiagonalBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC DiagonalMatrixoperator= (const DiagonalMatrix &other)
 
EIGEN_DEVICE_FUNC void resize (Index size)
 
EIGEN_DEVICE_FUNC void setZero ()
 
EIGEN_DEVICE_FUNC void setZero (Index size)
 
EIGEN_DEVICE_FUNC void setIdentity ()
 
EIGEN_DEVICE_FUNC void setIdentity (Index size)
 
- Public Member Functions inherited from Eigen::DiagonalBase< DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime > >
EIGEN_DEVICE_FUNC const DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime > & derived () const
 
EIGEN_DEVICE_FUNC DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime > & derived ()
 
EIGEN_DEVICE_FUNC DenseMatrixType toDenseMatrix () const
 
EIGEN_DEVICE_FUNC const DiagonalVectorTypediagonal () const
 
EIGEN_DEVICE_FUNC DiagonalVectorTypediagonal ()
 
EIGEN_DEVICE_FUNC Scalar coeff (Index row, Index col) const
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows () const
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols () const
 
EIGEN_DEVICE_FUNC const Product< DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >, MatrixDerived, LazyProduct > operator* (const MatrixBase< MatrixDerived > &matrix) const
 
EIGEN_DEVICE_FUNC const DiagonalProductReturnType< OtherDerived > operator* (const DiagonalBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC const DiagonalScaleReturnType operator* (const Scalar &scalar) const
 
EIGEN_DEVICE_FUNC const DiagonalInverseReturnType inverse () const
 
EIGEN_DEVICE_FUNC const DiagonalSumReturnType< OtherDerived > operator+ (const DiagonalBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC const DiagonalDifferenceReturnType< OtherDerived > operator- (const DiagonalBase< OtherDerived > &other) const
 
- Public Member Functions inherited from Eigen::EigenBase< Derived >
constexpr EIGEN_DEVICE_FUNC Derived & derived ()
 
constexpr EIGEN_DEVICE_FUNC const Derived & derived () const
 
EIGEN_DEVICE_FUNC Derived & const_cast_derived () const
 
EIGEN_DEVICE_FUNC const Derived & const_derived () const
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index size () const EIGEN_NOEXCEPT
 
template<typename Dest >
EIGEN_DEVICE_FUNC void evalTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void addTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void subTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void applyThisOnTheRight (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void applyThisOnTheLeft (Dest &dst) const
 
template<typename Device >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< Derived, Device > device (Device &device)
 
template<typename Device >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< const Derived, Device > device (Device &device) const
 

Static Public Member Functions

static EIGEN_DEVICE_FUNC const ZeroInitializeReturnType Zero ()
 
static EIGEN_DEVICE_FUNC const ZeroInitializeReturnType Zero (Index size)
 
static EIGEN_DEVICE_FUNC const InitializeReturnType Identity ()
 
static EIGEN_DEVICE_FUNC const InitializeReturnType Identity (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.

Template Parameters
Scalar_the 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 DiagonalBase, class DiagonalWrapper

Member Typedef Documentation

◆ DiagonalVectorType

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef internal::traits<DiagonalMatrix>::DiagonalVectorType Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalVectorType

◆ InitializeReturnType

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef DiagonalWrapper<const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, DiagonalVectorType> > Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::InitializeReturnType

◆ Nested

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef const DiagonalMatrix& Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::Nested

◆ Scalar

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef Scalar_ Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::Scalar

◆ StorageIndex

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef internal::traits<DiagonalMatrix>::StorageIndex Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::StorageIndex

◆ StorageKind

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef internal::traits<DiagonalMatrix>::StorageKind Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::StorageKind

◆ ZeroInitializeReturnType

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
typedef DiagonalWrapper<const CwiseNullaryOp<internal::scalar_zero_op<Scalar>, DiagonalVectorType> > Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::ZeroInitializeReturnType

Constructor & Destructor Documentation

◆ DiagonalMatrix() [1/10]

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

Default constructor without initialization

192 {}

◆ DiagonalMatrix() [2/10]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( Index  dim)
inlineexplicit

Constructs a diagonal matrix with given dimension

195 : m_diagonal(dim) {}
DiagonalVectorType m_diagonal
Definition: DiagonalMatrix.h:183

◆ DiagonalMatrix() [3/10]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const Scalar x,
const Scalar y 
)
inline

2D constructor.

198 : m_diagonal(x, y) {}
Scalar * y
Definition: level1_cplx_impl.h:128
list x
Definition: plotDoE.py:28

◆ DiagonalMatrix() [4/10]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const Scalar x,
const Scalar y,
const Scalar z 
)
inline

3D constructor.

201 : m_diagonal(x, y, z) {}

◆ DiagonalMatrix() [5/10]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename... ArgTypes>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const Scalar a0,
const Scalar a1,
const Scalar a2,
const ArgTypes &...  args 
)
inline

Construct a diagonal matrix with fixed size from an arbitrary number of coefficients.

Warning
To construct a diagonal matrix of fixed size, the number of values passed to this constructor must match the fixed dimension of *this.
See also
DiagonalMatrix(const Scalar&, const Scalar&)
DiagonalMatrix(const Scalar&, const Scalar&, const Scalar&)
214  : m_diagonal(a0, a1, a2, args...) {}
args
Definition: compute_granudrum_aor.py:143

◆ DiagonalMatrix() [6/10]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const std::initializer_list< std::initializer_list< Scalar >> &  list)
inlineexplicit

Constructs a DiagonalMatrix and initializes it by elements given by an initializer list of initializer lists \cpp11.

221  : m_diagonal(list) {}

◆ DiagonalMatrix() [7/10]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( DiagonalVectorType &&  diag)
inlineexplicit

Constructs a DiagonalMatrix from an r-value diagonal vector type.

224 : m_diagonal(std::move(diag)) {}
const char const char const char * diag
Definition: level2_impl.h:86

◆ DiagonalMatrix() [8/10]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const DiagonalBase< OtherDerived > &  other)
inline

Copy constructor.

228 : m_diagonal(other.diagonal()) {}

◆ DiagonalMatrix() [9/10]

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

232 : m_diagonal(other.diagonal()) {}

◆ DiagonalMatrix() [10/10]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::DiagonalMatrix ( const MatrixBase< OtherDerived > &  other)
inlineexplicit

generic constructor from expression of the diagonal coefficients

237 : m_diagonal(other) {}

Member Function Documentation

◆ diagonal() [1/2]

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

References Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal.

◆ diagonal() [2/2]

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

◆ Identity() [1/2]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
static EIGEN_DEVICE_FUNC const InitializeReturnType Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::Identity ( )
inlinestatic

Initializes a identity matrix of size SizeAtCompileTime

269 { return DiagonalVectorType::Ones().asDiagonal(); }

◆ Identity() [2/2]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
static EIGEN_DEVICE_FUNC const InitializeReturnType Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::Identity ( Index  size)
inlinestatic

Initializes a identity matrix of size dim

271  {
272  return DiagonalVectorType::Ones(size).asDiagonal();
273  }
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
Definition: EigenBase.h:64

References Eigen::EigenBase< Derived >::size().

◆ operator=() [1/2]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC DiagonalMatrix& Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::operator= ( const DiagonalBase< OtherDerived > &  other)
inline

Copy operator.

241  {
242  m_diagonal = other.diagonal();
243  return *this;
244  }

References Eigen::DiagonalBase< Derived >::diagonal(), and Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal.

◆ operator=() [2/2]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC 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=.

250  {
251  m_diagonal = other.diagonal();
252  return *this;
253  }

References Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::diagonal(), and Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal.

◆ resize()

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC void Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::resize ( Index  size)
inline

◆ setIdentity() [1/2]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC void Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity ( )
inline

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

282 { m_diagonal.setOnes(); }

References Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal.

◆ setIdentity() [2/2]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC void Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity ( Index  size)
inline

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

284 { m_diagonal.setOnes(size); }

References Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal, and Eigen::EigenBase< Derived >::size().

◆ setZero() [1/2]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC void Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero ( )
inline

Sets all coefficients to zero.

278 { m_diagonal.setZero(); }

References Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::m_diagonal.

◆ setZero() [2/2]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
EIGEN_DEVICE_FUNC void Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero ( Index  size)
inline

◆ Zero() [1/2]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
static EIGEN_DEVICE_FUNC const ZeroInitializeReturnType Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::Zero ( )
inlinestatic

Initializes a diagonal matrix of size SizeAtCompileTime with coefficients set to zero

263 { return DiagonalVectorType::Zero().asDiagonal(); }
double Zero
Definition: pseudosolid_node_update_elements.cc:35

References oomph::PseudoSolidHelper::Zero.

◆ Zero() [2/2]

template<typename Scalar_ , int SizeAtCompileTime, int MaxSizeAtCompileTime>
static EIGEN_DEVICE_FUNC const ZeroInitializeReturnType Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::Zero ( Index  size)
inlinestatic

Initializes a diagonal matrix of size dim with coefficients set to zero

265  {
266  return DiagonalVectorType::Zero(size).asDiagonal();
267  }

Member Data Documentation

◆ m_diagonal


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