OSVR-Core
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
54  typedef typename internal::traits<Derived>::StorageKind StorageKind;
55  typedef typename internal::traits<Derived>::Index Index;
56  typedef typename internal::traits<Derived>::Scalar Scalar;
58  typedef typename NumTraits<Scalar>::Real RealScalar;
59 
60  typedef DenseBase<Derived> Base;
68  using Base::Flags;
69  using Base::CoeffReadCost;
70 
71  using Base::derived;
72  using Base::const_cast_derived;
73  using Base::rows;
74  using Base::cols;
75  using Base::size;
76  using Base::coeff;
77  using Base::coeffRef;
78  using Base::lazyAssign;
79  using Base::eval;
80  using Base::operator+=;
81  using Base::operator-=;
82  using Base::operator*=;
83  using Base::operator/=;
84 
85  typedef typename Base::CoeffReturnType CoeffReturnType;
86  typedef typename Base::ConstTransposeReturnType ConstTransposeReturnType;
87  typedef typename Base::RowXpr RowXpr;
88  typedef typename Base::ColXpr ColXpr;
89 #endif // not EIGEN_PARSED_BY_DOXYGEN
90 
91 
92 
93 #ifndef EIGEN_PARSED_BY_DOXYGEN
94 
95  typedef Matrix<Scalar,EIGEN_SIZE_MAX(RowsAtCompileTime,ColsAtCompileTime),
97 #endif // not EIGEN_PARSED_BY_DOXYGEN
98 
101  inline Index diagonalSize() const { return (std::min)(rows(),cols()); }
116 
117 #ifndef EIGEN_PARSED_BY_DOXYGEN
118 
122  CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, ConstTransposeReturnType>,
123  ConstTransposeReturnType
131  internal::traits<Derived>::RowsAtCompileTime,
132  internal::traits<Derived>::ColsAtCompileTime> BasisReturnType;
133 #endif // not EIGEN_PARSED_BY_DOXYGEN
134 
135 #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::MatrixBase
136 # include "../plugins/CommonCwiseUnaryOps.h"
137 # include "../plugins/CommonCwiseBinaryOps.h"
138 # include "../plugins/MatrixCwiseUnaryOps.h"
139 # include "../plugins/MatrixCwiseBinaryOps.h"
140 # ifdef EIGEN_MATRIXBASE_PLUGIN
141 # include EIGEN_MATRIXBASE_PLUGIN
142 # endif
143 #undef EIGEN_CURRENT_STORAGE_BASE_CLASS
144 
148  Derived& operator=(const MatrixBase& other);
149 
150  // We cannot inherit here via Base::operator= since it is causing
151  // trouble with MSVC.
152 
153  template <typename OtherDerived>
154  Derived& operator=(const DenseBase<OtherDerived>& other);
155 
156  template <typename OtherDerived>
157  Derived& operator=(const EigenBase<OtherDerived>& other);
159  template<typename OtherDerived>
160  Derived& operator=(const ReturnByValue<OtherDerived>& other);
161 
162  template<typename ProductDerived, typename Lhs, typename Rhs>
163  Derived& lazyAssign(const ProductBase<ProductDerived, Lhs,Rhs>& other);
164 
165  template<typename MatrixPower, typename Lhs, typename Rhs>
166  Derived& lazyAssign(const MatrixPowerProduct<MatrixPower, Lhs,Rhs>& other);
168  template<typename OtherDerived>
169  Derived& operator+=(const MatrixBase<OtherDerived>& other);
170  template<typename OtherDerived>
171  Derived& operator-=(const MatrixBase<OtherDerived>& other);
172 
173  template<typename OtherDerived>
175  operator*(const MatrixBase<OtherDerived> &other) const;
176 
177  template<typename OtherDerived>
179  lazyProduct(const MatrixBase<OtherDerived> &other) const;
180 
181  template<typename OtherDerived>
182  Derived& operator*=(const EigenBase<OtherDerived>& other);
183 
184  template<typename OtherDerived>
185  void applyOnTheLeft(const EigenBase<OtherDerived>& other);
186 
187  template<typename OtherDerived>
188  void applyOnTheRight(const EigenBase<OtherDerived>& other);
189 
190  template<typename DiagonalDerived>
192  operator*(const DiagonalBase<DiagonalDerived> &diagonal) const;
193 
194  template<typename OtherDerived>
196  dot(const MatrixBase<OtherDerived>& other) const;
197 
198  #ifdef EIGEN2_SUPPORT
199  template<typename OtherDerived>
200  Scalar eigen2_dot(const MatrixBase<OtherDerived>& other) const;
201  #endif
202 
203  RealScalar squaredNorm() const;
204  RealScalar norm() const;
205  RealScalar stableNorm() const;
206  RealScalar blueNorm() const;
207  RealScalar hypotNorm() const;
208  const PlainObject normalized() const;
209  void normalize();
210 
211  const AdjointReturnType adjoint() const;
212  void adjointInPlace();
213 
215  DiagonalReturnType diagonal();
217  ConstDiagonalReturnType diagonal() const;
218 
219  template<int Index> struct DiagonalIndexReturnType { typedef Diagonal<Derived,Index> Type; };
220  template<int Index> struct ConstDiagonalIndexReturnType { typedef const Diagonal<const Derived,Index> Type; };
221 
222  template<int Index> typename DiagonalIndexReturnType<Index>::Type diagonal();
223  template<int Index> typename ConstDiagonalIndexReturnType<Index>::Type diagonal() const;
224 
227 
228  DiagonalDynamicIndexReturnType diagonal(Index index);
229  ConstDiagonalDynamicIndexReturnType diagonal(Index index) const;
230 
231  #ifdef EIGEN2_SUPPORT
232  template<unsigned int Mode> typename internal::eigen2_part_return_type<Derived, Mode>::type part();
233  template<unsigned int Mode> const typename internal::eigen2_part_return_type<Derived, Mode>::type part() const;
234 
235  // huuuge hack. make Eigen2's matrix.part<Diagonal>() work in eigen3. Problem: Diagonal is now a class template instead
236  // of an integer constant. Solution: overload the part() method template wrt template parameters list.
237  template<template<typename T, int N> class U>
239  { return diagonal().asDiagonal(); }
240  #endif // EIGEN2_SUPPORT
241 
242  template<unsigned int Mode> struct TriangularViewReturnType { typedef TriangularView<Derived, Mode> Type; };
243  template<unsigned int Mode> struct ConstTriangularViewReturnType { typedef const TriangularView<const Derived, Mode> Type; };
244 
245  template<unsigned int Mode> typename TriangularViewReturnType<Mode>::Type triangularView();
246  template<unsigned int Mode> typename ConstTriangularViewReturnType<Mode>::Type triangularView() const;
247 
248  template<unsigned int UpLo> struct SelfAdjointViewReturnType { typedef SelfAdjointView<Derived, UpLo> Type; };
249  template<unsigned int UpLo> struct ConstSelfAdjointViewReturnType { typedef const SelfAdjointView<const Derived, UpLo> Type; };
250 
251  template<unsigned int UpLo> typename SelfAdjointViewReturnType<UpLo>::Type selfadjointView();
252  template<unsigned int UpLo> typename ConstSelfAdjointViewReturnType<UpLo>::Type selfadjointView() const;
253 
254  const SparseView<Derived> sparseView(const Scalar& m_reference = Scalar(0),
255  const typename NumTraits<Scalar>::Real& m_epsilon = NumTraits<Scalar>::dummy_precision()) const;
256  static const IdentityReturnType Identity();
257  static const IdentityReturnType Identity(Index rows, Index cols);
258  static const BasisReturnType Unit(Index size, Index i);
259  static const BasisReturnType Unit(Index i);
260  static const BasisReturnType UnitX();
261  static const BasisReturnType UnitY();
262  static const BasisReturnType UnitZ();
263  static const BasisReturnType UnitW();
264 
266  const PermutationWrapper<const Derived> asPermutation() const;
267 
268  Derived& setIdentity();
269  Derived& setIdentity(Index rows, Index cols);
270 
271  bool isIdentity(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
272  bool isDiagonal(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
273 
274  bool isUpperTriangular(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
275  bool isLowerTriangular(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
276 
277  template<typename OtherDerived>
278  bool isOrthogonal(const MatrixBase<OtherDerived>& other,
279  const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
280  bool isUnitary(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
281 
286  template<typename OtherDerived>
287  inline bool operator==(const MatrixBase<OtherDerived>& other) const
288  { return cwiseEqual(other).all(); }
289 
294  template<typename OtherDerived>
295  inline bool operator!=(const MatrixBase<OtherDerived>& other) const
296  { return cwiseNotEqual(other).any(); }
297 
299 
300  inline const ForceAlignedAccess<Derived> forceAlignedAccess() const;
303  template<bool Enable> inline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf();
304 
305  Scalar trace() const;
306 
308 
309  template<int p> RealScalar lpNorm() const;
310 
311  MatrixBase<Derived>& matrix() { return *this; }
312  const MatrixBase<Derived>& matrix() const { return *this; }
313 
316  ArrayWrapper<Derived> array() { return derived(); }
317  const ArrayWrapper<const Derived> array() const { return derived(); }
318 
320 
321  const FullPivLU<PlainObject> fullPivLu() const;
323 
324  #if EIGEN2_SUPPORT_STAGE < STAGE20_RESOLVE_API_CONFLICTS
325  const LU<PlainObject> lu() const;
326  #endif
327 
328  #ifdef EIGEN2_SUPPORT
329  const LU<PlainObject> eigen2_lu() const;
330  #endif
331 
332  #if EIGEN2_SUPPORT_STAGE > STAGE20_RESOLVE_API_CONFLICTS
333  const PartialPivLU<PlainObject> lu() const;
334  #endif
335 
336  #ifdef EIGEN2_SUPPORT
337  template<typename ResultType>
338  void computeInverse(MatrixBase<ResultType> *result) const {
339  *result = this->inverse();
340  }
341  #endif
342 
344  template<typename ResultType>
346  ResultType& inverse,
348  bool& invertible,
349  const RealScalar& absDeterminantThreshold = NumTraits<Scalar>::dummy_precision()
350  ) const;
351  template<typename ResultType>
353  ResultType& inverse,
354  bool& invertible,
355  const RealScalar& absDeterminantThreshold = NumTraits<Scalar>::dummy_precision()
356  ) const;
357  Scalar determinant() const;
358 
360 
361  const LLT<PlainObject> llt() const;
362  const LDLT<PlainObject> ldlt() const;
363 
365 
369 
370  #ifdef EIGEN2_SUPPORT
371  const QR<PlainObject> qr() const;
372  #endif
373 
374  EigenvaluesReturnType eigenvalues() const;
375  RealScalar operatorNorm() const;
376 
378 
379  JacobiSVD<PlainObject> jacobiSvd(unsigned int computationOptions = 0) const;
380 
381  #ifdef EIGEN2_SUPPORT
382  SVD<PlainObject> svd() const;
383  #endif
384 
386 
387  #ifndef EIGEN_PARSED_BY_DOXYGEN
388  template<typename OtherDerived> struct cross_product_return_type {
392  };
393  #endif // EIGEN_PARSED_BY_DOXYGEN
394  template<typename OtherDerived>
395  typename cross_product_return_type<OtherDerived>::type
396  cross(const MatrixBase<OtherDerived>& other) const;
397  template<typename OtherDerived>
398  PlainObject cross3(const MatrixBase<OtherDerived>& other) const;
399  PlainObject unitOrthogonal(void) const;
400  Matrix<Scalar,3,1> eulerAngles(Index a0, Index a1, Index a2) const;
401 
402  #if EIGEN2_SUPPORT_STAGE > STAGE20_RESOLVE_API_CONFLICTS
404  // put this as separate enum value to work around possible GCC 4.3 bug (?)
405  enum { HomogeneousReturnTypeDirection = ColsAtCompileTime==1?Vertical:Horizontal };
406  typedef Homogeneous<Derived, HomogeneousReturnTypeDirection> HomogeneousReturnType;
407  HomogeneousReturnType homogeneous() const;
408  #endif
409 
410  enum {
411  SizeMinusOne = SizeAtCompileTime==Dynamic ? Dynamic : SizeAtCompileTime-1
412  };
413  typedef Block<const Derived,
414  internal::traits<Derived>::ColsAtCompileTime==1 ? SizeMinusOne : 1,
415  internal::traits<Derived>::ColsAtCompileTime==1 ? 1 : SizeMinusOne> ConstStartMinusOne;
417  const ConstStartMinusOne > HNormalizedReturnType;
418 
419  const HNormalizedReturnType hnormalized() const;
420 
422 
423  void makeHouseholderInPlace(Scalar& tau, RealScalar& beta);
424  template<typename EssentialPart>
425  void makeHouseholder(EssentialPart& essential,
426  Scalar& tau, RealScalar& beta) const;
427  template<typename EssentialPart>
428  void applyHouseholderOnTheLeft(const EssentialPart& essential,
429  const Scalar& tau,
430  Scalar* workspace);
431  template<typename EssentialPart>
432  void applyHouseholderOnTheRight(const EssentialPart& essential,
433  const Scalar& tau,
434  Scalar* workspace);
435 
437 
438  template<typename OtherScalar>
439  void applyOnTheLeft(Index p, Index q, const JacobiRotation<OtherScalar>& j);
440  template<typename OtherScalar>
441  void applyOnTheRight(Index p, Index q, const JacobiRotation<OtherScalar>& j);
442 
444 
445  template<typename OtherDerived>
446  EIGEN_STRONG_INLINE const typename SparseMatrixBase<OtherDerived>::template CwiseProductDenseReturnType<Derived>::Type
447  cwiseProduct(const SparseMatrixBase<OtherDerived> &other) const
448  {
449  return other.cwiseProduct(derived());
450  }
451 
453 
454  typedef typename internal::stem_function<Scalar>::type StemFunction;
455  const MatrixExponentialReturnValue<Derived> exp() const;
456  const MatrixFunctionReturnValue<Derived> matrixFunction(StemFunction f) const;
457  const MatrixFunctionReturnValue<Derived> cosh() const;
458  const MatrixFunctionReturnValue<Derived> sinh() const;
459  const MatrixFunctionReturnValue<Derived> cos() const;
460  const MatrixFunctionReturnValue<Derived> sin() const;
461  const MatrixSquareRootReturnValue<Derived> sqrt() const;
462  const MatrixLogarithmReturnValue<Derived> log() const;
463  const MatrixPowerReturnValue<Derived> pow(const RealScalar& p) const;
464 
465 #ifdef EIGEN2_SUPPORT
466  template<typename ProductDerived, typename Lhs, typename Rhs>
467  Derived& operator+=(const Flagged<ProductBase<ProductDerived, Lhs,Rhs>, 0,
468  EvalBeforeAssigningBit>& other);
469 
470  template<typename ProductDerived, typename Lhs, typename Rhs>
471  Derived& operator-=(const Flagged<ProductBase<ProductDerived, Lhs,Rhs>, 0,
472  EvalBeforeAssigningBit>& other);
473 
476  template<typename OtherDerived>
477  Derived& lazyAssign(const Flagged<OtherDerived, 0, EvalBeforeAssigningBit>& other)
478  { return lazyAssign(other._expression()); }
479 
480  template<unsigned int Added>
481  const Flagged<Derived, Added, 0> marked() const;
483 
484  inline const Cwise<Derived> cwise() const;
485  inline Cwise<Derived> cwise();
486 
487  VectorBlock<Derived> start(Index size);
488  const VectorBlock<const Derived> start(Index size) const;
489  VectorBlock<Derived> end(Index size);
490  const VectorBlock<const Derived> end(Index size) const;
491  template<int Size> VectorBlock<Derived,Size> start();
492  template<int Size> const VectorBlock<const Derived,Size> start() const;
493  template<int Size> VectorBlock<Derived,Size> end();
494  template<int Size> const VectorBlock<const Derived,Size> end() const;
495 
496  Minor<Derived> minor(Index row, Index col);
497  const Minor<Derived> minor(Index row, Index col) const;
498 #endif
499 
500  protected:
501  MatrixBase() : Base() {}
502 
503  private:
504  explicit MatrixBase(int);
505  MatrixBase(int,int);
506  template<typename OtherDerived> explicit MatrixBase(const MatrixBase<OtherDerived>&);
507  protected:
508  // mixing arrays and matrices is not legal
509  template<typename OtherDerived> Derived& operator+=(const ArrayBase<OtherDerived>& )
510  {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}
511  // mixing arrays and matrices is not legal
512  template<typename OtherDerived> Derived& operator-=(const ArrayBase<OtherDerived>& )
513  {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}
514 };
515 
516 
517 /***************************************************************************
518 * Implementation of matrix base methods
519 ***************************************************************************/
520 
528 template<typename Derived>
529 template<typename OtherDerived>
530 inline Derived&
532 {
533  other.derived().applyThisOnTheRight(derived());
534  return derived();
535 }
536 
542 template<typename Derived>
543 template<typename OtherDerived>
545 {
546  other.derived().applyThisOnTheRight(derived());
547 }
548 
554 template<typename Derived>
555 template<typename OtherDerived>
557 {
558  other.derived().applyThisOnTheLeft(derived());
559 }
560 
561 } // end namespace Eigen
562 
563 #endif // EIGEN_MATRIXBASE_H
const LazyProductReturnType< Derived, OtherDerived >::Type lazyProduct(const MatrixBase< OtherDerived > &other) const
Definition: GeneralProduct.h:615
Expression of the product of two general matrices or vectors.
Definition: GeneralProduct.h:36
Generic expression of a matrix where all coefficients are defined by a functor.
Definition: CwiseNullaryOp.h:49
Robust Cholesky decomposition of a matrix with pivoting.
Definition: LDLT.h:48
Definition: ForwardDeclarations.h:277
ColXpr col(Index i)
Definition: DenseBase.h:733
void makeHouseholder(EssentialPart &essential, Scalar &tau, RealScalar &beta) const
Computes the elementary reflector H such that: where the transformation H is: and the vector v is: ...
Definition: Householder.h:65
Enforce aligned packet loads and stores regardless of what is requested.
Definition: ForceAlignedAccess.h:34
RealScalar blueNorm() const
Definition: StableNorm.h:184
static const BasisReturnType UnitW()
Definition: CwiseNullaryOp.h:859
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:223
const AdjointReturnType adjoint() const
Definition: Transpose.h:237
const CwiseBinaryOp< std::equal_to< Scalar >, const Derived, const OtherDerived > cwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
Definition: MatrixBase.h:42
const CwiseBinaryOp< std::not_equal_to< Scalar >, const Derived, const OtherDerived > cwiseNotEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
Definition: MatrixBase.h:61
Expression with modified flags.
Definition: Flagged.h:39
void applyOnTheLeft(const EigenBase< OtherDerived > &other)
replaces *this by other * *this.
Definition: MatrixBase.h:556
For Reverse, all columns are reversed; for PartialReduxExpr and VectorwiseOp, act on columns...
Definition: Constants.h:209
Definition: LU.h:16
Derived & setIdentity()
Writes the identity expression (not necessarily square) into *this.
Definition: CwiseNullaryOp.h:772
Pseudo expression providing an operator = assuming no aliasing.
Definition: NoAlias.h:31
internal::traits< Derived >::Index Index
The type of indices.
Definition: DenseBase.h:60
const HNormalizedReturnType hnormalized() const
Definition: Homogeneous.h:158
Proxy for the matrix square root of some matrix (expression).
Definition: ForwardDeclarations.h:274
Definition: ProductBase.h:63
Expression of the transpose of a matrix.
Definition: Transpose.h:57
DiagonalReturnType diagonal()
Definition: Diagonal.h:168
bool isUnitary(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: Dot.h:247
This is a rough measure of how expensive it is to read one coefficient from this expression.
Definition: DenseBase.h:172
const ColPivHouseholderQR< PlainObject > colPivHouseholderQr() const
Definition: ColPivHouseholderQR.h:573
void applyOnTheRight(const EigenBase< OtherDerived > &other)
replaces *this by *this * other.
Definition: MatrixBase.h:544
Scalar trace() const
Definition: Redux.h:402
LU decomposition of a matrix with partial pivoting, and related features.
Definition: ForwardDeclarations.h:217
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
Definition: ForwardDeclarations.h:228
This is set to true if either the number of rows or the number of columns is known at compile-time to...
Definition: DenseBase.h:155
Holds information about the various numeric (i.e.
Definition: NumTraits.h:88
RowXpr row(Index i)
Definition: DenseBase.h:750
const PlainObject normalized() const
Definition: Dot.h:139
const internal::permut_matrix_product_retval< PermutationDerived, Derived, OnTheRight > operator*(const MatrixBase< Derived > &matrix, const PermutationBase< PermutationDerived > &permutation)
Definition: PermutationMatrix.h:539
Definition: Meta.h:29
Matrix< Scalar, 3, 1 > eulerAngles(Index a0, Index a1, Index a2) const
Definition: EulerAngles.h:37
Derived & derived()
Definition: EigenBase.h:34
static const BasisReturnType UnitY()
Definition: CwiseNullaryOp.h:839
RealScalar stableNorm() const
Definition: StableNorm.h:153
This is equal to the number of coefficients, i.e.
Definition: DenseBase.h:115
const FullPivLU< PlainObject > fullPivLu() const
Definition: FullPivLU.h:744
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:53
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
PlainObject unitOrthogonal(void) const
Definition: OrthoMethods.h:210
Proxy for the matrix function of some matrix (expression).
Definition: ForwardDeclarations.h:273
RealScalar squaredNorm() const
Definition: Dot.h:113
Common base class for all classes T such that MatrixBase has an operator=(T) and a constructor Matrix...
Definition: EigenBase.h:26
void applyHouseholderOnTheLeft(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Apply the elementary reflector H given by with from the left to a vector or matrix.
Definition: Householder.h:112
Definition: ReturnByValue.h:50
void computeInverseAndDetWithCheck(ResultType &inverse, typename ResultType::Scalar &determinant, bool &invertible, const RealScalar &absDeterminantThreshold=NumTraits< Scalar >::dummy_precision()) const
Definition: Inverse.h:347
void normalize()
Normalizes the vector, i.e.
Definition: Dot.h:154
RealScalar norm() const
Definition: Dot.h:125
bool operator!=(const MatrixBase< OtherDerived > &other) const
Definition: MatrixBase.h:295
EIGEN_STRONG_INLINE EvalReturnType eval() const
Definition: DenseBase.h:360
bool isUpperTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:791
detail::size< coerce_list< Ts... >> size
Get the size of a list (number of elements.)
Definition: Size.h:56
This stores expression Flags flags which may or may not be inherited by new expressions constructed f...
Definition: DenseBase.h:162
Expression of a fixed-size or dynamic-size sub-vector.
Definition: ForwardDeclarations.h:83
const ForceAlignedAccess< Derived > forceAlignedAccess() const
Definition: ForceAlignedAccess.h:107
Base class of any sparse matrices or sparse expressions.
Definition: ForwardDeclarations.h:239
Storage order is column major (see TopicStorageOrders).
Definition: Constants.h:264
Pseudo expression providing additional coefficient-wise operations.
Definition: Cwise.h:50
JacobiSVD< PlainObject > jacobiSvd(unsigned int computationOptions=0) const
Definition: JacobiSVD.h:969
Definition: XprHelper.h:371
ArrayWrapper< Derived > array()
Definition: MatrixBase.h:316
PlainObject cross3(const MatrixBase< OtherDerived > &other) const
Definition: OrthoMethods.h:74
Householder rank-revealing QR decomposition of a matrix with column-pivoting.
Definition: ForwardDeclarations.h:222
const internal::inverse_impl< Derived > inverse() const
Definition: Inverse.h:320
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
Definition: LLT.h:50
internal::add_const_on_value_type< typename internal::conditional< Enable, ForceAlignedAccess< Derived >, Derived & >::type >::type forceAlignedAccessIf() const
Definition: ForceAlignedAccess.h:128
const HouseholderQR< PlainObject > householderQr() const
Definition: HouseholderQR.h:381
Definition: SVD.h:30
bool isDiagonal(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: DiagonalMatrix.h:292
Definition: Scaling.h:33
Expression of a minor.
Definition: Minor.h:53
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition: SelfAdjointView.h:53
Definition: ForwardDeclarations.h:116
const DiagonalWrapper< const Derived > asDiagonal() const
Definition: DiagonalMatrix.h:278
Definition: ForwardDeclarations.h:219
Definition: MatrixBase.h:219
Base class for all 1D and 2D array, and related expressions.
Definition: ArrayBase.h:39
Class to view a vector of integers as a permutation matrix.
Definition: PermutationMatrix.h:512
static const BasisReturnType UnitZ()
Definition: CwiseNullaryOp.h:849
const unsigned int EvalBeforeAssigningBit
means the expression should be evaluated before any assignment
Definition: Constants.h:63
void adjointInPlace()
This is the "in place" version of adjoint(): it replaces *this by its own transpose.
Definition: Transpose.h:323
Definition: CoeffBasedProduct.h:114
Definition: ForwardDeclarations.h:281
const PartialPivLU< PlainObject > partialPivLu() const
Definition: PartialPivLU.h:485
const LDLT< PlainObject > ldlt() const
Definition: LDLT.h:604
For Reverse, all rows are reversed; for PartialReduxExpr and VectorwiseOp, act on rows...
Definition: Constants.h:212
Definition: DiagonalProduct.h:45
static const IdentityReturnType Identity()
Definition: CwiseNullaryOp.h:700
Definition: QR.h:17
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:817
Storage order is row major (see TopicStorageOrders).
Definition: Constants.h:266
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:103
LU decomposition of a matrix with complete pivoting, and related features.
Definition: ForwardDeclarations.h:216
The number of columns at compile-time.
Definition: DenseBase.h:108
void applyHouseholderOnTheRight(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Apply the elementary reflector H given by with from the right to a vector or matrix.
Definition: Householder.h:149
Householder QR decomposition of a matrix.
Definition: ForwardDeclarations.h:221
Definition: DiagonalMatrix.h:18
Definition: Meta.h:71
Two-sided Jacobi SVD decomposition of a rectangular matrix.
Definition: ForwardDeclarations.h:224
Base class for triangular part in a matrix.
Definition: TriangularMatrix.h:158
Expression of a diagonal matrix.
Definition: DiagonalMatrix.h:248
const LLT< PlainObject > llt() const
Definition: LLT.h:481
Proxy for the matrix exponential of some matrix (expression).
Definition: ForwardDeclarations.h:272
Derived & operator*=(const EigenBase< OtherDerived > &other)
replaces *this by *this * other.
Definition: MatrixBase.h:531
NoAlias< Derived, Eigen::MatrixBase > noalias()
Definition: NoAlias.h:127
bool isOrthogonal(const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: Dot.h:228
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
Definition: Diagonal.h:64
internal::scalar_product_traits< typename internal::traits< Derived >::Scalar, typename internal::traits< OtherDerived >::Scalar >::ReturnType dot(const MatrixBase< OtherDerived > &other) const
Definition: Dot.h:63
void makeHouseholderInPlace(Scalar &tau, RealScalar &beta)
Computes the elementary reflector H such that: where the transformation H is: and the vector v is: ...
Definition: Householder.h:42
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time, and that instead the value is stored in some runtime variable.
Definition: Constants.h:21
bool isIdentity(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: CwiseNullaryOp.h:717
static const BasisReturnType UnitX()
Definition: CwiseNullaryOp.h:829
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:59
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:127
void computeInverseWithCheck(ResultType &inverse, bool &invertible, const RealScalar &absDeterminantThreshold=NumTraits< Scalar >::dummy_precision()) const
Definition: Inverse.h:386
Definition: Meta.h:25
This value is equal to the maximum possible number of coefficients that this expression might have...
Definition: DenseBase.h:143
bool operator==(const MatrixBase< OtherDerived > &other) const
Definition: MatrixBase.h:287
Index diagonalSize() const
Definition: MatrixBase.h:101
Derived & operator=(const MatrixBase &other)
Special case of the template operator=, in order to prevent the compiler from generating a default op...
Definition: Assign.h:562
const FullPivHouseholderQR< PlainObject > fullPivHouseholderQr() const
Definition: FullPivHouseholderQR.h:615
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
Definition: MatrixBaseEigenvalues.h:67
Proxy for the matrix power of some matrix (expression).
Definition: ForwardDeclarations.h:276
static const BasisReturnType Unit(Index size, Index i)
Definition: CwiseNullaryOp.h:801
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
This value is equal to the maximum possible number of rows that this expression might have...
Definition: DenseBase.h:121
Definition: ForwardDeclarations.h:17
Scalar determinant() const
Definition: Determinant.h:92
Proxy for the matrix logarithm of some matrix (expression).
Definition: ForwardDeclarations.h:275
Align the matrix itself if it is vectorizable fixed-size.
Definition: Constants.h:268
double Scalar
Common scalar type.
Definition: FlexibleKalmanBase.h:48
Matrix< Scalar, EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime), EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime)> SquareMatrixType
type of the equivalent square matrix
Definition: MatrixBase.h:96
The number of rows at compile-time.
Definition: DenseBase.h:102
Definition: Homogeneous.h:61
RealScalar hypotNorm() const
Definition: StableNorm.h:196
This value is equal to the maximum possible number of columns that this expression might have...
Definition: DenseBase.h:132