Eigen  3.2.91
MatrixBase.h
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 namespace Eigen {
15 
48 template<typename Derived> class MatrixBase
49  : public DenseBase<Derived>
50 {
51  public:
52 #ifndef EIGEN_PARSED_BY_DOXYGEN
53  typedef MatrixBase StorageBaseType;
54  typedef typename internal::traits<Derived>::StorageKind StorageKind;
55  typedef typename internal::traits<Derived>::StorageIndex StorageIndex;
56  typedef typename internal::traits<Derived>::Scalar Scalar;
57  typedef typename internal::packet_traits<Scalar>::type PacketScalar;
58  typedef typename NumTraits<Scalar>::Real RealScalar;
59 
60  typedef DenseBase<Derived> Base;
61  using Base::RowsAtCompileTime;
62  using Base::ColsAtCompileTime;
63  using Base::SizeAtCompileTime;
64  using Base::MaxRowsAtCompileTime;
65  using Base::MaxColsAtCompileTime;
66  using Base::MaxSizeAtCompileTime;
67  using Base::IsVectorAtCompileTime;
68  using Base::Flags;
69 
70  using Base::derived;
71  using Base::const_cast_derived;
72  using Base::rows;
73  using Base::cols;
74  using Base::size;
75  using Base::coeff;
76  using Base::coeffRef;
77  using Base::lazyAssign;
78  using Base::eval;
79  using Base::operator+=;
80  using Base::operator-=;
81  using Base::operator*=;
82  using Base::operator/=;
83  using Base::operator*;
84  using Base::operator/;
85 
86  typedef typename Base::CoeffReturnType CoeffReturnType;
87  typedef typename Base::ConstTransposeReturnType ConstTransposeReturnType;
88  typedef typename Base::RowXpr RowXpr;
89  typedef typename Base::ColXpr ColXpr;
90 #endif // not EIGEN_PARSED_BY_DOXYGEN
91 
92 
93 
94 #ifndef EIGEN_PARSED_BY_DOXYGEN
95 
96  typedef Matrix<Scalar,EIGEN_SIZE_MAX(RowsAtCompileTime,ColsAtCompileTime),
97  EIGEN_SIZE_MAX(RowsAtCompileTime,ColsAtCompileTime)> SquareMatrixType;
98 #endif // not EIGEN_PARSED_BY_DOXYGEN
99 
102  EIGEN_DEVICE_FUNC
103  inline Index diagonalSize() const { return (std::min)(rows(),cols()); }
104 
105  typedef typename Base::PlainObject PlainObject;
106 
107 #ifndef EIGEN_PARSED_BY_DOXYGEN
108 
109  typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,PlainObject> ConstantReturnType;
111  typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
112  CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, ConstTransposeReturnType>,
113  ConstTransposeReturnType
114  >::type AdjointReturnType;
116  typedef Matrix<std::complex<RealScalar>, internal::traits<Derived>::ColsAtCompileTime, 1, ColMajor> EigenvaluesReturnType;
118  typedef CwiseNullaryOp<internal::scalar_identity_op<Scalar>,PlainObject> IdentityReturnType;
121  internal::traits<Derived>::RowsAtCompileTime,
122  internal::traits<Derived>::ColsAtCompileTime> BasisReturnType;
123 #endif // not EIGEN_PARSED_BY_DOXYGEN
124 
125 #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::MatrixBase
126 # include "../plugins/CommonCwiseUnaryOps.h"
127 # include "../plugins/CommonCwiseBinaryOps.h"
128 # include "../plugins/MatrixCwiseUnaryOps.h"
129 # include "../plugins/MatrixCwiseBinaryOps.h"
130 # ifdef EIGEN_MATRIXBASE_PLUGIN
131 # include EIGEN_MATRIXBASE_PLUGIN
132 # endif
133 #undef EIGEN_CURRENT_STORAGE_BASE_CLASS
134 
138  EIGEN_DEVICE_FUNC
139  Derived& operator=(const MatrixBase& other);
140 
141  // We cannot inherit here via Base::operator= since it is causing
142  // trouble with MSVC.
143 
144  template <typename OtherDerived>
145  EIGEN_DEVICE_FUNC
146  Derived& operator=(const DenseBase<OtherDerived>& other);
147 
148  template <typename OtherDerived>
149  EIGEN_DEVICE_FUNC
150  Derived& operator=(const EigenBase<OtherDerived>& other);
151 
152  template<typename OtherDerived>
153  EIGEN_DEVICE_FUNC
154  Derived& operator=(const ReturnByValue<OtherDerived>& other);
155 
156  template<typename OtherDerived>
157  EIGEN_DEVICE_FUNC
158  Derived& operator+=(const MatrixBase<OtherDerived>& other);
159  template<typename OtherDerived>
160  EIGEN_DEVICE_FUNC
161  Derived& operator-=(const MatrixBase<OtherDerived>& other);
162 
163 #ifdef __CUDACC__
164  template<typename OtherDerived>
165  EIGEN_DEVICE_FUNC
167  operator*(const MatrixBase<OtherDerived> &other) const
168  { return this->lazyProduct(other); }
169 #else
170 
171  template<typename OtherDerived>
173  operator*(const MatrixBase<OtherDerived> &other) const;
174 
175 #endif
176 
177  template<typename OtherDerived>
178  EIGEN_DEVICE_FUNC
180  lazyProduct(const MatrixBase<OtherDerived> &other) const;
181 
182  template<typename OtherDerived>
183  Derived& operator*=(const EigenBase<OtherDerived>& other);
184 
185  template<typename OtherDerived>
186  void applyOnTheLeft(const EigenBase<OtherDerived>& other);
187 
188  template<typename OtherDerived>
189  void applyOnTheRight(const EigenBase<OtherDerived>& other);
190 
191  template<typename DiagonalDerived>
192  EIGEN_DEVICE_FUNC
194  operator*(const DiagonalBase<DiagonalDerived> &diagonal) const;
195 
196  template<typename OtherDerived>
197  EIGEN_DEVICE_FUNC
198  typename internal::scalar_product_traits<typename internal::traits<Derived>::Scalar,typename internal::traits<OtherDerived>::Scalar>::ReturnType
199  dot(const MatrixBase<OtherDerived>& other) const;
200 
201  EIGEN_DEVICE_FUNC RealScalar squaredNorm() const;
202  EIGEN_DEVICE_FUNC RealScalar norm() const;
203  RealScalar stableNorm() const;
204  RealScalar blueNorm() const;
205  RealScalar hypotNorm() const;
206  EIGEN_DEVICE_FUNC const PlainObject normalized() const;
207  EIGEN_DEVICE_FUNC void normalize();
208 
209  EIGEN_DEVICE_FUNC const AdjointReturnType adjoint() const;
210  EIGEN_DEVICE_FUNC void adjointInPlace();
211 
213  EIGEN_DEVICE_FUNC
214  DiagonalReturnType diagonal();
215 
216  typedef typename internal::add_const<Diagonal<const Derived> >::type ConstDiagonalReturnType;
217  EIGEN_DEVICE_FUNC
218  ConstDiagonalReturnType diagonal() const;
219 
220  template<int Index> struct DiagonalIndexReturnType { typedef Diagonal<Derived,Index> Type; };
221  template<int Index> struct ConstDiagonalIndexReturnType { typedef const Diagonal<const Derived,Index> Type; };
222 
223  template<int Index>
224  EIGEN_DEVICE_FUNC
225  typename DiagonalIndexReturnType<Index>::Type diagonal();
226 
227  template<int Index>
228  EIGEN_DEVICE_FUNC
229  typename ConstDiagonalIndexReturnType<Index>::Type diagonal() const;
230 
231  typedef Diagonal<Derived,DynamicIndex> DiagonalDynamicIndexReturnType;
232  typedef typename internal::add_const<Diagonal<const Derived,DynamicIndex> >::type ConstDiagonalDynamicIndexReturnType;
233 
234  EIGEN_DEVICE_FUNC
235  DiagonalDynamicIndexReturnType diagonal(Index index);
236  EIGEN_DEVICE_FUNC
237  ConstDiagonalDynamicIndexReturnType diagonal(Index index) const;
238 
239  template<unsigned int Mode> struct TriangularViewReturnType { typedef TriangularView<Derived, Mode> Type; };
240  template<unsigned int Mode> struct ConstTriangularViewReturnType { typedef const TriangularView<const Derived, Mode> Type; };
241 
242  template<unsigned int Mode>
243  EIGEN_DEVICE_FUNC
244  typename TriangularViewReturnType<Mode>::Type triangularView();
245  template<unsigned int Mode>
246  EIGEN_DEVICE_FUNC
247  typename ConstTriangularViewReturnType<Mode>::Type triangularView() const;
248 
249  template<unsigned int UpLo> struct SelfAdjointViewReturnType { typedef SelfAdjointView<Derived, UpLo> Type; };
250  template<unsigned int UpLo> struct ConstSelfAdjointViewReturnType { typedef const SelfAdjointView<const Derived, UpLo> Type; };
251 
252  template<unsigned int UpLo>
253  EIGEN_DEVICE_FUNC
254  typename SelfAdjointViewReturnType<UpLo>::Type selfadjointView();
255  template<unsigned int UpLo>
256  EIGEN_DEVICE_FUNC
257  typename ConstSelfAdjointViewReturnType<UpLo>::Type selfadjointView() const;
258 
259  const SparseView<Derived> sparseView(const Scalar& m_reference = Scalar(0),
260  const typename NumTraits<Scalar>::Real& m_epsilon = NumTraits<Scalar>::dummy_precision()) const;
261  EIGEN_DEVICE_FUNC static const IdentityReturnType Identity();
262  EIGEN_DEVICE_FUNC static const IdentityReturnType Identity(Index rows, Index cols);
263  EIGEN_DEVICE_FUNC static const BasisReturnType Unit(Index size, Index i);
264  EIGEN_DEVICE_FUNC static const BasisReturnType Unit(Index i);
265  EIGEN_DEVICE_FUNC static const BasisReturnType UnitX();
266  EIGEN_DEVICE_FUNC static const BasisReturnType UnitY();
267  EIGEN_DEVICE_FUNC static const BasisReturnType UnitZ();
268  EIGEN_DEVICE_FUNC static const BasisReturnType UnitW();
269 
270  EIGEN_DEVICE_FUNC
271  const DiagonalWrapper<const Derived> asDiagonal() const;
272  const PermutationWrapper<const Derived> asPermutation() const;
273 
274  EIGEN_DEVICE_FUNC
275  Derived& setIdentity();
276  EIGEN_DEVICE_FUNC
277  Derived& setIdentity(Index rows, Index cols);
278 
279  bool isIdentity(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
280  bool isDiagonal(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
281 
282  bool isUpperTriangular(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
283  bool isLowerTriangular(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
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  inline bool operator==(const MatrixBase<OtherDerived>& other) const
296  { return cwiseEqual(other).all(); }
297 
302  template<typename OtherDerived>
303  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 
315  EIGEN_DEVICE_FUNC Scalar trace() const;
316 
317  template<int p> EIGEN_DEVICE_FUNC RealScalar lpNorm() const;
318 
319  EIGEN_DEVICE_FUNC MatrixBase<Derived>& matrix() { return *this; }
320  EIGEN_DEVICE_FUNC const MatrixBase<Derived>& matrix() const { return *this; }
321 
324  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ArrayWrapper<Derived> array() { return ArrayWrapper<Derived>(derived()); }
327  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArrayWrapper<const Derived> array() const { return ArrayWrapper<const Derived>(derived()); }
328 
330 
331  EIGEN_DEVICE_FUNC const FullPivLU<PlainObject> fullPivLu() const;
332  EIGEN_DEVICE_FUNC const PartialPivLU<PlainObject> partialPivLu() const;
333 
334  const PartialPivLU<PlainObject> lu() const;
335 
336  EIGEN_DEVICE_FUNC
337  const Inverse<Derived> inverse() const;
338 
339  template<typename ResultType>
341  ResultType& inverse,
342  typename ResultType::Scalar& determinant,
343  bool& invertible,
344  const RealScalar& absDeterminantThreshold = NumTraits<Scalar>::dummy_precision()
345  ) const;
346  template<typename ResultType>
348  ResultType& inverse,
349  bool& invertible,
350  const RealScalar& absDeterminantThreshold = NumTraits<Scalar>::dummy_precision()
351  ) const;
352  Scalar determinant() const;
353 
355 
356  const LLT<PlainObject> llt() const;
357  const LDLT<PlainObject> ldlt() const;
358 
360 
364 
365  EigenvaluesReturnType eigenvalues() const;
366  RealScalar operatorNorm() const;
367 
369 
370  JacobiSVD<PlainObject> jacobiSvd(unsigned int computationOptions = 0) const;
371  BDCSVD<PlainObject> bdcSvd(unsigned int computationOptions = 0) const;
372 
374 
375  #ifndef EIGEN_PARSED_BY_DOXYGEN
376  template<typename OtherDerived> struct cross_product_return_type {
378  typedef typename internal::scalar_product_traits<typename internal::traits<Derived>::Scalar,typename internal::traits<OtherDerived>::Scalar>::ReturnType Scalar;
380  };
381  #endif // EIGEN_PARSED_BY_DOXYGEN
382  template<typename OtherDerived>
383  EIGEN_DEVICE_FUNC
384  typename cross_product_return_type<OtherDerived>::type
385  cross(const MatrixBase<OtherDerived>& other) const;
386 
387  template<typename OtherDerived>
388  EIGEN_DEVICE_FUNC
389  PlainObject cross3(const MatrixBase<OtherDerived>& other) const;
390 
391  EIGEN_DEVICE_FUNC
392  PlainObject unitOrthogonal(void) const;
393 
394  Matrix<Scalar,3,1> eulerAngles(Index a0, Index a1, Index a2) const;
395 
396  ScalarMultipleReturnType operator*(const UniformScaling<Scalar>& s) const;
397  // put this as separate enum value to work around possible GCC 4.3 bug (?)
398  enum { HomogeneousReturnTypeDirection = ColsAtCompileTime==1&&RowsAtCompileTime==1 ? ((internal::traits<Derived>::Flags&RowMajorBit)==RowMajorBit ? Horizontal : Vertical)
399  : ColsAtCompileTime==1 ? Vertical : Horizontal };
400  typedef Homogeneous<Derived, HomogeneousReturnTypeDirection> HomogeneousReturnType;
401  HomogeneousReturnType homogeneous() const;
402 
403  enum {
404  SizeMinusOne = SizeAtCompileTime==Dynamic ? Dynamic : SizeAtCompileTime-1
405  };
406  typedef Block<const Derived,
407  internal::traits<Derived>::ColsAtCompileTime==1 ? SizeMinusOne : 1,
408  internal::traits<Derived>::ColsAtCompileTime==1 ? 1 : SizeMinusOne> ConstStartMinusOne;
409  typedef CwiseUnaryOp<internal::scalar_quotient1_op<typename internal::traits<Derived>::Scalar>,
410  const ConstStartMinusOne > HNormalizedReturnType;
411 
412  const HNormalizedReturnType hnormalized() const;
413 
415 
416  void makeHouseholderInPlace(Scalar& tau, RealScalar& beta);
417  template<typename EssentialPart>
418  void makeHouseholder(EssentialPart& essential,
419  Scalar& tau, RealScalar& beta) const;
420  template<typename EssentialPart>
421  void applyHouseholderOnTheLeft(const EssentialPart& essential,
422  const Scalar& tau,
423  Scalar* workspace);
424  template<typename EssentialPart>
425  void applyHouseholderOnTheRight(const EssentialPart& essential,
426  const Scalar& tau,
427  Scalar* workspace);
428 
430 
431  template<typename OtherScalar>
432  void applyOnTheLeft(Index p, Index q, const JacobiRotation<OtherScalar>& j);
433  template<typename OtherScalar>
434  void applyOnTheRight(Index p, Index q, const JacobiRotation<OtherScalar>& j);
435 
437 
438  typedef typename internal::stem_function<Scalar>::type StemFunction;
439  const MatrixExponentialReturnValue<Derived> exp() const;
440  const MatrixFunctionReturnValue<Derived> matrixFunction(StemFunction f) const;
441  const MatrixFunctionReturnValue<Derived> cosh() const;
442  const MatrixFunctionReturnValue<Derived> sinh() const;
443  const MatrixFunctionReturnValue<Derived> cos() const;
444  const MatrixFunctionReturnValue<Derived> sin() const;
445  const MatrixSquareRootReturnValue<Derived> sqrt() const;
446  const MatrixLogarithmReturnValue<Derived> log() const;
447  const MatrixPowerReturnValue<Derived> pow(const RealScalar& p) const;
448  const MatrixComplexPowerReturnValue<Derived> pow(const std::complex<RealScalar>& p) const;
449 
450  protected:
451  EIGEN_DEVICE_FUNC MatrixBase() : Base() {}
452 
453  private:
454  EIGEN_DEVICE_FUNC explicit MatrixBase(int);
455  EIGEN_DEVICE_FUNC MatrixBase(int,int);
456  template<typename OtherDerived> EIGEN_DEVICE_FUNC explicit MatrixBase(const MatrixBase<OtherDerived>&);
457  protected:
458  // mixing arrays and matrices is not legal
459  template<typename OtherDerived> Derived& operator+=(const ArrayBase<OtherDerived>& )
460  {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}
461  // mixing arrays and matrices is not legal
462  template<typename OtherDerived> Derived& operator-=(const ArrayBase<OtherDerived>& )
463  {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}
464 };
465 
466 
467 /***************************************************************************
468 * Implementation of matrix base methods
469 ***************************************************************************/
470 
478 template<typename Derived>
479 template<typename OtherDerived>
480 inline Derived&
482 {
483  other.derived().applyThisOnTheRight(derived());
484  return derived();
485 }
486 
492 template<typename Derived>
493 template<typename OtherDerived>
495 {
496  other.derived().applyThisOnTheRight(derived());
497 }
498 
504 template<typename Derived>
505 template<typename OtherDerived>
507 {
508  other.derived().applyThisOnTheLeft(derived());
509 }
510 
511 } // end namespace Eigen
512 
513 #endif // EIGEN_MATRIXBASE_H
Generic expression of a matrix where all coefficients are defined by a functor.
Definition: CwiseNullaryOp.h:44
Robust Cholesky decomposition of a matrix with pivoting.
Definition: LDLT.h:48
Scalar determinant() const
Definition: Determinant.h:92
PlainObject unitOrthogonal(void) const
Definition: OrthoMethods.h:219
const LDLT< PlainObject > ldlt() const
Definition: LDLT.h:590
internal::traits< Derived >::Scalar Scalar
Definition: DenseBase.h:72
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:107
bool operator!=(const MatrixBase< OtherDerived > &other) const
Definition: MatrixBase.h:303
Expression of a mathematical vector or matrix as an array object.
Definition: ArrayWrapper.h:41
Householder rank-revealing QR decomposition of a matrix with full pivoting.
Definition: ForwardDeclarations.h:253
HomogeneousReturnType homogeneous() const
Definition: Homogeneous.h:128
bool operator==(const MatrixBase< OtherDerived > &other) const
Definition: MatrixBase.h:295
void applyOnTheLeft(const EigenBase< OtherDerived > &other)
Definition: MatrixBase.h:506
Definition: Constants.h:257
Pseudo expression providing an operator = assuming no aliasing.
Definition: NoAlias.h:31
const Product< Derived, OtherDerived, LazyProduct > lazyProduct(const MatrixBase< OtherDerived > &other) const
Definition: GeneralProduct.h:433
Expression of the transpose of a matrix.
Definition: Transpose.h:53
static const BasisReturnType UnitW()
Definition: CwiseNullaryOp.h:866
RealScalar operatorNorm() const
Computes the L2 operator norm.
Definition: MatrixBaseEigenvalues.h:122
bool isLowerTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:617
void applyOnTheRight(const EigenBase< OtherDerived > &other)
Definition: MatrixBase.h:494
LU decomposition of a matrix with partial pivoting, and related features.
Definition: ForwardDeclarations.h:247
Definition: LDLT.h:16
const Derived & forceAlignedAccess() const
Definition: MatrixBase.h:310
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Definition: NumTraits.h:107
void makeHouseholder(EssentialPart &essential, Scalar &tau, RealScalar &beta) const
Definition: Householder.h:65
Derived & setIdentity()
Definition: CwiseNullaryOp.h:779
Definition: DenseBase.h:120
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
Definition: MatrixBaseEigenvalues.h:67
Definition: DenseBase.h:107
Derived & derived()
Definition: EigenBase.h:44
const unsigned int RowMajorBit
Definition: Constants.h:53
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
const ArrayWrapper< const Derived > array() const
Definition: MatrixBase.h:327
Matrix< Scalar, 3, 1 > eulerAngles(Index a0, Index a1, Index a2) const
Definition: EulerAngles.h:37
const PartialPivLU< PlainObject > partialPivLu() const
Definition: PartialPivLU.h:508
const HNormalizedReturnType hnormalized() const
Definition: Homogeneous.h:159
BDCSVD< PlainObject > bdcSvd(unsigned int computationOptions=0) const
Definition: BDCSVD.h:1200
internal::traits< Derived >::StorageIndex StorageIndex
The type used to store indices.
Definition: DenseBase.h:69
Definition: EigenBase.h:28
void applyHouseholderOnTheLeft(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Definition: Householder.h:113
void normalize()
Definition: Dot.h:128
Expression of the inverse of another expression.
Definition: Inverse.h:45
const CwiseBinaryOp< std::equal_to< Scalar >, const Derived, const OtherDerived > cwiseEqual(const Eigen::MatrixBase< OtherDerived > &other) const
Definition: MatrixBase.h:44
RealScalar squaredNorm() const
Definition: Dot.h:88
static const BasisReturnType UnitX()
Definition: CwiseNullaryOp.h:836
Derived & operator+=(const MatrixBase< OtherDerived > &other)
Definition: CwiseBinaryOp.h:175
RealScalar blueNorm() const
Definition: StableNorm.h:200
ArrayWrapper< Derived > array()
Definition: MatrixBase.h:324
Householder rank-revealing QR decomposition of a matrix with column-pivoting.
Definition: ForwardDeclarations.h:252
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
Definition: LLT.h:50
const ScalarMultipleReturnType operator*(const Scalar &scalar) const
Definition: MatrixBase.h:57
const PlainObject normalized() const
Definition: Dot.h:114
void computeInverseAndDetWithCheck(ResultType &inverse, typename ResultType::Scalar &determinant, bool &invertible, const RealScalar &absDeterminantThreshold=NumTraits< Scalar >::dummy_precision()) const
Definition: InverseImpl.h:358
PlainObject cross3(const MatrixBase< OtherDerived > &other) const
Definition: OrthoMethods.h:78
static const BasisReturnType UnitY()
Definition: CwiseNullaryOp.h:846
void adjointInPlace()
Definition: Transpose.h:309
RealScalar stableNorm() const
Definition: StableNorm.h:157
const ColPivHouseholderQR< PlainObject > colPivHouseholderQr() const
Definition: ColPivHouseholderQR.h:594
static const BasisReturnType Unit(Index size, Index i)
Definition: CwiseNullaryOp.h:808
Index diagonalSize() const
Definition: MatrixBase.h:103
bool isIdentity(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: CwiseNullaryOp.h:722
class Bidiagonal Divide and Conquer SVD
Definition: ForwardDeclarations.h:255
Definition: Constants.h:260
Definition: DenseBase.h:113
void computeInverseWithCheck(ResultType &inverse, bool &invertible, const RealScalar &absDeterminantThreshold=NumTraits< Scalar >::dummy_precision()) const
Definition: InverseImpl.h:397
internal::conditional< internal::is_same< typename internal::traits< Derived >::XprKind, MatrixXpr >::value, PlainMatrix, PlainArray >::type PlainObject
The plain matrix or array type corresponding to this expression.
Definition: DenseBase.h:212
bool isUnitary(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: Dot.h:225
static const IdentityReturnType Identity()
Definition: CwiseNullaryOp.h:705
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:104
Derived & operator-=(const MatrixBase< OtherDerived > &other)
Definition: CwiseBinaryOp.h:162
RealScalar hypotNorm() const
Definition: StableNorm.h:212
LU decomposition of a matrix with complete pivoting, and related features.
Definition: ForwardDeclarations.h:246
void applyHouseholderOnTheRight(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Definition: Householder.h:150
const FullPivLU< PlainObject > fullPivLu() const
Definition: FullPivLU.h:772
Householder QR decomposition of a matrix.
Definition: ForwardDeclarations.h:251
bool isUpperTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:591
Two-sided Jacobi SVD decomposition of a rectangular matrix.
Definition: ForwardDeclarations.h:254
Scalar trace() const
Definition: Redux.h:502
Derived & operator=(const MatrixBase &other)
Definition: Assign.h:55
Derived & forceAlignedAccess()
Definition: MatrixBase.h:311
Derived & operator*=(const EigenBase< OtherDerived > &other)
Definition: MatrixBase.h:481
DiagonalReturnType diagonal()
Definition: Diagonal.h:188
NoAlias< Derived, Eigen::MatrixBase > noalias()
Definition: NoAlias.h:101
bool isOrthogonal(const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: Dot.h:206
Definition: Constants.h:312
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
Definition: Diagonal.h:63
const LLT< PlainObject > llt() const
Definition: LLT.h:470
void makeHouseholderInPlace(Scalar &tau, RealScalar &beta)
Definition: Householder.h:42
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:56
bool isDiagonal(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: DiagonalMatrix.h:292
const DiagonalWrapper< const Derived > asDiagonal() const
Definition: DiagonalMatrix.h:278
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:178
const AdjointReturnType adjoint() const
Definition: Transpose.h:204
const Inverse< Derived > inverse() const
Definition: InverseImpl.h:331
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
const CwiseBinaryOp< std::not_equal_to< Scalar >, const Derived, const OtherDerived > cwiseNotEqual(const Eigen::MatrixBase< OtherDerived > &other) const
Definition: MatrixBase.h:64
RealScalar norm() const
Definition: Dot.h:100
static const BasisReturnType UnitZ()
Definition: CwiseNullaryOp.h:856
const HouseholderQR< PlainObject > householderQr() const
Definition: HouseholderQR.h:381
JacobiSVD< PlainObject > jacobiSvd(unsigned int computationOptions=0) const
Definition: JacobiSVD.h:795
const FullPivHouseholderQR< PlainObject > fullPivHouseholderQr() const
Definition: FullPivHouseholderQR.h:641
const PartialPivLU< PlainObject > lu() const
Definition: PartialPivLU.h:525