17template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
22 typedef typename find_best_packet<_Scalar,size>::type PacketScalar;
28 actual_alignment = ((_Options&
DontAlign)==0) ? default_alignment : 0,
34 typedef _Scalar Scalar;
39 RowsAtCompileTime =
_Rows,
40 ColsAtCompileTime =
_Cols,
45 InnerStrideAtCompileTime = 1,
46 OuterStrideAtCompileTime = (Options&
RowMajor) ? ColsAtCompileTime : RowsAtCompileTime,
50 Alignment = actual_alignment
177template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
179 :
public PlainObjectBase<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
188 enum { Options = _Options };
190 EIGEN_DENSE_PUBLIC_INTERFACE(
Matrix)
192 typedef typename Base::PlainObject PlainObject;
221 template<
typename OtherDerived>
232 template<
typename OtherDerived>
239 template<
typename OtherDerived>
256 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
259 Base::_check_template_params();
260 EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
264 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
266 :
Base(internal::constructor_without_unaligned_array_assert())
267 { Base::_check_template_params(); EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED }
269#if EIGEN_HAS_RVALUE_REFERENCES
270 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
271 Matrix(
Matrix&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_constructible<Scalar>::value)
274 Base::_check_template_params();
276 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
300 template <
typename... ArgTypes>
301 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
302 Matrix(
const Scalar& a0,
const Scalar& a1,
const Scalar& a2,
const Scalar& a3,
const ArgTypes&... args)
303 :
Base(a0, a1, a2, a3, args...) {}
329 explicit EIGEN_STRONG_INLINE
Matrix(
const std::initializer_list<std::initializer_list<Scalar>>& list) :
Base(list) {}
332#ifndef EIGEN_PARSED_BY_DOXYGEN
336 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
337 explicit Matrix(
const T& x)
339 Base::_check_template_params();
340 Base::template _init1<T>(x);
343 template<
typename T0,
typename T1>
344 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
345 Matrix(
const T0& x,
const T1& y)
347 Base::_check_template_params();
348 Base::template _init2<T0,T1>(x, y);
390 Matrix(
const Scalar& x,
const Scalar& y);
397 EIGEN_STRONG_INLINE
Matrix(
const Scalar& x,
const Scalar& y,
const Scalar& z)
399 Base::_check_template_params();
400 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(
Matrix, 3)
401 m_storage.data()[0] = x;
402 m_storage.data()[1] = y;
403 m_storage.data()[2] = z;
409 EIGEN_STRONG_INLINE
Matrix(
const Scalar& x,
const Scalar& y,
const Scalar& z,
const Scalar& w)
411 Base::_check_template_params();
412 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(
Matrix, 4)
413 m_storage.data()[0] = x;
414 m_storage.data()[1] = y;
415 m_storage.data()[2] = z;
416 m_storage.data()[3] = w;
428 template<
typename OtherDerived>
431 :
Base(other.derived())
434 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
435 inline Index innerStride()
const EIGEN_NOEXCEPT {
return 1; }
436 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
437 inline Index outerStride() const EIGEN_NOEXCEPT {
return this->innerSize(); }
441 template<
typename OtherDerived>
443 explicit Matrix(
const RotationBase<OtherDerived,ColsAtCompileTime>& r);
444 template<
typename OtherDerived>
446 Matrix&
operator=(
const RotationBase<OtherDerived,ColsAtCompileTime>& r);
449 #ifdef EIGEN_MATRIX_PLUGIN
450 #include EIGEN_MATRIX_PLUGIN
454 template <
typename Derived,
typename OtherDerived,
bool IsVector>
455 friend struct internal::conservative_resize_like_impl;
457 using Base::m_storage;
489#define EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Size, SizeSuffix) \
492typedef Matrix<Type, Size, Size> Matrix##SizeSuffix##TypeSuffix; \
495typedef Matrix<Type, Size, 1> Vector##SizeSuffix##TypeSuffix; \
498typedef Matrix<Type, 1, Size> RowVector##SizeSuffix##TypeSuffix;
500#define EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, Size) \
503typedef Matrix<Type, Size, Dynamic> Matrix##Size##X##TypeSuffix; \
506typedef Matrix<Type, Dynamic, Size> Matrix##X##Size##TypeSuffix;
508#define EIGEN_MAKE_TYPEDEFS_ALL_SIZES(Type, TypeSuffix) \
509EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 2, 2) \
510EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 3, 3) \
511EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 4, 4) \
512EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Dynamic, X) \
513EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 2) \
514EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 3) \
515EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 4)
517EIGEN_MAKE_TYPEDEFS_ALL_SIZES(
int, i)
518EIGEN_MAKE_TYPEDEFS_ALL_SIZES(
float, f)
519EIGEN_MAKE_TYPEDEFS_ALL_SIZES(
double, d)
520EIGEN_MAKE_TYPEDEFS_ALL_SIZES(std::complex<float>, cf)
521EIGEN_MAKE_TYPEDEFS_ALL_SIZES(std::complex<double>, cd)
523#undef EIGEN_MAKE_TYPEDEFS_ALL_SIZES
524#undef EIGEN_MAKE_TYPEDEFS
525#undef EIGEN_MAKE_FIXED_TYPEDEFS
529#define EIGEN_MAKE_TYPEDEFS(Size, SizeSuffix) \
532template <typename Type> \
533using Matrix##SizeSuffix = Matrix<Type, Size, Size>; \
536template <typename Type> \
537using Vector##SizeSuffix = Matrix<Type, Size, 1>; \
540template <typename Type> \
541using RowVector##SizeSuffix = Matrix<Type, 1, Size>;
543#define EIGEN_MAKE_FIXED_TYPEDEFS(Size) \
546template <typename Type> \
547using Matrix##Size##X = Matrix<Type, Size, Dynamic>; \
550template <typename Type> \
551using Matrix##X##Size = Matrix<Type, Dynamic, Size>;
553EIGEN_MAKE_TYPEDEFS(2, 2)
554EIGEN_MAKE_TYPEDEFS(3, 3)
555EIGEN_MAKE_TYPEDEFS(4, 4)
556EIGEN_MAKE_TYPEDEFS(Dynamic, X)
557EIGEN_MAKE_FIXED_TYPEDEFS(2)
558EIGEN_MAKE_FIXED_TYPEDEFS(3)
559EIGEN_MAKE_FIXED_TYPEDEFS(4)
563template <typename Type,
int Size>
564using Vector =
Matrix<Type, Size, 1>;
568template <typename Type,
int Size>
569using RowVector =
Matrix<Type, 1, Size>;
571#undef EIGEN_MAKE_TYPEDEFS
572#undef EIGEN_MAKE_FIXED_TYPEDEFS
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
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix(const Scalar &x, const Scalar &y, const Scalar &z)
Constructs an initialized 3D vector with given coefficients.
Definition Matrix.h:397
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix()
Default constructor.
Definition Matrix.h:257
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix & operator=(const Matrix &other)
Assigns matrices to each other.
Definition Matrix.h:206
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix & operator=(const EigenBase< OtherDerived > &other)
Copies the generic expression other into *this.
Definition Matrix.h:234
PlainObjectBase< Matrix > Base
Base class typedef.
Definition Matrix.h:186
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix(const EigenBase< OtherDerived > &other)
Copy constructor for generic expressions.
Definition Matrix.h:430
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix(const Matrix &other)
Copy constructor.
Definition Matrix.h:422
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix(const Scalar &x, const Scalar &y, const Scalar &z, const Scalar &w)
Constructs an initialized 4D vector with given coefficients.
Definition Matrix.h:409
Definition PlainObjectBase.h:100
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar * data() const
Definition PlainObjectBase.h:247
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 Scalar & coeffRef(Index rowId, Index colId)
This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index,...
Definition PlainObjectBase.h:175
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
Definition XprHelper.h:272
@ 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 PacketAccessBit
Short version: means the expression might be vectorized.
Definition Constants.h:94
const unsigned int LinearAccessBit
Short version: means the expression can be seen as 1D vector.
Definition Constants.h:130
const unsigned int DirectAccessBit
Means that the underlying array of coefficients can be directly accessed as a plain strided array.
Definition Constants.h:155
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition Constants.h:66
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
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
The type used to identify a dense storage.
Definition Constants.h:507
The type used to identify a matrix expression.
Definition Constants.h:522
Definition XprHelper.h:242
Definition DenseStorage.h:25
Definition GenericPacketMath.h:107
Definition XprHelper.h:282
Definition ForwardDeclarations.h:17
Definition GenericPacketMath.h:133
Definition inference.c:32