Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > Class Template Reference

General-purpose arrays with easy API for coefficient-wise operations. More...

#include <src/eigen/Eigen/src/Core/Array.h>

+ Inheritance diagram for Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >:
+ Collaboration diagram for Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >:

Classes

struct  PrivateType
 

Public Types

enum  { Options = _Options }
 
typedef PlainObjectBase< ArrayBase
 
typedef Base::PlainObject PlainObject
 
enum  
 
enum  
 
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 >, UnalignedMapType
 
typedef const Eigen::Map< const Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, UnalignedConstMapType
 
typedef Eigen::Map< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, AlignedMaxAlignedMapType
 
typedef const Eigen::Map< const Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, AlignedMaxConstAlignedMapType
 

Public Member Functions

template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Arrayoperator= (const EigenBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Arrayoperator= (const Scalar &value)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Arrayoperator= (const DenseBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Arrayoperator= (const Array &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array ()
 
EIGEN_DEVICE_FUNC Array (internal::constructor_without_unaligned_array_assert)
 
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 EIGEN_STRONG_INLINE Array (const Array &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array (const EigenBase< OtherDerived > &other, typename internal::enable_if< internal::is_convertible< typename OtherDerived::Scalar, Scalar >::value, PrivateType >::type=PrivateType())
 
EIGEN_DEVICE_FUNC Index innerStride () const
 
EIGEN_DEVICE_FUNC Index outerStride () const
 
EIGEN_DEVICE_FUNC Basebase ()
 
EIGEN_DEVICE_FUNC const Basebase () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalarcoeff (Index rowId, Index colId) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalarcoeff (Index index) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ScalarcoeffRef (Index rowId, Index colId)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ScalarcoeffRef (Index index)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ScalarcoeffRef (Index rowId, Index colId) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ScalarcoeffRef (Index index) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rows () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index cols () 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)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalardata () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalardata ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize (Index rows, Index cols)
 
EIGEN_DEVICE_FUNC void resize (Index size)
 
EIGEN_DEVICE_FUNC void resize (NoChange_t, Index cols)
 
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 EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & lazyAssign (const DenseBase< OtherDerived > &other)
 

Protected Attributes

DenseStorage< Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Optionsm_storage
 

Friends

template<typename Derived , typename OtherDerived , bool IsVector>
struct internal::conservative_resize_like_impl
 
template<typename MatrixType , typename OtherDerived , bool SwapPointers>
struct internal::matrix_swap_impl
 

Map

These are convenience functions returning Map objects. The Map() static functions return unaligned Map objects, while the AlignedMap() functions return aligned Map objects and thus should be called only with 16-byte-aligned data pointers.

Here is an example using strides:

Output:

See also
class Map
enum  
 
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 > & 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 > & setOnes (Index size)
 
EIGEN_DEVICE_FUNC Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setOnes (Index rows, Index cols)
 
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setRandom (Index size)
 
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setRandom (Index rows, Index cols)
 
EIGEN_DEVICE_FUNC void swap (DenseBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC void swap (DenseBase< OtherDerived > const &other)
 
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)
 
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _check_template_params ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _resize_to_match (const EigenBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC 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.
 
EIGEN_DEVICE_FUNC 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, typename internal::enable_if< Base::SizeAtCompileTime!=2, T0 >::type *=0)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2 (const T0 &val0, const T1 &val1, typename internal::enable_if< Base::SizeAtCompileTime==2, T0 >::type *=0)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2 (const Index &val0, const Index &val1, typename internal::enable_if<(!internal::is_same< Index, Scalar >::value) &&(internal::is_same< T0, Index >::value) &&(internal::is_same< T1, Index >::value) &&Base::SizeAtCompileTime==2, T1 >::type *=0)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1 (Index size, typename internal::enable_if<(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 >::type *=0)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1 (const Scalar &val0, typename internal::enable_if< Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T >::type *=0)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1 (const Index &val0, typename internal::enable_if<(!internal::is_same< Index, Scalar >::value) &&(internal::is_same< Index, T >::value) &&Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T * >::type *=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, typename internal::enable_if< 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 >::type *=0)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1 (const Index &val0, typename internal::enable_if<(!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 * >::type *=0)
 

Detailed Description

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 TopicCustomizing_Plugins by defining the preprocessor symbol EIGEN_ARRAY_PLUGIN.

See also
\blank TutorialArrayClass, TopicClassHierarchy

Class Documentation

◆ Eigen::Array::PrivateType

struct Eigen::Array::PrivateType
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
struct Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::PrivateType

Member Typedef Documentation

◆ AlignedMapType

typedef Eigen::Map<Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > , AlignedMax> Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::AlignedMapType
inherited

◆ Base

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
typedef PlainObjectBase<Array> Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::Base

◆ ConstAlignedMapType

typedef const Eigen::Map<const Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > , AlignedMax> Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::ConstAlignedMapType
inherited

◆ ConstMapType

typedef const Eigen::Map<const Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > , Unaligned> Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::ConstMapType
inherited

◆ DenseType

typedef Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::DenseType
inherited

◆ MapType

typedef Eigen::Map<Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > , Unaligned> Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapType
inherited

◆ PacketScalar

typedef internal::packet_traits<Scalar>::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::PacketScalar
inherited

◆ PlainObject

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
typedef Base::PlainObject Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::PlainObject

◆ RealScalar

typedef NumTraits<Scalar>::Real Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::RealScalar
inherited

◆ Scalar

typedef internal::traits<Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Scalar Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Scalar
inherited

◆ StorageKind

typedef internal::traits<Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::StorageKind Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::StorageKind
inherited

Member Enumeration Documentation

◆ anonymous enum

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
anonymous enum
Enumerator
Options 
53{ Options = _Options };
@ Options
Definition Array.h:53

◆ anonymous enum

anonymous enum
inherited
102{ Options = internal::traits<Derived>::Options };

◆ anonymous enum

anonymous enum
inherited
142{ NeedsToAlign = (SizeAtCompileTime != Dynamic) && (internal::traits<Derived>::Alignment>0) };
const int Dynamic
Definition Constants.h:21

◆ anonymous enum

anonymous enum
inherited

Constructor & Destructor Documentation

◆ Array() [1/8]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::Array ( )
inline

Default constructor.

For fixed-size matrices, does nothing.

For dynamic-size matrices, creates an empty matrix of size 0. Does not allocate any array. Such a matrix is called a null matrix. This constructor is the unique way to create null matrices: resizing a matrix to 0 is not supported.

See also
resize(Index,Index)
132 : Base()
133 {
136 }
#define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
Definition PlainObjectBase.h:22
PlainObjectBase< Array > Base
Definition Array.h:50
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _check_template_params()
Definition PlainObjectBase.h:901

References Eigen::PlainObjectBase< Derived >::_check_template_params(), and EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED.

+ Here is the call graph for this function:

◆ Array() [2/8]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::Array ( internal::constructor_without_unaligned_array_assert  )
inline
143 : Base(internal::constructor_without_unaligned_array_assert())
144 {
147 }

References Eigen::PlainObjectBase< Derived >::_check_template_params(), and EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED.

+ Here is the call graph for this function:

◆ Array() [3/8]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
template<typename T >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::Array ( const T &  x)
inlineexplicit
169 {
171 Base::template _init1<T>(x);
172 }

References Eigen::PlainObjectBase< Derived >::_check_template_params().

+ Here is the call graph for this function:

◆ Array() [4/8]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
template<typename T0 , typename T1 >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::Array ( const T0 &  val0,
const T1 &  val1 
)
inline
177 {
179 this->template _init2<T0,T1>(val0, val1);
180 }

References Eigen::PlainObjectBase< Derived >::_check_template_params().

+ Here is the call graph for this function:

◆ Array() [5/8]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::Array ( const Scalar val0,
const Scalar val1,
const Scalar val2 
)
inline

constructs an initialized 3D vector with given coefficients

207 {
210 m_storage.data()[0] = val0;
211 m_storage.data()[1] = val1;
212 m_storage.data()[2] = val2;
213 }
#define EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE)
Definition StaticAssert.h:154
DenseStorage< Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options > m_storage
Definition PlainObjectBase.h:139
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array()
Definition Array.h:132
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar * data() const
Definition PlainObjectBase.h:255

References Eigen::PlainObjectBase< Derived >::_check_template_params(), Eigen::DenseStorage< T, Size, _Rows, _Cols, _Options >::data(), EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE, and Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::m_storage.

+ Here is the call graph for this function:

◆ Array() [6/8]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::Array ( const Scalar val0,
const Scalar val1,
const Scalar val2,
const Scalar val3 
)
inline

constructs an initialized 4D vector with given coefficients

217 {
220 m_storage.data()[0] = val0;
221 m_storage.data()[1] = val1;
222 m_storage.data()[2] = val2;
223 m_storage.data()[3] = val3;
224 }

References Eigen::PlainObjectBase< Derived >::_check_template_params(), Eigen::DenseStorage< T, Size, _Rows, _Cols, _Options >::data(), EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE, and Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::m_storage.

+ Here is the call graph for this function:

◆ Array() [7/8]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::Array ( const Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &  other)
inline

Copy constructor

229 : Base(other)
230 { }

◆ Array() [8/8]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::Array ( const EigenBase< OtherDerived > &  other,
typename internal::enable_if< internal::is_convertible< typename OtherDerived::Scalar, Scalar >::value, PrivateType >::type  = PrivateType() 
)
inline
See also
MatrixBase::operator=(const EigenBase<OtherDerived>&)
242 : Base(other.derived())
243 { }

Member Function Documentation

◆ _check_template_params()

static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_check_template_params ( )
inlinestaticinherited
902 {
903 EIGEN_STATIC_ASSERT((EIGEN_IMPLIES(MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1, (Options&RowMajor)==RowMajor)
904 && EIGEN_IMPLIES(MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1, (Options&RowMajor)==0)
905 && ((RowsAtCompileTime == Dynamic) || (RowsAtCompileTime >= 0))
906 && ((ColsAtCompileTime == Dynamic) || (ColsAtCompileTime >= 0))
907 && ((MaxRowsAtCompileTime == Dynamic) || (MaxRowsAtCompileTime >= 0))
908 && ((MaxColsAtCompileTime == Dynamic) || (MaxColsAtCompileTime >= 0))
909 && (MaxRowsAtCompileTime == RowsAtCompileTime || RowsAtCompileTime==Dynamic)
910 && (MaxColsAtCompileTime == ColsAtCompileTime || ColsAtCompileTime==Dynamic)
911 && (Options & (DontAlign|RowMajor)) == Options),
912 INVALID_MATRIX_TEMPLATE_PARAMETERS)
913 }
#define EIGEN_IMPLIES(a, b)
Definition Macros.h:902
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition StaticAssert.h:124

◆ _init1() [1/11]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init1 ( const Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &  other)
inlineprotectedinherited
822 {
823 this->_set_noalias(other);
824 }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & _set_noalias(const DenseBase< OtherDerived > &other)
Definition PlainObjectBase.h:725

◆ _init1() [2/11]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init1 ( const DenseBase< OtherDerived > &  other)
inlineprotectedinherited
815 {
816 this->_set_noalias(other);
817 }

◆ _init1() [3/11]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init1 ( const EigenBase< OtherDerived > &  other)
inlineprotectedinherited
829 {
830 this->derived() = other;
831 }

◆ _init1() [4/11]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init1 ( const Index val0,
typename internal::enable_if<(!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 * >::type *  = 0 
)
inlineprotectedinherited
870 {
871 Base::setConstant(val0);
872 }

◆ _init1() [5/11]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init1 ( const Index val0,
typename internal::enable_if<(!internal::is_same< Index, Scalar >::value) &&(internal::is_same< Index, T >::value) &&Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T * >::type *  = 0 
)
inlineprotectedinherited
800 {
802 m_storage.data()[0] = Scalar(val0);
803 }

◆ _init1() [6/11]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init1 ( const ReturnByValue< OtherDerived > &  other)
inlineprotectedinherited
836 {
837 resize(other.rows(), other.cols());
838 other.evalTo(this->derived());
839 }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
Definition PlainObjectBase.h:279

◆ _init1() [7/11]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init1 ( const RotationBase< OtherDerived, ColsAtCompileTime > &  r)
inlineprotectedinherited
844 {
845 this->derived() = r;
846 }

◆ _init1() [8/11]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init1 ( const Scalar val0,
typename internal::enable_if< 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 >::type *  = 0 
)
inlineprotectedinherited
856 {
857 Base::setConstant(val0);
858 }

◆ _init1() [9/11]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init1 ( const Scalar val0,
typename internal::enable_if< Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T >::type *  = 0 
)
inlineprotectedinherited
787 {
789 m_storage.data()[0] = val0;
790 }

◆ _init1() [10/11]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init1 ( const Scalar data)
inlineprotectedinherited
808 {
809 this->_set_noalias(ConstMapType(data));
810 }
const Eigen::Map< const Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Unaligned > ConstMapType
Definition PlainObjectBase.h:125

◆ _init1() [11/11]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init1 ( Index  size,
typename internal::enable_if<(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 >::type *  = 0 
)
inlineprotectedinherited
774 {
775 // NOTE MSVC 2008 complains if we directly put bool(NumTraits<T>::IsInteger) as the EIGEN_STATIC_ASSERT argument.
776 const bool is_integer = NumTraits<T>::IsInteger;
777 EIGEN_UNUSED_VARIABLE(is_integer);
778 EIGEN_STATIC_ASSERT(is_integer,
779 FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED)
780 resize(size);
781 }
#define EIGEN_UNUSED_VARIABLE(var)
Definition Macros.h:618
fastfloat_really_inline bool is_integer(char c) noexcept
Definition fast_float.h:453

◆ _init2() [1/3]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init2 ( const Index val0,
const Index val1,
typename internal::enable_if<(!internal::is_same< Index, Scalar >::value) &&(internal::is_same< T0, Index >::value) &&(internal::is_same< T1, Index >::value) &&Base::SizeAtCompileTime==2, T1 >::type *  = 0 
)
inlineprotectedinherited
762 {
764 m_storage.data()[0] = Scalar(val0);
765 m_storage.data()[1] = Scalar(val1);
766 }

◆ _init2() [2/3]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init2 ( const T0 &  val0,
const T1 &  val1,
typename internal::enable_if< Base::SizeAtCompileTime==2, T0 >::type *  = 0 
)
inlineprotectedinherited
749 {
751 m_storage.data()[0] = Scalar(val0);
752 m_storage.data()[1] = Scalar(val1);
753 }

◆ _init2() [3/3]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_init2 ( Index  rows,
Index  cols,
typename internal::enable_if< Base::SizeAtCompileTime!=2, T0 >::type *  = 0 
)
inlineprotectedinherited
739 {
740 EIGEN_STATIC_ASSERT(bool(NumTraits<T0>::IsInteger) &&
741 bool(NumTraits<T1>::IsInteger),
742 FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED)
743 resize(rows,cols);
744 }

◆ _resize_to_match()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_resize_to_match ( const EigenBase< OtherDerived > &  other)
inlineprotectedinherited
683 {
684 #ifdef EIGEN_NO_AUTOMATIC_RESIZING
685 eigen_assert((this->size()==0 || (IsVectorAtCompileTime ? (this->size() == other.size())
686 : (rows() == other.rows() && cols() == other.cols())))
687 && "Size mismatch. Automatic resizing is disabled because EIGEN_NO_AUTOMATIC_RESIZING is defined");
689 #else
690 resizeLike(other);
691 #endif
692 }
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
Definition Macros.h:591
#define eigen_assert(x)
Definition Macros.h:579
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index cols() const
Definition PlainObjectBase.h:153
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rows() const
Definition PlainObjectBase.h:151
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resizeLike(const EigenBase< OtherDerived > &_other)
Definition PlainObjectBase.h:362
constexpr auto size(const C &c) -> decltype(c.size())
Definition span.hpp:183

◆ _set()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_set ( const DenseBase< OtherDerived > &  other)
inlineprotectedinherited

Copies the value of the expression other into *this with automatic resizing.

*this might be resized to match the dimensions of other. If *this was a null matrix (not already initialized), it will be initialized.

Note that copying a row-vector into a vector (and conversely) is allowed. The resizing, if any, is then done in the appropriate way so that row-vectors remain row-vectors and vectors remain vectors.

See also
operator=(const MatrixBase<OtherDerived>&), _set_noalias()
713 {
714 internal::call_assignment(this->derived(), other.derived());
715 return this->derived();
716 }

◆ _set_noalias()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_set_noalias ( const DenseBase< OtherDerived > &  other)
inlineprotectedinherited
726 {
727 // I don't think we need this resize call since the lazyAssign will anyways resize
728 // and lazyAssign will be called by the assign selector.
729 //_resize_to_match(other);
730 // the 'false' below means to enforce lazy evaluation. We don't use lazyAssign() because
731 // it wouldn't allow to copy a row-vector into a column-vector.
732 internal::call_assignment_no_alias(this->derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
733 return this->derived();
734 }

◆ base() [1/2]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC Base & Eigen::PlainObjectBase< Derived >::base ( )
inline
146{ return *static_cast<Base*>(this); }

◆ base() [2/2]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC const Base & Eigen::PlainObjectBase< Derived >::base ( ) const
inline
148{ return *static_cast<const Base*>(this); }

◆ coeff() [1/2]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & Eigen::PlainObjectBase< Derived >::coeff ( Index  index) const
inline

This is an overloaded version of DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

See DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const for details.

174 {
175 return m_storage.data()[index];
176 }
EIGEN_DEVICE_FUNC const T * data() const
Definition DenseStorage.h:215

◆ coeff() [2/2]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & Eigen::PlainObjectBase< Derived >::coeff ( Index  rowId,
Index  colId 
) const
inline

This is an overloaded version of DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index,Index) const provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

See DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const for details.

161 {
162 if(Flags & RowMajorBit)
163 return m_storage.data()[colId + rowId * m_storage.cols()];
164 else // column-major
165 return m_storage.data()[rowId + colId * m_storage.rows()];
166 }
static EIGEN_DEVICE_FUNC Index rows(void)
Definition DenseStorage.h:211
static EIGEN_DEVICE_FUNC Index cols(void)
Definition DenseStorage.h:212
const unsigned int RowMajorBit
Definition Constants.h:61

◆ coeffRef() [1/4]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & Eigen::PlainObjectBase< Derived >::coeffRef ( Index  index)
inline

This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index) const provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

See DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index) const for details.

197 {
198 return m_storage.data()[index];
199 }

◆ coeffRef() [2/4]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & Eigen::PlainObjectBase< Derived >::coeffRef ( Index  index) const
inline

This is the const version of coeffRef(Index) which is thus synonym of coeff(Index). It is provided for convenience.

216 {
217 return m_storage.data()[index];
218 }

◆ coeffRef() [3/4]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & Eigen::PlainObjectBase< Derived >::coeffRef ( Index  rowId,
Index  colId 
)
inline

This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index,Index) const provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.

See DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index,Index) const for details.

184 {
185 if(Flags & RowMajorBit)
186 return m_storage.data()[colId + rowId * m_storage.cols()];
187 else // column-major
188 return m_storage.data()[rowId + colId * m_storage.rows()];
189 }

◆ coeffRef() [4/4]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & Eigen::PlainObjectBase< Derived >::coeffRef ( Index  rowId,
Index  colId 
) const
inline

This is the const version of coeffRef(Index,Index) which is thus synonym of coeff(Index,Index). It is provided for convenience.

205 {
206 if(Flags & RowMajorBit)
207 return m_storage.data()[colId + rowId * m_storage.cols()];
208 else // column-major
209 return m_storage.data()[rowId + colId * m_storage.rows()];
210 }

◆ cols()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::cols ( ) const
inlineinherited
153{ return m_storage.cols(); }
DenseStorage< Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options > m_storage
Definition PlainObjectBase.h:139

◆ conservativeResize() [1/4]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::conservativeResize ( Index  rows,
Index  cols 
)
inlineinherited

Resizes the matrix to rows x cols while leaving old values untouched.

The method is intended for matrices of dynamic size. If you only want to change the number of rows and/or of columns, you can use conservativeResize(NoChange_t, Index) or conservativeResize(Index, NoChange_t).

Matrices are resized relative to the top-left element. In case values need to be appended to the matrix they will be uninitialized.

391 {
392 internal::conservative_resize_like_impl<Derived>::run(*this, rows, cols);
393 }

◆ conservativeResize() [2/4]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::conservativeResize ( Index  rows,
NoChange_t   
)
inlineinherited

Resizes the matrix to rows x cols while leaving old values untouched.

As opposed to conservativeResize(Index rows, Index cols), this version leaves the number of columns unchanged.

In case the matrix is growing, new rows will be uninitialized.

404 {
405 // Note: see the comment in conservativeResize(Index,Index)
406 conservativeResize(rows, cols());
407 }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResize(Index rows, Index cols)
Definition PlainObjectBase.h:390

◆ conservativeResize() [3/4]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::conservativeResize ( Index  size)
inlineinherited

Resizes the vector to size while retaining old values.

\only_for_vectors. This method does not work for partially dynamic matrices when the static dimension is anything other than 1. For example it will not work with Matrix<double, 2, Dynamic>.

When values are appended, they will be uninitialized.

433 {
434 internal::conservative_resize_like_impl<Derived>::run(*this, size);
435 }

◆ conservativeResize() [4/4]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::conservativeResize ( NoChange_t  ,
Index  cols 
)
inlineinherited

Resizes the matrix to rows x cols while leaving old values untouched.

As opposed to conservativeResize(Index rows, Index cols), this version leaves the number of rows unchanged.

In case the matrix is growing, new columns will be uninitialized.

418 {
419 // Note: see the comment in conservativeResize(Index,Index)
420 conservativeResize(rows(), cols);
421 }

◆ conservativeResizeLike()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::conservativeResizeLike ( const DenseBase< OtherDerived > &  other)
inlineinherited

Resizes the matrix to rows x cols of other, while leaving old values untouched.

The method is intended for matrices of dynamic size. If you only want to change the number of rows and/or of columns, you can use conservativeResize(NoChange_t, Index) or conservativeResize(Index, NoChange_t).

Matrices are resized relative to the top-left element. In case values need to be appended to the matrix they will copied from other.

449 {
450 internal::conservative_resize_like_impl<Derived,OtherDerived>::run(*this, other);
451 }

◆ data() [1/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar * Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::data ( )
inlineinherited
Returns
a pointer to the data array of this matrix
260 { return m_storage.data(); }

◆ data() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar * Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::data ( ) const
inlineinherited
Returns
a const pointer to the data array of this matrix
256 { return m_storage.data(); }

◆ innerStride()

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC Index Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::innerStride ( ) const
inline
245{ return 1; }

◆ lazyAssign()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::lazyAssign ( const DenseBase< OtherDerived > &  other)
inlineinherited
See also
MatrixBase::lazyAssign()
466 {
467 _resize_to_match(other);
468 return Base::lazyAssign(other.derived());
469 }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _resize_to_match(const EigenBase< OtherDerived > &other)
Definition PlainObjectBase.h:682

◆ Map() [1/12]

static ConstMapType Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map ( const Scalar data)
inlinestaticinherited
588 { return ConstMapType(data); }

◆ Map() [2/12]

static StridedConstMapType< Stride< Outer, Inner > >::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map ( const Scalar data,
const Stride< Outer, Inner > &  stride 
)
inlinestaticinherited
615 { return typename StridedConstMapType<Stride<Outer, Inner> >::type(data, stride); }

◆ Map() [3/12]

static ConstMapType Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map ( const Scalar data,
Index  rows,
Index  cols 
)
inlinestaticinherited
596 { return ConstMapType(data, rows, cols); }

◆ Map() [4/12]

static StridedConstMapType< Stride< Outer, Inner > >::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map ( const Scalar data,
Index  rows,
Index  cols,
const Stride< Outer, Inner > &  stride 
)
inlinestaticinherited
627 { return typename StridedConstMapType<Stride<Outer, Inner> >::type(data, rows, cols, stride); }

◆ Map() [5/12]

static ConstMapType Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map ( const Scalar data,
Index  size 
)
inlinestaticinherited
592 { return ConstMapType(data, size); }

◆ Map() [6/12]

static StridedConstMapType< Stride< Outer, Inner > >::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map ( const Scalar data,
Index  size,
const Stride< Outer, Inner > &  stride 
)
inlinestaticinherited
621 { return typename StridedConstMapType<Stride<Outer, Inner> >::type(data, size, stride); }

◆ Map() [7/12]

static MapType Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map ( Scalar data)
inlinestaticinherited
590 { return MapType(data); }
Eigen::Map< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, Unaligned > MapType
Definition PlainObjectBase.h:123

◆ Map() [8/12]

static StridedMapType< Stride< Outer, Inner > >::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map ( Scalar data,
const Stride< Outer, Inner > &  stride 
)
inlinestaticinherited
618 { return typename StridedMapType<Stride<Outer, Inner> >::type(data, stride); }

◆ Map() [9/12]

static MapType Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map ( Scalar data,
Index  rows,
Index  cols 
)
inlinestaticinherited
598 { return MapType(data, rows, cols); }

◆ Map() [10/12]

static StridedMapType< Stride< Outer, Inner > >::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map ( Scalar data,
Index  rows,
Index  cols,
const Stride< Outer, Inner > &  stride 
)
inlinestaticinherited
630 { return typename StridedMapType<Stride<Outer, Inner> >::type(data, rows, cols, stride); }

◆ Map() [11/12]

static MapType Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map ( Scalar data,
Index  size 
)
inlinestaticinherited
594 { return MapType(data, size); }

◆ Map() [12/12]

static StridedMapType< Stride< Outer, Inner > >::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map ( Scalar data,
Index  size,
const Stride< Outer, Inner > &  stride 
)
inlinestaticinherited
624 { return typename StridedMapType<Stride<Outer, Inner> >::type(data, size, stride); }

◆ MapAligned() [1/12]

static ConstAlignedMapType Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapAligned ( const Scalar data)
inlinestaticinherited
601 { return ConstAlignedMapType(data); }
const Eigen::Map< const Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, AlignedMax > ConstAlignedMapType
Definition PlainObjectBase.h:132

◆ MapAligned() [2/12]

static StridedConstAlignedMapType< Stride< Outer, Inner > >::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapAligned ( const Scalar data,
const Stride< Outer, Inner > &  stride 
)
inlinestaticinherited
634 { return typename StridedConstAlignedMapType<Stride<Outer, Inner> >::type(data, stride); }

◆ MapAligned() [3/12]

static ConstAlignedMapType Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapAligned ( const Scalar data,
Index  rows,
Index  cols 
)
inlinestaticinherited
609 { return ConstAlignedMapType(data, rows, cols); }

◆ MapAligned() [4/12]

static StridedConstAlignedMapType< Stride< Outer, Inner > >::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapAligned ( const Scalar data,
Index  rows,
Index  cols,
const Stride< Outer, Inner > &  stride 
)
inlinestaticinherited
646 { return typename StridedConstAlignedMapType<Stride<Outer, Inner> >::type(data, rows, cols, stride); }

◆ MapAligned() [5/12]

static ConstAlignedMapType Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapAligned ( const Scalar data,
Index  size 
)
inlinestaticinherited
605 { return ConstAlignedMapType(data, size); }

◆ MapAligned() [6/12]

static StridedConstAlignedMapType< Stride< Outer, Inner > >::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapAligned ( const Scalar data,
Index  size,
const Stride< Outer, Inner > &  stride 
)
inlinestaticinherited
640 { return typename StridedConstAlignedMapType<Stride<Outer, Inner> >::type(data, size, stride); }

◆ MapAligned() [7/12]

static AlignedMapType Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapAligned ( Scalar data)
inlinestaticinherited
603 { return AlignedMapType(data); }
Eigen::Map< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >, AlignedMax > AlignedMapType
Definition PlainObjectBase.h:131

◆ MapAligned() [8/12]

static StridedAlignedMapType< Stride< Outer, Inner > >::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapAligned ( Scalar data,
const Stride< Outer, Inner > &  stride 
)
inlinestaticinherited
637 { return typename StridedAlignedMapType<Stride<Outer, Inner> >::type(data, stride); }

◆ MapAligned() [9/12]

static AlignedMapType Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapAligned ( Scalar data,
Index  rows,
Index  cols 
)
inlinestaticinherited
611 { return AlignedMapType(data, rows, cols); }

◆ MapAligned() [10/12]

static StridedAlignedMapType< Stride< Outer, Inner > >::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapAligned ( Scalar data,
Index  rows,
Index  cols,
const Stride< Outer, Inner > &  stride 
)
inlinestaticinherited
649 { return typename StridedAlignedMapType<Stride<Outer, Inner> >::type(data, rows, cols, stride); }

◆ MapAligned() [11/12]

static AlignedMapType Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapAligned ( Scalar data,
Index  size 
)
inlinestaticinherited
607 { return AlignedMapType(data, size); }

◆ MapAligned() [12/12]

static StridedAlignedMapType< Stride< Outer, Inner > >::type Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::MapAligned ( Scalar data,
Index  size,
const Stride< Outer, Inner > &  stride 
)
inlinestaticinherited
643 { return typename StridedAlignedMapType<Stride<Outer, Inner> >::type(data, size, stride); }

◆ operator=() [1/4]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array & Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::operator= ( const Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &  other)
inline

This is a special case of the templated operator=. Its purpose is to prevent a default operator= from hiding the templated operator=.

117 {
118 return Base::_set(other);
119 }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & _set(const DenseBase< OtherDerived > &other)
Copies the value of the expression other into *this with automatic resizing.
Definition PlainObjectBase.h:712

References Eigen::PlainObjectBase< Derived >::_set().

+ Here is the call graph for this function:

◆ operator=() [2/4]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array & Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::operator= ( const DenseBase< OtherDerived > &  other)
inline

Copies the value of the expression other into *this with automatic resizing.

*this might be resized to match the dimensions of other. If *this was a null matrix (not already initialized), it will be initialized.

Note that copying a row-vector into a vector (and conversely) is allowed. The resizing, if any, is then done in the appropriate way so that row-vectors remain row-vectors and vectors remain vectors.

108 {
109 return Base::_set(other);
110 }

References Eigen::PlainObjectBase< Derived >::_set().

+ Here is the call graph for this function:

◆ operator=() [3/4]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array & Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::operator= ( const EigenBase< OtherDerived > &  other)
inline

The usage of using Base::operator=; fails on MSVC. Since the code below is working with GCC and MSVC, we skipped the usage of 'using'. This should be done only for operator=.

77 {
78 return Base::operator=(other);
79 }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator=(const PlainObjectBase &other)
Definition PlainObjectBase.h:457

References Eigen::PlainObjectBase< Derived >::operator=().

+ Here is the call graph for this function:

◆ operator=() [4/4]

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array & Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::operator= ( const Scalar value)
inline

Set all the entries to value.

See also
DenseBase::setConstant(), DenseBase::fill()
91 {
92 Base::setConstant(value);
93 return *this;
94 }
EIGEN_DEVICE_FUNC Derived & setConstant(Index size, const Scalar &val)
Definition CwiseNullaryOp.h:341

References Eigen::PlainObjectBase< Derived >::setConstant().

+ Here is the call graph for this function:

◆ outerStride()

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
EIGEN_DEVICE_FUNC Index Eigen::Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >::outerStride ( ) const
inline
246{ return this->innerSize(); }

◆ packet() [1/2]

EIGEN_STRONG_INLINE PacketScalar Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::packet ( Index  index) const
inlineinherited
233 {
234 return internal::ploadt<PacketScalar, LoadMode>(m_storage.data() + index);
235 }

◆ packet() [2/2]

EIGEN_STRONG_INLINE PacketScalar Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::packet ( Index  rowId,
Index  colId 
) const
inlineinherited
223 {
224 return internal::ploadt<PacketScalar, LoadMode>
225 (m_storage.data() + (Flags & RowMajorBit
226 ? colId + rowId * m_storage.cols()
227 : rowId + colId * m_storage.rows()));
228 }

◆ resize() [1/4]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resize ( Index  rows,
Index  cols 
)
inlineinherited

Resizes *this to a rows x cols matrix.

This method is intended for dynamic-size matrices, although it is legal to call it on any matrix as long as fixed dimensions are left unchanged. If you only want to change the number of rows and/or of columns, you can use resize(NoChange_t, Index), resize(Index, NoChange_t).

If the current number of coefficients of *this exactly matches the product rows * cols, then no memory allocation is performed and the current values are left unchanged. In all other cases, including shrinking, the data is reallocated and all previous values are lost.

Example:

Output:

See also
resize(Index) for vectors, resize(NoChange_t, Index), resize(Index, NoChange_t)
280 {
281 eigen_assert( EIGEN_IMPLIES(RowsAtCompileTime!=Dynamic,rows==RowsAtCompileTime)
282 && EIGEN_IMPLIES(ColsAtCompileTime!=Dynamic,cols==ColsAtCompileTime)
283 && EIGEN_IMPLIES(RowsAtCompileTime==Dynamic && MaxRowsAtCompileTime!=Dynamic,rows<=MaxRowsAtCompileTime)
284 && EIGEN_IMPLIES(ColsAtCompileTime==Dynamic && MaxColsAtCompileTime!=Dynamic,cols<=MaxColsAtCompileTime)
285 && rows>=0 && cols>=0 && "Invalid sizes when resizing a matrix or array.");
286 internal::check_rows_cols_for_overflow<MaxSizeAtCompileTime>::run(rows, cols);
287 #ifdef EIGEN_INITIALIZE_COEFFS
289 bool size_changed = size != this->size();
290 m_storage.resize(size, rows, cols);
292 #else
293 m_storage.resize(rows*cols, rows, cols);
294 #endif
295 }
EIGEN_DEVICE_FUNC void resize(Index, Index, Index)
Definition DenseStorage.h:214
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:33

◆ resize() [2/4]

EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resize ( Index  rows,
NoChange_t   
)
inlineinherited

Resizes the matrix, changing only the number of rows. For the parameter of type NoChange_t, just pass the special value NoChange as in the example below.

Example:

Output:

See also
resize(Index,Index)
349 {
350 resize(rows, cols());
351 }

◆ resize() [3/4]

EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resize ( Index  size)
inlineinherited

Resizes *this to a vector of length size

\only_for_vectors. This method does not work for partially dynamic matrices when the static dimension is anything other than 1. For example it will not work with Matrix<double, 2, Dynamic>.

Example:

Output:

See also
resize(Index,Index), resize(NoChange_t, Index), resize(Index, NoChange_t)
310 {
311 EIGEN_STATIC_ASSERT_VECTOR_ONLY(PlainObjectBase)
312 eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime==Dynamic || size<=MaxSizeAtCompileTime)) || SizeAtCompileTime == size) && size>=0);
313 #ifdef EIGEN_INITIALIZE_COEFFS
314 bool size_changed = size != this->size();
315 #endif
316 if(RowsAtCompileTime == 1)
317 m_storage.resize(size, 1, size);
318 else
319 m_storage.resize(size, size, 1);
320 #ifdef EIGEN_INITIALIZE_COEFFS
322 #endif
323 }
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition StaticAssert.h:139

◆ resize() [4/4]

EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resize ( NoChange_t  ,
Index  cols 
)
inlineinherited

Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the special value NoChange as in the example below.

Example:

Output:

See also
resize(Index,Index)
335 {
336 resize(rows(), cols);
337 }

◆ resizeLike()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resizeLike ( const EigenBase< OtherDerived > &  _other)
inlineinherited

Resizes *this to have the same dimensions as other. Takes care of doing all the checking that's needed.

Note that copying a row-vector into a vector (and conversely) is allowed. The resizing, if any, is then done in the appropriate way so that row-vectors remain row-vectors and vectors remain vectors.

363 {
364 const OtherDerived& other = _other.derived();
365 internal::check_rows_cols_for_overflow<MaxSizeAtCompileTime>::run(other.rows(), other.cols());
366 const Index othersize = other.rows()*other.cols();
367 if(RowsAtCompileTime == 1)
368 {
369 eigen_assert(other.rows() == 1 || other.cols() == 1);
370 resize(1, othersize);
371 }
372 else if(ColsAtCompileTime == 1)
373 {
374 eigen_assert(other.rows() == 1 || other.cols() == 1);
375 resize(othersize, 1);
376 }
377 else resize(other.rows(), other.cols());
378 }

◆ rows()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::rows ( ) const
inlineinherited
151{ return m_storage.rows(); }

◆ setConstant() [1/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::setConstant ( Index  rows,
Index  cols,
const Scalar val 
)
inherited

Resizes to the given size, and sets all coefficients in this expression to the given value val.

Parameters
rowsthe new number of rows
colsthe new number of columns
valthe value to which all coefficients are set

Example:

Output:

See also
MatrixBase::setConstant(const Scalar&), setConstant(Index,const Scalar&), class CwiseNullaryOp, MatrixBase::Constant(const Scalar&)
361{
362 resize(rows, cols);
363 return setConstant(val);
364}

◆ setConstant() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::setConstant ( Index  size,
const Scalar val 
)
inherited

Resizes to the given size, and sets all coefficients in this expression to the given value val.

\only_for_vectors

Example:

Output:

See also
MatrixBase::setConstant(const Scalar&), setConstant(Index,Index,const Scalar&), class CwiseNullaryOp, MatrixBase::Constant(const Scalar&)
342{
343 resize(size);
344 return setConstant(val);
345}

◆ setOnes() [1/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::setOnes ( Index  rows,
Index  cols 
)
inherited

Resizes to the given size, and sets all coefficients in this expression to one.

Parameters
rowsthe new number of rows
colsthe new number of columns

Example:

Output:

See also
MatrixBase::setOnes(), setOnes(Index), class CwiseNullaryOp, MatrixBase::Ones()
660{
661 resize(rows, cols);
662 return setConstant(Scalar(1));
663}
internal::traits< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Scalar Scalar
Definition PlainObjectBase.h:106

◆ setOnes() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::setOnes ( Index  newSize)
inherited

Resizes to the given newSize, and sets all coefficients in this expression to one.

\only_for_vectors

Example:

Output:

See also
MatrixBase::setOnes(), setOnes(Index,Index), class CwiseNullaryOp, MatrixBase::Ones()
642{
643 resize(newSize);
644 return setConstant(Scalar(1));
645}

◆ setRandom() [1/2]

EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::setRandom ( Index  rows,
Index  cols 
)
inherited

Resizes to the given size, and sets all coefficients in this expression to random values.

Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

\not_reentrant

Parameters
rowsthe new number of rows
colsthe new number of columns

Example:

Output:

See also
DenseBase::setRandom(), setRandom(Index), class CwiseNullaryOp, DenseBase::Random()
175{
176 resize(rows, cols);
177 return setRandom();
178}
Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setRandom(Index size)
Definition Random.h:151

◆ setRandom() [2/2]

EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::setRandom ( Index  newSize)
inherited

Resizes to the given newSize, and sets all coefficients in this expression to random values.

Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

\only_for_vectors \not_reentrant

Example:

Output:

See also
DenseBase::setRandom(), setRandom(Index,Index), class CwiseNullaryOp, DenseBase::Random()
152{
153 resize(newSize);
154 return setRandom();
155}

◆ setZero() [1/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::setZero ( Index  rows,
Index  cols 
)
inherited

Resizes to the given size, and sets all coefficients in this expression to zero.

Parameters
rowsthe new number of rows
colsthe new number of columns

Example:

Output:

See also
DenseBase::setZero(), setZero(Index), class CwiseNullaryOp, DenseBase::Zero()
534{
535 resize(rows, cols);
536 return setConstant(Scalar(0));
537}

◆ setZero() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::setZero ( Index  newSize)
inherited

Resizes to the given size, and sets all coefficients in this expression to zero.

\only_for_vectors

Example:

Output:

See also
DenseBase::setZero(), setZero(Index,Index), class CwiseNullaryOp, DenseBase::Zero()
516{
517 resize(newSize);
518 return setConstant(Scalar(0));
519}

◆ swap() [1/2]

EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::swap ( DenseBase< OtherDerived > &  other)
inlineinherited
887 {
888 enum { SwapPointers = internal::is_same<Derived, OtherDerived>::value && Base::SizeAtCompileTime==Dynamic };
889 internal::matrix_swap_impl<Derived, OtherDerived, bool(SwapPointers)>::run(this->derived(), other.derived());
890 }
friend struct internal::matrix_swap_impl
Definition PlainObjectBase.h:875

◆ swap() [2/2]

EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::swap ( DenseBase< OtherDerived > const other)
inlineinherited
898 { Base::swap(other.derived()); }

◆ writePacket() [1/2]

EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::writePacket ( Index  index,
const PacketScalar val 
)
inlineinherited
250 {
251 internal::pstoret<Scalar, PacketScalar, StoreMode>(m_storage.data() + index, val);
252 }

◆ writePacket() [2/2]

EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::writePacket ( Index  rowId,
Index  colId,
const PacketScalar val 
)
inlineinherited
240 {
241 internal::pstoret<Scalar, PacketScalar, StoreMode>
242 (m_storage.data() + (Flags & RowMajorBit
243 ? colId + rowId * m_storage.cols()
244 : rowId + colId * m_storage.rows()), val);
245 }

Friends And Related Symbol Documentation

◆ internal::conservative_resize_like_impl

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
template<typename Derived , typename OtherDerived , bool IsVector>
friend struct internal::conservative_resize_like_impl
friend

◆ internal::matrix_swap_impl

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
template<typename MatrixType , typename OtherDerived , bool SwapPointers>
friend struct internal::matrix_swap_impl
friend

Member Data Documentation

◆ m_storage

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
DenseStorage<Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options> Eigen::PlainObjectBase< Derived >::m_storage
protected

The documentation for this class was generated from the following file: