VectorwiseOp.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) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
5 // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
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_PARTIAL_REDUX_H
12 #define EIGEN_PARTIAL_REDUX_H
13 
14 namespace Eigen {
15 
32 template< typename MatrixType, typename MemberOp, int Direction>
33 class PartialReduxExpr;
34 
35 namespace internal {
36 template<typename MatrixType, typename MemberOp, int Direction>
37 struct traits<PartialReduxExpr<MatrixType, MemberOp, Direction> >
38  : traits<MatrixType>
39 {
40  typedef typename MemberOp::result_type Scalar;
43  typedef typename MatrixType::Scalar InputScalar;
46  enum {
47  RowsAtCompileTime = Direction==Vertical ? 1 : MatrixType::RowsAtCompileTime,
48  ColsAtCompileTime = Direction==Horizontal ? 1 : MatrixType::ColsAtCompileTime,
49  MaxRowsAtCompileTime = Direction==Vertical ? 1 : MatrixType::MaxRowsAtCompileTime,
50  MaxColsAtCompileTime = Direction==Horizontal ? 1 : MatrixType::MaxColsAtCompileTime,
51  Flags0 = (unsigned int)_MatrixTypeNested::Flags & HereditaryBits,
52  Flags = (Flags0 & ~RowMajorBit) | (RowsAtCompileTime == 1 ? RowMajorBit : 0),
53  TraversalSize = Direction==Vertical ? RowsAtCompileTime : ColsAtCompileTime
54  };
55  #if EIGEN_GNUC_AT_LEAST(3,4)
56  typedef typename MemberOp::template Cost<InputScalar,int(TraversalSize)> CostOpType;
57  #else
58  typedef typename MemberOp::template Cost<InputScalar,TraversalSize> CostOpType;
59  #endif
60  enum {
61  CoeffReadCost = TraversalSize * traits<_MatrixTypeNested>::CoeffReadCost + int(CostOpType::value)
62  };
63 };
64 }
65 
66 template< typename MatrixType, typename MemberOp, int Direction>
68  public internal::dense_xpr_base< PartialReduxExpr<MatrixType, MemberOp, Direction> >::type
69 {
70  public:
71 
76 
77  PartialReduxExpr(const MatrixType& mat, const MemberOp& func = MemberOp())
78  : m_matrix(mat), m_functor(func) {}
79 
80  Index rows() const { return (Direction==Vertical ? 1 : m_matrix.rows()); }
81  Index cols() const { return (Direction==Horizontal ? 1 : m_matrix.cols()); }
82 
83  EIGEN_STRONG_INLINE const Scalar coeff(Index i, Index j) const
84  {
85  if (Direction==Vertical)
86  return m_functor(m_matrix.col(j));
87  else
88  return m_functor(m_matrix.row(i));
89  }
90 
91  const Scalar coeff(Index index) const
92  {
93  if (Direction==Vertical)
94  return m_functor(m_matrix.col(index));
95  else
96  return m_functor(m_matrix.row(index));
97  }
98 
99  protected:
101  const MemberOp m_functor;
102 };
103 
104 #define EIGEN_MEMBER_FUNCTOR(MEMBER,COST) \
105  template <typename ResultType> \
106  struct member_##MEMBER { \
107  EIGEN_EMPTY_STRUCT_CTOR(member_##MEMBER) \
108  typedef ResultType result_type; \
109  template<typename Scalar, int Size> struct Cost \
110  { enum { value = COST }; }; \
111  template<typename XprType> \
112  EIGEN_STRONG_INLINE ResultType operator()(const XprType& mat) const \
113  { return mat.MEMBER(); } \
114  }
115 
116 namespace internal {
117 
122 EIGEN_MEMBER_FUNCTOR(hypotNorm, (Size-1) * functor_traits<scalar_hypot_op<Scalar> >::Cost );
131 
132 
133 template <typename BinaryOp, typename Scalar>
134 struct member_redux {
135  typedef typename result_of<
136  BinaryOp(Scalar)
137  >::type result_type;
138  template<typename _Scalar, int Size> struct Cost
139  { enum { value = (Size-1) * functor_traits<BinaryOp>::Cost }; };
140  member_redux(const BinaryOp func) : m_functor(func) {}
141  template<typename Derived>
142  inline result_type operator()(const DenseBase<Derived>& mat) const
143  { return mat.redux(m_functor); }
144  const BinaryOp m_functor;
145 };
146 }
147 
165 template<typename ExpressionType, int Direction> class VectorwiseOp
166 {
167  public:
168 
169  typedef typename ExpressionType::Scalar Scalar;
170  typedef typename ExpressionType::RealScalar RealScalar;
171  typedef typename ExpressionType::Index Index;
173  ExpressionType, ExpressionType&>::type ExpressionTypeNested;
175 
176  template<template<typename _Scalar> class Functor,
177  typename Scalar=typename internal::traits<ExpressionType>::Scalar> struct ReturnType
178  {
179  typedef PartialReduxExpr<ExpressionType,
180  Functor<Scalar>,
181  Direction
182  > Type;
183  };
184 
185  template<typename BinaryOp> struct ReduxReturnType
186  {
187  typedef PartialReduxExpr<ExpressionType,
189  Direction
190  > Type;
191  };
192 
193  enum {
194  IsVertical = (Direction==Vertical) ? 1 : 0,
195  IsHorizontal = (Direction==Horizontal) ? 1 : 0
196  };
197 
198  protected:
199 
202  typedef typename internal::conditional<Direction==Vertical,
203  typename ExpressionType::ColXpr,
205  SubVector subVector(Index i)
206  {
207  return SubVector(m_matrix.derived(),i);
208  }
209 
212  Index subVectors() const
213  { return Direction==Vertical?m_matrix.cols():m_matrix.rows(); }
214 
215  template<typename OtherDerived> struct ExtendedType {
216  typedef Replicate<OtherDerived,
217  Direction==Vertical ? 1 : ExpressionType::RowsAtCompileTime,
218  Direction==Horizontal ? 1 : ExpressionType::ColsAtCompileTime> Type;
219  };
220 
223  template<typename OtherDerived>
226  {
227  EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(Direction==Vertical, OtherDerived::MaxColsAtCompileTime==1),
228  YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED)
229  EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(Direction==Horizontal, OtherDerived::MaxRowsAtCompileTime==1),
230  YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED)
231  return typename ExtendedType<OtherDerived>::Type
232  (other.derived(),
233  Direction==Vertical ? 1 : m_matrix.rows(),
234  Direction==Horizontal ? 1 : m_matrix.cols());
235  }
236 
237  template<typename OtherDerived> struct OppositeExtendedType {
238  typedef Replicate<OtherDerived,
239  Direction==Horizontal ? 1 : ExpressionType::RowsAtCompileTime,
240  Direction==Vertical ? 1 : ExpressionType::ColsAtCompileTime> Type;
241  };
242 
245  template<typename OtherDerived>
248  {
249  EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(Direction==Horizontal, OtherDerived::MaxColsAtCompileTime==1),
250  YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED)
251  EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(Direction==Vertical, OtherDerived::MaxRowsAtCompileTime==1),
252  YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED)
254  (other.derived(),
255  Direction==Horizontal ? 1 : m_matrix.rows(),
256  Direction==Vertical ? 1 : m_matrix.cols());
257  }
258 
259  public:
260 
261  inline VectorwiseOp(ExpressionType& matrix) : m_matrix(matrix) {}
262 
264  inline const ExpressionType& _expression() const { return m_matrix; }
265 
273  template<typename BinaryOp>
274  const typename ReduxReturnType<BinaryOp>::Type
275  redux(const BinaryOp& func = BinaryOp()) const
276  { return typename ReduxReturnType<BinaryOp>::Type(_expression(), func); }
277 
288  { return _expression(); }
289 
300  { return _expression(); }
301 
310  { return _expression(); }
311 
320  { return _expression(); }
321 
322 
329  { return _expression(); }
330 
331 
338  { return _expression(); }
339 
340 
347  { return _expression(); }
348 
357  { return _expression(); }
358 
364  { return _expression(); }
365 
371  { return _expression(); }
372 
378  { return _expression(); }
379 
388  { return _expression(); }
389 
398  { return _expression(); }
399 
400 
409  { return Reverse<ExpressionType, Direction>( _expression() ); }
410 
412  const ReplicateReturnType replicate(Index factor) const;
413 
422  // NOTE implemented here because of sunstudio's compilation errors
424  replicate(Index factor = Factor) const
425  {
427  (_expression(),Direction==Vertical?factor:1,Direction==Horizontal?factor:1);
428  }
429 
431 
433  template<typename OtherDerived>
434  ExpressionType& operator=(const DenseBase<OtherDerived>& other)
435  {
436  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
437  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
438  //eigen_assert((m_matrix.isNull()) == (other.isNull())); FIXME
439  return const_cast<ExpressionType&>(m_matrix = extendedTo(other.derived()));
440  }
441 
443  template<typename OtherDerived>
444  ExpressionType& operator+=(const DenseBase<OtherDerived>& other)
445  {
446  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
447  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
448  return const_cast<ExpressionType&>(m_matrix += extendedTo(other.derived()));
449  }
450 
452  template<typename OtherDerived>
453  ExpressionType& operator-=(const DenseBase<OtherDerived>& other)
454  {
455  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
456  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
457  return const_cast<ExpressionType&>(m_matrix -= extendedTo(other.derived()));
458  }
459 
461  template<typename OtherDerived>
462  ExpressionType& operator*=(const DenseBase<OtherDerived>& other)
463  {
464  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
465  EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
466  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
467  m_matrix *= extendedTo(other.derived());
468  return const_cast<ExpressionType&>(m_matrix);
469  }
470 
472  template<typename OtherDerived>
473  ExpressionType& operator/=(const DenseBase<OtherDerived>& other)
474  {
475  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
476  EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
477  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
478  m_matrix /= extendedTo(other.derived());
479  return const_cast<ExpressionType&>(m_matrix);
480  }
481 
483  template<typename OtherDerived> EIGEN_STRONG_INLINE
485  const ExpressionTypeNestedCleaned,
486  const typename ExtendedType<OtherDerived>::Type>
487  operator+(const DenseBase<OtherDerived>& other) const
488  {
489  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
490  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
491  return m_matrix + extendedTo(other.derived());
492  }
493 
495  template<typename OtherDerived>
497  const ExpressionTypeNestedCleaned,
498  const typename ExtendedType<OtherDerived>::Type>
499  operator-(const DenseBase<OtherDerived>& other) const
500  {
501  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
502  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
503  return m_matrix - extendedTo(other.derived());
504  }
505 
508  template<typename OtherDerived> EIGEN_STRONG_INLINE
510  const ExpressionTypeNestedCleaned,
511  const typename ExtendedType<OtherDerived>::Type>
512  operator*(const DenseBase<OtherDerived>& other) const
513  {
514  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
515  EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
516  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
517  return m_matrix * extendedTo(other.derived());
518  }
519 
522  template<typename OtherDerived>
524  const ExpressionTypeNestedCleaned,
525  const typename ExtendedType<OtherDerived>::Type>
526  operator/(const DenseBase<OtherDerived>& other) const
527  {
528  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
529  EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
530  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
531  return m_matrix / extendedTo(other.derived());
532  }
533 
538  CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
539  const ExpressionTypeNestedCleaned,
541  normalized() const { return m_matrix.cwiseQuotient(extendedToOpposite(this->norm())); }
542 
543 
547  void normalize() {
548  m_matrix = this->normalized();
549  }
550 
552 
553  #if EIGEN2_SUPPORT_STAGE > STAGE20_RESOLVE_API_CONFLICTS
554  Homogeneous<ExpressionType,Direction> homogeneous() const;
555  #endif
556 
557  typedef typename ExpressionType::PlainObject CrossReturnType;
558  template<typename OtherDerived>
559  const CrossReturnType cross(const MatrixBase<OtherDerived>& other) const;
560 
561  enum {
564  HNormalized_SizeMinusOne = HNormalized_Size==Dynamic ? Dynamic : HNormalized_Size-1
565  };
566  typedef Block<const ExpressionType,
567  Direction==Vertical ? int(HNormalized_SizeMinusOne)
568  : int(internal::traits<ExpressionType>::RowsAtCompileTime),
569  Direction==Horizontal ? int(HNormalized_SizeMinusOne)
570  : int(internal::traits<ExpressionType>::ColsAtCompileTime)>
572  typedef Block<const ExpressionType,
577  const HNormalized_Block,
579  Direction==Vertical ? HNormalized_SizeMinusOne : 1,
580  Direction==Horizontal ? HNormalized_SizeMinusOne : 1> >
582 
583  const HNormalizedReturnType hnormalized() const;
584 
585  protected:
586  ExpressionTypeNested m_matrix;
587 };
588 
596 template<typename Derived>
597 inline const typename DenseBase<Derived>::ConstColwiseReturnType
599 {
600  return derived();
601 }
602 
607 template<typename Derived>
610 {
611  return derived();
612 }
613 
621 template<typename Derived>
622 inline const typename DenseBase<Derived>::ConstRowwiseReturnType
624 {
625  return derived();
626 }
627 
632 template<typename Derived>
635 {
636  return derived();
637 }
638 
639 } // end namespace Eigen
640 
641 #endif // EIGEN_PARTIAL_REDUX_H
const ReturnType< internal::member_mean >::Type mean() const
Definition: VectorwiseOp.h:363
CwiseBinaryOp< internal::scalar_quotient_op< Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType< OtherDerived >::Type > operator/(const DenseBase< OtherDerived > &other) const
Definition: VectorwiseOp.h:526
Block< Derived, 1, internal::traits< Derived >::ColsAtCompileTime, IsRowMajor > RowXpr
Definition: BlockMethods.h:18
internal::remove_all< ExpressionTypeNested >::type ExpressionTypeNestedCleaned
Definition: VectorwiseOp.h:174
ExpressionType & operator+=(const DenseBase< OtherDerived > &other)
Definition: VectorwiseOp.h:444
CwiseBinaryOp< internal::scalar_quotient_op< Scalar >, const ExpressionTypeNestedCleaned, const typename OppositeExtendedType< typename ReturnType< internal::member_norm, RealScalar >::Type >::Type > normalized() const
Definition: VectorwiseOp.h:541
Index subVectors() const
Definition: VectorwiseOp.h:212
const ReturnType< internal::member_sum >::Type sum() const
Definition: VectorwiseOp.h:356
const ReturnType< internal::member_stableNorm, RealScalar >::Type stableNorm() const
Definition: VectorwiseOp.h:337
#define EIGEN_STRONG_INLINE
const ExpressionType & _expression() const
Definition: VectorwiseOp.h:264
ExpressionType & operator*=(const DenseBase< OtherDerived > &other)
Definition: VectorwiseOp.h:462
ExtendedType< OtherDerived >::Type extendedTo(const DenseBase< OtherDerived > &other) const
Definition: VectorwiseOp.h:225
ExpressionType::Index Index
Definition: VectorwiseOp.h:171
Replicate< ExpressionType, Direction==Vertical?Dynamic:1, Direction==Horizontal?Dynamic:1 > ReplicateReturnType
Definition: VectorwiseOp.h:411
internal::conditional< internal::must_nest_by_value< ExpressionType >::ret, ExpressionType, ExpressionType & >::type ExpressionTypeNested
Definition: VectorwiseOp.h:173
TFSIMD_FORCE_INLINE Vector3 cross(const Vector3 &v) const
result_type operator()(const DenseBase< Derived > &mat) const
Definition: VectorwiseOp.h:142
Replicate< OtherDerived, Direction==Horizontal?1:ExpressionType::RowsAtCompileTime, Direction==Vertical?1:ExpressionType::ColsAtCompileTime > Type
Definition: VectorwiseOp.h:240
OppositeExtendedType< OtherDerived >::Type extendedToOpposite(const DenseBase< OtherDerived > &other) const
Definition: VectorwiseOp.h:247
ExpressionType::RealScalar RealScalar
Definition: VectorwiseOp.h:170
ExpressionType & operator=(const DenseBase< OtherDerived > &other)
Definition: VectorwiseOp.h:434
Definition: LDLT.h:16
Block< Derived, internal::traits< Derived >::RowsAtCompileTime, 1,!IsRowMajor > ColXpr
Definition: BlockMethods.h:15
MatrixTypeNested m_matrix
Definition: VectorwiseOp.h:100
ExpressionType & operator-=(const DenseBase< OtherDerived > &other)
Definition: VectorwiseOp.h:453
Generic expression of a partially reduxed matrix.
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:111
Pseudo expression providing partial reduction operations.
PartialReduxExpr< ExpressionType, internal::member_redux< BinaryOp, typename internal::traits< ExpressionType >::Scalar >, Direction > Type
Definition: VectorwiseOp.h:190
const ReturnType< internal::member_maxCoeff >::Type maxCoeff() const
Definition: VectorwiseOp.h:299
internal::conditional< Direction==Vertical, typename ExpressionType::ColXpr, typename ExpressionType::RowXpr >::type SubVector
Definition: VectorwiseOp.h:204
const unsigned int RowMajorBit
Definition: Constants.h:53
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
internal::traits< PartialReduxExpr >::_MatrixTypeNested _MatrixTypeNested
Definition: VectorwiseOp.h:75
SubVector subVector(Index i)
Definition: VectorwiseOp.h:205
Replicate< OtherDerived, Direction==Vertical?1:ExpressionType::RowsAtCompileTime, Direction==Horizontal?1:ExpressionType::ColsAtCompileTime > Type
Definition: VectorwiseOp.h:218
EIGEN_STRONG_INLINE CwiseBinaryOp< internal::scalar_sum_op< Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType< OtherDerived >::Type > operator+(const DenseBase< OtherDerived > &other) const
Definition: VectorwiseOp.h:487
const Reverse< ExpressionType, Direction > reverse() const
Definition: VectorwiseOp.h:408
MemberOp::template Cost< InputScalar, TraversalSize > CostOpType
Definition: VectorwiseOp.h:58
PartialReduxExpr< ExpressionType, Functor< Scalar >, Direction > Type
Definition: VectorwiseOp.h:182
result_of< BinaryOp(Scalar) >::type result_type
Definition: VectorwiseOp.h:137
TFSIMD_FORCE_INLINE Vector3 normalized() const
Generic expression where a coefficient-wise binary operator is applied to two expressions.
const unsigned int HereditaryBits
Definition: Constants.h:152
EIGEN_STRONG_INLINE const Scalar coeff(Index i, Index j) const
Definition: VectorwiseOp.h:83
internal::result_of< BinaryOp(typename internal::traits< Derived >::Scalar)>::type redux(const BinaryOp &func) const
ConstColwiseReturnType colwise() const
Definition: VectorwiseOp.h:598
const ReturnType< internal::member_any >::Type any() const
Definition: VectorwiseOp.h:377
const MemberOp m_functor
Definition: VectorwiseOp.h:101
const ReturnType< internal::member_minCoeff >::Type minCoeff() const
Definition: VectorwiseOp.h:287
EIGEN_MEMBER_FUNCTOR(squaredNorm, Size *NumTraits< Scalar >::MulCost+(Size-1)*NumTraits< Scalar >::AddCost)
Expression of the multiple replication of a matrix or vector.
Definition: Replicate.h:62
ExpressionTypeNested m_matrix
Definition: VectorwiseOp.h:586
CwiseBinaryOp< internal::scalar_quotient_op< typename internal::traits< ExpressionType >::Scalar >, const HNormalized_Block, const Replicate< HNormalized_Factors, Direction==Vertical?HNormalized_SizeMinusOne:1, Direction==Horizontal?HNormalized_SizeMinusOne:1 > > HNormalizedReturnType
Definition: VectorwiseOp.h:581
internal::traits< PartialReduxExpr >::MatrixTypeNested MatrixTypeNested
Definition: VectorwiseOp.h:74
#define EIGEN_STATIC_ASSERT_ARRAYXPR(Derived)
Definition: StaticAssert.h:195
const ReturnType< internal::member_all >::Type all() const
Definition: VectorwiseOp.h:370
const Scalar coeff(Index index) const
Definition: VectorwiseOp.h:91
const ReturnType< internal::member_norm, RealScalar >::Type norm() const
Definition: VectorwiseOp.h:319
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
ExpressionType::Scalar Scalar
Definition: VectorwiseOp.h:169
Expression of a fixed-size or dynamic-size block.
Definition: Core/Block.h:102
ExpressionType & operator/=(const DenseBase< OtherDerived > &other)
Definition: VectorwiseOp.h:473
#define EIGEN_STATIC_ASSERT_SAME_XPR_KIND(Derived1, Derived2)
Definition: StaticAssert.h:199
const ReturnType< internal::member_hypotNorm, RealScalar >::Type hypotNorm() const
Definition: VectorwiseOp.h:346
VectorwiseOp(ExpressionType &matrix)
Definition: VectorwiseOp.h:261
#define EIGEN_IMPLIES(a, b)
const ReduxReturnType< BinaryOp >::Type redux(const BinaryOp &func=BinaryOp()) const
Definition: VectorwiseOp.h:275
CwiseBinaryOp< internal::scalar_difference_op< Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType< OtherDerived >::Type > operator-(const DenseBase< OtherDerived > &other) const
Definition: VectorwiseOp.h:499
const int Dynamic
Definition: Constants.h:21
ConstRowwiseReturnType rowwise() const
Definition: VectorwiseOp.h:623
Block< const ExpressionType, Direction==Vertical?1:int(internal::traits< ExpressionType >::RowsAtCompileTime), Direction==Horizontal?1:int(internal::traits< ExpressionType >::ColsAtCompileTime)> HNormalized_Factors
Definition: VectorwiseOp.h:575
member_redux(const BinaryOp func)
Definition: VectorwiseOp.h:140
const PartialReduxExpr< ExpressionType, internal::member_count< Index >, Direction > count() const
Definition: VectorwiseOp.h:387
const ReturnType< internal::member_blueNorm, RealScalar >::Type blueNorm() const
Definition: VectorwiseOp.h:328
Index rows() const
Definition: VectorwiseOp.h:80
Expression of the reverse of a vector or matrix.
Definition: Reverse.h:70
const ReturnType< internal::member_squaredNorm, RealScalar >::Type squaredNorm() const
Definition: VectorwiseOp.h:309
const ReturnType< internal::member_prod >::Type prod() const
Definition: VectorwiseOp.h:397
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition: StaticAssert.h:126
ExpressionType::PlainObject CrossReturnType
Definition: VectorwiseOp.h:557
EIGEN_STRONG_INLINE CwiseBinaryOp< internal::scalar_product_op< Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType< OtherDerived >::Type > operator*(const DenseBase< OtherDerived > &other) const
Definition: VectorwiseOp.h:512
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
const Replicate< ExpressionType,(IsVertical?Factor:1),(IsHorizontal?Factor:1)> replicate(Index factor=Factor) const
Definition: VectorwiseOp.h:424
internal::dense_xpr_base< PartialReduxExpr >::type Base
Definition: VectorwiseOp.h:72
Index cols() const
Definition: VectorwiseOp.h:81
Expression of one (or a set of) homogeneous vector(s)
Definition: Homogeneous.h:61


tuw_aruco
Author(s): Lukas Pfeifhofer
autogenerated on Mon Jun 10 2019 15:41:02