10 #ifndef EIGEN_ARRAYBASE_H
11 #define EIGEN_ARRAYBASE_H
13 #include "./InternalHeaderCheck.h"
17 template<
typename ExpressionType>
class MatrixWrapper;
45 #ifndef EIGEN_PARSED_BY_DOXYGEN
49 typedef ArrayBase Eigen_BaseClassForSpecializationOfGlobalMathFuncImpl;
51 typedef typename internal::traits<Derived>::StorageKind StorageKind;
52 typedef typename internal::traits<Derived>::Scalar
Scalar;
53 typedef typename internal::packet_traits<Scalar>::type PacketScalar;
57 using Base::RowsAtCompileTime;
58 using Base::ColsAtCompileTime;
59 using Base::SizeAtCompileTime;
60 using Base::MaxRowsAtCompileTime;
61 using Base::MaxColsAtCompileTime;
62 using Base::MaxSizeAtCompileTime;
63 using Base::IsVectorAtCompileTime;
67 using Base::const_cast_derived;
73 using Base::lazyAssign;
74 using Base::operator-;
75 using Base::operator=;
76 using Base::operator+=;
77 using Base::operator-=;
78 using Base::operator*=;
79 using Base::operator/=;
81 typedef typename Base::CoeffReturnType CoeffReturnType;
85 #ifndef EIGEN_PARSED_BY_DOXYGEN
92 #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::ArrayBase
93 #define EIGEN_DOC_UNARY_ADDONS(X,Y)
94 # include "../plugins/MatrixCwiseUnaryOps.h"
95 # include "../plugins/ArrayCwiseUnaryOps.h"
96 # include "../plugins/CommonCwiseBinaryOps.h"
97 # include "../plugins/MatrixCwiseBinaryOps.h"
98 # include "../plugins/ArrayCwiseBinaryOps.h"
99 # ifdef EIGEN_ARRAYBASE_PLUGIN
100 # include EIGEN_ARRAYBASE_PLUGIN
102 #undef EIGEN_CURRENT_STORAGE_BASE_CLASS
103 #undef EIGEN_DOC_UNARY_ADDONS
108 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
117 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
121 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
122 Derived& operator+=(
const Scalar& scalar);
123 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
124 Derived& operator-=(
const Scalar& scalar);
126 template<
typename OtherDerived>
127 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
129 template<
typename OtherDerived>
130 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
133 template<
typename OtherDerived>
134 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
137 template<
typename OtherDerived>
138 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
158 EIGEN_DEFAULT_COPY_CONSTRUCTOR(ArrayBase)
159 EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(ArrayBase)
162 explicit ArrayBase(
Index);
164 template<
typename OtherDerived>
explicit ArrayBase(
const ArrayBase<OtherDerived>&);
167 template<
typename OtherDerived> Derived& operator+=(
const MatrixBase<OtherDerived>& )
168 {EIGEN_STATIC_ASSERT(std::ptrdiff_t(
sizeof(
typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);
return *
this;}
170 template<
typename OtherDerived> Derived& operator-=(
const MatrixBase<OtherDerived>& )
171 {EIGEN_STATIC_ASSERT(std::ptrdiff_t(
sizeof(
typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);
return *
this;}
178 template<
typename Derived>
179 template<
typename OtherDerived>
180 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
183 call_assignment(derived(), other.
derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());
191 template<
typename Derived>
192 template<
typename OtherDerived>
193 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
196 call_assignment(derived(), other.
derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());
204 template<
typename Derived>
205 template<
typename OtherDerived>
206 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
209 call_assignment(derived(), other.
derived(), internal::mul_assign_op<Scalar,typename OtherDerived::Scalar>());
217 template<
typename Derived>
218 template<
typename OtherDerived>
219 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
222 call_assignment(derived(), other.
derived(), internal::div_assign_op<Scalar,typename OtherDerived::Scalar>());
Base class for all 1D and 2D array, and related expressions.
Definition: ArrayBase.h:43
Derived & operator/=(const ArrayBase< OtherDerived > &other)
Definition: ArrayBase.h:220
Derived & operator*=(const ArrayBase< OtherDerived > &other)
Definition: ArrayBase.h:207
Derived & operator=(const Scalar &value)
Definition: ArrayBase.h:118
Derived & operator=(const ArrayBase &other)
Definition: ArrayBase.h:109
Derived & operator+=(const ArrayBase< OtherDerived > &other)
Definition: ArrayBase.h:194
Derived & operator-=(const ArrayBase< OtherDerived > &other)
Definition: ArrayBase.h:181
MatrixWrapper< Derived > matrix()
Definition: ArrayBase.h:150
Generic expression of a matrix where all coefficients are defined by a functor.
Definition: CwiseNullaryOp.h:63
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:42
std::conditional_t< internal::is_same< typename internal::traits< Derived >::XprKind, MatrixXpr >::value, PlainMatrix, PlainArray > PlainObject
The plain matrix or array type corresponding to this expression.
Definition: DenseBase.h:204
internal::traits< Derived >::Scalar Scalar
Definition: DenseBase.h:61
CoeffReturnType value() const
Definition: DenseBase.h:515
Derived & derived()
Definition: EigenBase.h:48
Expression of an array as a mathematical vector or matrix.
Definition: ArrayWrapper.h:143
Namespace containing all symbols from the Eigen library.
Definition: Core:139
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:41
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:231