|
enum | { Options = Options_
} |
|
typedef PlainObjectBase< Array > | Base |
|
typedef Base::PlainObject | PlainObject |
|
enum | |
|
enum | |
|
enum | |
|
typedef internal::dense_xpr_base< Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > >::type | Base |
|
typedef internal::traits< Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > >::StorageKind | StorageKind |
|
typedef internal::traits< Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > >::Scalar | Scalar |
|
typedef internal::packet_traits< Scalar >::type | PacketScalar |
|
typedef NumTraits< Scalar >::Real | RealScalar |
|
typedef Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > | DenseType |
|
typedef Eigen::Map< Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ >, Unaligned > | MapType |
|
typedef const Eigen::Map< const Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ >, Unaligned > | ConstMapType |
|
typedef Eigen::Map< Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ >, AlignedMax > | AlignedMapType |
|
typedef const Eigen::Map< const Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ >, AlignedMax > | ConstAlignedMapType |
|
|
template<typename OtherDerived > |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array & | operator= (const EigenBase< OtherDerived > &other) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array & | operator= (const Scalar &value) |
|
template<typename OtherDerived > |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array & | operator= (const DenseBase< OtherDerived > &other) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array & | operator= (const Array &other) |
| Assigns arrays to each other. More...
|
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE | Array ()=default |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE | Array (Array &&)=default |
| Move constructor. More...
|
|
EIGEN_DEVICE_FUNC Array & | operator= (Array &&other) EIGEN_NOEXCEPT_IF(std |
|
template<typename... ArgTypes> |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | Array (const Scalar &a0, const Scalar &a1, const Scalar &a2, const Scalar &a3, const ArgTypes &... args) |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE | Array (const std::initializer_list< std::initializer_list< Scalar >> &list) |
| Constructs an array and initializes it from the coefficients given as initializer-lists grouped by row. \cpp11. More...
|
|
template<typename T > |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | Array (const T &x) |
|
template<typename T0 , typename T1 > |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | Array (const T0 &val0, const T1 &val1) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | Array (const Scalar &val0, const Scalar &val1, const Scalar &val2) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | Array (const Scalar &val0, const Scalar &val1, const Scalar &val2, const Scalar &val3) |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE | Array (const Array &)=default |
|
template<typename OtherDerived > |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | Array (const EigenBase< OtherDerived > &other, std::enable_if_t< internal::is_convertible< typename OtherDerived::Scalar, Scalar >::value, PrivateType >=PrivateType()) |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | innerStride () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | outerStride () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC const Base & | base () const |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar & | coeff (Index rowId, Index colId) const |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar & | coeff (Index index) const |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar & | coeffRef (Index rowId, Index colId) |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar & | coeffRef (Index index) |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar & | coeffRef (Index rowId, Index colId) const |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar & | coeffRef (Index index) const |
|
| EIGEN_STATIC_ASSERT (internal::check_implication(MaxRowsAtCompileTime==1 &&MaxColsAtCompileTime !=1,(int(Options) &RowMajor)==RowMajor), INVALID_MATRIX_TEMPLATE_PARAMETERS) EIGEN_STATIC_ASSERT(internal |
|
EIGEN_DEVICE_FUNC const Base & | base () const |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar & | coeff (Index rowId, Index colId) const |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar & | coeff (Index index) const |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar & | coeffRef (Index rowId, Index colId) |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar & | coeffRef (Index index) |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar & | coeffRef (Index rowId, Index colId) const |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar & | coeffRef (Index index) const |
|
EIGEN_STRONG_INLINE PacketScalar | packet (Index rowId, Index colId) const |
|
EIGEN_STRONG_INLINE PacketScalar | packet (Index index) const |
|
EIGEN_STRONG_INLINE void | writePacket (Index rowId, Index colId, const PacketScalar &val) |
|
EIGEN_STRONG_INLINE void | writePacket (Index index, const PacketScalar &val) |
|
constexpr EIGEN_DEVICE_FUNC const Scalar * | data () const |
|
constexpr EIGEN_DEVICE_FUNC Scalar * | data () |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void | resize (Index rows, Index cols) |
|
constexpr EIGEN_DEVICE_FUNC void | resize (Index size) |
|
constexpr EIGEN_DEVICE_FUNC void | resize (NoChange_t, Index cols) |
|
constexpr EIGEN_DEVICE_FUNC void | resize (Index rows, NoChange_t) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | resizeLike (const EigenBase< OtherDerived > &_other) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | conservativeResize (Index rows, Index cols) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | conservativeResize (Index rows, NoChange_t) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | conservativeResize (NoChange_t, Index cols) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | conservativeResize (Index size) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | conservativeResizeLike (const DenseBase< OtherDerived > &other) |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | operator= (const PlainObjectBase &other) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | operator= (const ReturnByValue< OtherDerived > &func) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | operator= (const EigenBase< OtherDerived > &other) |
| Copies the generic expression other into *this. More...
|
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | lazyAssign (const DenseBase< OtherDerived > &other) |
|
EIGEN_DEVICE_FUNC Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setConstant (Index size, const Scalar &val) |
|
EIGEN_DEVICE_FUNC Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setConstant (Index rows, Index cols, const Scalar &val) |
|
EIGEN_DEVICE_FUNC Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setConstant (NoChange_t, Index cols, const Scalar &val) |
|
EIGEN_DEVICE_FUNC Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setConstant (Index rows, NoChange_t, const Scalar &val) |
|
EIGEN_DEVICE_FUNC Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setZero (Index size) |
|
EIGEN_DEVICE_FUNC Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setZero (Index rows, Index cols) |
|
EIGEN_DEVICE_FUNC Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setZero (NoChange_t, Index cols) |
|
EIGEN_DEVICE_FUNC Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setZero (Index rows, NoChange_t) |
|
EIGEN_DEVICE_FUNC Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setOnes (Index size) |
|
EIGEN_DEVICE_FUNC Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setOnes (Index rows, Index cols) |
|
EIGEN_DEVICE_FUNC Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setOnes (NoChange_t, Index cols) |
|
EIGEN_DEVICE_FUNC Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setOnes (Index rows, NoChange_t) |
|
Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setRandom (Index size) |
|
Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setRandom (Index rows, Index cols) |
|
Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setRandom (NoChange_t, Index cols) |
|
Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | setRandom (Index rows, NoChange_t) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | swap (DenseBase< OtherDerived > &other) |
| Override DenseBase::swap() since for dynamic-sized matrices of same type it is enough to swap the data pointers. More...
|
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | swap (DenseBase< OtherDerived > const &other) |
| const version forwarded to DenseBase::swap More...
|
|
|
static ConstMapType | Map (const Scalar *data) |
|
static MapType | Map (Scalar *data) |
|
static ConstMapType | Map (const Scalar *data, Index size) |
|
static MapType | Map (Scalar *data, Index size) |
|
static ConstMapType | Map (const Scalar *data, Index rows, Index cols) |
|
static MapType | Map (Scalar *data, Index rows, Index cols) |
|
static StridedConstMapType< Stride< Outer, Inner > >::type | Map (const Scalar *data, const Stride< Outer, Inner > &stride) |
|
static StridedMapType< Stride< Outer, Inner > >::type | Map (Scalar *data, const Stride< Outer, Inner > &stride) |
|
static StridedConstMapType< Stride< Outer, Inner > >::type | Map (const Scalar *data, Index size, const Stride< Outer, Inner > &stride) |
|
static StridedMapType< Stride< Outer, Inner > >::type | Map (Scalar *data, Index size, const Stride< Outer, Inner > &stride) |
|
static StridedConstMapType< Stride< Outer, Inner > >::type | Map (const Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride) |
|
static StridedMapType< Stride< Outer, Inner > >::type | Map (Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride) |
|
static ConstAlignedMapType | MapAligned (const Scalar *data) |
|
static AlignedMapType | MapAligned (Scalar *data) |
|
static ConstAlignedMapType | MapAligned (const Scalar *data, Index size) |
|
static AlignedMapType | MapAligned (Scalar *data, Index size) |
|
static ConstAlignedMapType | MapAligned (const Scalar *data, Index rows, Index cols) |
|
static AlignedMapType | MapAligned (Scalar *data, Index rows, Index cols) |
|
static StridedConstAlignedMapType< Stride< Outer, Inner > >::type | MapAligned (const Scalar *data, const Stride< Outer, Inner > &stride) |
|
static StridedAlignedMapType< Stride< Outer, Inner > >::type | MapAligned (Scalar *data, const Stride< Outer, Inner > &stride) |
|
static StridedConstAlignedMapType< Stride< Outer, Inner > >::type | MapAligned (const Scalar *data, Index size, const Stride< Outer, Inner > &stride) |
|
static StridedAlignedMapType< Stride< Outer, Inner > >::type | MapAligned (Scalar *data, Index size, const Stride< Outer, Inner > &stride) |
|
static StridedConstAlignedMapType< Stride< Outer, Inner > >::type | MapAligned (const Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride) |
|
static StridedAlignedMapType< Stride< Outer, Inner > >::type | MapAligned (Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride) |
|
constexpr EIGEN_DEVICE_FUNC PlainObjectBase & | operator= (PlainObjectBase &&other) EIGEN_NOEXCEPT |
| Move assignment operator. More...
|
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE | PlainObjectBase ()=default |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE | PlainObjectBase (PlainObjectBase &&)=default |
| Move constructor. More...
|
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE | PlainObjectBase (const PlainObjectBase &)=default |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | PlainObjectBase (Index size, Index rows, Index cols) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | PlainObjectBase (const Scalar &a0, const Scalar &a1, const Scalar &a2, const Scalar &a3, const ArgTypes &... args) |
| Construct a row of column vector with fixed size from an arbitrary number of coefficients. More...
|
|
constexpr EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | PlainObjectBase (const std::initializer_list< std::initializer_list< Scalar >> &list) |
| Constructs a Matrix or Array and initializes it by elements given by an initializer list of initializer lists. More...
|
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | PlainObjectBase (const DenseBase< OtherDerived > &other) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | PlainObjectBase (const EigenBase< OtherDerived > &other) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | PlainObjectBase (const ReturnByValue< OtherDerived > &other) |
| Copy constructor with in-place evaluation. More...
|
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _resize_to_match (const EigenBase< OtherDerived > &other) |
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | _set (const DenseBase< OtherDerived > &other) |
| Copies the value of the expression other into *this with automatic resizing. More...
|
|
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > & | _set_noalias (const DenseBase< OtherDerived > &other) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init2 (Index rows, Index cols, std::enable_if_t< Base::SizeAtCompileTime !=2, T0 > *=0) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init2 (const T0 &val0, const T1 &val1, std::enable_if_t< Base::SizeAtCompileTime==2, T0 > *=0) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init2 (const Index &val0, const Index &val1, std::enable_if_t<(!internal::is_same< Index, Scalar >::value) &&(internal::is_same< T0, Index >::value) &&(internal::is_same< T1, Index >::value) &&Base::SizeAtCompileTime==2, T1 > *=0) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (Index size, std::enable_if_t<(Base::SizeAtCompileTime !=1||!internal::is_convertible< T, Scalar >::value) &&((!internal::is_same< typename internal::traits< Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > >::XprKind, ArrayXpr >::value||Base::SizeAtCompileTime==Dynamic)), T > *=0) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const Scalar &val0, std::enable_if_t< Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T > *=0) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const Index &val0, std::enable_if_t<(!internal::is_same< Index, Scalar >::value) &&(internal::is_same< Index, T >::value) &&Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T * > *=0) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const Scalar *data) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const DenseBase< OtherDerived > &other) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > &other) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const EigenBase< OtherDerived > &other) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const ReturnByValue< OtherDerived > &other) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const RotationBase< OtherDerived, ColsAtCompileTime > &r) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const Scalar &val0, std::enable_if_t< Base::SizeAtCompileTime !=Dynamic &&Base::SizeAtCompileTime !=1 &&internal::is_convertible< T, Scalar >::value &&internal::is_same< typename internal::traits< Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > >::XprKind, ArrayXpr >::value, T > *=0) |
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void | _init1 (const Index &val0, std::enable_if_t<(!internal::is_same< Index, Scalar >::value) &&(internal::is_same< Index, T >::value) &&Base::SizeAtCompileTime !=Dynamic &&Base::SizeAtCompileTime !=1 &&internal::is_convertible< T, Scalar >::value &&internal::is_same< typename internal::traits< Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > >::XprKind, ArrayXpr >::value, T * > *=0) |
|
template<typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
class Eigen::Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ >
General-purpose arrays with easy API for coefficient-wise operations.
The Array class is very similar to the Matrix class. It provides general-purpose one- and two-dimensional arrays. The difference between the Array and the Matrix class is primarily in the API: the API for the Array class provides easy access to coefficient-wise operations, while the API for the Matrix class provides easy access to linear-algebra operations.
See documentation of class Matrix for detailed information on the template parameters storage layout.
This class can be extended with the help of the plugin mechanism described on the page Extending MatrixBase (and other classes) by defining the preprocessor symbol EIGEN_ARRAY_PLUGIN
.
- See also
- \blank TutorialArrayClass, The class hierarchy
template<typename Scalar_ , int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
Constructs an array and initializes it from the coefficients given as initializer-lists grouped by row. \cpp11.
In the general case, the constructor takes a list of rows, each row being represented as a list of coefficients:
Example:
ArrayXXi
a{{1, 2, 3}, {3, 4, 5}};
Output:
Each of the inner initializer lists must contain the exact same number of elements, otherwise an assertion is triggered.
In the case of a compile-time column 1D array, implicit transposition from a single row is allowed. Therefore Array<int,Dynamic,1>{{1,2,3,4,5}}
is legal and the more verbose syntax Array<int,Dynamic,1>{{1},{2},{3},{4},{5}}
can be avoided:
Example:
Array<int, Dynamic, 1>
v{{1, 2, 3, 4, 5}};
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
Output:
In the case of fixed-sized arrays, the initializer list sizes must exactly match the array sizes, and implicit transposition is allowed for compile-time 1D arrays only.
- See also
- Array(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)