Eigen::PlainObjectBase< Derived > Class Template Reference

#include <PlainObjectBase.h>

+ Inheritance diagram for Eigen::PlainObjectBase< Derived >:

Classes

struct  StridedAlignedMapType
 
struct  StridedConstAlignedMapType
 
struct  StridedConstMapType
 
struct  StridedMapType
 

Public Types

enum  { Options = internal::traits<Derived>::Options }
 
enum  { NeedsToAlign = (SizeAtCompileTime != Dynamic) && (internal::traits<Derived>::Alignment > 0) }
 
enum  { IsPlainObjectBase = 1 }
 
typedef internal::dense_xpr_base< Derived >::type Base
 
typedef internal::traits< Derived >::StorageKind StorageKind
 
typedef internal::traits< Derived >::Scalar Scalar
 
typedef internal::packet_traits< Scalar >::type PacketScalar
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef Derived DenseType
 
typedef Eigen::Map< Derived, UnalignedMapType
 
typedef const Eigen::Map< const Derived, UnalignedConstMapType
 
typedef Eigen::Map< Derived, AlignedMaxAlignedMapType
 
typedef const Eigen::Map< const Derived, AlignedMaxConstAlignedMapType
 

Public Member Functions

 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 Basebase () 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 Scalarcoeff (Index rowId, Index colId) const
 
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalarcoeff (Index index) const
 
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE ScalarcoeffRef (Index rowId, Index colId)
 
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE ScalarcoeffRef (Index index)
 
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const ScalarcoeffRef (Index rowId, Index colId) const
 
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const ScalarcoeffRef (Index index) const
 
template<int LoadMode>
EIGEN_STRONG_INLINE PacketScalar packet (Index rowId, Index colId) const
 
template<int LoadMode>
EIGEN_STRONG_INLINE PacketScalar packet (Index index) const
 
template<int StoreMode>
EIGEN_STRONG_INLINE void writePacket (Index rowId, Index colId, const PacketScalar &val)
 
template<int StoreMode>
EIGEN_STRONG_INLINE void writePacket (Index index, const PacketScalar &val)
 
constexpr EIGEN_DEVICE_FUNC const Scalardata () const
 
constexpr EIGEN_DEVICE_FUNC Scalardata ()
 
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)
 
template<typename OtherDerived >
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)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResizeLike (const DenseBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived & operator= (const PlainObjectBase &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & lazyAssign (const DenseBase< OtherDerived > &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator= (const ReturnByValue< OtherDerived > &func)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator= (const EigenBase< OtherDerived > &other)
 Copies the generic expression other into *this. More...
 
EIGEN_DEVICE_FUNC Derived & setConstant (Index size, const Scalar &val)
 
EIGEN_DEVICE_FUNC Derived & setConstant (Index rows, Index cols, const Scalar &val)
 
EIGEN_DEVICE_FUNC Derived & setConstant (NoChange_t, Index cols, const Scalar &val)
 
EIGEN_DEVICE_FUNC Derived & setConstant (Index rows, NoChange_t, const Scalar &val)
 
EIGEN_DEVICE_FUNC Derived & setZero (Index size)
 
EIGEN_DEVICE_FUNC Derived & setZero (Index rows, Index cols)
 
EIGEN_DEVICE_FUNC Derived & setZero (NoChange_t, Index cols)
 
EIGEN_DEVICE_FUNC Derived & setZero (Index rows, NoChange_t)
 
EIGEN_DEVICE_FUNC Derived & setOnes (Index size)
 
EIGEN_DEVICE_FUNC Derived & setOnes (Index rows, Index cols)
 
EIGEN_DEVICE_FUNC Derived & setOnes (NoChange_t, Index cols)
 
EIGEN_DEVICE_FUNC Derived & setOnes (Index rows, NoChange_t)
 
Derived & setRandom (Index size)
 
Derived & setRandom (Index rows, Index cols)
 
Derived & setRandom (NoChange_t, Index cols)
 
Derived & setRandom (Index rows, NoChange_t)
 
template<typename OtherDerived >
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...
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap (DenseBase< OtherDerived > const &other)
 const version forwarded to DenseBase::swap More...
 

Static Public Member Functions

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:

Matrix4i A;
A << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16;
std::cout << Matrix2i::Map(&A(1, 1), Stride<8, 2>()) << std::endl;
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47

Output:

See also
class Map
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 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)
 
template<int Outer, int Inner>
static StridedConstMapType< Stride< Outer, Inner > >::type Map (const Scalar *data, const Stride< Outer, Inner > &stride)
 
template<int Outer, int Inner>
static StridedMapType< Stride< Outer, Inner > >::type Map (Scalar *data, const Stride< Outer, Inner > &stride)
 
template<int Outer, int Inner>
static StridedConstMapType< Stride< Outer, Inner > >::type Map (const Scalar *data, Index size, const Stride< Outer, Inner > &stride)
 
template<int Outer, int Inner>
static StridedMapType< Stride< Outer, Inner > >::type Map (Scalar *data, Index size, const Stride< Outer, Inner > &stride)
 
template<int Outer, int Inner>
static StridedConstMapType< Stride< Outer, Inner > >::type Map (const Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
 
template<int Outer, int Inner>
static StridedMapType< Stride< Outer, Inner > >::type Map (Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
 
template<int Outer, int Inner>
static StridedConstAlignedMapType< Stride< Outer, Inner > >::type MapAligned (const Scalar *data, const Stride< Outer, Inner > &stride)
 
template<int Outer, int Inner>
static StridedAlignedMapType< Stride< Outer, Inner > >::type MapAligned (Scalar *data, const Stride< Outer, Inner > &stride)
 
template<int Outer, int Inner>
static StridedConstAlignedMapType< Stride< Outer, Inner > >::type MapAligned (const Scalar *data, Index size, const Stride< Outer, Inner > &stride)
 
template<int Outer, int Inner>
static StridedAlignedMapType< Stride< Outer, Inner > >::type MapAligned (Scalar *data, Index size, const Stride< Outer, Inner > &stride)
 
template<int Outer, int Inner>
static StridedConstAlignedMapType< Stride< Outer, Inner > >::type MapAligned (const Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
 
template<int Outer, int Inner>
static StridedAlignedMapType< Stride< Outer, Inner > >::type MapAligned (Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
 

Protected Member Functions

EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE PlainObjectBase ()=default
 
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE PlainObjectBase (PlainObjectBase &&)=default
 Move constructor. More...
 
constexpr EIGEN_DEVICE_FUNC PlainObjectBaseoperator= (PlainObjectBase &&other) EIGEN_NOEXCEPT
 Move assignment operator. 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)
 
template<typename... ArgTypes>
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...
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase (const DenseBase< OtherDerived > &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase (const EigenBase< OtherDerived > &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase (const ReturnByValue< OtherDerived > &other)
 Copy constructor with in-place evaluation. More...
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _resize_to_match (const EigenBase< OtherDerived > &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived & _set (const DenseBase< OtherDerived > &other)
 Copies the value of the expression other into *this with automatic resizing. More...
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived & _set_noalias (const DenseBase< OtherDerived > &other)
 
template<typename T0 , typename T1 >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2 (Index rows, Index cols, std::enable_if_t< Base::SizeAtCompileTime !=2, T0 > *=0)
 
template<typename T0 , typename T1 >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2 (const T0 &val0, const T1 &val1, std::enable_if_t< Base::SizeAtCompileTime==2, T0 > *=0)
 
template<typename T0 , typename T1 >
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)
 
template<typename T >
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< Derived >::XprKind, ArrayXpr >::value||Base::SizeAtCompileTime==Dynamic)), T > *=0)
 
template<typename T >
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)
 
template<typename T >
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)
 
template<typename T >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1 (const Scalar *data)
 
template<typename T , typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1 (const DenseBase< OtherDerived > &other)
 
template<typename T >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1 (const Derived &other)
 
template<typename T , typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1 (const EigenBase< OtherDerived > &other)
 
template<typename T , typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1 (const ReturnByValue< OtherDerived > &other)
 
template<typename T , typename OtherDerived , int ColsAtCompileTime>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1 (const RotationBase< OtherDerived, ColsAtCompileTime > &r)
 
template<typename T >
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< Derived >::XprKind, ArrayXpr >::value, T > *=0)
 
template<typename T >
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< Derived >::XprKind, ArrayXpr >::value, T * > *=0)
 

Protected Attributes

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

Friends

template<typename MatrixTypeA , typename MatrixTypeB , bool SwapPointers>
struct internal::matrix_swap_impl
 
template<typename PlainObjectType , int MapOptions, typename StrideType >
class Eigen::Map
 
class Eigen::Map< Derived, Unaligned >
 
class Eigen::Map< const Derived, Unaligned >
 

Member Typedef Documentation

◆ AlignedMapType

template<typename Derived >
typedef Eigen::Map<Derived, AlignedMax> Eigen::PlainObjectBase< Derived >::AlignedMapType

◆ Base

template<typename Derived >
typedef internal::dense_xpr_base<Derived>::type Eigen::PlainObjectBase< Derived >::Base

◆ ConstAlignedMapType

template<typename Derived >
typedef const Eigen::Map<const Derived, AlignedMax> Eigen::PlainObjectBase< Derived >::ConstAlignedMapType

◆ ConstMapType

template<typename Derived >
typedef const Eigen::Map<const Derived, Unaligned> Eigen::PlainObjectBase< Derived >::ConstMapType

◆ DenseType

template<typename Derived >
typedef Derived Eigen::PlainObjectBase< Derived >::DenseType

◆ MapType

template<typename Derived >
typedef Eigen::Map<Derived, Unaligned> Eigen::PlainObjectBase< Derived >::MapType

◆ PacketScalar

template<typename Derived >
typedef internal::packet_traits<Scalar>::type Eigen::PlainObjectBase< Derived >::PacketScalar

◆ RealScalar

template<typename Derived >
typedef NumTraits<Scalar>::Real Eigen::PlainObjectBase< Derived >::RealScalar

◆ Scalar

template<typename Derived >
typedef internal::traits<Derived>::Scalar Eigen::PlainObjectBase< Derived >::Scalar

◆ StorageKind

template<typename Derived >
typedef internal::traits<Derived>::StorageKind Eigen::PlainObjectBase< Derived >::StorageKind

Member Enumeration Documentation

◆ anonymous enum

template<typename Derived >
anonymous enum
Enumerator
Options 
123 { Options = internal::traits<Derived>::Options };
@ Options
Definition: PlainObjectBase.h:123

◆ anonymous enum

template<typename Derived >
anonymous enum
Enumerator
NeedsToAlign 
167 { NeedsToAlign = (SizeAtCompileTime != Dynamic) && (internal::traits<Derived>::Alignment > 0) };
@ NeedsToAlign
Definition: PlainObjectBase.h:167
const int Dynamic
Definition: Constants.h:25

◆ anonymous enum

template<typename Derived >
anonymous enum
Enumerator
IsPlainObjectBase 
911 {IsPlainObjectBase = 1};
@ IsPlainObjectBase
Definition: PlainObjectBase.h:911

Constructor & Destructor Documentation

◆ PlainObjectBase() [1/9]

template<typename Derived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase ( )
constexprprotecteddefault

◆ PlainObjectBase() [2/9]

template<typename Derived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase ( PlainObjectBase< Derived > &&  )
constexprprotecteddefault

Move constructor.

◆ PlainObjectBase() [3/9]

template<typename Derived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase ( const PlainObjectBase< Derived > &  )
constexprprotecteddefault

Copy constructor

◆ PlainObjectBase() [4/9]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase ( Index  size,
Index  rows,
Index  cols 
)
inlineprotected
487  : m_storage(size, rows, cols) {}
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
DenseStorage< Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options > m_storage
Definition: PlainObjectBase.h:164
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: PlainObjectBase.h:192
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: PlainObjectBase.h:191

◆ PlainObjectBase() [5/9]

template<typename Derived >
template<typename... ArgTypes>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase ( const Scalar a0,
const Scalar a1,
const Scalar a2,
const Scalar a3,
const ArgTypes &...  args 
)
inlineprotected

Construct a row of column vector with fixed size from an arbitrary number of coefficients.

\only_for_vectors

This constructor is for 1D array or vectors with more than 4 coefficients.

Warning
To construct a column (resp. row) vector of fixed length, the number of values passed to this constructor must match the the fixed number of rows (resp. columns) of *this.
501  : m_storage() {
503  m_storage.data()[0] = a0;
504  m_storage.data()[1] = a1;
505  m_storage.data()[2] = a2;
506  m_storage.data()[3] = a3;
507  Index i = 4;
508  auto x = {(m_storage.data()[i++] = args, 0)...};
509  static_cast<void>(x);
510  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
#define EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE)
Definition: StaticAssert.h:50
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE PlainObjectBase()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE T * data()
Definition: DenseStorage.h:122
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
args
Definition: compute_granudrum_aor.py:143
list x
Definition: plotDoE.py:28

References compute_granudrum_aor::args, Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::data(), EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE, i, Eigen::PlainObjectBase< Derived >::m_storage, and plotDoE::x.

◆ PlainObjectBase() [6/9]

template<typename Derived >
constexpr EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase ( const std::initializer_list< std::initializer_list< Scalar >> &  list)
inlineexplicitconstexprprotected

Constructs a Matrix or Array and initializes it by elements given by an initializer list of initializer lists.

517  : m_storage() {
518  size_t list_size = 0;
519  if (list.begin() != list.end()) {
520  list_size = list.begin()->size();
521  }
522 
523  // This is to allow syntax like VectorXi {{1, 2, 3, 4}}
524  if (ColsAtCompileTime == 1 && list.size() == 1) {
525  eigen_assert(list_size == static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic);
526  resize(list_size, ColsAtCompileTime);
527  if (list.begin()->begin() != nullptr) {
528  Index index = 0;
529  for (const Scalar& e : *list.begin()) {
530  coeffRef(index++) = e;
531  }
532  }
533  } else {
534  eigen_assert(list.size() == static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic);
535  eigen_assert(list_size == static_cast<size_t>(ColsAtCompileTime) || ColsAtCompileTime == Dynamic);
536  resize(list.size(), list_size);
537 
538  Index row_index = 0;
539  for (const std::initializer_list<Scalar>& row : list) {
540  eigen_assert(list_size == row.size());
541  Index col_index = 0;
542  for (const Scalar& e : row) {
543  coeffRef(row_index, col_index) = e;
544  ++col_index;
545  }
546  ++row_index;
547  }
548  }
549  }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
#define eigen_assert(x)
Definition: Macros.h:910
m row(1)
SCALAR Scalar
Definition: bench_gemm.cpp:45
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
Definition: PlainObjectBase.h:217
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
Definition: PlainObjectBase.h:294
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index size() const
Definition: DenseStorage.h:121

References Eigen::PlainObjectBase< Derived >::coeffRef(), Eigen::Dynamic, e(), eigen_assert, Eigen::PlainObjectBase< Derived >::resize(), row(), and Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::size().

◆ PlainObjectBase() [7/9]

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase ( const DenseBase< OtherDerived > &  other)
inlineprotected
See also
PlainObjectBase::operator=(const EigenBase<OtherDerived>&)
553  : m_storage() {
554  resizeLike(other);
555  _set_noalias(other);
556  }
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived & _set_noalias(const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:754
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resizeLike(const EigenBase< OtherDerived > &_other)
Definition: PlainObjectBase.h:372

References Eigen::PlainObjectBase< Derived >::_set_noalias(), and Eigen::PlainObjectBase< Derived >::resizeLike().

◆ PlainObjectBase() [8/9]

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase ( const EigenBase< OtherDerived > &  other)
inlineprotected
See also
PlainObjectBase::operator=(const EigenBase<OtherDerived>&)
560  : m_storage() {
561  resizeLike(other);
562  *this = other.derived();
563  }

References Eigen::EigenBase< Derived >::derived(), and Eigen::PlainObjectBase< Derived >::resizeLike().

◆ PlainObjectBase() [9/9]

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::PlainObjectBase< Derived >::PlainObjectBase ( const ReturnByValue< OtherDerived > &  other)
inlineprotected

Copy constructor with in-place evaluation.

566  {
567  // FIXME this does not automatically transpose vectors if necessary
568  resize(other.rows(), other.cols());
569  other.evalTo(this->derived());
570  }

References Eigen::ReturnByValue< Derived >::cols(), Eigen::ReturnByValue< Derived >::evalTo(), Eigen::PlainObjectBase< Derived >::resize(), and Eigen::ReturnByValue< Derived >::rows().

Member Function Documentation

◆ _init1() [1/11]

template<typename Derived >
template<typename T , typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 ( const DenseBase< OtherDerived > &  other)
inlineprotected
838  {
839  this->_set_noalias(other);
840  }

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

◆ _init1() [2/11]

template<typename Derived >
template<typename T >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 ( const Derived &  other)
inlineprotected
844  {
845  this->_set_noalias(other);
846  }

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

◆ _init1() [3/11]

template<typename Derived >
template<typename T , typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 ( const EigenBase< OtherDerived > &  other)
inlineprotected
850  {
851  this->derived() = other;
852  }

◆ _init1() [4/11]

template<typename Derived >
template<typename T >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_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< Derived >::XprKind, ArrayXpr >::value, T * > *  = 0 
)
inlineprotected
884  {
885  Base::setConstant(val0);
886  }
v setConstant(3, 5)

References setConstant().

◆ _init1() [5/11]

template<typename Derived >
template<typename T >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_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 
)
inlineprotected

◆ _init1() [6/11]

template<typename Derived >
template<typename T , typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 ( const ReturnByValue< OtherDerived > &  other)
inlineprotected
855  {
856  resize(other.rows(), other.cols());
857  other.evalTo(this->derived());
858  }

References Eigen::ReturnByValue< Derived >::cols(), Eigen::ReturnByValue< Derived >::evalTo(), Eigen::PlainObjectBase< Derived >::resize(), and Eigen::ReturnByValue< Derived >::rows().

◆ _init1() [7/11]

template<typename Derived >
template<typename T , typename OtherDerived , int ColsAtCompileTime>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 ( const RotationBase< OtherDerived, ColsAtCompileTime > &  r)
inlineprotected
861  {
862  this->derived() = r;
863  }
r
Definition: UniformPSDSelfTest.py:20

References UniformPSDSelfTest::r.

◆ _init1() [8/11]

template<typename Derived >
template<typename T >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_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< Derived >::XprKind, ArrayXpr >::value, T > *  = 0 
)
inlineprotected
872  {
873  Base::setConstant(val0);
874  }

References setConstant().

◆ _init1() [9/11]

template<typename Derived >
template<typename T >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 ( const Scalar val0,
std::enable_if_t< Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T > *  = 0 
)
inlineprotected

◆ _init1() [10/11]

template<typename Derived >
template<typename T >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 ( const Scalar data)
inlineprotected
832  {
834  }
const Eigen::Map< const Derived, Unaligned > ConstMapType
Definition: PlainObjectBase.h:143

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

◆ _init1() [11/11]

template<typename Derived >
template<typename T >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init1 ( Index  size,
std::enable_if_t<(Base::SizeAtCompileTime !=1||!internal::is_convertible< T, Scalar >::value) &&((!internal::is_same< typename internal::traits< Derived >::XprKind, ArrayXpr >::value||Base::SizeAtCompileTime==Dynamic)), T > *  = 0 
)
inlineprotected
800  {
801  // NOTE MSVC 2008 complains if we directly put bool(NumTraits<T>::IsInteger) as the EIGEN_STATIC_ASSERT argument.
802  const bool is_integer_alike = internal::is_valid_index_type<T>::value;
803  EIGEN_UNUSED_VARIABLE(is_integer_alike);
804  EIGEN_STATIC_ASSERT(is_integer_alike, FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED)
805  resize(size);
806  }
#define EIGEN_UNUSED_VARIABLE(var)
Definition: Macros.h:966
EIGEN_STATIC_ASSERT(internal::check_implication(MaxRowsAtCompileTime==1 &&MaxColsAtCompileTime !=1,(int(Options) &RowMajor)==RowMajor), INVALID_MATRIX_TEMPLATE_PARAMETERS) EIGEN_STATIC_ASSERT(internal
Definition: PlainObjectBase.h:170
@ value
Definition: XprHelper.h:70

References Eigen::PlainObjectBase< Derived >::EIGEN_STATIC_ASSERT(), EIGEN_UNUSED_VARIABLE, Eigen::PlainObjectBase< Derived >::resize(), and size.

◆ _init2() [1/3]

template<typename Derived >
template<typename T0 , typename T1 >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_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 
)
inlineprotected

◆ _init2() [2/3]

template<typename Derived >
template<typename T0 , typename T1 >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init2 ( const T0 &  val0,
const T1 &  val1,
std::enable_if_t< Base::SizeAtCompileTime==2, T0 > *  = 0 
)
inlineprotected

◆ _init2() [3/3]

template<typename Derived >
template<typename T0 , typename T1 >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_init2 ( Index  rows,
Index  cols,
std::enable_if_t< Base::SizeAtCompileTime !=2, T0 > *  = 0 
)
inlineprotected

◆ _resize_to_match()

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::_resize_to_match ( const EigenBase< OtherDerived > &  other)
inlineprotected

Resizes *this in preparation for assigning other to it. 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.

715  {
716 #ifdef EIGEN_NO_AUTOMATIC_RESIZING
717  eigen_assert((this->size() == 0 || (IsVectorAtCompileTime ? (this->size() == other.size())
718  : (rows() == other.rows() && cols() == other.cols()))) &&
719  "Size mismatch. Automatic resizing is disabled because EIGEN_NO_AUTOMATIC_RESIZING is defined");
721 #else
722  resizeLike(other);
723 #endif
724  }
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
Definition: Macros.h:922

References Eigen::EigenBase< Derived >::cols(), Eigen::PlainObjectBase< Derived >::cols(), eigen_assert, EIGEN_ONLY_USED_FOR_DEBUG, Eigen::PlainObjectBase< Derived >::resizeLike(), Eigen::EigenBase< Derived >::rows(), Eigen::PlainObjectBase< Derived >::rows(), size, and Eigen::EigenBase< Derived >::size().

Referenced by Eigen::PlainObjectBase< Derived >::lazyAssign(), and Eigen::PlainObjectBase< Derived >::operator=().

◆ _set()

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived& Eigen::PlainObjectBase< Derived >::_set ( const DenseBase< OtherDerived > &  other)
inlineconstexprprotected

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()
743  {
744  internal::call_assignment(this->derived(), other.derived());
745  return this->derived();
746  }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment(Dst &dst, const Src &src)
Definition: AssignEvaluator.h:781

References Eigen::internal::call_assignment().

Referenced by Eigen::Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ >::operator=(), Eigen::Matrix< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ >::operator=(), and Eigen::PlainObjectBase< Derived >::operator=().

◆ _set_noalias()

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived& Eigen::PlainObjectBase< Derived >::_set_noalias ( const DenseBase< OtherDerived > &  other)
inlineconstexprprotected

Like _set() but additionally makes the assumption that no aliasing effect can happen (which is the case when creating a new matrix) so one can enforce lazy evaluation.

See also
operator=(const MatrixBase<OtherDerived>&), _set()
754  {
755  // I don't think we need this resize call since the lazyAssign will anyways resize
756  // and lazyAssign will be called by the assign selector.
757  //_resize_to_match(other);
758  // the 'false' below means to enforce lazy evaluation. We don't use lazyAssign() because
759  // it wouldn't allow to copy a row-vector into a column-vector.
760  internal::call_assignment_no_alias(this->derived(), other.derived(),
761  internal::assign_op<Scalar, typename OtherDerived::Scalar>());
762  return this->derived();
763  }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void call_assignment_no_alias(Dst &dst, const Src &src, const Func &func)
Definition: AssignEvaluator.h:812

References Eigen::internal::call_assignment_no_alias().

Referenced by Eigen::PlainObjectBase< Derived >::_init1(), and Eigen::PlainObjectBase< Derived >::PlainObjectBase().

◆ base()

template<typename Derived >
EIGEN_DEVICE_FUNC const Base& Eigen::PlainObjectBase< Derived >::base ( ) const
inline
189 { return *static_cast<const Base*>(this); }
internal::dense_xpr_base< Derived >::type Base
Definition: PlainObjectBase.h:124

◆ coeff() [1/2]

template<typename Derived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar& Eigen::PlainObjectBase< Derived >::coeff ( Index  index) const
inlineconstexpr

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.

209  {
210  return m_storage.data()[index];
211  }

References Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::data(), and Eigen::PlainObjectBase< Derived >::m_storage.

◆ coeff() [2/2]

template<typename Derived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar& Eigen::PlainObjectBase< Derived >::coeff ( Index  rowId,
Index  colId 
) const
inlineconstexpr

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.

198  {
199  if (Flags & RowMajorBit)
200  return m_storage.data()[colId + rowId * m_storage.cols()];
201  else // column-major
202  return m_storage.data()[rowId + colId * m_storage.rows()];
203  }
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index cols() const
Definition: DenseStorage.h:120
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index rows() const
Definition: DenseStorage.h:119
const unsigned int RowMajorBit
Definition: Constants.h:70
Extend namespace for flags.
Definition: fsi_chan_precond_driver.cc:56

Referenced by __attribute__(), Eigen::FullPivHouseholderQR< MatrixType_, PermutationIndex_ >::_solve_impl(), Eigen::FullPivHouseholderQR< MatrixType_, PermutationIndex_ >::_solve_impl_transposed(), check_indexed_view(), Eigen::SelfAdjointEigenSolver< MatrixType_ >::compute(), Eigen::GeneralizedEigenSolver< MatrixType_ >::compute(), Eigen::JacobiSVD< MatrixType_, Options_ >::compute_impl(), Eigen::FullPivHouseholderQR< MatrixType_, PermutationIndex_ >::computeInPlace(), Eigen::ComplexSchur< MatrixType_ >::computeShift(), Eigen::RealSchur< MatrixType_ >::computeShift(), Eigen::ComplexEigenSolver< MatrixType_ >::doComputeEigenvectors(), Eigen::internal::kernel_retval< FullPivLU< MatrixType_, PermutationIndex_ > >::evalTo(), Eigen::internal::image_retval< FullPivLU< MatrixType_, PermutationIndex_ > >::evalTo(), Eigen::RealSchur< MatrixType_ >::initFrancisQRStep(), Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >::intersection(), Eigen::internal::matrix_sqrt_quasi_triangular_1x2_off_diagonal_block(), Eigen::internal::matrix_sqrt_quasi_triangular_2x1_off_diagonal_block(), Eigen::internal::matrix_sqrt_quasi_triangular_solve_auxiliary_equation(), Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >::offset(), Eigen::ComplexSchur< MatrixType_ >::reduceToTriangularForm(), ref_prod(), Eigen::internal::sparse_solve_triangular_selector< Lhs, Rhs, Mode, Lower, RowMajor >::run(), Eigen::internal::sparse_solve_triangular_selector< Lhs, Rhs, Mode, Upper, RowMajor >::run(), Eigen::internal::svd_precondition_2x2_block_to_be_real< MatrixType, Options, true >::run(), sparse_block(), sparse_vector(), Eigen::RealQZ< MatrixType_ >::step(), Eigen::ComplexSchur< MatrixType_ >::subdiagonalEntryIsNeglegible(), and test_dynamic_bool().

◆ coeffRef() [1/4]

template<typename Derived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar& Eigen::PlainObjectBase< Derived >::coeffRef ( Index  index)
inlineconstexpr

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.

228 { return m_storage.data()[index]; }

References Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::data(), and Eigen::PlainObjectBase< Derived >::m_storage.

◆ coeffRef() [2/4]

template<typename Derived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar& Eigen::PlainObjectBase< Derived >::coeffRef ( Index  index) const
inlineconstexpr

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

241  {
242  return m_storage.data()[index];
243  }

References Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::data(), and Eigen::PlainObjectBase< Derived >::m_storage.

◆ coeffRef() [3/4]

template<typename Derived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar& Eigen::PlainObjectBase< Derived >::coeffRef ( Index  rowId,
Index  colId 
)
inlineconstexpr

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.

217  {
218  if (Flags & RowMajorBit)
219  return m_storage.data()[colId + rowId * m_storage.cols()];
220  else // column-major
221  return m_storage.data()[rowId + colId * m_storage.rows()];
222  }

References Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::cols(), Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::data(), Eigen::PlainObjectBase< Derived >::m_storage, Eigen::RowMajorBit, and Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::rows().

Referenced by Eigen::PlainObjectBase< Derived >::PlainObjectBase().

◆ coeffRef() [4/4]

template<typename Derived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar& Eigen::PlainObjectBase< Derived >::coeffRef ( Index  rowId,
Index  colId 
) const
inlineconstexpr

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

232  {
233  if (Flags & RowMajorBit)
234  return m_storage.data()[colId + rowId * m_storage.cols()];
235  else // column-major
236  return m_storage.data()[rowId + colId * m_storage.rows()];
237  }

References Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::cols(), Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::data(), Eigen::PlainObjectBase< Derived >::m_storage, Eigen::RowMajorBit, and Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::rows().

◆ cols()

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index Eigen::PlainObjectBase< Derived >::cols ( ) const
inline
192 { return m_storage.cols(); }

References Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::cols(), and Eigen::PlainObjectBase< Derived >::m_storage.

Referenced by gdb.printers._MatrixEntryIterator::__next__(), Eigen::HessenbergDecomposition< MatrixType_ >::_compute(), Eigen::PlainObjectBase< Derived >::_init2(), Eigen::PlainObjectBase< Derived >::_resize_to_match(), bench(), binary_op_test(), check_generateRandomMatrixSvs(), check_indexed_view(), check_sparse_inverse(), check_sparse_solving(), check_sparse_solving_real_cases(), check_sparse_spd_solving(), check_sparse_square_solving(), check_tutorial_examples(), gdb.printers.EigenMatrixPrinter::children(), gdb.printers.EigenSparseMatrixPrinter::children(), Eigen::Transform< Scalar_, Dim_, Mode_, Options_ >::cols(), Eigen::GeneralizedEigenSolver< MatrixType_ >::compute(), Eigen::ArpackGeneralizedSelfAdjointEigenSolver< MatrixType, MatrixSolver, BisSPD >::compute(), Eigen::GeneralizedSelfAdjointEigenSolver< MatrixType_ >::compute(), compute_norm_equation(), Eigen::PlainObjectBase< Derived >::conservativeResize(), Eigen::copy_using_evaluator(), DenseLM< Scalar >::df(), Eigen::internal::dogleg(), equalsIdentity(), Eigen::MetisOrdering< StorageIndex >::get_symmetrized_graph(), initSparse(), initSPD(), main(), Eigen::PlainObjectBase< Derived >::Map(), Eigen::PlainObjectBase< Derived >::MapAligned(), Eigen::internal::matrix_exp_pade13(), Eigen::internal::matrix_exp_pade3(), Eigen::internal::matrix_exp_pade5(), Eigen::internal::matrix_exp_pade7(), Eigen::internal::matrix_exp_pade9(), Eigen::internal::matrix_function_solve_triangular_sylvester(), Eigen::MatrixPower< MatrixType >::MatrixPower(), Eigen::AutoDiffJacobian< Functor >::operator()(), Eigen::MetisOrdering< StorageIndex >::operator()(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_inner(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_outer(), real_qz(), Eigen::ComplexSchur< MatrixType_ >::reduceToTriangularForm(), ref_prod(), Eigen::PlainObjectBase< Derived >::resize(), Eigen::Transform< Scalar_, Dim_, Mode_, Options_ >::rows(), Eigen::internal::conservative_resize_like_impl< Derived, OtherDerived, IsVector >::run(), sparse_basic(), sparse_solvers(), Eigen::DenseBase< Derived >::swap(), test_dynamic_bool(), test_nnls_known_solution(), test_nnls_random_problem(), test_non_spd(), test_sparseqr_scalar(), test_stl_iterators(), gdb.printers.EigenMatrixPrinter::to_string(), gdb.printers.EigenSparseMatrixPrinter::to_string(), Eigen::internal::tridiagonalization_inplace(), trsolve(), Eigen::internal::upperbidiagonalization_blocked_helper(), and Eigen::internal::upperbidiagonalization_inplace_blocked().

◆ conservativeResize() [1/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::conservativeResize ( Index  rows,
Index  cols 
)
inline

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.

398  {
400  }
static void run(DenseBase< Derived > &_this, Index rows, Index cols)
Definition: PlainObjectBase.h:933

References Eigen::PlainObjectBase< Derived >::cols(), Eigen::PlainObjectBase< Derived >::rows(), and Eigen::internal::conservative_resize_like_impl< Derived, OtherDerived, IsVector >::run().

Referenced by Eigen::PlainObjectBase< Derived >::conservativeResize(), sparse_basic(), sparse_vector(), and svd_min_norm().

◆ conservativeResize() [2/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::conservativeResize ( Index  rows,
NoChange_t   
)
inline

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.

409  {
410  // Note: see the comment in conservativeResize(Index,Index)
412  }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResize(Index rows, Index cols)
Definition: PlainObjectBase.h:398

References Eigen::PlainObjectBase< Derived >::cols(), Eigen::PlainObjectBase< Derived >::conservativeResize(), and Eigen::PlainObjectBase< Derived >::rows().

◆ conservativeResize() [3/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::conservativeResize ( Index  size)
inline

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.

References Eigen::internal::conservative_resize_like_impl< Derived, OtherDerived, IsVector >::run(), and size.

◆ conservativeResize() [4/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::conservativeResize ( NoChange_t  ,
Index  cols 
)
inline

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.

421  {
422  // Note: see the comment in conservativeResize(Index,Index)
424  }

References Eigen::PlainObjectBase< Derived >::cols(), Eigen::PlainObjectBase< Derived >::conservativeResize(), and Eigen::PlainObjectBase< Derived >::rows().

◆ conservativeResizeLike()

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::conservativeResizeLike ( const DenseBase< OtherDerived > &  other)
inline

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.

References Eigen::internal::conservative_resize_like_impl< Derived, OtherDerived, IsVector >::run().

◆ data() [1/2]

◆ data() [2/2]

template<typename Derived >
constexpr EIGEN_DEVICE_FUNC const Scalar* Eigen::PlainObjectBase< Derived >::data ( ) const
inlineconstexpr
Returns
a const pointer to the data array of this matrix
273 { return m_storage.data(); }

References Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::data(), and Eigen::PlainObjectBase< Derived >::m_storage.

Referenced by Eigen::PardisoImpl< Derived >::_solve_impl(), Eigen::UmfPackLU< MatrixType_ >::_solve_impl(), Eigen::UmfPackLU< MatrixType_ >::analyzePattern_impl(), Eigen::AccelerateImpl< MatrixType_, UpLo_, Solver_, EnforceSquare_ >::buildAccelSparseMatrix(), check_indexed_view(), check_product(), check_tutorial_examples(), gdb.printers.EigenMatrixPrinter::children(), gdb.printers.EigenSparseMatrixPrinter::children(), gdb.printers.EigenQuaternionPrinter::children(), Eigen::PastixBase< Derived >::clean(), Eigen::GeneralizedEigenSolver< MatrixType_ >::compute(), Eigen::internal::lapacke_helpers::BDCSVD_LAPACKE< MatrixType_, Options >::compute_impl_lapacke(), Eigen::internal::UpperBidiagonalization< MatrixType_ >::computeUnblocked(), Eigen::Transform< Scalar_, Dim_, Mode_, Options_ >::data(), EIGEN_DECLARE_TEST(), Eigen::KroneckerProductSparse< Lhs, Rhs >::evalTo(), Eigen::SparseQR< MatrixType_, OrderingType_ >::factorize(), Eigen::UmfPackLU< MatrixType_ >::factorize_impl(), householder_update(), Eigen::UmfPackLU< MatrixType_ >::init(), main(), Eigen::PlainObjectBase< Derived >::Map(), Eigen::PlainObjectBase< Derived >::MapAligned(), matrix(), Eigen::MetisOrdering< StorageIndex >::operator()(), Eigen::COLAMDOrdering< StorageIndex >::operator()(), Eigen::internal::tribb_kernel< LhsScalar, RhsScalar, Index, mr, nr, ConjLhs, ConjRhs, ResInnerStride, UpLo >::operator()(), Eigen::internal::unary_evaluator< CwiseUnaryOp< core_cast_op< SrcType, DstType >, ArgType >, IndexBased >::packet(), Eigen::internal::SparseLUImpl< Scalar, StorageIndex >::panel_bmod(), Eigen::PardisoImpl< Derived >::pardisoRelease(), Eigen::UmfPackLU< MatrixType_ >::printUmfpackControl(), Eigen::UmfPackLU< MatrixType_ >::printUmfpackInfo(), Eigen::UmfPackLU< MatrixType_ >::printUmfpackStatus(), Eigen::internal::simpl_chol_helper< Scalar, StorageIndex >::run(), Eigen::internal::product_triangular_matrix_matrix< Scalar, Index, Mode, true, LhsStorageOrder, ConjugateLhs, RhsStorageOrder, ConjugateRhs, ColMajor, ResInnerStride, Version >::run(), Eigen::internal::product_triangular_matrix_matrix< Scalar, Index, Mode, false, LhsStorageOrder, ConjugateLhs, RhsStorageOrder, ConjugateRhs, ColMajor, ResInnerStride, Version >::run(), rvalue_copyassign(), Eigen::internal::set_from_triplets(), Eigen::internal::MappedSuperNodalMatrix< Scalar_, StorageIndex_ >::setInfos(), Eigen::RealQZ< MatrixType_ >::step(), test_async_sharded_by_inner_dim_contraction(), test_async_sharded_by_inner_dim_contraction_with_output_kernel(), test_complex2d(), test_contraction_corner_cases(), test_contractions(), test_large_contraction(), test_large_contraction_with_output_kernel(), test_multithread_contraction(), test_multithread_contraction_with_output_kernel(), test_sharded_by_inner_dim_contraction(), test_sharded_by_inner_dim_contraction_with_output_kernel(), test_small_blocking_factors(), test_stl_iterators(), gdb.printers.EigenMatrixPrinter::to_string(), gdb.printers.EigenSparseMatrixPrinter::to_string(), and gdb.printers.EigenQuaternionPrinter::to_string().

◆ EIGEN_STATIC_ASSERT()

template<typename Derived >
Eigen::PlainObjectBase< Derived >::EIGEN_STATIC_ASSERT ( internal::check_implication(MaxRowsAtCompileTime==1 &&MaxColsAtCompileTime !=1,(int(Options) &RowMajor)==RowMajor ,
INVALID_MATRIX_TEMPLATE_PARAMETERS   
)
inline
188  { return *static_cast<Base*>(this); }

Referenced by Eigen::PlainObjectBase< Derived >::_init1(), and Eigen::PlainObjectBase< Derived >::_init2().

◆ lazyAssign()

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::PlainObjectBase< Derived >::lazyAssign ( const DenseBase< OtherDerived > &  other)
inline
See also
MatrixBase::lazyAssign()
461  {
462  _resize_to_match(other);
463  return Base::lazyAssign(other.derived());
464  }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _resize_to_match(const EigenBase< OtherDerived > &other)
Definition: PlainObjectBase.h:715

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

◆ Map() [1/12]

template<typename Derived >
static ConstMapType Eigen::PlainObjectBase< Derived >::Map ( const Scalar data)
inlinestatic

◆ Map() [2/12]

template<typename Derived >
template<int Outer, int Inner>
static StridedConstMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::Map ( const Scalar data,
const Stride< Outer, Inner > &  stride 
)
inlinestatic
617  {
618  return typename StridedConstMapType<Stride<Outer, Inner>>::type(data, stride);
619  }
type
Definition: compute_granudrum_aor.py:141

References Eigen::PlainObjectBase< Derived >::data(), and compute_granudrum_aor::type.

◆ Map() [3/12]

template<typename Derived >
static ConstMapType Eigen::PlainObjectBase< Derived >::Map ( const Scalar data,
Index  rows,
Index  cols 
)
inlinestatic

◆ Map() [4/12]

template<typename Derived >
template<int Outer, int Inner>
static StridedConstMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::Map ( const Scalar data,
Index  rows,
Index  cols,
const Stride< Outer, Inner > &  stride 
)
inlinestatic
637  {
638  return typename StridedConstMapType<Stride<Outer, Inner>>::type(data, rows, cols, stride);
639  }

References Eigen::PlainObjectBase< Derived >::cols(), Eigen::PlainObjectBase< Derived >::data(), Eigen::PlainObjectBase< Derived >::rows(), and compute_granudrum_aor::type.

◆ Map() [5/12]

template<typename Derived >
static ConstMapType Eigen::PlainObjectBase< Derived >::Map ( const Scalar data,
Index  size 
)
inlinestatic

◆ Map() [6/12]

template<typename Derived >
template<int Outer, int Inner>
static StridedConstMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::Map ( const Scalar data,
Index  size,
const Stride< Outer, Inner > &  stride 
)
inlinestatic
627  {
628  return typename StridedConstMapType<Stride<Outer, Inner>>::type(data, size, stride);
629  }

References Eigen::PlainObjectBase< Derived >::data(), size, and compute_granudrum_aor::type.

◆ Map() [7/12]

template<typename Derived >
static MapType Eigen::PlainObjectBase< Derived >::Map ( Scalar data)
inlinestatic
596 { return MapType(data); }
Eigen::Map< Derived, Unaligned > MapType
Definition: PlainObjectBase.h:142

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

◆ Map() [8/12]

template<typename Derived >
template<int Outer, int Inner>
static StridedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::Map ( Scalar data,
const Stride< Outer, Inner > &  stride 
)
inlinestatic
622  {
623  return typename StridedMapType<Stride<Outer, Inner>>::type(data, stride);
624  }

References Eigen::PlainObjectBase< Derived >::data(), and compute_granudrum_aor::type.

◆ Map() [9/12]

template<typename Derived >
static MapType Eigen::PlainObjectBase< Derived >::Map ( Scalar data,
Index  rows,
Index  cols 
)
inlinestatic

◆ Map() [10/12]

template<typename Derived >
template<int Outer, int Inner>
static StridedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::Map ( Scalar data,
Index  rows,
Index  cols,
const Stride< Outer, Inner > &  stride 
)
inlinestatic
642  {
643  return typename StridedMapType<Stride<Outer, Inner>>::type(data, rows, cols, stride);
644  }

References Eigen::PlainObjectBase< Derived >::cols(), Eigen::PlainObjectBase< Derived >::data(), Eigen::PlainObjectBase< Derived >::rows(), and compute_granudrum_aor::type.

◆ Map() [11/12]

template<typename Derived >
static MapType Eigen::PlainObjectBase< Derived >::Map ( Scalar data,
Index  size 
)
inlinestatic
598 { return MapType(data, size); }

References Eigen::PlainObjectBase< Derived >::data(), and size.

◆ Map() [12/12]

template<typename Derived >
template<int Outer, int Inner>
static StridedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::Map ( Scalar data,
Index  size,
const Stride< Outer, Inner > &  stride 
)
inlinestatic
632  {
633  return typename StridedMapType<Stride<Outer, Inner>>::type(data, size, stride);
634  }

References Eigen::PlainObjectBase< Derived >::data(), size, and compute_granudrum_aor::type.

◆ MapAligned() [1/12]

template<typename Derived >
static ConstAlignedMapType Eigen::PlainObjectBase< Derived >::MapAligned ( const Scalar data)
inlinestatic
602 { return ConstAlignedMapType(data); }
const Eigen::Map< const Derived, AlignedMax > ConstAlignedMapType
Definition: PlainObjectBase.h:145

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

◆ MapAligned() [2/12]

template<typename Derived >
template<int Outer, int Inner>
static StridedConstAlignedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::MapAligned ( const Scalar data,
const Stride< Outer, Inner > &  stride 
)
inlinestatic
648  {
649  return typename StridedConstAlignedMapType<Stride<Outer, Inner>>::type(data, stride);
650  }

References Eigen::PlainObjectBase< Derived >::data(), and compute_granudrum_aor::type.

◆ MapAligned() [3/12]

template<typename Derived >
static ConstAlignedMapType Eigen::PlainObjectBase< Derived >::MapAligned ( const Scalar data,
Index  rows,
Index  cols 
)
inlinestatic

◆ MapAligned() [4/12]

template<typename Derived >
template<int Outer, int Inner>
static StridedConstAlignedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::MapAligned ( const Scalar data,
Index  rows,
Index  cols,
const Stride< Outer, Inner > &  stride 
)
inlinestatic
668  {
669  return typename StridedConstAlignedMapType<Stride<Outer, Inner>>::type(data, rows, cols, stride);
670  }

References Eigen::PlainObjectBase< Derived >::cols(), Eigen::PlainObjectBase< Derived >::data(), Eigen::PlainObjectBase< Derived >::rows(), and compute_granudrum_aor::type.

◆ MapAligned() [5/12]

template<typename Derived >
static ConstAlignedMapType Eigen::PlainObjectBase< Derived >::MapAligned ( const Scalar data,
Index  size 
)
inlinestatic
604  {
605  return ConstAlignedMapType(data, size);
606  }

References Eigen::PlainObjectBase< Derived >::data(), and size.

◆ MapAligned() [6/12]

template<typename Derived >
template<int Outer, int Inner>
static StridedConstAlignedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::MapAligned ( const Scalar data,
Index  size,
const Stride< Outer, Inner > &  stride 
)
inlinestatic
658  {
659  return typename StridedConstAlignedMapType<Stride<Outer, Inner>>::type(data, size, stride);
660  }

References Eigen::PlainObjectBase< Derived >::data(), size, and compute_granudrum_aor::type.

◆ MapAligned() [7/12]

template<typename Derived >
static AlignedMapType Eigen::PlainObjectBase< Derived >::MapAligned ( Scalar data)
inlinestatic
603 { return AlignedMapType(data); }
Eigen::Map< Derived, AlignedMax > AlignedMapType
Definition: PlainObjectBase.h:144

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

◆ MapAligned() [8/12]

template<typename Derived >
template<int Outer, int Inner>
static StridedAlignedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::MapAligned ( Scalar data,
const Stride< Outer, Inner > &  stride 
)
inlinestatic
653  {
654  return typename StridedAlignedMapType<Stride<Outer, Inner>>::type(data, stride);
655  }

References Eigen::PlainObjectBase< Derived >::data(), and compute_granudrum_aor::type.

◆ MapAligned() [9/12]

template<typename Derived >
static AlignedMapType Eigen::PlainObjectBase< Derived >::MapAligned ( Scalar data,
Index  rows,
Index  cols 
)
inlinestatic

◆ MapAligned() [10/12]

template<typename Derived >
template<int Outer, int Inner>
static StridedAlignedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::MapAligned ( Scalar data,
Index  rows,
Index  cols,
const Stride< Outer, Inner > &  stride 
)
inlinestatic
673  {
674  return typename StridedAlignedMapType<Stride<Outer, Inner>>::type(data, rows, cols, stride);
675  }

References Eigen::PlainObjectBase< Derived >::cols(), Eigen::PlainObjectBase< Derived >::data(), Eigen::PlainObjectBase< Derived >::rows(), and compute_granudrum_aor::type.

◆ MapAligned() [11/12]

template<typename Derived >
static AlignedMapType Eigen::PlainObjectBase< Derived >::MapAligned ( Scalar data,
Index  size 
)
inlinestatic

◆ MapAligned() [12/12]

template<typename Derived >
template<int Outer, int Inner>
static StridedAlignedMapType<Stride<Outer, Inner> >::type Eigen::PlainObjectBase< Derived >::MapAligned ( Scalar data,
Index  size,
const Stride< Outer, Inner > &  stride 
)
inlinestatic
663  {
664  return typename StridedAlignedMapType<Stride<Outer, Inner>>::type(data, size, stride);
665  }

References Eigen::PlainObjectBase< Derived >::data(), size, and compute_granudrum_aor::type.

◆ operator=() [1/4]

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::PlainObjectBase< Derived >::operator= ( const EigenBase< OtherDerived > &  other)
inline

Copies the generic expression other into *this.

The expression must provide a (templated) evalTo(Derived& dst) const function which does the actual job. In practice, this allows any user to write its own special matrix without having to modify MatrixBase

Returns
a reference to *this.
577  {
578  _resize_to_match(other);
579  Base::operator=(other.derived());
580  return this->derived();
581  }

References Eigen::PlainObjectBase< Derived >::_resize_to_match(), and Eigen::EigenBase< Derived >::derived().

◆ operator=() [2/4]

template<typename Derived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived& Eigen::PlainObjectBase< Derived >::operator= ( const PlainObjectBase< Derived > &  other)
inlineconstexpr

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

455  {
456  return _set(other);
457  }
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived & _set(const DenseBase< OtherDerived > &other)
Copies the value of the expression other into *this with automatic resizing.
Definition: PlainObjectBase.h:743

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

Referenced by Eigen::Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ >::operator=(), and Eigen::Matrix< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ >::operator=().

◆ operator=() [3/4]

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& Eigen::PlainObjectBase< Derived >::operator= ( const ReturnByValue< OtherDerived > &  func)
inline
467  {
468  resize(func.rows(), func.cols());
469  return Base::operator=(func);
470  }
Definition: benchGeometry.cpp:21

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

◆ operator=() [4/4]

template<typename Derived >
constexpr EIGEN_DEVICE_FUNC PlainObjectBase& Eigen::PlainObjectBase< Derived >::operator= ( PlainObjectBase< Derived > &&  other)
inlineconstexprprotected

Move assignment operator.

479  {
480  m_storage = std::move(other.m_storage);
481  return *this;
482  }

References Eigen::PlainObjectBase< Derived >::m_storage.

◆ packet() [1/2]

template<typename Derived >
template<int LoadMode>
EIGEN_STRONG_INLINE PacketScalar Eigen::PlainObjectBase< Derived >::packet ( Index  index) const
inline
254  {
255  return internal::ploadt<PacketScalar, LoadMode>(m_storage.data() + index);
256  }

References Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::data(), and Eigen::PlainObjectBase< Derived >::m_storage.

◆ packet() [2/2]

◆ resize() [1/4]

template<typename Derived >
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::resize ( Index  rows,
Index  cols 
)
inlineconstexpr

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:

MatrixXd m(2, 3);
m << 1, 2, 3, 4, 5, 6;
cout << "here's the 2x3 matrix m:" << endl << m << endl;
cout << "let's resize m to 3x2. This is a conservative resizing because 2*3==3*2." << endl;
m.resize(3, 2);
cout << "here's the 3x2 matrix m:" << endl << m << endl;
cout << "now let's resize m to size 2x2. This is NOT a conservative resizing, so it becomes uninitialized:" << endl;
m.resize(2, 2);
cout << m << endl;
int * m
Definition: level2_cplx_impl.h:294

Output:

See also
resize(Index) for vectors, resize(NoChange_t, Index), resize(Index, NoChange_t)
294  {
295  eigen_assert(internal::check_implication(RowsAtCompileTime != Dynamic, rows == RowsAtCompileTime) &&
296  internal::check_implication(ColsAtCompileTime != Dynamic, cols == ColsAtCompileTime) &&
297  internal::check_implication(RowsAtCompileTime == Dynamic && MaxRowsAtCompileTime != Dynamic,
298  rows <= MaxRowsAtCompileTime) &&
299  internal::check_implication(ColsAtCompileTime == Dynamic && MaxColsAtCompileTime != Dynamic,
300  cols <= MaxColsAtCompileTime) &&
301  rows >= 0 && cols >= 0 && "Invalid sizes when resizing a matrix or array.");
302 #ifndef EIGEN_NO_DEBUG
304  cols);
305 #endif
306 #ifdef EIGEN_INITIALIZE_COEFFS
307  Index size = rows * cols;
308  bool size_changed = size != this->size();
309  m_storage.resize(size, rows, cols);
311 #else
313 #endif
314  }
#define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
Definition: PlainObjectBase.h:24
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index, Index, Index)
Definition: DenseStorage.h:118
constexpr bool check_implication(bool a, bool b)
Definition: Meta.h:740
void run(const string &dir_name, LinearSolver *linear_solver_pt, const unsigned nel_1d, bool mess_up_order)
Definition: two_d_poisson_compare_solvers.cc:317

References Eigen::internal::check_implication(), Eigen::PlainObjectBase< Derived >::cols(), Eigen::Dynamic, eigen_assert, EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED, Eigen::PlainObjectBase< Derived >::m_storage, Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::resize(), Eigen::PlainObjectBase< Derived >::rows(), run(), and size.

Referenced by Eigen::HessenbergDecomposition< MatrixType_ >::_compute(), Eigen::PlainObjectBase< Derived >::_init1(), Eigen::PlainObjectBase< Derived >::_init2(), Eigen::UmfPackLU< MatrixType_ >::_solve_impl(), Eigen::JacobiSVD< MatrixType_, Options_ >::allocate(), Eigen::SparseLU< MatrixType_, OrderingType_ >::analyzePattern(), check_sparse_inverse(), check_sparse_spd_solving(), Eigen::internal::chkder(), Eigen::LDLT< MatrixType_, UpLo_ >::compute(), Eigen::SelfAdjointEigenSolver< MatrixType_ >::compute(), Eigen::HessenbergDecomposition< MatrixType_ >::compute(), Eigen::Tridiagonalization< MatrixType_ >::compute(), Eigen::GeneralizedEigenSolver< MatrixType_ >::compute(), Eigen::PolynomialSolver< Scalar_, Deg_ >::compute(), Eigen::FullPivHouseholderQR< MatrixType_, PermutationIndex_ >::computeInPlace(), Eigen::BDCSVD< MatrixType_, Options_ >::computeSVDofM(), Eigen::internal::FullPivHouseholderQRMatrixQReturnType< MatrixType, PermutationIndex >::evalTo(), Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::factorize(), Eigen::DiagonalPreconditioner< Scalar_ >::factorize(), Eigen::LeastSquareDiagonalPreconditioner< Scalar_ >::factorize(), generate_sparse_leastsquare_problem(), generate_sparse_nonhermitian_problem(), generate_sparse_rectangular_problem(), generate_sparse_spd_problem(), generate_sparse_square_problem(), generate_sparse_square_symmetric_problem(), Eigen::MetisOrdering< StorageIndex >::get_symmetrized_graph(), Eigen::HessenbergDecomposition< MatrixType_ >::HessenbergDecomposition(), Eigen::SuperLUBase< MatrixType_, Derived >::initFactorization(), oomph::LowStorageRungeKutta< ORDER >::LowStorageRungeKutta(), main(), Eigen::AutoDiffJacobian< Functor >::operator()(), Eigen::PlainObjectBase< Derived >::operator=(), Eigen::PlainObjectBase< Derived >::PlainObjectBase(), Eigen::LDLT< MatrixType_, UpLo_ >::rankUpdate(), Eigen::MatrixMarketIterator< Scalar >::refX(), replicate(), Eigen::PlainObjectBase< Derived >::resizeLike(), Eigen::MatrixMarketIterator< Scalar >::rhs(), Eigen::internal::simpl_chol_helper< Scalar, StorageIndex >::run(), Eigen::internal::householder_qr_inplace_blocked< MatrixQR, HCoeffs, MatrixQRScalar, InnerStrideIsOne >::run(), Eigen::PolynomialSolverBase< Scalar_, Deg_ >::setPolynomial(), sparse_solvers(), trsolve(), and Eigen::internal::upperbidiagonalization_inplace_unblocked().

◆ resize() [2/4]

template<typename Derived >
constexpr EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Derived >::resize ( Index  rows,
NoChange_t   
)
inlineconstexpr

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:

MatrixXd m(3, 4);
m.resize(5, NoChange);
cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl;
@ NoChange
Definition: Constants.h:359

Output:

See also
resize(Index,Index)
362 { resize(rows, cols()); }

References Eigen::PlainObjectBase< Derived >::cols(), Eigen::PlainObjectBase< Derived >::resize(), and Eigen::PlainObjectBase< Derived >::rows().

Referenced by Eigen::PlainObjectBase< Derived >::resize().

◆ resize() [3/4]

template<typename Derived >
constexpr EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Derived >::resize ( Index  size)
inlineconstexpr

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:

VectorXd v(10);
v.resize(3);
RowVector3d w;
w.resize(3); // this is legal, but has no effect
cout << "v: " << v.rows() << " rows, " << v.cols() << " cols" << endl;
cout << "w: " << w.rows() << " rows, " << w.cols() << " cols" << endl;
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
RowVector3d w
Definition: Matrix_resize_int.cpp:3

Output:

See also
resize(Index,Index), resize(NoChange_t, Index), resize(Index, NoChange_t)
327  {
329  eigen_assert(((SizeAtCompileTime == Dynamic && (MaxSizeAtCompileTime == Dynamic || size <= MaxSizeAtCompileTime)) ||
330  SizeAtCompileTime == size) &&
331  size >= 0);
332 #ifdef EIGEN_INITIALIZE_COEFFS
333  bool size_changed = size != this->size();
334 #endif
335  if (RowsAtCompileTime == 1)
336  m_storage.resize(size, 1, size);
337  else
338  m_storage.resize(size, size, 1);
339 #ifdef EIGEN_INITIALIZE_COEFFS
341 #endif
342  }
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition: StaticAssert.h:36

References Eigen::Dynamic, eigen_assert, EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED, EIGEN_STATIC_ASSERT_VECTOR_ONLY, Eigen::PlainObjectBase< Derived >::m_storage, Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::resize(), and size.

◆ resize() [4/4]

template<typename Derived >
constexpr EIGEN_DEVICE_FUNC void Eigen::PlainObjectBase< Derived >::resize ( NoChange_t  ,
Index  cols 
)
inlineconstexpr

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:

MatrixXd m(3, 4);
m.resize(NoChange, 5);
cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl;

Output:

See also
resize(Index,Index)
352 { resize(rows(), cols); }

References Eigen::PlainObjectBase< Derived >::cols(), Eigen::PlainObjectBase< Derived >::resize(), and Eigen::PlainObjectBase< Derived >::rows().

Referenced by Eigen::PlainObjectBase< Derived >::resize().

◆ resizeLike()

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::resizeLike ( const EigenBase< OtherDerived > &  _other)
inline

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.

372  {
373  const OtherDerived& other = _other.derived();
374 #ifndef EIGEN_NO_DEBUG
376  other.rows(), other.cols());
377 #endif
378  const Index othersize = other.rows() * other.cols();
379  if (RowsAtCompileTime == 1) {
380  eigen_assert(other.rows() == 1 || other.cols() == 1);
381  resize(1, othersize);
382  } else if (ColsAtCompileTime == 1) {
383  eigen_assert(other.rows() == 1 || other.cols() == 1);
384  resize(othersize, 1);
385  } else
386  resize(other.rows(), other.cols());
387  }

References Eigen::EigenBase< Derived >::derived(), eigen_assert, Eigen::PlainObjectBase< Derived >::resize(), and run().

Referenced by Eigen::PlainObjectBase< Derived >::_resize_to_match(), Eigen::copy_using_evaluator(), and Eigen::PlainObjectBase< Derived >::PlainObjectBase().

◆ rows()

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index Eigen::PlainObjectBase< Derived >::rows ( ) const
inline
191 { return m_storage.rows(); }

References Eigen::PlainObjectBase< Derived >::m_storage, and Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::rows().

Referenced by gdb.printers._MatrixEntryIterator::__next__(), Eigen::HessenbergDecomposition< MatrixType_ >::_compute(), Eigen::PlainObjectBase< Derived >::_init2(), Eigen::PlainObjectBase< Derived >::_resize_to_match(), bench(), binary_op_test(), check_generateRandomMatrixSvs(), check_indexed_view(), check_sparse_inverse(), check_sparse_leastsquare_solving(), check_sparse_solving(), check_sparse_spd_solving(), check_sparse_square_solving(), check_tutorial_examples(), gdb.printers.EigenMatrixPrinter::children(), gdb.printers.EigenSparseMatrixPrinter::children(), Eigen::internal::MatrixFunctionAtomic< MatrixType >::compute(), Eigen::internal::MatrixLogarithmAtomic< MatrixType >::compute(), Eigen::GeneralizedEigenSolver< MatrixType_ >::compute(), Eigen::ArpackGeneralizedSelfAdjointEigenSolver< MatrixType, MatrixSolver, BisSPD >::compute(), Eigen::GeneralizedSelfAdjointEigenSolver< MatrixType_ >::compute(), compute_norm_equation(), Eigen::PlainObjectBase< Derived >::conservativeResize(), Eigen::copy_using_evaluator(), DenseLM< Scalar >::df(), equalsIdentity(), Eigen::MetisOrdering< StorageIndex >::get_symmetrized_graph(), initSparse(), initSPD(), main(), Eigen::PlainObjectBase< Derived >::Map(), Eigen::PlainObjectBase< Derived >::MapAligned(), Eigen::internal::matrix_exp_pade13(), Eigen::internal::matrix_exp_pade3(), Eigen::internal::matrix_exp_pade5(), Eigen::internal::matrix_exp_pade7(), Eigen::internal::matrix_exp_pade9(), Eigen::internal::matrix_function_compute_mu(), Eigen::internal::matrix_function_solve_triangular_sylvester(), Eigen::MatrixPower< MatrixType >::MatrixPower(), Eigen::AutoDiffJacobian< Functor >::operator()(), Eigen::internal::companion< Scalar_, Deg_ >::operator()(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_inner(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_outer(), Eigen::ComplexSchur< MatrixType_ >::reduceToTriangularForm(), Eigen::PlainObjectBase< Derived >::resize(), Eigen::internal::conservative_resize_like_impl< Derived, OtherDerived, IsVector >::run(), sparse_basic(), sparse_vector(), Eigen::BDCSVD< MatrixType_, Options_ >::structured_update(), Eigen::DenseBase< Derived >::swap(), test_accelerate_ldlt(), test_accelerate_llt(), test_accelerate_qr(), test_nnls_random_problem(), test_non_spd(), test_sparseqr_scalar(), test_spqr_scalar(), test_stl_iterators(), testMapRef(), gdb.printers.EigenMatrixPrinter::to_string(), gdb.printers.EigenSparseMatrixPrinter::to_string(), Eigen::internal::tridiagonalization_inplace(), trsolve(), Eigen::internal::upperbidiagonalization_blocked_helper(), and Eigen::internal::upperbidiagonalization_inplace_blocked().

◆ setConstant() [1/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setConstant ( Index  rows,
Index  cols,
const Scalar val 
)

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:

MatrixXf m;
m.setConstant(3, 3, 5);
cout << m << endl;

Output:

See also
MatrixBase::setConstant(const Scalar&), setConstant(Index,const Scalar&), class CwiseNullaryOp, MatrixBase::Constant(const Scalar&)
384  {
385  resize(rows, cols);
386  return setConstant(val);
387 }
EIGEN_DEVICE_FUNC Derived & setConstant(Index size, const Scalar &val)
Definition: CwiseNullaryOp.h:365
val
Definition: calibrate.py:119

References cols, resize(), rows, setConstant(), and calibrate::val.

◆ setConstant() [2/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setConstant ( Index  rows,
NoChange_t  ,
const Scalar val 
)

Resizes to the given size, changing only the number of rows, and sets all coefficients in this expression to the given value val. For the parameter of type NoChange_t, just pass the special value NoChange.

See also
MatrixBase::setConstant(const Scalar&), setConstant(Index,const Scalar&), class CwiseNullaryOp, MatrixBase::Constant(const Scalar&)
411  {
412  return setConstant(rows, cols(), val);
413 }

References cols, rows, setConstant(), and calibrate::val.

◆ setConstant() [3/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setConstant ( Index  size,
const Scalar val 
)

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

\only_for_vectors

Example:

VectorXf v;
v.setConstant(3, 5);
cout << v << endl;

Output:

See also
MatrixBase::setConstant(const Scalar&), setConstant(Index,Index,const Scalar&), class CwiseNullaryOp, MatrixBase::Constant(const Scalar&)
365  {
366  resize(size);
367  return setConstant(val);
368 }

References resize(), setConstant(), size, and calibrate::val.

Referenced by Eigen::GeneralizedEigenSolver< MatrixType_ >::compute(), Eigen::RealSchur< MatrixType_ >::computeShift(), Eigen::SparseQR< MatrixType_, OrderingType_ >::factorize(), Eigen::SparseLU< MatrixType_, OrderingType_ >::factorize(), Eigen::MetisOrdering< StorageIndex >::get_symmetrized_graph(), Eigen::internal::SparseLUImpl< Scalar, StorageIndex >::heap_relax_snode(), main(), Eigen::Array< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ >::operator=(), Eigen::internal::SparseLUImpl< Scalar, StorageIndex >::relax_snode(), and Eigen::AlignedBox< Scalar_, AmbientDim_ >::setEmpty().

◆ setConstant() [4/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setConstant ( NoChange_t  ,
Index  cols,
const Scalar val 
)

Resizes to the given size, changing only the number of columns, and sets all coefficients in this expression to the given value val. For the parameter of type NoChange_t, just pass the special value NoChange.

See also
MatrixBase::setConstant(const Scalar&), setConstant(Index,const Scalar&), class CwiseNullaryOp, MatrixBase::Constant(const Scalar&)
398  {
399  return setConstant(rows(), cols, val);
400 }

References cols, rows, setConstant(), and calibrate::val.

◆ setOnes() [1/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setOnes ( Index  rows,
Index  cols 
)

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:

MatrixXf m;
m.setOnes(3, 3);
cout << m << endl;

Output:

See also
MatrixBase::setOnes(), setOnes(Index), class CwiseNullaryOp, MatrixBase::Ones()
724  {
725  resize(rows, cols);
726  return setConstant(Scalar(1));
727 }
internal::traits< Derived >::Scalar Scalar
Definition: PlainObjectBase.h:127

References cols, resize(), rows, and setConstant().

◆ setOnes() [2/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setOnes ( Index  rows,
NoChange_t   
)

Resizes to the given size, changing only the number of rows, and sets all coefficients in this expression to one. For the parameter of type NoChange_t, just pass the special value NoChange.

See also
MatrixBase::setOnes(), setOnes(Index), setOnes(Index, Index), setOnes(NoChange_t, Index), class CwiseNullaryOp, MatrixBase::Ones()
737  {
738  return setOnes(rows, cols());
739 }
EIGEN_DEVICE_FUNC Derived & setOnes(Index size)
Definition: CwiseNullaryOp.h:708

References cols, rows, and setOnes().

◆ setOnes() [3/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setOnes ( Index  newSize)

◆ setOnes() [4/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setOnes ( NoChange_t  ,
Index  cols 
)

Resizes to the given size, changing only the number of columns, and sets all coefficients in this expression to one. For the parameter of type NoChange_t, just pass the special value NoChange.

See also
MatrixBase::setOnes(), setOnes(Index), setOnes(Index, Index), setOnes(Index, NoChange_t) class CwiseNullaryOp, MatrixBase::Ones()
749  {
750  return setOnes(rows(), cols);
751 }

References cols, rows, and setOnes().

◆ setRandom() [1/4]

template<typename Derived >
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setRandom ( Index  rows,
Index  cols 
)

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:

MatrixXf m;
m.setRandom(3, 3);
cout << m << endl;

Output:

See also
DenseBase::setRandom(), setRandom(Index), class CwiseNullaryOp, DenseBase::Random()
168  {
169  resize(rows, cols);
170  return setRandom();
171 }
Derived & setRandom(Index size)
Definition: Random.h:147

References cols, resize(), rows, and setRandom().

◆ setRandom() [2/4]

template<typename Derived >
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setRandom ( Index  rows,
NoChange_t   
)

Resizes to the given size, changing only the number of rows, and sets all coefficients in this expression to random values. For the parameter of type NoChange_t, just pass the special value NoChange.

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

See also
DenseBase::setRandom(), setRandom(Index), setRandom(NoChange_t, Index), class CwiseNullaryOp, DenseBase::Random()
201  {
202  return setRandom(rows, cols());
203 }

References cols, rows, and setRandom().

◆ setRandom() [3/4]

template<typename Derived >
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setRandom ( Index  newSize)

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:

VectorXf v;
v.setRandom(3);
cout << v << endl;

Output:

See also
DenseBase::setRandom(), setRandom(Index,Index), class CwiseNullaryOp, DenseBase::Random()
147  {
148  resize(newSize);
149  return setRandom();
150 }

References resize(), and setRandom().

Referenced by bench(), bug_1311(), check_sparse_square_determinant(), EIGEN_DECLARE_TEST(), homogeneous(), inplace(), inverse_for_fixed_size(), main(), map_class_matrix(), openglsupport_test_loop(), packetmath_notcomplex(), product(), product1x1(), product_large_regressions(), product_small_regressions(), reshape4x4(), Eigen::MatrixMarketIterator< Scalar >::rhs(), sparse_basic(), test_aliasing(), test_blocks(), test_dynamic_bool(), test_lazy_single(), test_linear_but_not_vectorizable(), test_scalar_sugar_add_mul(), test_scalar_sugar_sub_div(), test_stl_iterators(), test_unaryview_solve(), triangular_square(), trsolve(), and unaligned_objects().

◆ setRandom() [4/4]

template<typename Derived >
EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setRandom ( NoChange_t  ,
Index  cols 
)

Resizes to the given size, changing only the number of columns, and sets all coefficients in this expression to random values. For the parameter of type NoChange_t, just pass the special value NoChange.

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

See also
DenseBase::setRandom(), setRandom(Index), setRandom(Index, NoChange_t), class CwiseNullaryOp, DenseBase::Random()
185  {
186  return setRandom(rows(), cols);
187 }

References cols, rows, and setRandom().

◆ setZero() [1/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setZero ( Index  rows,
Index  cols 
)

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:

MatrixXf m;
m.setZero(3, 3);
cout << m << endl;

Output:

See also
DenseBase::setZero(), setZero(Index), class CwiseNullaryOp, DenseBase::Zero()
585  {
586  resize(rows, cols);
587  return setZero();
588 }
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
Definition: CwiseNullaryOp.h:569

References cols, resize(), rows, and setZero().

◆ setZero() [2/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setZero ( Index  rows,
NoChange_t   
)

Resizes to the given size, changing only the number of rows, and sets all coefficients in this expression to zero. For the parameter of type NoChange_t, just pass the special value NoChange.

See also
DenseBase::setZero(), setZero(Index), setZero(Index, Index), setZero(NoChange_t, Index), class CwiseNullaryOp, DenseBase::Zero()
610  {
611  return setZero(rows, cols());
612 }

References cols, rows, and setZero().

◆ setZero() [3/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setZero ( Index  newSize)

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

\only_for_vectors

Example:

VectorXf v;
v.setZero(3);
cout << v << endl;

Output:

See also
DenseBase::setZero(), setZero(Index,Index), class CwiseNullaryOp, DenseBase::Zero()
569  {
570  resize(newSize);
571  return setZero();
572 }

References resize(), and setZero().

Referenced by Eigen::internal::chkder(), cholesky(), Eigen::GeneralizedEigenSolver< MatrixType_ >::compute(), RandomImpl< Eigen::SparseMatrix< Scalar, Options, DenseIndex > >::Create(), RandomImpl< Eigen::SparseVector< Scalar, Options, DenseIndex > >::Create(), Eigen::DGMRES< MatrixType_, Preconditioner_ >::dgmresComputeDeflationData(), Eigen::DGMRES< MatrixType_, Preconditioner_ >::dgmresCycle(), eiToDense(), NurbsSurface::evaluateDerivatives(), Eigen::SparseQR< MatrixType_, OrderingType_ >::factorize(), Eigen::SparseLU< MatrixType_, OrderingType_ >::factorize(), Eigen::LeastSquareDiagonalPreconditioner< Scalar_ >::factorize(), Eigen::internal::fdjac1(), Eigen::internal::SparseLUImpl< Scalar, StorageIndex >::heap_relax_snode(), Eigen::internal::lmpar2(), Eigen::internal::lmqrsolv(), main(), Eigen::internal::matrix_function_compute_cluster_size(), Eigen::internal::tribb_kernel< LhsScalar, RhsScalar, Index, mr, nr, ConjLhs, ConjRhs, ResInnerStride, UpLo >::operator()(), Eigen::Transform< Scalar_, Dim_, Mode_, Options_ >::operator=(), Eigen::PardisoImpl< Derived >::PardisoImpl(), product_sweep(), Eigen::internal::qrsolv(), real_qz(), Eigen::internal::SparseLUImpl< Scalar, StorageIndex >::relax_snode(), Eigen::internal::product_triangular_matrix_matrix< Scalar, Index, Mode, true, LhsStorageOrder, ConjugateLhs, RhsStorageOrder, ConjugateRhs, ColMajor, ResInnerStride, Version >::run(), Eigen::internal::product_triangular_matrix_matrix< Scalar, Index, Mode, false, LhsStorageOrder, ConjugateLhs, RhsStorageOrder, ConjugateRhs, ColMajor, ResInnerStride, Version >::run(), Eigen::internal::MappedSuperNodalMatrix< Scalar_, StorageIndex_ >::solveInPlace(), Eigen::internal::MappedSuperNodalMatrix< Scalar_, StorageIndex_ >::solveTransposedInPlace(), sparse_basic(), sparse_block(), sparse_vector(), svd_min_norm(), test_complex_sqrt(), test_stl_iterators(), and testPascal().

◆ setZero() [4/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::PlainObjectBase< Derived >::setZero ( NoChange_t  ,
Index  cols 
)

Resizes to the given size, changing only the number of columns, and sets all coefficients in this expression to zero. For the parameter of type NoChange_t, just pass the special value NoChange.

See also
DenseBase::setZero(), setZero(Index), setZero(Index, Index), setZero(Index, NoChange_t), class CwiseNullaryOp, DenseBase::Zero()
598  {
599  return setZero(rows(), cols);
600 }

References cols, rows, and setZero().

◆ swap() [1/2]

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::swap ( DenseBase< OtherDerived > &  other)
inline

Override DenseBase::swap() since for dynamic-sized matrices of same type it is enough to swap the data pointers.

898  {
899  enum {SwapPointers = internal::is_same<Derived, OtherDerived>::value && Base::SizeAtCompileTime == Dynamic};
900  internal::matrix_swap_impl<Derived, OtherDerived, bool(SwapPointers)>::run(this->derived(), other.derived());
901  }
friend struct internal::matrix_swap_impl
Definition: PlainObjectBase.h:889
auto run(Kernel kernel, Args &&... args) -> decltype(kernel(args...))
Definition: gpu_test_helper.h:414
@ value
Definition: Meta.h:206

References Eigen::Dynamic, and Eigen::run().

Referenced by Eigen::JacobiSVD< MatrixType_, Options_ >::compute_impl(), Eigen::KdBVH< Scalar_, Dim_, _Object >::init(), permutationmatrices(), and Eigen::ComplexEigenSolver< MatrixType_ >::sortEigenvalues().

◆ swap() [2/2]

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::swap ( DenseBase< OtherDerived > const &  other)
inline

const version forwarded to DenseBase::swap

907  {
908  Base::swap(other.derived());
909  }
EIGEN_BLAS_FUNC() swap(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)
Definition: level1_impl.h:117

References swap().

◆ writePacket() [1/2]

template<typename Derived >
template<int StoreMode>
EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::writePacket ( Index  index,
const PacketScalar val 
)
inline
268  {
269  internal::pstoret<Scalar, PacketScalar, StoreMode>(m_storage.data() + index, val);
270  }

References Eigen::internal::DenseStorage_impl< T, Size, Rows, Cols, Options >::data(), Eigen::PlainObjectBase< Derived >::m_storage, and calibrate::val.

◆ writePacket() [2/2]

template<typename Derived >
template<int StoreMode>
EIGEN_STRONG_INLINE void Eigen::PlainObjectBase< Derived >::writePacket ( Index  rowId,
Index  colId,
const PacketScalar val 
)
inline

Friends And Related Function Documentation

◆ Eigen::Map

template<typename Derived >
template<typename PlainObjectType , int MapOptions, typename StrideType >
friend class Eigen::Map
friend

◆ Eigen::Map< const Derived, Unaligned >

template<typename Derived >
friend class Eigen::Map< const Derived, Unaligned >
friend

◆ Eigen::Map< Derived, Unaligned >

template<typename Derived >
friend class Eigen::Map< Derived, Unaligned >
friend

◆ internal::matrix_swap_impl

template<typename Derived >
template<typename MatrixTypeA , typename MatrixTypeB , bool SwapPointers>
friend struct internal::matrix_swap_impl
friend

Member Data Documentation

◆ m_storage


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