11 #ifndef EIGEN_EIGENBASE_H 12 #define EIGEN_EIGENBASE_H 42 typedef typename internal::traits<Derived>::StorageKind StorageKind;
46 Derived&
derived() {
return *
static_cast<Derived*
>(
this); }
49 const Derived&
derived()
const {
return *
static_cast<const Derived*
>(
this); }
52 inline Derived& const_cast_derived()
const 53 {
return *
static_cast<Derived*
>(
const_cast<EigenBase*
>(
this)); }
55 inline const Derived& const_derived()
const 56 {
return *
static_cast<const Derived*
>(
this); }
59 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
60 inline Index
rows() const EIGEN_NOEXCEPT {
return derived().rows(); }
62 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
63 inline Index
cols() const EIGEN_NOEXCEPT {
return derived().cols(); }
66 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
67 inline Index
size() const EIGEN_NOEXCEPT {
return rows() *
cols(); }
70 template<
typename Dest>
72 inline void evalTo(Dest& dst)
const 76 template<
typename Dest>
78 inline void addTo(Dest& dst)
const 82 typename Dest::PlainObject res(
rows(),
cols());
88 template<
typename Dest>
90 inline void subTo(Dest& dst)
const 94 typename Dest::PlainObject res(
rows(),
cols());
100 template<
typename Dest>
101 EIGEN_DEVICE_FUNC
inline void applyThisOnTheRight(Dest& dst)
const 109 template<
typename Dest>
110 EIGEN_DEVICE_FUNC
inline void applyThisOnTheLeft(Dest& dst)
const 131 template<
typename Derived>
132 template<
typename OtherDerived>
140 template<
typename Derived>
141 template<
typename OtherDerived>
145 call_assignment(
derived(), other.
derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());
149 template<
typename Derived>
150 template<
typename OtherDerived>
154 call_assignment(
derived(), other.
derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());
160 #endif // EIGEN_EIGENBASE_H Namespace containing all symbols from the Eigen library.
Definition: Core:141
Derived & operator=(const DenseBase< OtherDerived > &other)
Definition: Assign.h:39
Derived & derived()
Definition: EigenBase.h:46
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:39
EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
Definition: EigenBase.h:67
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
Definition: EigenBase.h:29
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: EigenBase.h:63
const Derived & derived() const
Definition: EigenBase.h:49
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: EigenBase.h:60