Eigen  3.3.90 (mercurial changeset b7a5520e097f)
DenseBase.h
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2007-2010 Benoit Jacob <jacob.benoit.1@gmail.com>
5 // Copyright (C) 2008-2010 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_DENSEBASE_H
12 #define EIGEN_DENSEBASE_H
13 
14 namespace Eigen {
15 
16 namespace internal {
17 
18 // The index type defined by EIGEN_DEFAULT_DENSE_INDEX_TYPE must be a signed type.
19 // This dummy function simply aims at checking that at compile time.
20 static inline void check_DenseIndex_is_signed() {
21  EIGEN_STATIC_ASSERT(NumTraits<DenseIndex>::IsSigned,THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE);
22 }
23 
24 } // end namespace internal
25 
41 template<typename Derived> class DenseBase
42 #ifndef EIGEN_PARSED_BY_DOXYGEN
43  : public DenseCoeffsBase<Derived>
44 #else
45  : public DenseCoeffsBase<Derived,DirectWriteAccessors>
46 #endif // not EIGEN_PARSED_BY_DOXYGEN
47 {
48  public:
49 
53  typedef Eigen::InnerIterator<Derived> InnerIterator;
54 
55  typedef typename internal::traits<Derived>::StorageKind StorageKind;
56 
63  typedef typename internal::traits<Derived>::StorageIndex StorageIndex;
64 
66  typedef typename internal::traits<Derived>::Scalar Scalar;
67 
71  typedef Scalar value_type;
72 
73  typedef typename NumTraits<Scalar>::Real RealScalar;
74  typedef DenseCoeffsBase<Derived> Base;
75 
76  using Base::derived;
77  using Base::const_cast_derived;
78  using Base::rows;
79  using Base::cols;
80  using Base::size;
81  using Base::rowIndexByOuterInner;
82  using Base::colIndexByOuterInner;
83  using Base::coeff;
84  using Base::coeffByOuterInner;
85  using Base::operator();
86  using Base::operator[];
87  using Base::x;
88  using Base::y;
89  using Base::z;
90  using Base::w;
91  using Base::stride;
92  using Base::innerStride;
93  using Base::outerStride;
94  using Base::rowStride;
95  using Base::colStride;
96  typedef typename Base::CoeffReturnType CoeffReturnType;
97 
98  enum {
99 
100  RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
106  ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
113  SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,
114  internal::traits<Derived>::ColsAtCompileTime>::ret),
119  MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,
130  MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,
141  MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,
142  internal::traits<Derived>::MaxColsAtCompileTime>::ret),
153  IsVectorAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime == 1
154  || internal::traits<Derived>::MaxColsAtCompileTime == 1,
160  NumDimensions = int(MaxSizeAtCompileTime) == 1 ? 0 : bool(IsVectorAtCompileTime) ? 1 : 2,
165  Flags = internal::traits<Derived>::Flags,
170  IsRowMajor = int(Flags) & RowMajorBit,
172  InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? int(SizeAtCompileTime)
173  : int(IsRowMajor) ? int(ColsAtCompileTime) : int(RowsAtCompileTime),
174 
175  InnerStrideAtCompileTime = internal::inner_stride_at_compile_time<Derived>::ret,
176  OuterStrideAtCompileTime = internal::outer_stride_at_compile_time<Derived>::ret
177  };
178 
179  typedef typename internal::find_best_packet<Scalar,SizeAtCompileTime>::type PacketScalar;
180 
181  enum { IsPlainObjectBase = 0 };
182 
186  internal::traits<Derived>::RowsAtCompileTime,
187  internal::traits<Derived>::ColsAtCompileTime,
188  AutoAlign | (internal::traits<Derived>::Flags&RowMajorBit ? RowMajor : ColMajor),
189  internal::traits<Derived>::MaxRowsAtCompileTime,
190  internal::traits<Derived>::MaxColsAtCompileTime
192 
196  internal::traits<Derived>::RowsAtCompileTime,
197  internal::traits<Derived>::ColsAtCompileTime,
198  AutoAlign | (internal::traits<Derived>::Flags&RowMajorBit ? RowMajor : ColMajor),
199  internal::traits<Derived>::MaxRowsAtCompileTime,
200  internal::traits<Derived>::MaxColsAtCompileTime
202 
209  typedef typename internal::conditional<internal::is_same<typename internal::traits<Derived>::XprKind,MatrixXpr >::value,
211 
214  EIGEN_DEVICE_FUNC
215  inline Index nonZeros() const { return size(); }
216 
222  EIGEN_DEVICE_FUNC
223  Index outerSize() const
224  {
225  return IsVectorAtCompileTime ? 1
226  : int(IsRowMajor) ? this->rows() : this->cols();
227  }
228 
234  EIGEN_DEVICE_FUNC
235  Index innerSize() const
236  {
237  return IsVectorAtCompileTime ? this->size()
238  : int(IsRowMajor) ? this->cols() : this->rows();
239  }
240 
245  EIGEN_DEVICE_FUNC
246  void resize(Index newSize)
247  {
248  EIGEN_ONLY_USED_FOR_DEBUG(newSize);
249  eigen_assert(newSize == this->size()
250  && "DenseBase::resize() does not actually allow to resize.");
251  }
256  EIGEN_DEVICE_FUNC
257  void resize(Index rows, Index cols)
258  {
259  EIGEN_ONLY_USED_FOR_DEBUG(rows);
260  EIGEN_ONLY_USED_FOR_DEBUG(cols);
261  eigen_assert(rows == this->rows() && cols == this->cols()
262  && "DenseBase::resize() does not actually allow to resize.");
263  }
264 
265 #ifndef EIGEN_PARSED_BY_DOXYGEN
266 
267  typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,PlainObject> ConstantReturnType;
269  typedef CwiseNullaryOp<internal::linspaced_op<Scalar,PacketScalar>,PlainObject> SequentialLinSpacedReturnType;
271  typedef CwiseNullaryOp<internal::linspaced_op<Scalar,PacketScalar>,PlainObject> RandomAccessLinSpacedReturnType;
273  typedef Matrix<typename NumTraits<typename internal::traits<Derived>::Scalar>::Real, internal::traits<Derived>::ColsAtCompileTime, 1> EigenvaluesReturnType;
274 
275 #endif // not EIGEN_PARSED_BY_DOXYGEN
276 
278  template<typename OtherDerived>
279  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
280  Derived& operator=(const DenseBase<OtherDerived>& other);
285  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
286  Derived& operator=(const DenseBase& other);
287 
288  template<typename OtherDerived>
289  EIGEN_DEVICE_FUNC
290  Derived& operator=(const EigenBase<OtherDerived> &other);
291 
292  template<typename OtherDerived>
293  EIGEN_DEVICE_FUNC
294  Derived& operator+=(const EigenBase<OtherDerived> &other);
295 
296  template<typename OtherDerived>
297  EIGEN_DEVICE_FUNC
298  Derived& operator-=(const EigenBase<OtherDerived> &other);
299 
300  template<typename OtherDerived>
301  EIGEN_DEVICE_FUNC
302  Derived& operator=(const ReturnByValue<OtherDerived>& func);
303 
307  template<typename OtherDerived>
308  EIGEN_DEVICE_FUNC
309  Derived& lazyAssign(const DenseBase<OtherDerived>& other);
310 
311  EIGEN_DEVICE_FUNC
312  CommaInitializer<Derived> operator<< (const Scalar& s);
313 
315  template<unsigned int Added,unsigned int Removed>
316  EIGEN_DEPRECATED
317  const Derived& flagged() const
318  { return derived(); }
319 
320  template<typename OtherDerived>
321  EIGEN_DEVICE_FUNC
322  CommaInitializer<Derived> operator<< (const DenseBase<OtherDerived>& other);
323 
325  EIGEN_DEVICE_FUNC
326  TransposeReturnType transpose();
327  typedef typename internal::add_const<Transpose<const Derived> >::type ConstTransposeReturnType;
328  EIGEN_DEVICE_FUNC
329  ConstTransposeReturnType transpose() const;
330  EIGEN_DEVICE_FUNC
331  void transposeInPlace();
332 
333  EIGEN_DEVICE_FUNC static const ConstantReturnType
334  Constant(Index rows, Index cols, const Scalar& value);
335  EIGEN_DEVICE_FUNC static const ConstantReturnType
336  Constant(Index size, const Scalar& value);
337  EIGEN_DEVICE_FUNC static const ConstantReturnType
338  Constant(const Scalar& value);
339 
340  EIGEN_DEVICE_FUNC static const SequentialLinSpacedReturnType
341  LinSpaced(Sequential_t, Index size, const Scalar& low, const Scalar& high);
342  EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType
343  LinSpaced(Index size, const Scalar& low, const Scalar& high);
344  EIGEN_DEVICE_FUNC static const SequentialLinSpacedReturnType
345  LinSpaced(Sequential_t, const Scalar& low, const Scalar& high);
346  EIGEN_DEVICE_FUNC static const RandomAccessLinSpacedReturnType
347  LinSpaced(const Scalar& low, const Scalar& high);
348 
349  template<typename CustomNullaryOp> EIGEN_DEVICE_FUNC
351  NullaryExpr(Index rows, Index cols, const CustomNullaryOp& func);
352  template<typename CustomNullaryOp> EIGEN_DEVICE_FUNC
354  NullaryExpr(Index size, const CustomNullaryOp& func);
355  template<typename CustomNullaryOp> EIGEN_DEVICE_FUNC
357  NullaryExpr(const CustomNullaryOp& func);
358 
359  EIGEN_DEVICE_FUNC static const ConstantReturnType Zero(Index rows, Index cols);
360  EIGEN_DEVICE_FUNC static const ConstantReturnType Zero(Index size);
361  EIGEN_DEVICE_FUNC static const ConstantReturnType Zero();
362  EIGEN_DEVICE_FUNC static const ConstantReturnType Ones(Index rows, Index cols);
363  EIGEN_DEVICE_FUNC static const ConstantReturnType Ones(Index size);
364  EIGEN_DEVICE_FUNC static const ConstantReturnType Ones();
365 
366  EIGEN_DEVICE_FUNC void fill(const Scalar& value);
367  EIGEN_DEVICE_FUNC Derived& setConstant(const Scalar& value);
368  EIGEN_DEVICE_FUNC Derived& setLinSpaced(Index size, const Scalar& low, const Scalar& high);
369  EIGEN_DEVICE_FUNC Derived& setLinSpaced(const Scalar& low, const Scalar& high);
370  EIGEN_DEVICE_FUNC Derived& setZero();
371  EIGEN_DEVICE_FUNC Derived& setOnes();
372  EIGEN_DEVICE_FUNC Derived& setRandom();
373 
374  template<typename OtherDerived> EIGEN_DEVICE_FUNC
375  bool isApprox(const DenseBase<OtherDerived>& other,
376  const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
377  EIGEN_DEVICE_FUNC
378  bool isMuchSmallerThan(const RealScalar& other,
379  const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
380  template<typename OtherDerived> EIGEN_DEVICE_FUNC
381  bool isMuchSmallerThan(const DenseBase<OtherDerived>& other,
382  const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
383 
384  EIGEN_DEVICE_FUNC bool isApproxToConstant(const Scalar& value, const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
385  EIGEN_DEVICE_FUNC bool isConstant(const Scalar& value, const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
386  EIGEN_DEVICE_FUNC bool isZero(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
387  EIGEN_DEVICE_FUNC bool isOnes(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
388 
389  inline bool hasNaN() const;
390  inline bool allFinite() const;
391 
392  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
393  Derived& operator*=(const Scalar& other);
394  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
395  Derived& operator/=(const Scalar& other);
396 
397  typedef typename internal::add_const_on_value_type<typename internal::eval<Derived>::type>::type EvalReturnType;
405  EIGEN_DEVICE_FUNC
406  EIGEN_STRONG_INLINE EvalReturnType eval() const
407  {
408  // Even though MSVC does not honor strong inlining when the return type
409  // is a dynamic matrix, we desperately need strong inlining for fixed
410  // size types on MSVC.
411  return typename internal::eval<Derived>::type(derived());
412  }
413 
417  template<typename OtherDerived>
418  EIGEN_DEVICE_FUNC
419  void swap(const DenseBase<OtherDerived>& other)
420  {
421  EIGEN_STATIC_ASSERT(!OtherDerived::IsPlainObjectBase,THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY);
422  eigen_assert(rows()==other.rows() && cols()==other.cols());
423  call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
424  }
425 
429  template<typename OtherDerived>
430  EIGEN_DEVICE_FUNC
432  {
433  eigen_assert(rows()==other.rows() && cols()==other.cols());
434  call_assignment(derived(), other.derived(), internal::swap_assign_op<Scalar>());
435  }
436 
437  EIGEN_DEVICE_FUNC inline const NestByValue<Derived> nestByValue() const;
438  EIGEN_DEVICE_FUNC inline const ForceAlignedAccess<Derived> forceAlignedAccess() const;
439  EIGEN_DEVICE_FUNC inline ForceAlignedAccess<Derived> forceAlignedAccess();
440  template<bool Enable> EIGEN_DEVICE_FUNC
441  inline const typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf() const;
442  template<bool Enable> EIGEN_DEVICE_FUNC
443  inline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf();
444 
445  EIGEN_DEVICE_FUNC Scalar sum() const;
446  EIGEN_DEVICE_FUNC Scalar mean() const;
447  EIGEN_DEVICE_FUNC Scalar trace() const;
448 
449  EIGEN_DEVICE_FUNC Scalar prod() const;
450 
451  EIGEN_DEVICE_FUNC typename internal::traits<Derived>::Scalar minCoeff() const;
452  EIGEN_DEVICE_FUNC typename internal::traits<Derived>::Scalar maxCoeff() const;
453 
454  template<typename IndexType> EIGEN_DEVICE_FUNC
455  typename internal::traits<Derived>::Scalar minCoeff(IndexType* row, IndexType* col) const;
456  template<typename IndexType> EIGEN_DEVICE_FUNC
457  typename internal::traits<Derived>::Scalar maxCoeff(IndexType* row, IndexType* col) const;
458  template<typename IndexType> EIGEN_DEVICE_FUNC
459  typename internal::traits<Derived>::Scalar minCoeff(IndexType* index) const;
460  template<typename IndexType> EIGEN_DEVICE_FUNC
461  typename internal::traits<Derived>::Scalar maxCoeff(IndexType* index) const;
462 
463  template<typename BinaryOp>
464  EIGEN_DEVICE_FUNC
465  Scalar redux(const BinaryOp& func) const;
466 
467  template<typename Visitor>
468  EIGEN_DEVICE_FUNC
469  void visit(Visitor& func) const;
470 
478  inline const WithFormat<Derived> format(const IOFormat& fmt) const
479  {
480  return WithFormat<Derived>(derived(), fmt);
481  }
482 
484  EIGEN_DEVICE_FUNC
485  CoeffReturnType value() const
486  {
487  EIGEN_STATIC_ASSERT_SIZE_1x1(Derived)
488  eigen_assert(this->rows() == 1 && this->cols() == 1);
489  return derived().coeff(0,0);
490  }
491 
492  EIGEN_DEVICE_FUNC bool all() const;
493  EIGEN_DEVICE_FUNC bool any() const;
494  EIGEN_DEVICE_FUNC Index count() const;
495 
500 
508  //Code moved here due to a CUDA compiler bug
509  EIGEN_DEVICE_FUNC inline ConstRowwiseReturnType rowwise() const {
510  return ConstRowwiseReturnType(derived());
511  }
512  EIGEN_DEVICE_FUNC RowwiseReturnType rowwise();
513 
521  EIGEN_DEVICE_FUNC inline ConstColwiseReturnType colwise() const {
522  return ConstColwiseReturnType(derived());
523  }
524  EIGEN_DEVICE_FUNC ColwiseReturnType colwise();
525 
527  static const RandomReturnType Random(Index rows, Index cols);
528  static const RandomReturnType Random(Index size);
529  static const RandomReturnType Random();
530 
531  template<typename ThenDerived,typename ElseDerived>
533  select(const DenseBase<ThenDerived>& thenMatrix,
534  const DenseBase<ElseDerived>& elseMatrix) const;
535 
536  template<typename ThenDerived>
538  select(const DenseBase<ThenDerived>& thenMatrix, const typename ThenDerived::Scalar& elseScalar) const;
539 
540  template<typename ElseDerived>
542  select(const typename ElseDerived::Scalar& thenScalar, const DenseBase<ElseDerived>& elseMatrix) const;
543 
544  template<int p> RealScalar lpNorm() const;
545 
546  template<int RowFactor, int ColFactor>
547  EIGEN_DEVICE_FUNC
548  const Replicate<Derived,RowFactor,ColFactor> replicate() const;
557  //Code moved here due to a CUDA compiler bug
558  EIGEN_DEVICE_FUNC
559  const Replicate<Derived, Dynamic, Dynamic> replicate(Index rowFactor, Index colFactor) const
560  {
561  return Replicate<Derived, Dynamic, Dynamic>(derived(), rowFactor, colFactor);
562  }
566  EIGEN_DEVICE_FUNC ReverseReturnType reverse();
568  //Code moved here due to a CUDA compiler bug
569  EIGEN_DEVICE_FUNC ConstReverseReturnType reverse() const
570  {
571  return ConstReverseReturnType(derived());
572  }
573  EIGEN_DEVICE_FUNC void reverseInPlace();
574 
575 #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::DenseBase
576 #define EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
577 #define EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(COND)
578 #define EIGEN_DOC_UNARY_ADDONS(X,Y)
579 # include "../plugins/CommonCwiseUnaryOps.h"
580 # include "../plugins/BlockMethods.h"
581 # include "../plugins/IndexedViewMethods.h"
582 # ifdef EIGEN_DENSEBASE_PLUGIN
583 # include EIGEN_DENSEBASE_PLUGIN
584 # endif
585 #undef EIGEN_CURRENT_STORAGE_BASE_CLASS
586 #undef EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
587 #undef EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF
588 #undef EIGEN_DOC_UNARY_ADDONS
589 
590  // disable the use of evalTo for dense objects with a nice compilation error
591  template<typename Dest>
592  EIGEN_DEVICE_FUNC
593  inline void evalTo(Dest& ) const
594  {
595  EIGEN_STATIC_ASSERT((internal::is_same<Dest,void>::value),THE_EVAL_EVALTO_FUNCTION_SHOULD_NEVER_BE_CALLED_FOR_DENSE_OBJECTS);
596  }
597 
598  protected:
600  EIGEN_DEVICE_FUNC DenseBase()
601  {
602  /* Just checks for self-consistency of the flags.
603  * Only do it when debugging Eigen, as this borders on paranoiac and could slow compilation down
604  */
605 #ifdef EIGEN_INTERNAL_DEBUGGING
606  EIGEN_STATIC_ASSERT((EIGEN_IMPLIES(MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1, int(IsRowMajor))
607  && EIGEN_IMPLIES(MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1, int(!IsRowMajor))),
608  INVALID_STORAGE_ORDER_FOR_THIS_VECTOR_EXPRESSION)
609 #endif
610  }
611 
612  private:
613  EIGEN_DEVICE_FUNC explicit DenseBase(int);
614  EIGEN_DEVICE_FUNC DenseBase(int,int);
615  template<typename OtherDerived> EIGEN_DEVICE_FUNC explicit DenseBase(const DenseBase<OtherDerived>&);
616 };
617 
618 } // end namespace Eigen
619 
620 #endif // EIGEN_DENSEBASE_H
Generic expression of a matrix where all coefficients are defined by a functor.
Definition: CwiseNullaryOp.h:60
const Replicate< Derived, Dynamic, Dynamic > replicate(Index rowFactor, Index colFactor) const
Definition: DenseBase.h:559
static const Eigen::internal::all_t all
Definition: IndexedViewHelper.h:181
ConstReverseReturnType reverse() const
Definition: DenseBase.h:569
Index innerSize() const
Definition: DenseBase.h:235
Enforce aligned packet loads and stores regardless of what is requested.
Definition: ForceAlignedAccess.h:34
internal::traits< Derived >::Scalar Scalar
Definition: DenseBase.h:66
Definition: Constants.h:324
Expression of the transpose of a matrix.
Definition: Transpose.h:52
Namespace containing all symbols from the Eigen library.
Definition: Core:340
Scalar value_type
Definition: DenseBase.h:71
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Definition: NumTraits.h:190
Pseudo expression providing partial reduction operations.
Definition: ForwardDeclarations.h:246
const WithFormat< Derived > format(const IOFormat &fmt) const
Definition: DenseBase.h:478
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:38
const unsigned int RowMajorBit
Definition: Constants.h:65
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
void resize(Index newSize)
Definition: DenseBase.h:246
Helper class used by the comma initializer operator.
Definition: CommaInitializer.h:28
internal::traits< Derived >::StorageIndex StorageIndex
The type used to store indices.
Definition: DenseBase.h:63
Definition: EigenBase.h:29
Definition: Constants.h:510
Index nonZeros() const
Definition: DenseBase.h:215
Definition: Constants.h:328
Index rows() const
Definition: EigenBase.h:59
Dense storage base class for matrices and arrays.
Definition: PlainObjectBase.h:95
Expression of the multiple replication of a matrix or vector.
Definition: Replicate.h:61
EIGEN_DEPRECATED const Derived & flagged() const
Definition: DenseBase.h:317
Expression which must be nested by value.
Definition: NestByValue.h:34
void swap(const DenseBase< OtherDerived > &other)
Definition: DenseBase.h:419
ConstColwiseReturnType colwise() const
Definition: DenseBase.h:521
Definition: Eigen_Colamd.h:50
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:210
ConstRowwiseReturnType rowwise() const
Definition: DenseBase.h:509
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:45
Definition: Constants.h:326
CoeffReturnType value() const
Definition: DenseBase.h:485
EvalReturnType eval() const
Definition: DenseBase.h:406
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:178
Index cols() const
Definition: EigenBase.h:62
Pseudo expression providing matrix output with given format.
Definition: IO.h:94
Expression of the reverse of a vector or matrix.
Definition: Reverse.h:63
Stores a set of parameters controlling the way matrices are printed.
Definition: IO.h:50
Index outerSize() const
Definition: DenseBase.h:223
void resize(Index rows, Index cols)
Definition: DenseBase.h:257
void swap(PlainObjectBase< OtherDerived > &other)
Definition: DenseBase.h:431
Expression of a coefficient wise version of the C++ ternary operator ?:
Definition: Select.h:52