11#ifndef EIGEN_PARTIAL_REDUX_H
12#define EIGEN_PARTIAL_REDUX_H
15#include "./InternalHeaderCheck.h"
35template <
typename MatrixType,
typename MemberOp,
int Direction>
40template <
typename MatrixType,
typename MemberOp,
int Direction>
41struct traits<PartialReduxExpr<MatrixType, MemberOp, Direction> > : traits<MatrixType> {
42 typedef typename MemberOp::result_type Scalar;
43 typedef typename traits<MatrixType>::StorageKind StorageKind;
44 typedef typename traits<MatrixType>::XprKind XprKind;
45 typedef typename MatrixType::Scalar InputScalar;
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,
52 TraversalSize = Direction ==
Vertical ? MatrixType::RowsAtCompileTime : MatrixType::ColsAtCompileTime
57template <
typename MatrixType,
typename MemberOp,
int Direction>
58class PartialReduxExpr :
public internal::dense_xpr_base<PartialReduxExpr<MatrixType, MemberOp, Direction> >::type,
59 internal::no_assignment_operator {
61 typedef typename internal::dense_xpr_base<PartialReduxExpr>::type Base;
62 EIGEN_DENSE_PUBLIC_INTERFACE(PartialReduxExpr)
64 EIGEN_DEVICE_FUNC
explicit PartialReduxExpr(
const MatrixType& mat,
const MemberOp& func = MemberOp())
65 : m_matrix(mat), m_functor(func) {}
67 EIGEN_DEVICE_FUNC
constexpr Index rows()
const noexcept {
return (Direction ==
Vertical ? 1 : m_matrix.rows()); }
68 EIGEN_DEVICE_FUNC
constexpr Index cols()
const noexcept {
return (Direction ==
Horizontal ? 1 : m_matrix.cols()); }
70 EIGEN_DEVICE_FUNC
typename MatrixType::Nested nestedExpression()
const {
return m_matrix; }
72 EIGEN_DEVICE_FUNC
const MemberOp& functor()
const {
return m_functor; }
75 typename MatrixType::Nested m_matrix;
76 const MemberOp m_functor;
79template <
typename A,
typename B>
80struct partial_redux_dummy_func;
82#define EIGEN_MAKE_PARTIAL_REDUX_FUNCTOR(MEMBER, COST, VECTORIZABLE, BINARYOP) \
83 template <typename ResultType, typename Scalar> \
84 struct member_##MEMBER { \
85 typedef ResultType result_type; \
86 typedef BINARYOP<Scalar, Scalar> BinaryOp; \
89 enum { value = COST }; \
91 enum { Vectorizable = VECTORIZABLE }; \
92 template <typename XprType> \
93 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ResultType operator()(const XprType& mat) const { \
94 return mat.MEMBER(); \
96 BinaryOp binaryFunc() const { return BinaryOp(); } \
99#define EIGEN_MEMBER_FUNCTOR(MEMBER, COST) EIGEN_MAKE_PARTIAL_REDUX_FUNCTOR(MEMBER, COST, 0, partial_redux_dummy_func)
103EIGEN_MEMBER_FUNCTOR(norm, (Size + 5) * NumTraits<Scalar>::MulCost + (Size - 1) * NumTraits<Scalar>::AddCost);
104EIGEN_MEMBER_FUNCTOR(stableNorm, (Size + 5) * NumTraits<Scalar>::MulCost + (Size - 1) * NumTraits<Scalar>::AddCost);
105EIGEN_MEMBER_FUNCTOR(blueNorm, (Size + 5) * NumTraits<Scalar>::MulCost + (Size - 1) * NumTraits<Scalar>::AddCost);
106EIGEN_MEMBER_FUNCTOR(hypotNorm, (Size - 1) * functor_traits<scalar_hypot_op<Scalar> >::Cost);
107EIGEN_MEMBER_FUNCTOR(all, (Size - 1) * NumTraits<Scalar>::AddCost);
108EIGEN_MEMBER_FUNCTOR(any, (Size - 1) * NumTraits<Scalar>::AddCost);
109EIGEN_MEMBER_FUNCTOR(count, (Size - 1) * NumTraits<Scalar>::AddCost);
111EIGEN_MAKE_PARTIAL_REDUX_FUNCTOR(sum, (Size - 1) * NumTraits<Scalar>::AddCost, 1, internal::scalar_sum_op);
112EIGEN_MAKE_PARTIAL_REDUX_FUNCTOR(minCoeff, (Size - 1) * NumTraits<Scalar>::AddCost, 1, internal::scalar_min_op);
113EIGEN_MAKE_PARTIAL_REDUX_FUNCTOR(maxCoeff, (Size - 1) * NumTraits<Scalar>::AddCost, 1, internal::scalar_max_op);
114EIGEN_MAKE_PARTIAL_REDUX_FUNCTOR(prod, (Size - 1) * NumTraits<Scalar>::MulCost, 1, internal::scalar_product_op);
116template <
int p,
typename ResultType,
typename Scalar>
117struct member_lpnorm {
118 typedef ResultType result_type;
119 enum { Vectorizable = 0 };
122 enum { value = (Size + 5) * NumTraits<Scalar>::MulCost + (Size - 1) * NumTraits<Scalar>::AddCost };
124 EIGEN_DEVICE_FUNC member_lpnorm() {}
125 template <
typename XprType>
126 EIGEN_DEVICE_FUNC
inline ResultType operator()(
const XprType& mat)
const {
127 return mat.template lpNorm<p>();
131template <
typename BinaryOpT,
typename Scalar>
133 typedef BinaryOpT BinaryOp;
134 typedef typename result_of<BinaryOp(
const Scalar&,
const Scalar&)>::type result_type;
136 enum { Vectorizable = functor_traits<BinaryOp>::PacketAccess };
139 enum { value = (Size - 1) * functor_traits<BinaryOp>::Cost };
141 EIGEN_DEVICE_FUNC
explicit member_redux(
const BinaryOp func) : m_functor(func) {}
142 template <
typename Derived>
143 EIGEN_DEVICE_FUNC
inline result_type operator()(
const DenseBase<Derived>& mat)
const {
144 return mat.redux(m_functor);
146 const BinaryOp& binaryFunc()
const {
return m_functor; }
147 const BinaryOp m_functor;
150template <
typename Scalar>
151struct scalar_replace_zero_with_one_op {
152 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(
const Scalar& x)
const {
153 return numext::is_exactly_zero(x) ? Scalar(1) : x;
155 template <
typename Packet>
156 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(
const Packet& x)
const {
157 return pselect(pcmp_eq(x, pzero(x)), pset1<Packet>(Scalar(1)), x);
160template <
typename Scalar>
161struct functor_traits<scalar_replace_zero_with_one_op<Scalar>> {
162 enum { Cost = 1, PacketAccess = packet_traits<Scalar>::HasCmp };
204template <
typename ExpressionType,
int Direction>
207 typedef typename ExpressionType::Scalar Scalar;
208 typedef typename ExpressionType::RealScalar RealScalar;
209 typedef internal::remove_all_t<ExpressionType> ExpressionTypeCleaned;
211 template <
template <
typename OutScalar,
typename InputScalar>
class Functor,
typename ReturnScalar = Scalar>
216 template <
typename BinaryOp>
217 struct ReduxReturnType {
221 enum { isVertical = (Direction ==
Vertical) ? 1 : 0, isHorizontal = (Direction ==
Horizontal) ? 1 : 0 };
224 template <
typename OtherDerived>
225 struct ExtendedType {
226 typedef Replicate<OtherDerived, isVertical ? 1 : ExpressionType::RowsAtCompileTime,
227 isHorizontal ? 1 : ExpressionType::ColsAtCompileTime>
233 template <
typename OtherDerived>
234 EIGEN_DEVICE_FUNC
typename ExtendedType<OtherDerived>::Type extendedTo(
const DenseBase<OtherDerived>& other)
const {
235 EIGEN_STATIC_ASSERT(internal::check_implication(isVertical, OtherDerived::MaxColsAtCompileTime == 1),
236 YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED)
237 EIGEN_STATIC_ASSERT(internal::check_implication(isHorizontal, OtherDerived::MaxRowsAtCompileTime == 1),
238 YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED)
239 return typename ExtendedType<OtherDerived>::Type(other.derived(), isVertical ? 1 : m_matrix.rows(),
240 isHorizontal ? 1 : m_matrix.cols());
243 template <
typename OtherDerived>
244 struct OppositeExtendedType {
245 typedef Replicate<OtherDerived, isHorizontal ? 1 : ExpressionType::RowsAtCompileTime,
246 isVertical ? 1 : ExpressionType::ColsAtCompileTime>
252 template <
typename OtherDerived>
253 EIGEN_DEVICE_FUNC
typename OppositeExtendedType<OtherDerived>::Type extendedToOpposite(
255 EIGEN_STATIC_ASSERT(internal::check_implication(isHorizontal, OtherDerived::MaxColsAtCompileTime == 1),
256 YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED)
257 EIGEN_STATIC_ASSERT(internal::check_implication(isVertical, OtherDerived::MaxRowsAtCompileTime == 1),
258 YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED)
259 return typename OppositeExtendedType<OtherDerived>::Type(other.derived(), isHorizontal ? 1 : m_matrix.rows(),
260 isVertical ? 1 : m_matrix.cols());
264 EIGEN_DEVICE_FUNC
explicit inline VectorwiseOp(ExpressionType& matrix) : m_matrix(matrix) {}
267 EIGEN_DEVICE_FUNC
inline const ExpressionType& _expression()
const {
return m_matrix; }
269#ifdef EIGEN_PARSED_BY_DOXYGEN
279 typedef internal::subvector_stl_reverse_iterator<ExpressionType,
DirectionType(Direction)> reverse_iterator;
280 typedef internal::subvector_stl_reverse_iterator<
const ExpressionType,
DirectionType(Direction)>
281 const_reverse_iterator;
297 return reverse_iterator(m_matrix, m_matrix.template subVectors<
DirectionType(Direction)>() - 1);
301 return const_reverse_iterator(m_matrix, m_matrix.template subVectors<
DirectionType(Direction)>() - 1);
305 return const_reverse_iterator(m_matrix, m_matrix.template subVectors<
DirectionType(Direction)>() - 1);
324 reverse_iterator
rend() {
return reverse_iterator(m_matrix, -1); }
326 const_reverse_iterator
rend()
const {
return const_reverse_iterator(m_matrix, -1); }
328 const_reverse_iterator
crend()
const {
return const_reverse_iterator(m_matrix, -1); }
340 template <
typename BinaryOp>
341 EIGEN_DEVICE_FUNC
const typename ReduxReturnType<BinaryOp>::Type
redux(
const BinaryOp& func = BinaryOp())
const {
342 eigen_assert(redux_length() > 0 &&
"you are using an empty matrix");
343 return typename ReduxReturnType<BinaryOp>::Type(_expression(), internal::member_redux<BinaryOp, Scalar>(func));
349 internal::member_sum<RealScalar, RealScalar>, Direction>
350 SquaredNormReturnType;
356 typedef EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(SumReturnType,
Scalar, quotient) MeanReturnType;
365 struct LpNormReturnType {
381 EIGEN_DEVICE_FUNC
const MinCoeffReturnType
minCoeff()
const {
382 eigen_assert(redux_length() > 0 &&
"you are using an empty matrix");
383 return MinCoeffReturnType(_expression());
398 EIGEN_DEVICE_FUNC
const MaxCoeffReturnType
maxCoeff()
const {
399 eigen_assert(redux_length() > 0 &&
"you are using an empty matrix");
400 return MaxCoeffReturnType(_expression());
411 EIGEN_DEVICE_FUNC
const SquaredNormReturnType
squaredNorm()
const {
412 return SquaredNormReturnType(m_matrix.cwiseAbs2());
423 EIGEN_DEVICE_FUNC
const NormReturnType
norm()
const {
return NormReturnType(
squaredNorm()); }
434 EIGEN_DEVICE_FUNC
const typename LpNormReturnType<p>::Type
lpNorm()
const {
435 return typename LpNormReturnType<p>::Type(_expression());
444 EIGEN_DEVICE_FUNC
const BlueNormReturnType
blueNorm()
const {
return BlueNormReturnType(_expression()); }
452 EIGEN_DEVICE_FUNC
const StableNormReturnType
stableNorm()
const {
return StableNormReturnType(_expression()); }
460 EIGEN_DEVICE_FUNC
const HypotNormReturnType
hypotNorm()
const {
return HypotNormReturnType(_expression()); }
469 EIGEN_DEVICE_FUNC
const SumReturnType
sum()
const {
return SumReturnType(_expression()); }
475 EIGEN_DEVICE_FUNC
const MeanReturnType
mean()
const {
476 return sum() / Scalar(Direction ==
Vertical ? m_matrix.rows() : m_matrix.cols());
484 EIGEN_DEVICE_FUNC
const AllReturnType
all()
const {
return AllReturnType(_expression()); }
491 EIGEN_DEVICE_FUNC
const AnyReturnType
any()
const {
return AnyReturnType(_expression()); }
502 EIGEN_DEVICE_FUNC
const CountReturnType
count()
const {
return CountReturnType(_expression()); }
511 EIGEN_DEVICE_FUNC
const ProdReturnType
prod()
const {
return ProdReturnType(_expression()); }
520 EIGEN_DEVICE_FUNC
const ConstReverseReturnType
reverse()
const {
return ConstReverseReturnType(_expression()); }
526 EIGEN_DEVICE_FUNC ReverseReturnType
reverse() {
return ReverseReturnType(_expression()); }
528 typedef Replicate<ExpressionType, (isVertical ?
Dynamic : 1), (isHorizontal ?
Dynamic : 1)> ReplicateReturnType;
541 template <
int Factor>
542 const Replicate<ExpressionType, isVertical * Factor + isHorizontal,
543 isHorizontal * Factor + isVertical> EIGEN_DEVICE_FUNC
546 _expression(), isVertical ? factor : 1, isHorizontal ? factor : 1);
552 template <
typename OtherDerived>
554 EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
555 EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
557 return m_matrix = extendedTo(other.derived());
561 template <
typename OtherDerived>
563 EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
564 EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
565 return m_matrix += extendedTo(other.derived());
569 template <
typename OtherDerived>
571 EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
572 EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
573 return m_matrix -= extendedTo(other.derived());
577 template <
typename OtherDerived>
579 EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
580 EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
581 EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
582 m_matrix *= extendedTo(other.derived());
587 template <
typename OtherDerived>
589 EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
590 EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
591 EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
592 m_matrix /= extendedTo(other.derived());
597 template <
typename OtherDerived>
598 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
600 const typename ExtendedType<OtherDerived>::Type>
602 EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
603 EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
604 return m_matrix + extendedTo(other.derived());
608 template <
typename OtherDerived>
610 const ExpressionTypeCleaned,
const typename ExtendedType<OtherDerived>::Type>
612 EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
613 EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
614 return m_matrix - extendedTo(other.derived());
619 template <
typename OtherDerived>
621 const ExpressionTypeCleaned,
const typename ExtendedType<OtherDerived>::Type>
623 EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
624 EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
625 EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
626 return m_matrix * extendedTo(other.derived());
631 template <
typename OtherDerived>
633 const ExpressionTypeCleaned,
const typename ExtendedType<OtherDerived>::Type>
635 EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived)
636 EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType)
637 EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived)
638 return m_matrix / extendedTo(other.derived());
641 using Normalized_NonzeroNormType =
644 const typename OppositeExtendedType<Normalized_NonzeroNormType>::Type>;
655 return m_matrix.cwiseQuotient(extendedToOpposite(Normalized_NonzeroNormType(this->
norm())));
673 typedef typename ExpressionType::PlainObject CrossReturnType;
674 template <
typename OtherDerived>
678 HNormalized_Size = Direction ==
Vertical ? internal::traits<ExpressionType>::RowsAtCompileTime
679 : internal::traits<ExpressionType>::ColsAtCompileTime,
680 HNormalized_SizeMinusOne = HNormalized_Size ==
Dynamic ?
Dynamic : HNormalized_Size - 1
682 typedef Block<
const ExpressionType,
683 Direction ==
Vertical ? int(HNormalized_SizeMinusOne)
684 : int(internal::traits<ExpressionType>::RowsAtCompileTime),
685 Direction ==
Horizontal ? int(HNormalized_SizeMinusOne)
686 : int(internal::traits<ExpressionType>::ColsAtCompileTime)>
688 typedef Block<
const ExpressionType,
689 Direction ==
Vertical ? 1 : int(internal::traits<ExpressionType>::RowsAtCompileTime),
690 Direction ==
Horizontal ? 1 : int(internal::traits<ExpressionType>::ColsAtCompileTime)>
693 const HNormalized_Block,
694 const Replicate<HNormalized_Factors, Direction ==
Vertical ? HNormalized_SizeMinusOne : 1,
695 Direction ==
Horizontal ? HNormalized_SizeMinusOne : 1> >
696 HNormalizedReturnType;
698 EIGEN_DEVICE_FUNC
const HNormalizedReturnType
hnormalized()
const;
700#ifdef EIGEN_VECTORWISEOP_PLUGIN
701#include EIGEN_VECTORWISEOP_PLUGIN
705 EIGEN_DEVICE_FUNC
Index redux_length()
const {
return Direction ==
Vertical ? m_matrix.rows() : m_matrix.cols(); }
706 ExpressionType& m_matrix;
715template <
typename Derived>
717 return ColwiseReturnType(derived());
726template <
typename Derived>
728 return RowwiseReturnType(derived());
Expression of a fixed-size or dynamic-size block.
Definition Block.h:110
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition CwiseBinaryOp.h:79
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition CwiseUnaryOp.h:53
Base class for all dense matrices, vectors, and arrays.
Definition DenseBase.h:44
ConstColwiseReturnType colwise() const
Definition DenseBase.h:518
ConstRowwiseReturnType rowwise() const
Definition DenseBase.h:508
Expression of one (or a set of) homogeneous vector(s)
Definition Homogeneous.h:62
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:52
Generic expression of a partially reduxed matrix.
Definition VectorwiseOp.h:59
Expression of the multiple replication of a matrix or vector.
Definition Replicate.h:64
Expression of the reverse of a vector or matrix.
Definition Reverse.h:65
const HypotNormReturnType hypotNorm() const
Definition VectorwiseOp.h:460
const SquaredNormReturnType squaredNorm() const
Definition VectorwiseOp.h:411
const Replicate< ExpressionType, isVertical *Factor+isHorizontal, isHorizontal *Factor+isVertical > replicate(Index factor=Factor) const
Definition VectorwiseOp.h:544
const ProdReturnType prod() const
Definition VectorwiseOp.h:511
NormalizedReturnType normalized() const
Definition VectorwiseOp.h:654
const_reverse_iterator crend() const
Definition VectorwiseOp.h:328
ExpressionType & operator-=(const DenseBase< OtherDerived > &other)
Definition VectorwiseOp.h:570
CwiseBinaryOp< internal::scalar_difference_op< Scalar, typename OtherDerived::Scalar >, const ExpressionTypeCleaned, const typename ExtendedType< OtherDerived >::Type > operator-(const DenseBase< OtherDerived > &other) const
Definition VectorwiseOp.h:611
const BlueNormReturnType blueNorm() const
Definition VectorwiseOp.h:444
ExpressionType & operator/=(const DenseBase< OtherDerived > &other)
Definition VectorwiseOp.h:588
const_iterator cend() const
Definition VectorwiseOp.h:317
random_access_iterator_type const_iterator
Definition VectorwiseOp.h:275
CwiseBinaryOp< internal::scalar_product_op< Scalar, typename OtherDerived::Scalar >, const ExpressionTypeCleaned, const typename ExtendedType< OtherDerived >::Type > operator*(const DenseBase< OtherDerived > &other) const
Definition VectorwiseOp.h:622
const CountReturnType count() const
Definition VectorwiseOp.h:502
const ReplicateReturnType replicate(Index factor) const
Definition Replicate.h:123
const MaxCoeffReturnType maxCoeff() const
Definition VectorwiseOp.h:398
const SumReturnType sum() const
Definition VectorwiseOp.h:469
ExpressionType & operator*=(const DenseBase< OtherDerived > &other)
Definition VectorwiseOp.h:578
const_iterator cbegin() const
Definition VectorwiseOp.h:291
const MinCoeffReturnType minCoeff() const
Definition VectorwiseOp.h:381
reverse_iterator rbegin()
Definition VectorwiseOp.h:296
const AnyReturnType any() const
Definition VectorwiseOp.h:491
const AllReturnType all() const
Definition VectorwiseOp.h:484
iterator end()
Definition VectorwiseOp.h:311
random_access_iterator_type iterator
Definition VectorwiseOp.h:273
const_reverse_iterator rbegin() const
Definition VectorwiseOp.h:300
reverse_iterator rend()
Definition VectorwiseOp.h:324
const MeanReturnType mean() const
Definition VectorwiseOp.h:475
const_iterator begin() const
Definition VectorwiseOp.h:289
ExpressionType & operator=(const DenseBase< OtherDerived > &other)
Definition VectorwiseOp.h:553
ReverseReturnType reverse()
Definition VectorwiseOp.h:526
void reverseInPlace()
Definition Reverse.h:196
iterator begin()
Definition VectorwiseOp.h:287
ExpressionType & operator+=(const DenseBase< OtherDerived > &other)
Definition VectorwiseOp.h:562
CwiseBinaryOp< internal::scalar_sum_op< Scalar, typename OtherDerived::Scalar >, const ExpressionTypeCleaned, const typename ExtendedType< OtherDerived >::Type > operator+(const DenseBase< OtherDerived > &other) const
Definition VectorwiseOp.h:601
const_iterator end() const
Definition VectorwiseOp.h:313
void normalize()
Definition VectorwiseOp.h:664
const StableNormReturnType stableNorm() const
Definition VectorwiseOp.h:452
const LpNormReturnType< p >::Type lpNorm() const
Definition VectorwiseOp.h:434
CwiseBinaryOp< internal::scalar_quotient_op< Scalar, typename OtherDerived::Scalar >, const ExpressionTypeCleaned, const typename ExtendedType< OtherDerived >::Type > operator/(const DenseBase< OtherDerived > &other) const
Definition VectorwiseOp.h:634
const ConstReverseReturnType reverse() const
Definition VectorwiseOp.h:520
const_reverse_iterator crbegin() const
Definition VectorwiseOp.h:304
const NormReturnType norm() const
Definition VectorwiseOp.h:423
const ReduxReturnType< BinaryOp >::Type redux(const BinaryOp &func=BinaryOp()) const
Definition VectorwiseOp.h:341
const_reverse_iterator rend() const
Definition VectorwiseOp.h:326
const HNormalizedReturnType hnormalized() const
column or row-wise homogeneous normalization
Definition Homogeneous.h:189
const CrossReturnType cross(const MatrixBase< OtherDerived > &other) const
Definition OrthoMethods.h:149
HomogeneousReturnType homogeneous() const
Definition Homogeneous.h:141
DirectionType
Definition Constants.h:263
@ Horizontal
Definition Constants.h:269
@ Vertical
Definition Constants.h:266
const unsigned int RowMajorBit
Definition Constants.h:70
Namespace containing all symbols from the Eigen library.
Definition B01_Experimental.dox:1
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:82
const int Dynamic
Definition Constants.h:25