| 46 | */ |
| 47 | template <typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_> |
| 48 | class Array : public PlainObjectBase<Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>> { |
| 49 | public: |
| 50 | typedef PlainObjectBase<Array> Base; |
| 51 | EIGEN_DENSE_PUBLIC_INTERFACE(Array) |
| 52 | |
| 53 | enum { Options = Options_ }; |
| 54 | typedef typename Base::PlainObject PlainObject; |
| 55 | |
| 56 | protected: |
| 57 | template <typename Derived, typename OtherDerived, bool IsVector> |
| 58 | friend struct internal::conservative_resize_like_impl; |
| 59 | |
| 60 | using Base::m_storage; |
| 61 | |
| 62 | public: |
| 63 | using Base::base; |
| 64 | using Base::coeff; |
| 65 | using Base::coeffRef; |
| 66 | |
| 67 | /** |
| 68 | * The usage of |
| 69 | * using Base::operator=; |
| 70 | * fails on MSVC. Since the code below is working with GCC and MSVC, we skipped |
| 71 | * the usage of 'using'. This should be done only for operator=. |
| 72 | */ |
| 73 | template <typename OtherDerived> |
| 74 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array& operator=(const EigenBase<OtherDerived>& other) { |
| 75 | return Base::operator=(other); |
| 76 | } |
| 77 | |
| 78 | /** Set all the entries to \a value. |
| 79 | * \sa DenseBase::setConstant(), DenseBase::fill() |
| 80 | */ |
| 81 | /* This overload is needed because the usage of |
| 82 | * using Base::operator=; |
| 83 | * fails on MSVC. Since the code below is working with GCC and MSVC, we skipped |
| 84 | * the usage of 'using'. This should be done only for operator=. |
| 85 | */ |
| 86 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array& operator=(const Scalar& value) { |
| 87 | Base::setConstant(value); |
| 88 | return *this; |
| 89 | } |
| 90 | |
| 91 | /** Copies the value of the expression \a other into \c *this with automatic resizing. |
| 92 | * |
| 93 | * *this might be resized to match the dimensions of \a other. If *this was a null matrix (not already initialized), |
| 94 | * it will be initialized. |
| 95 | * |
| 96 | * Note that copying a row-vector into a vector (and conversely) is allowed. |
| 97 | * The resizing, if any, is then done in the appropriate way so that row-vectors |
| 98 | * remain row-vectors and vectors remain vectors. |
| 99 | */ |
| 100 | template <typename OtherDerived> |
| 101 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array& operator=(const DenseBase<OtherDerived>& other) { |
| 102 | return Base::_set(other); |
| 103 | } |
| 104 | |
| 105 | /** |
no test coverage detected