Eigen::EigenBase< Derived > Class Template Reference

#include <EigenBase.h>

+ Inheritance diagram for Eigen::EigenBase< Derived >:

Public Types

typedef Eigen::Index Index
 The interface type of indices. More...
 
typedef internal::traits< Derived >::StorageKind StorageKind
 

Public Member Functions

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
 

Detailed Description

template<typename Derived>
class Eigen::EigenBase< Derived >

Common base class for all classes T such that MatrixBase has an operator=(T) and a constructor MatrixBase(T).

In other words, an EigenBase object is an object that can be copied into a MatrixBase.

Besides MatrixBase-derived classes, this also includes special matrix classes such as diagonal matrices, etc.

Notice that this class is trivial, it is only used to disambiguate overloaded functions.

See also
\blank The class hierarchy

Member Typedef Documentation

◆ Index

template<typename Derived >
typedef Eigen::Index Eigen::EigenBase< Derived >::Index

The interface type of indices.

To change this, #define the preprocessor symbol EIGEN_DEFAULT_DENSE_INDEX_TYPE.

See also
StorageIndex, Preprocessor directives. DEPRECATED: Since Eigen 3.3, its usage is deprecated. Use Eigen::Index instead. Deprecation is not marked with a doxygen comment because there are too many existing usages to add the deprecation attribute.

◆ StorageKind

template<typename Derived >
typedef internal::traits<Derived>::StorageKind Eigen::EigenBase< Derived >::StorageKind

Member Function Documentation

◆ addTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::addTo ( Dest &  dst) const
inline

Don't use it, but do the equivalent:

dst += *this;
74  {
75  // This is the default implementation,
76  // derived class can reimplement it in a more optimized way.
77  typename Dest::PlainObject res(rows(), cols());
78  evalTo(res);
79  dst += res;
80  }
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: EigenBase.h:61
EIGEN_DEVICE_FUNC void evalTo(Dest &dst) const
Definition: EigenBase.h:68
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: EigenBase.h:59

◆ applyThisOnTheLeft()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::applyThisOnTheLeft ( Dest &  dst) const
inline

Don't use it, but do the equivalent:

dst.applyOnTheLeft(*this);
102  {
103  // This is the default implementation,
104  // derived class can reimplement it in a more optimized way.
105  dst = this->derived() * dst;
106  }
constexpr EIGEN_DEVICE_FUNC Derived & derived()
Definition: EigenBase.h:49

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

◆ applyThisOnTheRight()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::applyThisOnTheRight ( Dest &  dst) const
inline

Don't use it, but do the equivalent:

dst.applyOnTheRight(*this);
94  {
95  // This is the default implementation,
96  // derived class can reimplement it in a more optimized way.
97  dst = dst * this->derived();
98  }

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

◆ cols()

◆ const_cast_derived()

template<typename Derived >
EIGEN_DEVICE_FUNC Derived& Eigen::EigenBase< Derived >::const_cast_derived ( ) const
inline
53  {
54  return *static_cast<Derived*>(const_cast<EigenBase*>(this));
55  }

Referenced by Eigen::copy_using_evaluator(), and Eigen::TriangularViewImpl< MatrixType_, Mode_, Dense >::swap().

◆ const_derived()

template<typename Derived >
EIGEN_DEVICE_FUNC const Derived& Eigen::EigenBase< Derived >::const_derived ( ) const
inline
56 { return *static_cast<const Derived*>(this); }

◆ derived() [1/2]

◆ derived() [2/2]

template<typename Derived >
constexpr EIGEN_DEVICE_FUNC const Derived& Eigen::EigenBase< Derived >::derived ( ) const
inlineconstexpr
Returns
a const reference to the derived object
51 { return *static_cast<const Derived*>(this); }

◆ device() [1/2]

template<typename Derived >
template<typename Device >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< Derived, Device > Eigen::EigenBase< Derived >::device ( Device &  device)
144  {
145  return DeviceWrapper<Derived, Device>(derived(), device);
146 }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< Derived, Device > device(Device &device)
Definition: DeviceWrapper.h:144

◆ device() [2/2]

template<typename Derived >
template<typename Device >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< const Derived, Device > Eigen::EigenBase< Derived >::device ( Device &  device) const
151  {
152  return DeviceWrapper<const Derived, Device>(derived(), device);
153 }

◆ evalTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::evalTo ( Dest &  dst) const
inline

Don't use it, but do the equivalent:

dst = *this;
68  {
69  derived().evalTo(dst);
70  }

Referenced by Eigen::internal::FullPivHouseholderQRMatrixQReturnType< MatrixType, PermutationIndex >::evalTo(), and Eigen::EigenBase< Derived >::subTo().

◆ rows()

◆ size()

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index Eigen::EigenBase< Derived >::size ( ) const
inline
Returns
the number of coefficients, which is rows()*cols().
See also
rows(), cols(), SizeAtCompileTime.
64 { return rows() * cols(); }

References Eigen::EigenBase< Derived >::cols(), and Eigen::EigenBase< Derived >::rows().

Referenced by Eigen::PlainObjectBase< Derived >::_resize_to_match(), Eigen::FullPivHouseholderQR< MatrixType_, PermutationIndex_ >::_solve_impl_transposed(), Eigen::internal::llt_inplace< Scalar, Lower >::blocked(), Eigen::LDLT< MatrixType_, UpLo_ >::compute(), Eigen::LLT< MatrixType_, UpLo_ >::compute(), Eigen::ColPivHouseholderQR< MatrixType_, PermutationIndex_ >::computeInPlace(), Eigen::FullPivHouseholderQR< MatrixType_, PermutationIndex_ >::computeInPlace(), Eigen::HouseholderQR< MatrixType_ >::computeInPlace(), Eigen::internal::FullPivHouseholderQRMatrixQReturnType< MatrixType, PermutationIndex >::evalTo(), Eigen::internal::householder_qr_inplace_unblocked(), Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::Identity(), Eigen::MatrixBase< Homogeneous< MatrixType, Direction_ > >::isDiagonal(), Eigen::LDLT< MatrixType_, UpLo_ >::rankUpdate(), Eigen::LDLT< MatrixType_, UpLo_ >::reconstructedMatrix(), Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::resize(), Eigen::internal::householder_determinant< HCoeffs, Scalar, IsComplex >::run(), Eigen::internal::householder_determinant< HCoeffs, Scalar, false >::run(), Eigen::internal::householder_qr_inplace_blocked< MatrixQR, HCoeffs, MatrixQRScalar, InnerStrideIsOne >::run(), Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity(), Eigen::DiagonalMatrix< Scalar_, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero(), Eigen::internal::llt_inplace< Scalar, Lower >::unblocked(), Eigen::internal::ldlt_inplace< Lower >::unblocked(), and Eigen::internal::ldlt_inplace< Lower >::updateInPlace().

◆ subTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::subTo ( Dest &  dst) const
inline

Don't use it, but do the equivalent:

dst -= *this;
84  {
85  // This is the default implementation,
86  // derived class can reimplement it in a more optimized way.
87  typename Dest::PlainObject res(rows(), cols());
88  evalTo(res);
89  dst -= res;
90  }

References Eigen::EigenBase< Derived >::cols(), Eigen::EigenBase< Derived >::evalTo(), res, and Eigen::EigenBase< Derived >::rows().


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