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