11#ifndef EIGEN_DENSESTORAGEBASE_H
12#define EIGEN_DENSESTORAGEBASE_H
14#if defined(EIGEN_INITIALIZE_MATRICES_BY_ZERO)
15# define EIGEN_INITIALIZE_COEFFS
16# define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED for(Index i=0;i<base().size();++i) coeffRef(i)=Scalar(0);
17#elif defined(EIGEN_INITIALIZE_MATRICES_BY_NAN)
18# define EIGEN_INITIALIZE_COEFFS
19# define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED for(Index i=0;i<base().size();++i) coeffRef(i)=std::numeric_limits<Scalar>::quiet_NaN();
21# undef EIGEN_INITIALIZE_COEFFS
22# define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
30 template<
typename Index>
38 template<
typename Index>
44 Index max_index = (std::size_t(1) << (8 *
sizeof(
Index) - 1)) - 1;
45 bool error = (rows == 0 || cols == 0) ?
false
46 : (rows > max_index / cols);
52template <
typename Derived,
53 typename OtherDerived = Derived,
54 bool IsVector = bool(Derived::IsVectorAtCompileTime) && bool(OtherDerived::IsVectorAtCompileTime)>
55struct conservative_resize_like_impl;
57template<
typename MatrixTypeA,
typename MatrixTypeB,
bool SwapPo
inters>
struct matrix_swap_impl;
61#ifdef EIGEN_PARSED_BY_DOXYGEN
71template<
typename Derived>
struct dense_xpr_base_dispatcher;
73template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
74struct dense_xpr_base_dispatcher<
Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
77template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
78struct dense_xpr_base_dispatcher<
Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
94template<
typename Derived>
95class PlainObjectBase :
public doxygen::dense_xpr_base_dispatcher<Derived>
97template<typename Derived>
112 using Base::RowsAtCompileTime;
113 using Base::ColsAtCompileTime;
114 using Base::SizeAtCompileTime;
115 using Base::MaxRowsAtCompileTime;
116 using Base::MaxColsAtCompileTime;
117 using Base::MaxSizeAtCompileTime;
118 using Base::IsVectorAtCompileTime;
213 template<
int LoadMode>
216 return internal::ploadt<PacketScalar, LoadMode>
223 template<
int LoadMode>
230 template<
int StoreMode>
233 internal::pstoret<Scalar, PacketScalar, StoreMode>
240 template<
int StoreMode>
277 &&
rows>=0 &&
cols>=0 &&
"Invalid sizes when resizing a matrix or array.");
279 #ifdef EIGEN_INITIALIZE_COEFFS
281 bool size_changed =
size != this->
size();
305 #ifdef EIGEN_INITIALIZE_COEFFS
306 bool size_changed =
size != this->
size();
308 if(RowsAtCompileTime == 1)
312 #ifdef EIGEN_INITIALIZE_COEFFS
352 template<
typename OtherDerived>
356 const OtherDerived& other = _other.
derived();
358 const Index othersize = other.rows()*other.cols();
359 if(RowsAtCompileTime == 1)
364 else if(ColsAtCompileTime == 1)
369 else resize(other.rows(), other.cols());
438 template<
typename OtherDerived>
455 template<
typename OtherDerived>
460 return Base::lazyAssign(other.derived());
463 template<
typename OtherDerived>
468 return Base::operator=(func);
482#ifndef EIGEN_PARSED_BY_DOXYGEN
493#if EIGEN_HAS_RVALUE_REFERENCES
496 :
m_storage( std::move(other.m_storage) )
532 template <
typename... ArgTypes>
545 static_cast<void>(x);
557 size_t list_size = 0;
558 if (list.begin() != list.end()) {
559 list_size = list.begin()->size();
563 if (ColsAtCompileTime == 1 && list.size() == 1) {
564 eigen_assert(list_size ==
static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime ==
Dynamic);
565 resize(list_size, ColsAtCompileTime);
568 eigen_assert(list.size() ==
static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime ==
Dynamic);
569 eigen_assert(list_size ==
static_cast<size_t>(ColsAtCompileTime) || ColsAtCompileTime ==
Dynamic);
570 resize(list.size(), list_size);
573 for (
const std::initializer_list<Scalar>&
row : list) {
587 template<
typename OtherDerived>
598 template<
typename OtherDerived>
608 template<
typename OtherDerived>
615 other.
evalTo(this->derived());
623 template<
typename OtherDerived>
628 Base::operator=(other.
derived());
629 return this->derived();
670 template<
int Outer,
int Inner>
673 template<
int Outer,
int Inner>
676 template<
int Outer,
int Inner>
679 template<
int Outer,
int Inner>
682 template<
int Outer,
int Inner>
685 template<
int Outer,
int Inner>
689 template<
int Outer,
int Inner>
692 template<
int Outer,
int Inner>
695 template<
int Outer,
int Inner>
698 template<
int Outer,
int Inner>
701 template<
int Outer,
int Inner>
704 template<
int Outer,
int Inner>
709 using Base::setConstant;
727 using Base::setRandom;
733 #ifdef EIGEN_PLAINOBJECTBASE_PLUGIN
734 #include EIGEN_PLAINOBJECTBASE_PLUGIN
745 template<
typename OtherDerived>
749 #ifdef EIGEN_NO_AUTOMATIC_RESIZING
752 &&
"Size mismatch. Automatic resizing is disabled because EIGEN_NO_AUTOMATIC_RESIZING is defined");
775 template<
typename OtherDerived>
780 return this->derived();
788 template<
typename OtherDerived>
798 return this->derived();
801 template<
typename T0,
typename T1>
809 FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED)
813 template<
typename T0,
typename T1>
822 template<
typename T0,
typename T1>
828 && Base::SizeAtCompileTime==2,T1>
::type* = 0)
846 FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED)
865 && Base::SizeAtCompileTime==1
880 template<
typename T,
typename OtherDerived>
894 template<
typename T,
typename OtherDerived>
897 this->derived() = other;
900 template<
typename T,
typename OtherDerived>
905 other.
evalTo(this->derived());
908 template<
typename T,
typename OtherDerived,
int ColsAtCompileTime>
920 && Base::SizeAtCompileTime!=1
924 Base::setConstant(val0);
933 && Base::SizeAtCompileTime!=
Dynamic
934 && Base::SizeAtCompileTime!=1
938 Base::setConstant(val0);
941 template<
typename MatrixTypeA,
typename MatrixTypeB,
bool SwapPo
inters>
946#ifndef EIGEN_PARSED_BY_DOXYGEN
951 template<
typename OtherDerived>
962 template<
typename OtherDerived>
972 && ((RowsAtCompileTime ==
Dynamic) || (RowsAtCompileTime >= 0))
973 && ((ColsAtCompileTime ==
Dynamic) || (ColsAtCompileTime >= 0))
974 && ((MaxRowsAtCompileTime ==
Dynamic) || (MaxRowsAtCompileTime >= 0))
975 && ((MaxColsAtCompileTime ==
Dynamic) || (MaxColsAtCompileTime >= 0))
976 && (MaxRowsAtCompileTime == RowsAtCompileTime || RowsAtCompileTime==
Dynamic)
977 && (MaxColsAtCompileTime == ColsAtCompileTime || ColsAtCompileTime==
Dynamic)
979 INVALID_MATRIX_TEMPLATE_PARAMETERS)
987 template<
typename PlainObjectType,
int MapOptions,
typename Str
ideType>
friend class Eigen::Map;
990#if EIGEN_MAX_ALIGN_BYTES>0
999template <
typename Derived,
typename OtherDerived,
bool IsVector>
1002 #if EIGEN_HAS_TYPE_TRAITS
1003 static const bool IsRelocatable = std::is_trivially_copyable<typename Derived::Scalar>::value;
1009 if (_this.rows() == rows && _this.cols() == cols)
return;
1013 && (( Derived::IsRowMajor && _this.cols() == cols) ||
1014 (!Derived::IsRowMajor && _this.rows() == rows) ))
1017 _this.derived().m_storage.conservativeResize(rows*cols,rows,cols);
1022 Derived tmp(rows,cols);
1025 tmp.block(0,0,common_rows,common_cols) = _this.block(0,0,common_rows,common_cols);
1026 _this.derived().
swap(tmp);
1032 if (_this.rows() == other.rows() && _this.cols() == other.cols())
return;
1043 (( Derived::IsRowMajor && _this.cols() == other.cols()) ||
1044 (!Derived::IsRowMajor && _this.rows() == other.rows()) ))
1046 const Index new_rows = other.rows() - _this.rows();
1047 const Index new_cols = other.cols() - _this.cols();
1048 _this.derived().m_storage.conservativeResize(other.size(),other.rows(),other.cols());
1050 _this.bottomRightCorner(new_rows, other.cols()) = other.bottomRows(new_rows);
1051 else if (new_cols>0)
1052 _this.bottomRightCorner(other.rows(), new_cols) = other.rightCols(new_cols);
1060 tmp.block(0,0,common_rows,common_cols) = _this.block(0,0,common_rows,common_cols);
1061 _this.derived().
swap(tmp);
1068template <
typename Derived,
typename OtherDerived>
1074 using Base::IsRelocatable;
1078 const Index new_rows = Derived::RowsAtCompileTime==1 ? 1 :
size;
1079 const Index new_cols = Derived::RowsAtCompileTime==1 ?
size : 1;
1081 _this.derived().m_storage.conservativeResize(
size,new_rows,new_cols);
1083 Base::run(_this.derived(), new_rows, new_cols);
1088 if (_this.rows() == other.rows() && _this.cols() == other.cols())
return;
1090 const Index num_new_elements = other.size() - _this.size();
1092 const Index new_rows = Derived::RowsAtCompileTime==1 ? 1 : other.rows();
1093 const Index new_cols = Derived::RowsAtCompileTime==1 ? other.cols() : 1;
1095 _this.derived().m_storage.conservativeResize(other.size(),new_rows,new_cols);
1097 Base::run(_this.derived(), new_rows, new_cols);
1099 if (num_new_elements > 0)
1100 _this.tail(num_new_elements) = other.tail(num_new_elements);
1104template<
typename MatrixTypeA,
typename MatrixTypeB,
bool SwapPo
inters>
1114template<
typename MatrixTypeA,
typename MatrixTypeB>
1118 static inline void run(MatrixTypeA& a, MatrixTypeB&
b)
1120 static_cast<typename MatrixTypeA::Base&
>(a).m_storage.
swap(
static_cast<typename MatrixTypeB::Base&
>(
b).m_storage);
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE RowXpr row(Index i)
This is the const version of row(). */.
Definition: BlockMethods.h:1118
#define EIGEN_ALWAYS_INLINE
Definition: Macros.h:942
#define EIGEN_NOEXCEPT
Definition: Macros.h:1428
#define EIGEN_CONSTEXPR
Definition: Macros.h:797
#define EIGEN_UNUSED_VARIABLE(var)
Definition: Macros.h:1086
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
Definition: Macros.h:1059
#define eigen_assert(x)
Definition: Macros.h:1047
#define EIGEN_IMPLIES(a, b)
Definition: Macros.h:1325
#define EIGEN_STRONG_INLINE
Definition: Macros.h:927
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
Definition: Memory.h:838
#define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
Definition: PlainObjectBase.h:22
#define EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(TYPE)
Definition: StaticAssert.h:152
#define EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE)
Definition: StaticAssert.h:157
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition: StaticAssert.h:142
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:127
Base class for all 1D and 2D array, and related expressions.
Definition: ArrayBase.h:41
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:47
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:47
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(const DenseBase< OtherDerived > &other)
swaps *this with the expression other.
Definition: DenseBase.h:420
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT
Definition: DenseStorage.h:262
EIGEN_DEVICE_FUNC void resize(Index, Index, Index)
Definition: DenseStorage.h:265
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols(void) EIGEN_NOEXCEPT
Definition: DenseStorage.h:263
EIGEN_DEVICE_FUNC void swap(DenseStorage &other)
Definition: DenseStorage.h:259
EIGEN_DEVICE_FUNC const T * data() const
Definition: DenseStorage.h:266
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:96
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:50
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:180
Definition: PlainObjectBase.h:100
@ Options
Definition: PlainObjectBase.h:102
Eigen::Map< Derived, Unaligned > MapType
Definition: PlainObjectBase.h:121
EIGEN_DEVICE_FUNC PlainObjectBase(internal::constructor_without_unaligned_array_assert)
Definition: PlainObjectBase.h:486
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index) const provi...
Definition: PlainObjectBase.h:188
Eigen::Map< Derived, AlignedMax > AlignedMapType
Definition: PlainObjectBase.h:123
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar * data()
Definition: PlainObjectBase.h:251
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _check_template_params()
Definition: PlainObjectBase.h:968
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const EigenBase< OtherDerived > &other)
Definition: PlainObjectBase.h:896
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeffRef(Index index) const
This is the const version of coeffRef(Index) which is thus synonym of coeff(Index).
Definition: PlainObjectBase.h:207
DenseStorage< Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options > m_storage
Definition: PlainObjectBase.h:131
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(Index size, Index rows, Index cols)
Definition: PlainObjectBase.h:514
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)
Definition: PlainObjectBase.h:824
EIGEN_DEVICE_FUNC Derived & setOnes(Index size)
Resizes to the given newSize, and sets all coefficients in this expression to one.
Definition: CwiseNullaryOp.h:714
static StridedMapType< Stride< Outer, Inner > >::type Map(Scalar *data, Index size, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:680
internal::packet_traits< Scalar >::type PacketScalar
Definition: PlainObjectBase.h:108
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(const EigenBase< OtherDerived > &other)
Definition: PlainObjectBase.h:600
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar * data() const
Definition: PlainObjectBase.h:247
static StridedMapType< Stride< Outer, Inner > >::type Map(Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:686
EIGEN_DEVICE_FUNC Base & base()
Definition: PlainObjectBase.h:138
static StridedAlignedMapType< Stride< Outer, Inner > >::type MapAligned(Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:705
static StridedConstAlignedMapType< Stride< Outer, Inner > >::type MapAligned(const Scalar *data, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:690
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResize(NoChange_t, Index cols)
Resizes the matrix to rows x cols while leaving old values untouched.
Definition: PlainObjectBase.h:409
NumTraits< Scalar >::Real RealScalar
Definition: PlainObjectBase.h:109
const Eigen::Map< const Derived, AlignedMax > ConstAlignedMapType
Definition: PlainObjectBase.h:124
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & lazyAssign(const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:457
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResize(Index rows, NoChange_t)
Resizes the matrix to rows x cols while leaving old values untouched.
Definition: PlainObjectBase.h:395
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResize(Index size)
Resizes the vector to size while retaining old values.
Definition: PlainObjectBase.h:424
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResize(Index rows, Index cols)
Resizes the matrix to rows x cols while leaving old values untouched.
Definition: PlainObjectBase.h:382
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:882
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator=(const ReturnByValue< OtherDerived > &func)
Definition: PlainObjectBase.h:465
static AlignedMapType MapAligned(Scalar *data, Index size)
Definition: PlainObjectBase.h:663
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(const PlainObjectBase &other)
Copy constructor.
Definition: PlainObjectBase.h:511
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< Derived >::XprKind, ArrayXpr >::value, T * >::type *=0)
Definition: PlainObjectBase.h:930
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator=(const EigenBase< OtherDerived > &other)
Copies the generic expression other into *this.
Definition: PlainObjectBase.h:625
static ConstAlignedMapType MapAligned(const Scalar *data, Index size)
Definition: PlainObjectBase.h:661
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: PlainObjectBase.h:145
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResizeLike(const DenseBase< OtherDerived > &other)
Resizes the matrix to rows x cols of other, while leaving old values untouched.
Definition: PlainObjectBase.h:440
static StridedMapType< Stride< Outer, Inner > >::type Map(Scalar *data, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:674
EIGEN_DEVICE_FUNC void resize(Index rows, NoChange_t)
Resizes the matrix, changing only the number of rows.
Definition: PlainObjectBase.h:340
internal::traits< Derived >::Scalar Scalar
Definition: PlainObjectBase.h:106
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:589
EIGEN_STRONG_INLINE PacketScalar packet(Index rowId, Index colId) const
Definition: PlainObjectBase.h:214
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(DenseBase< OtherDerived > const &other)
Definition: PlainObjectBase.h:964
static StridedAlignedMapType< Stride< Outer, Inner > >::type MapAligned(Scalar *data, Index size, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:699
static ConstAlignedMapType MapAligned(const Scalar *data, Index rows, Index cols)
Definition: PlainObjectBase.h:665
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator=(const PlainObjectBase &other)
This is a special case of the templated operator=.
Definition: PlainObjectBase.h:449
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase()
Definition: PlainObjectBase.h:476
@ NeedsToAlign
Definition: PlainObjectBase.h:134
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< Derived >::XprKind, ArrayXpr >::value, T >::type *=0)
Definition: PlainObjectBase.h:918
static AlignedMapType MapAligned(Scalar *data, Index rows, Index cols)
Definition: PlainObjectBase.h:667
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
Resizes *this to a rows x cols matrix.
Definition: PlainObjectBase.h:271
static AlignedMapType MapAligned(Scalar *data)
Definition: PlainObjectBase.h:659
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff(Index rowId, Index colId) const
This is an overloaded version of DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index,...
Definition: PlainObjectBase.h:152
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & _set_noalias(const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:790
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)
Definition: PlainObjectBase.h:853
static StridedAlignedMapType< Stride< Outer, Inner > >::type MapAligned(Scalar *data, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:693
static ConstMapType Map(const Scalar *data)
Definition: PlainObjectBase.h:644
static MapType Map(Scalar *data, Index size)
Definition: PlainObjectBase.h:650
static MapType Map(Scalar *data)
Definition: PlainObjectBase.h:646
EIGEN_DEVICE_FUNC void resize(NoChange_t, Index cols)
Resizes the matrix, changing only the number of columns.
Definition: PlainObjectBase.h:326
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(const ReturnByValue< OtherDerived > &other)
Copy constructor with in-place evaluation.
Definition: PlainObjectBase.h:610
static StridedConstMapType< Stride< Outer, Inner > >::type Map(const Scalar *data, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:671
static ConstMapType Map(const Scalar *data, Index size)
Definition: PlainObjectBase.h:648
EIGEN_DEVICE_FUNC void resize(Index size)
Resizes *this to a vector of length size.
Definition: PlainObjectBase.h:301
static StridedConstMapType< Stride< Outer, Inner > >::type Map(const Scalar *data, Index size, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:677
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
Resizes to the given size, and sets all coefficients in this expression to zero.
Definition: CwiseNullaryOp.h:562
Derived DenseType
Definition: PlainObjectBase.h:110
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _resize_to_match(const EigenBase< OtherDerived > &other)
Definition: PlainObjectBase.h:747
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const RotationBase< OtherDerived, ColsAtCompileTime > &r)
Definition: PlainObjectBase.h:910
EIGEN_DEVICE_FUNC Derived & setConstant(Index size, const Scalar &val)
Resizes to the given size, and sets all coefficients in this expression to the given value val.
Definition: CwiseNullaryOp.h:361
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2(Index rows, Index cols, typename internal::enable_if< Base::SizeAtCompileTime!=2, T0 >::type *=0)
Definition: PlainObjectBase.h:803
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const ReturnByValue< OtherDerived > &other)
Definition: PlainObjectBase.h:902
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resizeLike(const EigenBase< OtherDerived > &_other)
Resizes *this to have the same dimensions as other.
Definition: PlainObjectBase.h:354
EIGEN_STRONG_INLINE void writePacket(Index index, const PacketScalar &val)
Definition: PlainObjectBase.h:241
static StridedConstAlignedMapType< Stride< Outer, Inner > >::type MapAligned(const Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:702
@ IsPlainObjectBase
Definition: PlainObjectBase.h:982
static MapType Map(Scalar *data, Index rows, Index cols)
Definition: PlainObjectBase.h:654
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index,...
Definition: PlainObjectBase.h:175
static StridedConstAlignedMapType< Stride< Outer, Inner > >::type MapAligned(const Scalar *data, Index size, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:696
EIGEN_STRONG_INLINE void writePacket(Index rowId, Index colId, const PacketScalar &val)
Definition: PlainObjectBase.h:231
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2(const T0 &val0, const T1 &val1, typename internal::enable_if< Base::SizeAtCompileTime==2, T0 >::type *=0)
Definition: PlainObjectBase.h:815
static ConstMapType Map(const Scalar *data, Index rows, Index cols)
Definition: PlainObjectBase.h:652
static StridedConstMapType< Stride< Outer, Inner > >::type Map(const Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:683
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeffRef(Index rowId, Index colId) const
This is the const version of coeffRef(Index,Index) which is thus synonym of coeff(Index,...
Definition: PlainObjectBase.h:196
static ConstAlignedMapType MapAligned(const Scalar *data)
Definition: PlainObjectBase.h:657
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< Derived >::XprKind, ArrayXpr >::value||Base::SizeAtCompileTime==Dynamic)), T >::type *=0)
Definition: PlainObjectBase.h:839
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:777
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const Derived &other)
Definition: PlainObjectBase.h:889
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const Scalar *data)
Definition: PlainObjectBase.h:875
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff(Index index) const
This is an overloaded version of DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const provi...
Definition: PlainObjectBase.h:165
Derived & setRandom(Index size)
Resizes to the given newSize, and sets all coefficients in this expression to random values.
Definition: Random.h:151
internal::traits< Derived >::StorageKind StorageKind
Definition: PlainObjectBase.h:105
EIGEN_DEVICE_FUNC const Base & base() const
Definition: PlainObjectBase.h:140
internal::dense_xpr_base< Derived >::type Base
Definition: PlainObjectBase.h:103
const Eigen::Map< const Derived, Unaligned > ConstMapType
Definition: PlainObjectBase.h:122
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:953
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)
Definition: PlainObjectBase.h:862
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: PlainObjectBase.h:143
EIGEN_STRONG_INLINE PacketScalar packet(Index index) const
Definition: PlainObjectBase.h:224
Definition: ReturnByValue.h:52
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: ReturnByValue.h:64
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: ReturnByValue.h:66
EIGEN_DEVICE_FUNC void evalTo(Dest &dst) const
Definition: ReturnByValue.h:61
Definition: ForwardDeclarations.h:286
Holds strides information for Map.
Definition: Stride.h:49
type
Definition: core.h:575
@ Unaligned
Data pointer has no specific alignment.
Definition: Constants.h:233
@ AlignedMax
Definition: Constants.h:252
@ DontAlign
Don't require alignment for the matrix itself (the array of coefficients, if dynamically allocated,...
Definition: Constants.h:325
@ RowMajor
Storage order is row major (see TopicStorageOrders).
Definition: Constants.h:321
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:66
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment_no_alias(Dst &dst, const Src &src, const Func &func)
Definition: AssignEvaluator.h:873
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment(Dst &dst, const Src &src)
Definition: AssignEvaluator.h:834
EIGEN_DEVICE_FUNC void throw_std_bad_alloc()
Definition: Memory.h:67
EIGEN_CONSTEXPR Index size(const T &x)
Definition: Meta.h:479
EIGEN_STRONG_INLINE void swap(T &a, T &b)
Definition: Meta.h:766
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
Definition: MathFunctions.h:1083
Namespace containing all symbols from the Eigen library.
Definition: Core:141
NoChange_t
Definition: Constants.h:360
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition: Constants.h:22
OutputIterator copy(const RangeT &range, OutputIterator out)
Definition: ranges.h:26
@ error
Definition: format.h:2567
Definition: Eigen_Colamd.h:50
static constexpr const charge::coulomb_t e(1.6021766208e-19)
elementary charge.
The type used to identify an array expression.
Definition: Constants.h:525
Common base class for all classes T such that MatrixBase has an operator=(T) and a constructor Matrix...
Definition: EigenBase.h:30
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: EigenBase.h:63
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
Definition: EigenBase.h:67
EIGEN_DEVICE_FUNC Derived & derived()
Definition: EigenBase.h:46
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: EigenBase.h:60
Holds information about the various numeric (i.e.
Definition: NumTraits.h:233
Definition: PlainObjectBase.h:127
Eigen::Map< Derived, AlignedMax, StrideType > type
Definition: PlainObjectBase.h:127
Definition: PlainObjectBase.h:128
Eigen::Map< const Derived, AlignedMax, StrideType > type
Definition: PlainObjectBase.h:128
Definition: PlainObjectBase.h:126
Eigen::Map< const Derived, Unaligned, StrideType > type
Definition: PlainObjectBase.h:126
Definition: PlainObjectBase.h:125
Eigen::Map< Derived, Unaligned, StrideType > type
Definition: PlainObjectBase.h:125
Definition: AssignmentFunctors.h:21
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void run(Index rows, Index cols)
Definition: PlainObjectBase.h:40
Definition: PlainObjectBase.h:29
static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void run(Index, Index)
Definition: PlainObjectBase.h:32
static void run(DenseBase< Derived > &_this, Index size)
Definition: PlainObjectBase.h:1076
conservative_resize_like_impl< Derived, OtherDerived, false > Base
Definition: PlainObjectBase.h:1072
static void run(DenseBase< Derived > &_this, const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:1086
Definition: PlainObjectBase.h:1001
static const bool IsRelocatable
Definition: PlainObjectBase.h:1005
static void run(DenseBase< Derived > &_this, Index rows, Index cols)
Definition: PlainObjectBase.h:1007
static void run(DenseBase< Derived > &_this, const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:1030
Definition: DenseStorage.h:25
Definition: XprHelper.h:484
Definition: XprHelper.h:39
static EIGEN_DEVICE_FUNC void run(MatrixTypeA &a, MatrixTypeB &b)
Definition: PlainObjectBase.h:1118
Definition: PlainObjectBase.h:1106
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(MatrixTypeA &a, MatrixTypeB &b)
Definition: PlainObjectBase.h:1108
T type
Definition: GenericPacketMath.h:108
Definition: ForwardDeclarations.h:17
Definition: format.h:1552