10 #ifndef EIGEN_ARRAYBASE_H
11 #define EIGEN_ARRAYBASE_H
43 #ifndef EIGEN_PARSED_BY_DOXYGEN
47 typedef ArrayBase Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl;
49 typedef typename internal::traits<Derived>::StorageKind StorageKind;
50 typedef typename internal::traits<Derived>::Scalar
Scalar;
51 typedef typename internal::packet_traits<Scalar>::type PacketScalar;
55 using Base::RowsAtCompileTime;
56 using Base::ColsAtCompileTime;
57 using Base::SizeAtCompileTime;
58 using Base::MaxRowsAtCompileTime;
59 using Base::MaxColsAtCompileTime;
60 using Base::MaxSizeAtCompileTime;
61 using Base::IsVectorAtCompileTime;
65 using Base::const_cast_derived;
71 using Base::lazyAssign;
72 using Base::operator=;
73 using Base::operator+=;
74 using Base::operator-=;
75 using Base::operator*=;
76 using Base::operator/=;
78 typedef typename Base::CoeffReturnType CoeffReturnType;
80 #endif // not EIGEN_PARSED_BY_DOXYGEN
82 #ifndef EIGEN_PARSED_BY_DOXYGEN
87 #endif // not EIGEN_PARSED_BY_DOXYGEN
89 #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::ArrayBase
90 #define EIGEN_DOC_UNARY_ADDONS(X,Y)
91 # include "../plugins/CommonCwiseUnaryOps.h"
92 # include "../plugins/MatrixCwiseUnaryOps.h"
93 # include "../plugins/ArrayCwiseUnaryOps.h"
94 # include "../plugins/CommonCwiseBinaryOps.h"
95 # include "../plugins/MatrixCwiseBinaryOps.h"
96 # include "../plugins/ArrayCwiseBinaryOps.h"
97 # ifdef EIGEN_ARRAYBASE_PLUGIN
98 # include EIGEN_ARRAYBASE_PLUGIN
100 #undef EIGEN_CURRENT_STORAGE_BASE_CLASS
101 #undef EIGEN_DOC_UNARY_ADDONS
106 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
115 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
119 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
120 Derived& operator+=(
const Scalar& scalar);
121 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
122 Derived& operator-=(
const Scalar& scalar);
124 template<
typename OtherDerived>
125 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
127 template<
typename OtherDerived>
128 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
131 template<
typename OtherDerived>
132 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
135 template<
typename OtherDerived>
136 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
143 const ArrayBase<Derived>& array()
const {
return *
this; }
157 ArrayBase() : Base() {}
160 explicit ArrayBase(
Index);
162 template<
typename OtherDerived>
explicit ArrayBase(
const ArrayBase<OtherDerived>&);
165 template<
typename OtherDerived> Derived& operator+=(
const MatrixBase<OtherDerived>& )
166 {EIGEN_STATIC_ASSERT(std::ptrdiff_t(
sizeof(
typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);
return *
this;}
168 template<
typename OtherDerived> Derived& operator-=(
const MatrixBase<OtherDerived>& )
169 {EIGEN_STATIC_ASSERT(std::ptrdiff_t(
sizeof(
typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);
return *
this;}
176 template<
typename Derived>
177 template<
typename OtherDerived>
178 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
181 call_assignment(derived(), other.
derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());
189 template<
typename Derived>
190 template<
typename OtherDerived>
191 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
194 call_assignment(derived(), other.
derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());
202 template<
typename Derived>
203 template<
typename OtherDerived>
204 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
207 call_assignment(derived(), other.
derived(), internal::mul_assign_op<Scalar,typename OtherDerived::Scalar>());
215 template<
typename Derived>
216 template<
typename OtherDerived>
217 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
220 call_assignment(derived(), other.
derived(), internal::div_assign_op<Scalar,typename OtherDerived::Scalar>());
226 #endif // EIGEN_ARRAYBASE_H