Eigen::EigenBase< Derived > Class Template Reference
+ 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

template<typename Dest >
void addTo (Dest &dst) const
 
template<typename Dest >
void applyThisOnTheLeft (Dest &dst) const
 
template<typename Dest >
void applyThisOnTheRight (Dest &dst) const
 
EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
Derived & const_cast_derived () const
 
const Derived & const_derived () const
 
Derived & derived ()
 
const Derived & derived () const
 
template<typename Dest >
void evalTo (Dest &dst) const
 
EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_CONSTEXPR Index size () const EIGEN_NOEXCEPT
 
template<typename Dest >
void subTo (Dest &dst) 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
The class hierarchy

Definition at line 31 of file EigenBase.h.

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.

Definition at line 41 of file EigenBase.h.

◆ StorageKind

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

Definition at line 44 of file EigenBase.h.

Member Function Documentation

◆ addTo()

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

Definition at line 80 of file EigenBase.h.

81  {
82  // This is the default implementation,
83  // derived class can reimplement it in a more optimized way.
84  typename Dest::PlainObject res(rows(),cols());
85  evalTo(res);
86  dst += res;
87  }
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: EigenBase.h:65
void evalTo(Dest &dst) const
Definition: EigenBase.h:74
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: EigenBase.h:62

◆ applyThisOnTheLeft()

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

Definition at line 112 of file EigenBase.h.

113  {
114  // This is the default implementation,
115  // derived class can reimplement it in a more optimized way.
116  dst = this->derived() * dst;
117  }
Derived & derived()
Definition: EigenBase.h:48

◆ applyThisOnTheRight()

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

Definition at line 103 of file EigenBase.h.

104  {
105  // This is the default implementation,
106  // derived class can reimplement it in a more optimized way.
107  dst = dst * this->derived();
108  }

◆ cols()

template<typename Derived >
EIGEN_CONSTEXPR Index Eigen::EigenBase< Derived >::cols ( void  ) const
inline
Returns
the number of columns.
See also
rows(), ColsAtCompileTime

Definition at line 65 of file EigenBase.h.

65 { return derived().cols(); }

◆ const_cast_derived()

template<typename Derived >
Derived& Eigen::EigenBase< Derived >::const_cast_derived ( ) const
inline

Definition at line 54 of file EigenBase.h.

55  { return *static_cast<Derived*>(const_cast<EigenBase*>(this)); }

◆ const_derived()

template<typename Derived >
const Derived& Eigen::EigenBase< Derived >::const_derived ( ) const
inline

Definition at line 57 of file EigenBase.h.

58  { return *static_cast<const Derived*>(this); }

◆ derived() [1/2]

template<typename Derived >
Derived& Eigen::EigenBase< Derived >::derived ( )
inline
Returns
a reference to the derived object

Definition at line 48 of file EigenBase.h.

48 { return *static_cast<Derived*>(this); }

◆ derived() [2/2]

template<typename Derived >
const Derived& Eigen::EigenBase< Derived >::derived ( ) const
inline
Returns
a const reference to the derived object

Definition at line 51 of file EigenBase.h.

51 { return *static_cast<const Derived*>(this); }

◆ evalTo()

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

Definition at line 74 of file EigenBase.h.

75  { derived().evalTo(dst); }

◆ rows()

template<typename Derived >
EIGEN_CONSTEXPR Index Eigen::EigenBase< Derived >::rows ( void  ) const
inline
Returns
the number of rows.
See also
cols(), RowsAtCompileTime

Definition at line 62 of file EigenBase.h.

62 { return derived().rows(); }

◆ size()

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

Definition at line 69 of file EigenBase.h.

69 { return rows() * cols(); }

◆ subTo()

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

Definition at line 92 of file EigenBase.h.

93  {
94  // This is the default implementation,
95  // derived class can reimplement it in a more optimized way.
96  typename Dest::PlainObject res(rows(),cols());
97  evalTo(res);
98  dst -= res;
99  }

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