Eigen  3.2.92
VectorwiseOp.h
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;
41  typedef typename traits<MatrixType>::StorageKind StorageKind;
42  typedef typename traits<MatrixType>::XprKind XprKind;
43  typedef typename MatrixType::Scalar InputScalar;
44  enum {
45  RowsAtCompileTime = Direction==Vertical ? 1 : MatrixType::RowsAtCompileTime,
46  ColsAtCompileTime = Direction==Horizontal ? 1 : MatrixType::ColsAtCompileTime,
47  MaxRowsAtCompileTime = Direction==Vertical ? 1 : MatrixType::MaxRowsAtCompileTime,
48  MaxColsAtCompileTime = Direction==Horizontal ? 1 : MatrixType::MaxColsAtCompileTime,
49  Flags = RowsAtCompileTime == 1 ? RowMajorBit : 0,
50  TraversalSize = Direction==Vertical ? MatrixType::RowsAtCompileTime : MatrixType::ColsAtCompileTime
51  };
52 };
53 }
54 
55 template< typename MatrixType, typename MemberOp, int Direction>
56 class PartialReduxExpr : public internal::dense_xpr_base< PartialReduxExpr<MatrixType, MemberOp, Direction> >::type,
57  internal::no_assignment_operator
58 {
59  public:
60 
61  typedef typename internal::dense_xpr_base<PartialReduxExpr>::type Base;
62  EIGEN_DENSE_PUBLIC_INTERFACE(PartialReduxExpr)
63 
64  EIGEN_DEVICE_FUNC
65  explicit PartialReduxExpr(const MatrixType& mat, const MemberOp& func = MemberOp())
66  : m_matrix(mat), m_functor(func) {}
67 
68  EIGEN_DEVICE_FUNC
69  Index rows() const { return (Direction==Vertical ? 1 : m_matrix.rows()); }
70  EIGEN_DEVICE_FUNC
71  Index cols() const { return (Direction==Horizontal ? 1 : m_matrix.cols()); }
72 
73  EIGEN_DEVICE_FUNC
74  typename MatrixType::Nested nestedExpression() const { return m_matrix; }
75 
76  EIGEN_DEVICE_FUNC
77  const MemberOp& functor() const { return m_functor; }
78 
79  protected:
80  typename MatrixType::Nested m_matrix;
81  const MemberOp m_functor;
82 };
83 
84 #define EIGEN_MEMBER_FUNCTOR(MEMBER,COST) \
85  template <typename ResultType> \
86  struct member_##MEMBER { \
87  EIGEN_EMPTY_STRUCT_CTOR(member_##MEMBER) \
88  typedef ResultType result_type; \
89  template<typename Scalar, int Size> struct Cost \
90  { enum { value = COST }; }; \
91  template<typename XprType> \
92  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE \
93  ResultType operator()(const XprType& mat) const \
94  { return mat.MEMBER(); } \
95  }
96 
97 namespace internal {
98 
99 EIGEN_MEMBER_FUNCTOR(squaredNorm, Size * NumTraits<Scalar>::MulCost + (Size-1)*NumTraits<Scalar>::AddCost);
100 EIGEN_MEMBER_FUNCTOR(norm, (Size+5) * NumTraits<Scalar>::MulCost + (Size-1)*NumTraits<Scalar>::AddCost);
101 EIGEN_MEMBER_FUNCTOR(stableNorm, (Size+5) * NumTraits<Scalar>::MulCost + (Size-1)*NumTraits<Scalar>::AddCost);
102 EIGEN_MEMBER_FUNCTOR(blueNorm, (Size+5) * NumTraits<Scalar>::MulCost + (Size-1)*NumTraits<Scalar>::AddCost);
103 EIGEN_MEMBER_FUNCTOR(hypotNorm, (Size-1) * functor_traits<scalar_hypot_op<Scalar> >::Cost );
104 EIGEN_MEMBER_FUNCTOR(sum, (Size-1)*NumTraits<Scalar>::AddCost);
105 EIGEN_MEMBER_FUNCTOR(mean, (Size-1)*NumTraits<Scalar>::AddCost + NumTraits<Scalar>::MulCost);
106 EIGEN_MEMBER_FUNCTOR(minCoeff, (Size-1)*NumTraits<Scalar>::AddCost);
107 EIGEN_MEMBER_FUNCTOR(maxCoeff, (Size-1)*NumTraits<Scalar>::AddCost);
108 EIGEN_MEMBER_FUNCTOR(all, (Size-1)*NumTraits<Scalar>::AddCost);
109 EIGEN_MEMBER_FUNCTOR(any, (Size-1)*NumTraits<Scalar>::AddCost);
110 EIGEN_MEMBER_FUNCTOR(count, (Size-1)*NumTraits<Scalar>::AddCost);
111 EIGEN_MEMBER_FUNCTOR(prod, (Size-1)*NumTraits<Scalar>::MulCost);
112 
113 template <int p, typename ResultType>
114 struct member_lpnorm {
115  typedef ResultType result_type;
116  template<typename Scalar, int Size> struct Cost
117  { enum { value = (Size+5) * NumTraits<Scalar>::MulCost + (Size-1)*NumTraits<Scalar>::AddCost }; };
118  EIGEN_DEVICE_FUNC member_lpnorm() {}
119  template<typename XprType>
120  EIGEN_DEVICE_FUNC inline ResultType operator()(const XprType& mat) const
121  { return mat.template lpNorm<p>(); }
122 };
123 
124 template <typename BinaryOp, typename Scalar>
125 struct member_redux {
126  typedef typename result_of<
127  BinaryOp(Scalar,Scalar)
128  >::type result_type;
129  template<typename _Scalar, int Size> struct Cost
130  { enum { value = (Size-1) * functor_traits<BinaryOp>::Cost }; };
131  EIGEN_DEVICE_FUNC explicit member_redux(const BinaryOp func) : m_functor(func) {}
132  template<typename Derived>
133  EIGEN_DEVICE_FUNC inline result_type operator()(const DenseBase<Derived>& mat) const
134  { return mat.redux(m_functor); }
135  const BinaryOp m_functor;
136 };
137 }
138 
156 template<typename ExpressionType, int Direction> class VectorwiseOp
157 {
158  public:
159 
160  typedef typename ExpressionType::Scalar Scalar;
161  typedef typename ExpressionType::RealScalar RealScalar;
162  typedef Eigen::Index Index;
163  typedef typename internal::ref_selector<ExpressionType>::non_const_type ExpressionTypeNested;
164  typedef typename internal::remove_all<ExpressionTypeNested>::type ExpressionTypeNestedCleaned;
165 
166  template<template<typename _Scalar> class Functor,
167  typename Scalar_=Scalar> struct ReturnType
168  {
169  typedef PartialReduxExpr<ExpressionType,
170  Functor<Scalar_>,
171  Direction
172  > Type;
173  };
174 
175  template<typename BinaryOp> struct ReduxReturnType
176  {
177  typedef PartialReduxExpr<ExpressionType,
178  internal::member_redux<BinaryOp,Scalar>,
179  Direction
180  > Type;
181  };
182 
183  enum {
184  isVertical = (Direction==Vertical) ? 1 : 0,
185  isHorizontal = (Direction==Horizontal) ? 1 : 0
186  };
187 
188  protected:
189 
192  typedef typename internal::conditional<isVertical,
193  typename ExpressionType::ColXpr,
194  typename ExpressionType::RowXpr>::type SubVector;
195  EIGEN_DEVICE_FUNC
196  SubVector subVector(Index i)
197  {
198  return SubVector(m_matrix.derived(),i);
199  }
200 
203  EIGEN_DEVICE_FUNC
204  Index subVectors() const
205  { return isVertical?m_matrix.cols():m_matrix.rows(); }
206 
207  template<typename OtherDerived> struct ExtendedType {
208  typedef Replicate<OtherDerived,
209  isVertical ? 1 : ExpressionType::RowsAtCompileTime,
210  isHorizontal ? 1 : ExpressionType::ColsAtCompileTime> Type;
211  };
212 
215  template<typename OtherDerived>
216  EIGEN_DEVICE_FUNC
218  extendedTo(const DenseBase<OtherDerived>& other) const
219  {
220  EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(isVertical, OtherDerived::MaxColsAtCompileTime==1),
221  YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED)
222  EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(isHorizontal, OtherDerived::MaxRowsAtCompileTime==1),
223  YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED)
224  return typename ExtendedType<OtherDerived>::Type
225  (other.derived(),
226  isVertical ? 1 : m_matrix.rows(),
227  isHorizontal ? 1 : m_matrix.cols());
228  }
229 
230  template<typename OtherDerived> struct OppositeExtendedType {
231  typedef Replicate<OtherDerived,
232  isHorizontal ? 1 : ExpressionType::RowsAtCompileTime,
233  isVertical ? 1 : ExpressionType::ColsAtCompileTime> Type;
234  };
235 
238  template<typename OtherDerived>
239  EIGEN_DEVICE_FUNC
241  extendedToOpposite(const DenseBase<OtherDerived>& other) const
242  {
243  EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(isHorizontal, OtherDerived::MaxColsAtCompileTime==1),
244  YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED)
245  EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(isVertical, OtherDerived::MaxRowsAtCompileTime==1),
246  YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED)
248  (other.derived(),
249  isHorizontal ? 1 : m_matrix.rows(),
250  isVertical ? 1 : m_matrix.cols());
251  }
252 
253  public:
254  EIGEN_DEVICE_FUNC
255  explicit inline VectorwiseOp(ExpressionType& matrix) : m_matrix(matrix) {}
256 
258  EIGEN_DEVICE_FUNC
259  inline const ExpressionType& _expression() const { return m_matrix; }
260 
268  template<typename BinaryOp>
269  EIGEN_DEVICE_FUNC
270  const typename ReduxReturnType<BinaryOp>::Type
271  redux(const BinaryOp& func = BinaryOp()) const
272  { return typename ReduxReturnType<BinaryOp>::Type(_expression(), internal::member_redux<BinaryOp,Scalar>(func)); }
273 
288 
289  template<int p> struct LpNormReturnType {
291  };
292 
302  EIGEN_DEVICE_FUNC
303  const MinCoeffReturnType minCoeff() const
304  { return MinCoeffReturnType(_expression()); }
305 
315  EIGEN_DEVICE_FUNC
316  const MaxCoeffReturnType maxCoeff() const
317  { return MaxCoeffReturnType(_expression()); }
318 
327  EIGEN_DEVICE_FUNC
328  const SquaredNormReturnType squaredNorm() const
329  { return SquaredNormReturnType(_expression()); }
330 
339  EIGEN_DEVICE_FUNC
340  const NormReturnType norm() const
341  { return NormReturnType(_expression()); }
342 
351  template<int p>
352  EIGEN_DEVICE_FUNC
353  const typename LpNormReturnType<p>::Type lpNorm() const
354  { return typename LpNormReturnType<p>::Type(_expression()); }
355 
356 
363  EIGEN_DEVICE_FUNC
364  const BlueNormReturnType blueNorm() const
365  { return BlueNormReturnType(_expression()); }
366 
367 
374  EIGEN_DEVICE_FUNC
375  const StableNormReturnType stableNorm() const
376  { return StableNormReturnType(_expression()); }
377 
378 
385  EIGEN_DEVICE_FUNC
386  const HypotNormReturnType hypotNorm() const
387  { return HypotNormReturnType(_expression()); }
388 
396  EIGEN_DEVICE_FUNC
397  const SumReturnType sum() const
398  { return SumReturnType(_expression()); }
399 
404  EIGEN_DEVICE_FUNC
405  const MeanReturnType mean() const
406  { return MeanReturnType(_expression()); }
407 
413  EIGEN_DEVICE_FUNC
414  const AllReturnType all() const
415  { return AllReturnType(_expression()); }
416 
422  EIGEN_DEVICE_FUNC
423  const AnyReturnType any() const
424  { return AnyReturnType(_expression()); }
425 
435  EIGEN_DEVICE_FUNC
436  const CountReturnType count() const
437  { return CountReturnType(_expression()); }
438 
446  EIGEN_DEVICE_FUNC
447  const ProdReturnType prod() const
448  { return ProdReturnType(_expression()); }
449 
450 
458  EIGEN_DEVICE_FUNC
459  const ReverseReturnType reverse() const
460  { return ReverseReturnType( _expression() ); }
461 
463  EIGEN_DEVICE_FUNC
464  const ReplicateReturnType replicate(Index factor) const;
465 
474  // NOTE implemented here because of sunstudio's compilation errors
475  // isVertical*Factor+isHorizontal instead of (isVertical?Factor:1) to handle CUDA bug with ternary operator
477  EIGEN_DEVICE_FUNC
478  replicate(Index factor = Factor) const
479  {
481  (_expression(),isVertical?factor:1,isHorizontal?factor:1);
482  }
483 
485 
487  template<typename OtherDerived>
488  EIGEN_DEVICE_FUNC
489  ExpressionType& operator=(const DenseBase<OtherDerived>& other)
490  {
491  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
492  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
493  //eigen_assert((m_matrix.isNull()) == (other.isNull())); FIXME
494  return const_cast<ExpressionType&>(m_matrix = extendedTo(other.derived()));
495  }
496 
498  template<typename OtherDerived>
499  EIGEN_DEVICE_FUNC
500  ExpressionType& operator+=(const DenseBase<OtherDerived>& other)
501  {
502  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
503  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
504  return const_cast<ExpressionType&>(m_matrix += extendedTo(other.derived()));
505  }
506 
508  template<typename OtherDerived>
509  EIGEN_DEVICE_FUNC
510  ExpressionType& operator-=(const DenseBase<OtherDerived>& other)
511  {
512  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
513  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
514  return const_cast<ExpressionType&>(m_matrix -= extendedTo(other.derived()));
515  }
516 
518  template<typename OtherDerived>
519  EIGEN_DEVICE_FUNC
520  ExpressionType& operator*=(const DenseBase<OtherDerived>& other)
521  {
522  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
523  EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
524  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
525  m_matrix *= extendedTo(other.derived());
526  return const_cast<ExpressionType&>(m_matrix);
527  }
528 
530  template<typename OtherDerived>
531  EIGEN_DEVICE_FUNC
532  ExpressionType& operator/=(const DenseBase<OtherDerived>& other)
533  {
534  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
535  EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
536  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
537  m_matrix /= extendedTo(other.derived());
538  return const_cast<ExpressionType&>(m_matrix);
539  }
540 
542  template<typename OtherDerived> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
544  const ExpressionTypeNestedCleaned,
545  const typename ExtendedType<OtherDerived>::Type>
546  operator+(const DenseBase<OtherDerived>& other) const
547  {
548  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
549  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
550  return m_matrix + extendedTo(other.derived());
551  }
552 
554  template<typename OtherDerived>
555  EIGEN_DEVICE_FUNC
557  const ExpressionTypeNestedCleaned,
558  const typename ExtendedType<OtherDerived>::Type>
559  operator-(const DenseBase<OtherDerived>& other) const
560  {
561  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
562  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
563  return m_matrix - extendedTo(other.derived());
564  }
565 
568  template<typename OtherDerived> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
570  const ExpressionTypeNestedCleaned,
571  const typename ExtendedType<OtherDerived>::Type>
572  EIGEN_DEVICE_FUNC
573  operator*(const DenseBase<OtherDerived>& other) const
574  {
575  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
576  EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
577  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
578  return m_matrix * extendedTo(other.derived());
579  }
580 
583  template<typename OtherDerived>
584  EIGEN_DEVICE_FUNC
586  const ExpressionTypeNestedCleaned,
587  const typename ExtendedType<OtherDerived>::Type>
588  operator/(const DenseBase<OtherDerived>& other) const
589  {
590  EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
591  EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
592  EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
593  return m_matrix / extendedTo(other.derived());
594  }
595 
600  EIGEN_DEVICE_FUNC
601  CwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
602  const ExpressionTypeNestedCleaned,
603  const typename OppositeExtendedType<typename ReturnType<internal::member_norm,RealScalar>::Type>::Type>
604  normalized() const { return m_matrix.cwiseQuotient(extendedToOpposite(this->norm())); }
605 
606 
610  EIGEN_DEVICE_FUNC void normalize() {
611  m_matrix = this->normalized();
612  }
613 
614  EIGEN_DEVICE_FUNC inline void reverseInPlace();
615 
617 
619  HomogeneousReturnType homogeneous() const;
620 
621  typedef typename ExpressionType::PlainObject CrossReturnType;
622  template<typename OtherDerived>
623  EIGEN_DEVICE_FUNC
624  const CrossReturnType cross(const MatrixBase<OtherDerived>& other) const;
625 
626  enum {
627  HNormalized_Size = Direction==Vertical ? internal::traits<ExpressionType>::RowsAtCompileTime
628  : internal::traits<ExpressionType>::ColsAtCompileTime,
629  HNormalized_SizeMinusOne = HNormalized_Size==Dynamic ? Dynamic : HNormalized_Size-1
630  };
631  typedef Block<const ExpressionType,
632  Direction==Vertical ? int(HNormalized_SizeMinusOne)
633  : int(internal::traits<ExpressionType>::RowsAtCompileTime),
634  Direction==Horizontal ? int(HNormalized_SizeMinusOne)
635  : int(internal::traits<ExpressionType>::ColsAtCompileTime)>
637  typedef Block<const ExpressionType,
638  Direction==Vertical ? 1 : int(internal::traits<ExpressionType>::RowsAtCompileTime),
639  Direction==Horizontal ? 1 : int(internal::traits<ExpressionType>::ColsAtCompileTime)>
642  const HNormalized_Block,
644  Direction==Vertical ? HNormalized_SizeMinusOne : 1,
645  Direction==Horizontal ? HNormalized_SizeMinusOne : 1> >
647 
648  const HNormalizedReturnType hnormalized() const;
649 
650  protected:
651  ExpressionTypeNested m_matrix;
652 };
653 
654 //const colwise moved to DenseBase.h due to CUDA compiler bug
655 
656 
661 template<typename Derived>
664 {
665  return ColwiseReturnType(derived());
666 }
667 
668 //const rowwise moved to DenseBase.h due to CUDA compiler bug
669 
670 
675 template<typename Derived>
678 {
679  return RowwiseReturnType(derived());
680 }
681 
682 } // end namespace Eigen
683 
684 #endif // EIGEN_PARTIAL_REDUX_H
CwiseBinaryOp< internal::scalar_quotient_op< Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType< OtherDerived >::Type > operator/(const DenseBase< OtherDerived > &other) const
Definition: VectorwiseOp.h:588
ExpressionType & operator+=(const DenseBase< OtherDerived > &other)
Definition: VectorwiseOp.h:500
CwiseBinaryOp< internal::scalar_quotient_op< Scalar >, const ExpressionTypeNestedCleaned, const typename OppositeExtendedType< typename ReturnType< internal::member_norm, RealScalar >::Type >::Type > normalized() const
Definition: VectorwiseOp.h:604
const ReverseReturnType reverse() const
Definition: VectorwiseOp.h:459
const MeanReturnType mean() const
Definition: VectorwiseOp.h:405
ExpressionType & operator*=(const DenseBase< OtherDerived > &other)
Definition: VectorwiseOp.h:520
Definition: Constants.h:265
void normalize()
Definition: VectorwiseOp.h:610
Eigen::Index Index
Definition: VectorwiseOp.h:162
CwiseBinaryOp< internal::scalar_product_op< Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType< OtherDerived >::Type > operator*(const DenseBase< OtherDerived > &other) const
Definition: VectorwiseOp.h:573
const ProdReturnType prod() const
Definition: VectorwiseOp.h:447
ExpressionType & operator=(const DenseBase< OtherDerived > &other)
Definition: VectorwiseOp.h:489
Definition: LDLT.h:16
ExpressionType & operator-=(const DenseBase< OtherDerived > &other)
Definition: VectorwiseOp.h:510
const CountReturnType count() const
Definition: VectorwiseOp.h:436
const SumReturnType sum() const
Definition: VectorwiseOp.h:397
Generic expression of a partially reduxed matrix.
Definition: ForwardDeclarations.h:242
Pseudo expression providing partial reduction operations.
Definition: ForwardDeclarations.h:243
const HypotNormReturnType hypotNorm() const
Definition: VectorwiseOp.h:386
ConstColwiseReturnType colwise() const
Definition: DenseBase.h:510
const unsigned int RowMajorBit
Definition: Constants.h:61
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
const AnyReturnType any() const
Definition: VectorwiseOp.h:423
const StableNormReturnType stableNorm() const
Definition: VectorwiseOp.h:375
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition: CwiseBinaryOp.h:78
CwiseBinaryOp< internal::scalar_sum_op< Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType< OtherDerived >::Type > operator+(const DenseBase< OtherDerived > &other) const
Definition: VectorwiseOp.h:546
const MinCoeffReturnType minCoeff() const
Definition: VectorwiseOp.h:303
Expression of the multiple replication of a matrix or vector.
Definition: Replicate.h:60
const AllReturnType all() const
Definition: VectorwiseOp.h:414
Definition: Constants.h:268
Definition: Eigen_Colamd.h:54
const MaxCoeffReturnType maxCoeff() const
Definition: VectorwiseOp.h:316
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:104
ExpressionType & operator/=(const DenseBase< OtherDerived > &other)
Definition: VectorwiseOp.h:532
const Replicate< ExpressionType, isVertical *Factor+isHorizontal, isHorizontal *Factor+isVertical > replicate(Index factor=Factor) const
Definition: VectorwiseOp.h:478
const LpNormReturnType< p >::Type lpNorm() const
Definition: VectorwiseOp.h:353
const SquaredNormReturnType squaredNorm() const
Definition: VectorwiseOp.h:328
ConstRowwiseReturnType rowwise() const
Definition: DenseBase.h:498
const NormReturnType norm() const
Definition: VectorwiseOp.h:340
const ReduxReturnType< BinaryOp >::Type redux(const BinaryOp &func=BinaryOp()) const
Definition: VectorwiseOp.h:271
CwiseBinaryOp< internal::scalar_difference_op< Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType< OtherDerived >::Type > operator-(const DenseBase< OtherDerived > &other) const
Definition: VectorwiseOp.h:559
Expression of the reverse of a vector or matrix.
Definition: Reverse.h:63
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
const BlueNormReturnType blueNorm() const
Definition: VectorwiseOp.h:364
Expression of one (or a set of) homogeneous vector(s)
Definition: ForwardDeclarations.h:275