MatrixBase.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2006-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
5 // Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #ifndef EIGEN_MATRIXBASE_H
12 #define EIGEN_MATRIXBASE_H
13 
14 #include "./InternalHeaderCheck.h"
15 
16 namespace Eigen {
17 
50 template<typename Derived> class MatrixBase
51  : public DenseBase<Derived>
52 {
53  public:
54 #ifndef EIGEN_PARSED_BY_DOXYGEN
55  typedef MatrixBase StorageBaseType;
56  typedef typename internal::traits<Derived>::StorageKind StorageKind;
57  typedef typename internal::traits<Derived>::StorageIndex StorageIndex;
58  typedef typename internal::traits<Derived>::Scalar Scalar;
59  typedef typename internal::packet_traits<Scalar>::type PacketScalar;
60  typedef typename NumTraits<Scalar>::Real RealScalar;
61 
62  typedef DenseBase<Derived> Base;
63  using Base::RowsAtCompileTime;
64  using Base::ColsAtCompileTime;
65  using Base::SizeAtCompileTime;
66  using Base::MaxRowsAtCompileTime;
67  using Base::MaxColsAtCompileTime;
68  using Base::MaxSizeAtCompileTime;
69  using Base::IsVectorAtCompileTime;
70  using Base::Flags;
71 
72  using Base::derived;
73  using Base::const_cast_derived;
74  using Base::rows;
75  using Base::cols;
76  using Base::size;
77  using Base::coeff;
78  using Base::coeffRef;
79  using Base::lazyAssign;
80  using Base::eval;
81  using Base::operator-;
82  using Base::operator+=;
83  using Base::operator-=;
84  using Base::operator*=;
85  using Base::operator/=;
86 
87  typedef typename Base::CoeffReturnType CoeffReturnType;
88  typedef typename Base::ConstTransposeReturnType ConstTransposeReturnType;
89  typedef typename Base::RowXpr RowXpr;
90  typedef typename Base::ColXpr ColXpr;
91 #endif // not EIGEN_PARSED_BY_DOXYGEN
92 
93 
94 
95 #ifndef EIGEN_PARSED_BY_DOXYGEN
99 #endif // not EIGEN_PARSED_BY_DOXYGEN
100 
104  inline Index diagonalSize() const { return (numext::mini)(rows(),cols()); }
105 
106  typedef typename Base::PlainObject PlainObject;
107 
108 #ifndef EIGEN_PARSED_BY_DOXYGEN
112  typedef std::conditional_t<NumTraits<Scalar>::IsComplex,
115  > AdjointReturnType;
117  typedef Matrix<std::complex<RealScalar>, internal::traits<Derived>::ColsAtCompileTime, 1, ColMajor> EigenvaluesReturnType;
122  internal::traits<Derived>::RowsAtCompileTime,
123  internal::traits<Derived>::ColsAtCompileTime> BasisReturnType;
124 #endif // not EIGEN_PARSED_BY_DOXYGEN
125 
126 #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::MatrixBase
127 #define EIGEN_DOC_UNARY_ADDONS(X,Y)
128 # include "../plugins/CommonCwiseBinaryOps.h"
129 # include "../plugins/MatrixCwiseUnaryOps.h"
130 # include "../plugins/MatrixCwiseBinaryOps.h"
131 # ifdef EIGEN_MATRIXBASE_PLUGIN
132 # include EIGEN_MATRIXBASE_PLUGIN
133 # endif
134 #undef EIGEN_CURRENT_STORAGE_BASE_CLASS
135 #undef EIGEN_DOC_UNARY_ADDONS
136 
140  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
141  Derived& operator=(const MatrixBase& other);
142 
143  // We cannot inherit here via Base::operator= since it is causing
144  // trouble with MSVC.
145 
146  template <typename OtherDerived>
147  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
148  Derived& operator=(const DenseBase<OtherDerived>& other);
149 
150  template <typename OtherDerived>
152  Derived& operator=(const EigenBase<OtherDerived>& other);
153 
154  template<typename OtherDerived>
156  Derived& operator=(const ReturnByValue<OtherDerived>& other);
157 
158  template<typename OtherDerived>
159  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
160  Derived& operator+=(const MatrixBase<OtherDerived>& other);
161  template<typename OtherDerived>
162  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
163  Derived& operator-=(const MatrixBase<OtherDerived>& other);
164 
165  template<typename OtherDerived>
167  const Product<Derived,OtherDerived>
168  operator*(const MatrixBase<OtherDerived> &other) const;
169 
170  template<typename OtherDerived>
172  const Product<Derived,OtherDerived,LazyProduct>
173  lazyProduct(const MatrixBase<OtherDerived> &other) const;
174 
175  template<typename OtherDerived>
176  Derived& operator*=(const EigenBase<OtherDerived>& other);
177 
178  template<typename OtherDerived>
180 
181  template<typename OtherDerived>
183 
184  template<typename DiagonalDerived>
188 
189  template<typename SkewDerived>
192  operator*(const SkewSymmetricBase<SkewDerived> &skew) const;
193 
194  template<typename OtherDerived>
196  typename ScalarBinaryOpTraits<typename internal::traits<Derived>::Scalar,typename internal::traits<OtherDerived>::Scalar>::ReturnType
197  dot(const MatrixBase<OtherDerived>& other) const;
198 
201  RealScalar stableNorm() const;
202  RealScalar blueNorm() const;
203  RealScalar hypotNorm() const;
208 
209  EIGEN_DEVICE_FUNC const AdjointReturnType adjoint() const;
211 
215 
218  const ConstDiagonalReturnType diagonal() const;
219 
220  template<int Index>
223 
224  template<int Index>
227 
232 
233  template<unsigned int Mode> struct TriangularViewReturnType { typedef TriangularView<Derived, Mode> Type; };
234  template<unsigned int Mode> struct ConstTriangularViewReturnType { typedef const TriangularView<const Derived, Mode> Type; };
235 
236  template<unsigned int Mode>
239  template<unsigned int Mode>
242 
243  template<unsigned int UpLo> struct SelfAdjointViewReturnType { typedef SelfAdjointView<Derived, UpLo> Type; };
244  template<unsigned int UpLo> struct ConstSelfAdjointViewReturnType { typedef const SelfAdjointView<const Derived, UpLo> Type; };
245 
246  template<unsigned int UpLo>
249  template<unsigned int UpLo>
252 
253  const SparseView<Derived> sparseView(const Scalar& m_reference = Scalar(0),
254  const typename NumTraits<Scalar>::Real& m_epsilon = NumTraits<Scalar>::dummy_precision()) const;
255  EIGEN_DEVICE_FUNC static const IdentityReturnType Identity();
256  EIGEN_DEVICE_FUNC static const IdentityReturnType Identity(Index rows, Index cols);
257  EIGEN_DEVICE_FUNC static const BasisReturnType Unit(Index size, Index i);
258  EIGEN_DEVICE_FUNC static const BasisReturnType Unit(Index i);
259  EIGEN_DEVICE_FUNC static const BasisReturnType UnitX();
260  EIGEN_DEVICE_FUNC static const BasisReturnType UnitY();
261  EIGEN_DEVICE_FUNC static const BasisReturnType UnitZ();
262  EIGEN_DEVICE_FUNC static const BasisReturnType UnitW();
263 
269 
271  Derived& setIdentity();
273  Derived& setIdentity(Index rows, Index cols);
274  EIGEN_DEVICE_FUNC Derived& setUnit(Index i);
275  EIGEN_DEVICE_FUNC Derived& setUnit(Index newSize, Index i);
276 
277  bool isIdentity(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
278  bool isDiagonal(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
279 
282 
284 
285  template<typename OtherDerived>
286  bool isOrthogonal(const MatrixBase<OtherDerived>& other,
287  const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
288  bool isUnitary(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
289 
294  template<typename OtherDerived>
295  EIGEN_DEVICE_FUNC inline bool operator==(const MatrixBase<OtherDerived>& other) const
296  { return cwiseEqual(other).all(); }
297 
302  template<typename OtherDerived>
303  EIGEN_DEVICE_FUNC inline bool operator!=(const MatrixBase<OtherDerived>& other) const
304  { return cwiseNotEqual(other).any(); }
305 
307 
308  // TODO forceAlignedAccess is temporarily disabled
309  // Need to find a nicer workaround.
310  inline const Derived& forceAlignedAccess() const { return derived(); }
311  inline Derived& forceAlignedAccess() { return derived(); }
312  template<bool Enable> inline const Derived& forceAlignedAccessIf() const { return derived(); }
313  template<bool Enable> inline Derived& forceAlignedAccessIf() { return derived(); }
314 
316 
317  template<int p> EIGEN_DEVICE_FUNC RealScalar lpNorm() const;
318 
320  EIGEN_DEVICE_FUNC const MatrixBase<Derived>& matrix() const { return *this; }
321 
328 
330 
331  template<typename PermutationIndex = DefaultPermutationIndex> inline const FullPivLU<PlainObject, PermutationIndex> fullPivLu() const;
332  template<typename PermutationIndex = DefaultPermutationIndex> inline const PartialPivLU<PlainObject, PermutationIndex> partialPivLu() const;
333 
334  template<typename PermutationIndex = DefaultPermutationIndex> inline const PartialPivLU<PlainObject, PermutationIndex> lu() const;
335 
337  inline const Inverse<Derived> inverse() const;
338 
339  template<typename ResultType>
340  inline void computeInverseAndDetWithCheck(
341  ResultType& inverse,
342  typename ResultType::Scalar& determinant,
343  bool& invertible,
344  const RealScalar& absDeterminantThreshold = NumTraits<Scalar>::dummy_precision()
345  ) const;
346 
347  template<typename ResultType>
348  inline void computeInverseWithCheck(
349  ResultType& inverse,
350  bool& invertible,
351  const RealScalar& absDeterminantThreshold = NumTraits<Scalar>::dummy_precision()
352  ) const;
353 
355  Scalar determinant() const;
356 
358 
359  inline const LLT<PlainObject> llt() const;
360  inline const LDLT<PlainObject> ldlt() const;
361 
363 
364  inline const HouseholderQR<PlainObject> householderQr() const;
365  template<typename PermutationIndex = DefaultPermutationIndex> inline const ColPivHouseholderQR<PlainObject, PermutationIndex> colPivHouseholderQr() const;
366  template<typename PermutationIndex = DefaultPermutationIndex> inline const FullPivHouseholderQR<PlainObject, PermutationIndex> fullPivHouseholderQr() const;
367  template<typename PermutationIndex = DefaultPermutationIndex> inline const CompleteOrthogonalDecomposition<PlainObject, PermutationIndex> completeOrthogonalDecomposition() const;
368 
370 
371  inline EigenvaluesReturnType eigenvalues() const;
372  inline RealScalar operatorNorm() const;
373 
375 
376  template<int Options = 0>
378  template<int Options = 0>
380  inline JacobiSVD<PlainObject, Options> jacobiSvd(unsigned int computationOptions) const;
381 
382  template<int Options = 0>
384  template<int Options = 0>
386  inline BDCSVD<PlainObject, Options> bdcSvd(unsigned int computationOptions) const;
387 
389 
390  template<typename OtherDerived>
393  cross(const MatrixBase<OtherDerived>& other) const;
394 
395  template<typename OtherDerived>
397  inline PlainObject cross3(const MatrixBase<OtherDerived>& other) const;
398 
400  inline PlainObject unitOrthogonal(void) const;
401 
403  inline Matrix<Scalar,3,1> eulerAngles(Index a0, Index a1, Index a2) const;
404 
406  inline Matrix<Scalar,3,1> canonicalEulerAngles(Index a0, Index a1, Index a2) const;
407 
408  // put this as separate enum value to work around possible GCC 4.3 bug (?)
409  enum { HomogeneousReturnTypeDirection = ColsAtCompileTime==1&&RowsAtCompileTime==1 ? ((internal::traits<Derived>::Flags&RowMajorBit)==RowMajorBit ? Horizontal : Vertical)
413  inline HomogeneousReturnType homogeneous() const;
414 
415  enum {
417  };
418  typedef Block<const Derived,
419  internal::traits<Derived>::ColsAtCompileTime==1 ? SizeMinusOne : 1,
420  internal::traits<Derived>::ColsAtCompileTime==1 ? 1 : SizeMinusOne> ConstStartMinusOne;
421  typedef EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(ConstStartMinusOne,Scalar,quotient) HNormalizedReturnType;
423  inline const HNormalizedReturnType hnormalized() const;
424 
426 
428  void makeHouseholderInPlace(Scalar& tau, RealScalar& beta);
429  template<typename EssentialPart>
431  void makeHouseholder(EssentialPart& essential,
432  Scalar& tau, RealScalar& beta) const;
433  template<typename EssentialPart>
435  void applyHouseholderOnTheLeft(const EssentialPart& essential,
436  const Scalar& tau,
437  Scalar* workspace);
438  template<typename EssentialPart>
440  void applyHouseholderOnTheRight(const EssentialPart& essential,
441  const Scalar& tau,
442  Scalar* workspace);
443 
445 
446  template<typename OtherScalar>
449  template<typename OtherScalar>
452 
454 
455  template<typename OtherDerived>
458  {
459  return other.cwiseProduct(derived());
460  }
461 
463 
464  typedef typename internal::stem_function<Scalar>::type StemFunction;
465 #define EIGEN_MATRIX_FUNCTION(ReturnType, Name, Description) \
466  \
467  const ReturnType<Derived> Name() const;
468 #define EIGEN_MATRIX_FUNCTION_1(ReturnType, Name, Description, Argument) \
469  \
470  const ReturnType<Derived> Name(Argument) const;
471 
486 
487  protected:
490 
491  private:
494  template<typename OtherDerived> EIGEN_DEVICE_FUNC explicit MatrixBase(const MatrixBase<OtherDerived>&);
495  protected:
496  // mixing arrays and matrices is not legal
497  template<typename OtherDerived> Derived& operator+=(const ArrayBase<OtherDerived>& )
498  {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}
499  // mixing arrays and matrices is not legal
500  template<typename OtherDerived> Derived& operator-=(const ArrayBase<OtherDerived>& )
501  {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}
502 };
503 
504 
505 
516 template<typename Derived>
517 template<typename OtherDerived>
518 inline Derived&
520 {
521  other.derived().applyThisOnTheRight(derived());
522  return derived();
523 }
524 
530 template<typename Derived>
531 template<typename OtherDerived>
533 {
534  other.derived().applyThisOnTheRight(derived());
535 }
536 
542 template<typename Derived>
543 template<typename OtherDerived>
545 {
546  other.derived().applyThisOnTheLeft(derived());
547 }
548 
549 } // end namespace Eigen
550 
551 #endif // EIGEN_MATRIXBASE_H
Array33i c
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)
Definition: Macros.h:1113
#define EIGEN_DEPRECATED
Definition: Macros.h:923
#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived)
Definition: Macros.h:1133
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:883
#define EIGEN_MATRIX_FUNCTION(ReturnType, Name, Description)
Definition: MatrixBase.h:465
#define EIGEN_MATRIX_FUNCTION_1(ReturnType, Name, Description, Argument)
Definition: MatrixBase.h:468
const CwiseBinaryEqualReturnType< OtherDerived > cwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
const CwiseBinaryNotEqualReturnType< OtherDerived > cwiseNotEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
float * p
Base class for all 1D and 2D array, and related expressions.
Definition: ArrayBase.h:43
Expression of a mathematical vector or matrix as an array object.
Definition: ArrayWrapper.h:45
class Bidiagonal Divide and Conquer SVD
Definition: BDCSVD.h:104
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:107
Householder rank-revealing QR decomposition of a matrix with column-pivoting.
Complete orthogonal decomposition (COD) of a matrix.
Generic expression of a matrix where all coefficients are defined by a functor.
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:58
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:42
DenseCoeffsBase< Derived, internal::accessors_level< Derived >::value > Base
Definition: DenseBase.h:69
NumTraits< Scalar >::Real RealScalar
Definition: DenseBase.h:68
internal::traits< Derived >::StorageIndex StorageIndex
The type used to store indices.
Definition: DenseBase.h:58
std::conditional_t< internal::is_same< typename internal::traits< Derived >::XprKind, MatrixXpr >::value, PlainMatrix, PlainArray > PlainObject
The plain matrix or array type corresponding to this expression.
Definition: DenseBase.h:204
Transpose< const Derived > ConstTransposeReturnType
Definition: DenseBase.h:318
internal::traits< Derived >::StorageKind StorageKind
Definition: DenseBase.h:50
Base::CoeffReturnType CoeffReturnType
Definition: DenseBase.h:91
internal::traits< Derived >::Scalar Scalar
Definition: DenseBase.h:61
internal::find_best_packet< Scalar, SizeAtCompileTime >::type PacketScalar
Definition: DenseBase.h:173
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: EigenBase.h:65
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: EigenBase.h:62
EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
Definition: EigenBase.h:69
Base class for diagonal matrices and expressions.
Expression of a diagonal matrix.
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
Definition: Diagonal.h:67
Householder rank-revealing QR decomposition of a matrix with full pivoting.
LU decomposition of a matrix with complete pivoting, and related features.
Definition: FullPivLU.h:64
Expression of one (or a set of) homogeneous vector(s)
Definition: Homogeneous.h:64
Householder QR decomposition of a matrix.
Definition: HouseholderQR.h:60
Expression of the inverse of another expression.
Definition: Inverse.h:46
Rotation given by a cosine-sine pair.
Definition: Jacobi.h:37
Two-sided Jacobi SVD decomposition of a rectangular matrix.
Definition: JacobiSVD.h:514
Robust Cholesky decomposition of a matrix with pivoting.
Definition: LDLT.h:63
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
Definition: LLT.h:70
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:52
static const BasisReturnType UnitY()
bool operator!=(const MatrixBase< OtherDerived > &other) const
Definition: MatrixBase.h:303
const MatrixFunctionReturnValue< Derived > sin() const
This function requires the unsupported MatrixFunctions module. To compute the coefficient-wise sine u...
void stableNormalize()
Definition: Dot.h:189
const LDLT< PlainObject > ldlt() const
Definition: LDLT.h:678
const SkewSymmetricWrapper< const Derived > asSkewSymmetric() const
RealScalar operatorNorm() const
Computes the L2 operator norm.
Derived & operator-=(const MatrixBase< OtherDerived > &other)
void computeInverseWithCheck(ResultType &inverse, bool &invertible, const RealScalar &absDeterminantThreshold=NumTraits< Scalar >::dummy_precision()) const
Definition: InverseImpl.h:420
void makeHouseholder(EssentialPart &essential, Scalar &tau, RealScalar &beta) const
Definition: Householder.h:69
const DiagonalWrapper< const Derived > asDiagonal() const
Derived & setIdentity()
RealScalar norm() const
Definition: Dot.h:106
const MatrixFunctionReturnValue< Derived > matrixFunction(StemFunction f) const
Helper function for the unsupported MatrixFunctions module.
bool isLowerTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
internal::cross_impl< Derived, OtherDerived >::return_type cross(const MatrixBase< OtherDerived > &other) const
ConstTriangularViewReturnType< Mode >::Type triangularView() const
NoAlias< Derived, Eigen::MatrixBase > noalias()
Definition: NoAlias.h:104
internal::stem_function< Scalar >::type StemFunction
Definition: MatrixBase.h:464
DiagonalReturnType diagonal()
Definition: Diagonal.h:189
const PartialPivLU< PlainObject, PermutationIndex > lu() const
Derived & operator-=(const ArrayBase< OtherDerived > &)
Definition: MatrixBase.h:500
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
RealScalar hypotNorm() const
Definition: StableNorm.h:243
const MatrixFunctionReturnValue< Derived > cos() const
This function requires the unsupported MatrixFunctions module. To compute the coefficient-wise cosine...
ArrayWrapper< Derived > array()
Definition: MatrixBase.h:324
Derived & operator=(const MatrixBase &other)
Definition: Assign.h:57
Derived & operator*=(const EigenBase< OtherDerived > &other)
Definition: MatrixBase.h:519
const PlainObject stableNormalized() const
Definition: Dot.h:165
void applyOnTheLeft(const EigenBase< OtherDerived > &other)
Definition: MatrixBase.h:544
RealScalar blueNorm() const
Definition: StableNorm.h:231
const SparseMatrixBase< OtherDerived >::template CwiseProductDenseReturnType< Derived >::Type cwiseProduct(const SparseMatrixBase< OtherDerived > &other) const
Definition: MatrixBase.h:457
const ColPivHouseholderQR< PlainObject, PermutationIndex > colPivHouseholderQr() const
void applyOnTheRight(const EigenBase< OtherDerived > &other)
Definition: MatrixBase.h:532
TriangularViewReturnType< Mode >::Type triangularView()
bool isIdentity(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
JacobiSVD< PlainObject, Options > jacobiSvd() const
const MatrixLogarithmReturnValue< Derived > log() const
This function requires the unsupported MatrixFunctions module. To compute the coefficient-wise logari...
typedef EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(ConstStartMinusOne, Scalar, quotient) HNormalizedReturnType
void adjointInPlace()
Definition: Transpose.h:377
@ HomogeneousReturnTypeDirection
Definition: MatrixBase.h:409
Scalar trace() const
Definition: Redux.h:595
const Diagonal< const Derived, Index > diagonal() const
const PlainObject normalized() const
Definition: Dot.h:122
const MatrixFunctionReturnValue< Derived > cosh() const
This function requires the unsupported MatrixFunctions module. To compute the coefficient-wise hyperb...
const FullPivHouseholderQR< PlainObject, PermutationIndex > fullPivHouseholderQr() const
SelfAdjointViewReturnType< UpLo >::Type selfadjointView()
BDCSVD< PlainObject, Options > bdcSvd() const
const MatrixExponentialReturnValue< Derived > exp() const
This function requires the unsupported MatrixFunctions module. To compute the coefficient-wise expone...
RealScalar lpNorm() const
Definition: Dot.h:265
MatrixBase< Derived > & matrix()
Definition: MatrixBase.h:319
const ArrayWrapper< const Derived > array() const
Definition: MatrixBase.h:327
const MatrixFunctionReturnValue< Derived > acosh() const
This function requires the unsupported MatrixFunctions module. To compute the coefficient-wise invers...
const PartialPivLU< PlainObject, PermutationIndex > partialPivLu() const
const Inverse< Derived > inverse() const
Definition: InverseImpl.h:350
const Derived & forceAlignedAccessIf() const
Definition: MatrixBase.h:312
Scalar determinant() const
Definition: Determinant.h:110
const MatrixPowerReturnValue< Derived > pow(const RealScalar &p) const
This function requires the unsupported MatrixFunctions module. To compute the coefficient-wise power ...
void computeInverseAndDetWithCheck(ResultType &inverse, typename ResultType::Scalar &determinant, bool &invertible, const RealScalar &absDeterminantThreshold=NumTraits< Scalar >::dummy_precision()) const
Definition: InverseImpl.h:379
bool operator==(const MatrixBase< OtherDerived > &other) const
Definition: MatrixBase.h:295
Block< const Derived, internal::traits< Derived >::ColsAtCompileTime==1 ? SizeMinusOne :1, internal::traits< Derived >::ColsAtCompileTime==1 ? 1 :SizeMinusOne > ConstStartMinusOne
Definition: MatrixBase.h:420
Derived & forceAlignedAccessIf()
Definition: MatrixBase.h:313
static const BasisReturnType UnitX()
bool isUnitary(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: Dot.h:300
EIGEN_DEPRECATED BDCSVD< PlainObject, Options > bdcSvd(unsigned int computationOptions) const
const MatrixFunctionReturnValue< Derived > asinh() const
This function requires the unsupported MatrixFunctions module. To compute the coefficient-wise invers...
void applyHouseholderOnTheLeft(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Definition: Householder.h:118
const LLT< PlainObject > llt() const
Definition: LLT.h:537
bool isDiagonal(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Derived & operator+=(const MatrixBase< OtherDerived > &other)
static const IdentityReturnType Identity()
const HouseholderQR< PlainObject > householderQr() const
const MatrixFunctionReturnValue< Derived > sinh() const
This function requires the unsupported MatrixFunctions module. To compute the coefficient-wise hyperb...
const MatrixBase< Derived > & matrix() const
Definition: MatrixBase.h:320
bool isSkewSymmetric(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
static const BasisReturnType UnitZ()
bool isUpperTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Base::PlainObject PlainObject
Definition: MatrixBase.h:106
void applyHouseholderOnTheRight(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Definition: Householder.h:156
Index diagonalSize() const
Definition: MatrixBase.h:104
RealScalar stableNorm() const
Definition: StableNorm.h:215
const MatrixFunctionReturnValue< Derived > atanh() const
This function requires the unsupported MatrixFunctions module. To compute the coefficient-wise invers...
Diagonal< Derived, Index > diagonal()
const PermutationWrapper< const Derived > asPermutation() const
static const BasisReturnType Unit(Index size, Index i)
Derived & setUnit(Index i)
Set the coefficients of *this to the i-th unit (basis) vector.
RealScalar squaredNorm() const
Definition: Dot.h:94
EIGEN_DEPRECATED JacobiSVD< PlainObject, Options > jacobiSvd(unsigned int computationOptions) const
void normalize()
Definition: Dot.h:143
const Derived & forceAlignedAccess() const
Definition: MatrixBase.h:310
const MatrixSquareRootReturnValue< Derived > sqrt() const
This function requires the unsupported MatrixFunctions module. To compute the coefficient-wise square...
ScalarBinaryOpTraits< typename internal::traits< Derived >::Scalar, typename internal::traits< OtherDerived >::Scalar >::ReturnType dot(const MatrixBase< OtherDerived > &other) const
Definition: Dot.h:69
const Product< Derived, OtherDerived, LazyProduct > lazyProduct(const MatrixBase< OtherDerived > &other) const
const Product< Derived, OtherDerived > operator*(const MatrixBase< OtherDerived > &other) const
void makeHouseholderInPlace(Scalar &tau, RealScalar &beta)
Definition: Householder.h:45
const FullPivLU< PlainObject, PermutationIndex > fullPivLu() const
bool isOrthogonal(const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: Dot.h:281
const CompleteOrthogonalDecomposition< PlainObject, PermutationIndex > completeOrthogonalDecomposition() const
Diagonal< Derived > DiagonalReturnType
Definition: MatrixBase.h:212
Homogeneous< Derived, HomogeneousReturnTypeDirection > HomogeneousReturnType
Definition: MatrixBase.h:411
ConstSelfAdjointViewReturnType< UpLo >::Type selfadjointView() const
Diagonal< const Derived > ConstDiagonalReturnType
Definition: MatrixBase.h:216
static const BasisReturnType UnitW()
const AdjointReturnType adjoint() const
Definition: Transpose.h:223
Derived & forceAlignedAccess()
Definition: MatrixBase.h:311
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:182
Pseudo expression providing an operator = assuming no aliasing.
Definition: NoAlias.h:34
LU decomposition of a matrix with partial pivoting, and related features.
Definition: PartialPivLU.h:80
Class to view a vector of integers as a permutation matrix.
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:77
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Base class for skew symmetric matrices and expressions.
Expression of a skew symmetric matrix.
Base class of any sparse matrices or sparse expressions.
const CwiseProductDenseReturnType< OtherDerived >::Type cwiseProduct(const MatrixBase< OtherDerived > &other) const
Expression of a dense or sparse matrix with zero or too small values removed.
Definition: SparseView.h:48
Expression of the transpose of a matrix.
Definition: Transpose.h:56
Expression of a triangular part in a matrix.
EIGEN_DEPRECATED Matrix< Scalar, 3, 1 > eulerAngles(Index a0, Index a1, Index a2) const
Definition: EulerAngles.h:139
PlainObject unitOrthogonal(void) const
Definition: OrthoMethods.h:273
PlainObject cross3(const MatrixBase< OtherDerived > &other) const
Definition: OrthoMethods.h:129
const HNormalizedReturnType hnormalized() const
homogeneous normalization
Definition: Homogeneous.h:176
HomogeneousReturnType homogeneous() const
Definition: Homogeneous.h:134
Matrix< Scalar, 3, 1 > canonicalEulerAngles(Index a0, Index a1, Index a2) const
Definition: EulerAngles.h:43
const SparseView< Derived > sparseView(const Scalar &m_reference=Scalar(0), const typename NumTraits< Scalar >::Real &m_epsilon=NumTraits< Scalar >::dummy_precision()) const
Definition: SparseView.h:228
@ ColMajor
Definition: Constants.h:321
@ Horizontal
Definition: Constants.h:269
@ Vertical
Definition: Constants.h:266
const unsigned int RowMajorBit
Definition: Constants.h:68
constexpr int max_size_prefer_dynamic(A a, B b)
Definition: Meta.h:566
EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
: InteropHeaders
Definition: Core:139
const int Dynamic
Definition: Constants.h:24
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_square_op< typename Derived::Scalar >, const Derived > square(const Eigen::ArrayBase< Derived > &x)
Definition: BFloat16.h:222
Derived & derived()
Definition: EigenBase.h:48
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:41
const SelfAdjointView< const Derived, UpLo > Type
Definition: MatrixBase.h:244
const TriangularView< const Derived, Mode > Type
Definition: MatrixBase.h:234
SelfAdjointView< Derived, UpLo > Type
Definition: MatrixBase.h:243
TriangularView< Derived, Mode > Type
Definition: MatrixBase.h:233
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:231
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
Definition: XprHelper.h:856
std::ptrdiff_t j