MOAB
4.9.3pre
|
Pseudo expression providing partial reduction operations. More...
#include <VectorwiseOp.h>
Classes | |
struct | ExtendedType |
struct | LpNormReturnType |
struct | OppositeExtendedType |
struct | ReduxReturnType |
struct | ReturnType |
Public Types | |
enum | { isVertical = (Direction==Vertical) ? 1 : 0, isHorizontal = (Direction==Horizontal) ? 1 : 0 } |
enum | { HNormalized_Size, HNormalized_SizeMinusOne = HNormalized_Size==Dynamic ? Dynamic : HNormalized_Size-1 } |
typedef ExpressionType::Scalar | Scalar |
typedef ExpressionType::RealScalar | RealScalar |
typedef Eigen::Index | Index |
typedef internal::ref_selector < ExpressionType > ::non_const_type | ExpressionTypeNested |
typedef internal::remove_all < ExpressionTypeNested >::type | ExpressionTypeNestedCleaned |
typedef ReturnType < internal::member_minCoeff > ::Type | MinCoeffReturnType |
typedef ReturnType < internal::member_maxCoeff > ::Type | MaxCoeffReturnType |
typedef ReturnType < internal::member_squaredNorm, RealScalar >::Type | SquaredNormReturnType |
typedef ReturnType < internal::member_norm, RealScalar >::Type | NormReturnType |
typedef ReturnType < internal::member_blueNorm, RealScalar >::Type | BlueNormReturnType |
typedef ReturnType < internal::member_stableNorm, RealScalar >::Type | StableNormReturnType |
typedef ReturnType < internal::member_hypotNorm, RealScalar >::Type | HypotNormReturnType |
typedef ReturnType < internal::member_sum >::Type | SumReturnType |
typedef ReturnType < internal::member_mean > ::Type | MeanReturnType |
typedef ReturnType < internal::member_all >::Type | AllReturnType |
typedef ReturnType < internal::member_any >::Type | AnyReturnType |
typedef PartialReduxExpr < ExpressionType, internal::member_count< Index > , Direction > | CountReturnType |
typedef ReturnType < internal::member_prod > ::Type | ProdReturnType |
typedef Reverse < ExpressionType, Direction > | ReverseReturnType |
typedef Replicate < ExpressionType,(isVertical?Dynamic:1),(isHorizontal?Dynamic:1)> | ReplicateReturnType |
typedef Homogeneous < ExpressionType, Direction > | HomogeneousReturnType |
typedef ExpressionType::PlainObject | CrossReturnType |
typedef Block< const ExpressionType, Direction==Vertical?int(HNormalized_SizeMinusOne):int(internal::traits < ExpressionType > ::RowsAtCompileTime), Direction==Horizontal?int(HNormalized_SizeMinusOne):int(internal::traits < ExpressionType > ::ColsAtCompileTime)> | HNormalized_Block |
typedef Block< const ExpressionType, Direction==Vertical?1:int(internal::traits < ExpressionType > ::RowsAtCompileTime), Direction==Horizontal?1:int(internal::traits < ExpressionType > ::ColsAtCompileTime)> | HNormalized_Factors |
typedef 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 |
Public Member Functions | |
EIGEN_DEVICE_FUNC | VectorwiseOp (ExpressionType &matrix) |
EIGEN_DEVICE_FUNC const ExpressionType & | _expression () const |
template<typename BinaryOp > | |
EIGEN_DEVICE_FUNC const ReduxReturnType< BinaryOp > ::Type | redux (const BinaryOp &func=BinaryOp()) const |
EIGEN_DEVICE_FUNC const MinCoeffReturnType | minCoeff () const |
EIGEN_DEVICE_FUNC const MaxCoeffReturnType | maxCoeff () const |
EIGEN_DEVICE_FUNC const SquaredNormReturnType | squaredNorm () const |
EIGEN_DEVICE_FUNC const NormReturnType | norm () const |
template<int p> | |
EIGEN_DEVICE_FUNC const LpNormReturnType< p >::Type | lpNorm () const |
EIGEN_DEVICE_FUNC const BlueNormReturnType | blueNorm () const |
EIGEN_DEVICE_FUNC const StableNormReturnType | stableNorm () const |
EIGEN_DEVICE_FUNC const HypotNormReturnType | hypotNorm () const |
EIGEN_DEVICE_FUNC const SumReturnType | sum () const |
EIGEN_DEVICE_FUNC const MeanReturnType | mean () const |
EIGEN_DEVICE_FUNC const AllReturnType | all () const |
EIGEN_DEVICE_FUNC const AnyReturnType | any () const |
EIGEN_DEVICE_FUNC const CountReturnType | count () const |
EIGEN_DEVICE_FUNC const ProdReturnType | prod () const |
EIGEN_DEVICE_FUNC const ReverseReturnType | reverse () const |
EIGEN_DEVICE_FUNC const ReplicateReturnType | replicate (Index factor) const |
template<int Factor> | |
const Replicate < ExpressionType, isVertical *Factor+isHorizontal, isHorizontal *Factor+isVertical > EIGEN_DEVICE_FUNC | replicate (Index factor=Factor) const |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC ExpressionType & | operator= (const DenseBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC ExpressionType & | operator+= (const DenseBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC ExpressionType & | operator-= (const DenseBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC ExpressionType & | operator*= (const DenseBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC ExpressionType & | operator/= (const DenseBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC CwiseBinaryOp < internal::scalar_sum_op < Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType < OtherDerived >::Type > | operator+ (const DenseBase< OtherDerived > &other) const |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC CwiseBinaryOp < internal::scalar_difference_op < Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType < OtherDerived >::Type > | operator- (const DenseBase< OtherDerived > &other) const |
template<typename OtherDerived > | |
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC CwiseBinaryOp < internal::scalar_product_op < Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType < OtherDerived >::Type > EIGEN_DEVICE_FUNC | operator* (const DenseBase< OtherDerived > &other) const |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC CwiseBinaryOp < internal::scalar_quotient_op < Scalar >, const ExpressionTypeNestedCleaned, const typename ExtendedType < OtherDerived >::Type > | operator/ (const DenseBase< OtherDerived > &other) const |
EIGEN_DEVICE_FUNC CwiseBinaryOp < internal::scalar_quotient_op < Scalar >, const ExpressionTypeNestedCleaned, const typename OppositeExtendedType< typename ReturnType < internal::member_norm, RealScalar >::Type >::Type > | normalized () const |
EIGEN_DEVICE_FUNC void | normalize () |
EIGEN_DEVICE_FUNC void | reverseInPlace () |
HomogeneousReturnType | homogeneous () const |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC const CrossReturnType | cross (const MatrixBase< OtherDerived > &other) const |
const HNormalizedReturnType | hnormalized () const |
Protected Types | |
typedef internal::conditional < isVertical, typename ExpressionType::ColXpr, typename ExpressionType::RowXpr >::type | SubVector |
Protected Member Functions | |
EIGEN_DEVICE_FUNC SubVector | subVector (Index i) |
EIGEN_DEVICE_FUNC Index | subVectors () const |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC ExtendedType < OtherDerived >::Type | extendedTo (const DenseBase< OtherDerived > &other) const |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC OppositeExtendedType < OtherDerived >::Type | extendedToOpposite (const DenseBase< OtherDerived > &other) const |
Protected Attributes | |
ExpressionTypeNested | m_matrix |
Pseudo expression providing partial reduction operations.
ExpressionType | the type of the object on which to do partial reductions |
Direction | indicates the direction of the redux (Vertical or Horizontal) |
This class represents a pseudo expression with partial reduction features. It is the return type of DenseBase::colwise() and DenseBase::rowwise() and most of the time this is the only way it is used.
Example:
Output:
Definition at line 156 of file VectorwiseOp.h.
typedef ReturnType<internal::member_all>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::AllReturnType |
Definition at line 283 of file VectorwiseOp.h.
typedef ReturnType<internal::member_any>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::AnyReturnType |
Definition at line 284 of file VectorwiseOp.h.
typedef ReturnType<internal::member_blueNorm,RealScalar>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::BlueNormReturnType |
Definition at line 278 of file VectorwiseOp.h.
typedef PartialReduxExpr<ExpressionType, internal::member_count<Index>, Direction> Eigen::VectorwiseOp< ExpressionType, Direction >::CountReturnType |
Definition at line 285 of file VectorwiseOp.h.
typedef ExpressionType::PlainObject Eigen::VectorwiseOp< ExpressionType, Direction >::CrossReturnType |
Definition at line 621 of file VectorwiseOp.h.
typedef internal::ref_selector<ExpressionType>::non_const_type Eigen::VectorwiseOp< ExpressionType, Direction >::ExpressionTypeNested |
Definition at line 163 of file VectorwiseOp.h.
typedef internal::remove_all<ExpressionTypeNested>::type Eigen::VectorwiseOp< ExpressionType, Direction >::ExpressionTypeNestedCleaned |
Definition at line 164 of file VectorwiseOp.h.
typedef Block<const ExpressionType, Direction==Vertical ? int(HNormalized_SizeMinusOne) : int(internal::traits<ExpressionType>::RowsAtCompileTime), Direction==Horizontal ? int(HNormalized_SizeMinusOne) : int(internal::traits<ExpressionType>::ColsAtCompileTime)> Eigen::VectorwiseOp< ExpressionType, Direction >::HNormalized_Block |
Definition at line 636 of file VectorwiseOp.h.
typedef Block<const ExpressionType, Direction==Vertical ? 1 : int(internal::traits<ExpressionType>::RowsAtCompileTime), Direction==Horizontal ? 1 : int(internal::traits<ExpressionType>::ColsAtCompileTime)> Eigen::VectorwiseOp< ExpressionType, Direction >::HNormalized_Factors |
Definition at line 640 of file VectorwiseOp.h.
typedef 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> > Eigen::VectorwiseOp< ExpressionType, Direction >::HNormalizedReturnType |
Definition at line 646 of file VectorwiseOp.h.
typedef Homogeneous<ExpressionType,Direction> Eigen::VectorwiseOp< ExpressionType, Direction >::HomogeneousReturnType |
Definition at line 618 of file VectorwiseOp.h.
typedef ReturnType<internal::member_hypotNorm,RealScalar>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::HypotNormReturnType |
Definition at line 280 of file VectorwiseOp.h.
typedef Eigen::Index Eigen::VectorwiseOp< ExpressionType, Direction >::Index |
Definition at line 162 of file VectorwiseOp.h.
typedef ReturnType<internal::member_maxCoeff>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::MaxCoeffReturnType |
Definition at line 275 of file VectorwiseOp.h.
typedef ReturnType<internal::member_mean>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::MeanReturnType |
Definition at line 282 of file VectorwiseOp.h.
typedef ReturnType<internal::member_minCoeff>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::MinCoeffReturnType |
Definition at line 274 of file VectorwiseOp.h.
typedef ReturnType<internal::member_norm,RealScalar>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::NormReturnType |
Definition at line 277 of file VectorwiseOp.h.
typedef ReturnType<internal::member_prod>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::ProdReturnType |
Definition at line 286 of file VectorwiseOp.h.
typedef ExpressionType::RealScalar Eigen::VectorwiseOp< ExpressionType, Direction >::RealScalar |
Definition at line 161 of file VectorwiseOp.h.
typedef Replicate<ExpressionType,(isVertical?Dynamic:1),(isHorizontal?Dynamic:1)> Eigen::VectorwiseOp< ExpressionType, Direction >::ReplicateReturnType |
Definition at line 462 of file VectorwiseOp.h.
typedef Reverse<ExpressionType, Direction> Eigen::VectorwiseOp< ExpressionType, Direction >::ReverseReturnType |
Definition at line 287 of file VectorwiseOp.h.
typedef ExpressionType::Scalar Eigen::VectorwiseOp< ExpressionType, Direction >::Scalar |
Definition at line 160 of file VectorwiseOp.h.
typedef ReturnType<internal::member_squaredNorm,RealScalar>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::SquaredNormReturnType |
Definition at line 276 of file VectorwiseOp.h.
typedef ReturnType<internal::member_stableNorm,RealScalar>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::StableNormReturnType |
Definition at line 279 of file VectorwiseOp.h.
typedef internal::conditional<isVertical, typename ExpressionType::ColXpr, typename ExpressionType::RowXpr>::type Eigen::VectorwiseOp< ExpressionType, Direction >::SubVector [protected] |
Definition at line 192 of file VectorwiseOp.h.
typedef ReturnType<internal::member_sum>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::SumReturnType |
Definition at line 281 of file VectorwiseOp.h.
anonymous enum |
Definition at line 183 of file VectorwiseOp.h.
{ isVertical = (Direction==Vertical) ? 1 : 0, isHorizontal = (Direction==Horizontal) ? 1 : 0 };
anonymous enum |
Definition at line 626 of file VectorwiseOp.h.
{ HNormalized_Size = Direction==Vertical ? internal::traits<ExpressionType>::RowsAtCompileTime : internal::traits<ExpressionType>::ColsAtCompileTime, HNormalized_SizeMinusOne = HNormalized_Size==Dynamic ? Dynamic : HNormalized_Size-1 };
EIGEN_DEVICE_FUNC Eigen::VectorwiseOp< ExpressionType, Direction >::VectorwiseOp | ( | ExpressionType & | matrix | ) | [inline, explicit] |
Definition at line 255 of file VectorwiseOp.h.
: m_matrix(matrix) {}
EIGEN_DEVICE_FUNC const ExpressionType& Eigen::VectorwiseOp< ExpressionType, Direction >::_expression | ( | ) | const [inline] |
Definition at line 259 of file VectorwiseOp.h.
{ return m_matrix; }
EIGEN_DEVICE_FUNC const AllReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::all | ( | ) | const [inline] |
true
. This expression can be assigned to a vector with entries of type bool
.Definition at line 414 of file VectorwiseOp.h.
{ return AllReturnType(_expression()); }
EIGEN_DEVICE_FUNC const AnyReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::any | ( | ) | const [inline] |
true
. This expression can be assigned to a vector with entries of type bool
.Definition at line 423 of file VectorwiseOp.h.
{ return AnyReturnType(_expression()); }
EIGEN_DEVICE_FUNC const BlueNormReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::blueNorm | ( | ) | const [inline] |
Definition at line 364 of file VectorwiseOp.h.
{ return BlueNormReturnType(_expression()); }
EIGEN_DEVICE_FUNC const CountReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::count | ( | ) | const [inline] |
true
coefficients of each respective column (or row). This expression can be assigned to a vector whose entries have the same type as is used to index entries of the original matrix; for dense matrices, this is std::ptrdiff_t
.Example:
Output:
Definition at line 436 of file VectorwiseOp.h.
{ return CountReturnType(_expression()); }
EIGEN_DEVICE_FUNC ExtendedType<OtherDerived>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::extendedTo | ( | const DenseBase< OtherDerived > & | other | ) | const [inline, protected] |
Replicates a vector to match the size of *this
Definition at line 218 of file VectorwiseOp.h.
{ EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(isVertical, OtherDerived::MaxColsAtCompileTime==1), YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED) EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(isHorizontal, OtherDerived::MaxRowsAtCompileTime==1), YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED) return typename ExtendedType<OtherDerived>::Type (other.derived(), isVertical ? 1 : m_matrix.rows(), isHorizontal ? 1 : m_matrix.cols()); }
EIGEN_DEVICE_FUNC OppositeExtendedType<OtherDerived>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::extendedToOpposite | ( | const DenseBase< OtherDerived > & | other | ) | const [inline, protected] |
Replicates a vector in the opposite direction to match the size of *this
Definition at line 241 of file VectorwiseOp.h.
{ EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(isHorizontal, OtherDerived::MaxColsAtCompileTime==1), YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED) EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(isVertical, OtherDerived::MaxRowsAtCompileTime==1), YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED) return typename OppositeExtendedType<OtherDerived>::Type (other.derived(), isHorizontal ? 1 : m_matrix.rows(), isVertical ? 1 : m_matrix.cols()); }
EIGEN_DEVICE_FUNC const HypotNormReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::hypotNorm | ( | ) | const [inline] |
Definition at line 386 of file VectorwiseOp.h.
{ return HypotNormReturnType(_expression()); }
EIGEN_DEVICE_FUNC const LpNormReturnType<p>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::lpNorm | ( | ) | const [inline] |
Example:
Output:
Definition at line 353 of file VectorwiseOp.h.
{ return typename LpNormReturnType<p>::Type(_expression()); }
EIGEN_DEVICE_FUNC const MaxCoeffReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::maxCoeff | ( | ) | const [inline] |
*this
contains NaN.Example:
Output:
Definition at line 316 of file VectorwiseOp.h.
{ return MaxCoeffReturnType(_expression()); }
EIGEN_DEVICE_FUNC const MeanReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::mean | ( | ) | const [inline] |
Definition at line 405 of file VectorwiseOp.h.
{ return MeanReturnType(_expression()); }
EIGEN_DEVICE_FUNC const MinCoeffReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::minCoeff | ( | ) | const [inline] |
*this
contains NaN.Example:
Output:
Definition at line 303 of file VectorwiseOp.h.
{ return MinCoeffReturnType(_expression()); }
EIGEN_DEVICE_FUNC const NormReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::norm | ( | ) | const [inline] |
Example:
Output:
Definition at line 340 of file VectorwiseOp.h.
{ return NormReturnType(_expression()); }
EIGEN_DEVICE_FUNC void Eigen::VectorwiseOp< ExpressionType, Direction >::normalize | ( | ) | [inline] |
Normalize in-place each row or columns of the referenced matrix.
Definition at line 610 of file VectorwiseOp.h.
{ m_matrix = this->normalized(); }
EIGEN_DEVICE_FUNC CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const ExpressionTypeNestedCleaned, const typename OppositeExtendedType<typename ReturnType<internal::member_norm,RealScalar>::Type>::Type> Eigen::VectorwiseOp< ExpressionType, Direction >::normalized | ( | ) | const [inline] |
Definition at line 604 of file VectorwiseOp.h.
{ return m_matrix.cwiseQuotient(extendedToOpposite(this->norm())); }
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC CwiseBinaryOp<internal::scalar_product_op<Scalar>, const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type> EIGEN_DEVICE_FUNC Eigen::VectorwiseOp< ExpressionType, Direction >::operator* | ( | const DenseBase< OtherDerived > & | other | ) | const [inline] |
Returns the expression where each subvector is the product of the vector other by the corresponding subvector of *this
Definition at line 573 of file VectorwiseOp.h.
{ EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType) EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived) return m_matrix * extendedTo(other.derived()); }
EIGEN_DEVICE_FUNC ExpressionType& Eigen::VectorwiseOp< ExpressionType, Direction >::operator*= | ( | const DenseBase< OtherDerived > & | other | ) | [inline] |
Multiples each subvector of *this
by the vector other
Definition at line 520 of file VectorwiseOp.h.
{ EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType) EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived) m_matrix *= extendedTo(other.derived()); return const_cast<ExpressionType&>(m_matrix); }
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type> Eigen::VectorwiseOp< ExpressionType, Direction >::operator+ | ( | const DenseBase< OtherDerived > & | other | ) | const [inline] |
Returns the expression of the sum of the vector other to each subvector of *this
Definition at line 546 of file VectorwiseOp.h.
{ EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived) return m_matrix + extendedTo(other.derived()); }
EIGEN_DEVICE_FUNC ExpressionType& Eigen::VectorwiseOp< ExpressionType, Direction >::operator+= | ( | const DenseBase< OtherDerived > & | other | ) | [inline] |
Adds the vector other to each subvector of *this
Definition at line 500 of file VectorwiseOp.h.
{ EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived) return const_cast<ExpressionType&>(m_matrix += extendedTo(other.derived())); }
EIGEN_DEVICE_FUNC CwiseBinaryOp<internal::scalar_difference_op<Scalar>, const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type> Eigen::VectorwiseOp< ExpressionType, Direction >::operator- | ( | const DenseBase< OtherDerived > & | other | ) | const [inline] |
Returns the expression of the difference between each subvector of *this
and the vector other
Definition at line 559 of file VectorwiseOp.h.
{ EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived) return m_matrix - extendedTo(other.derived()); }
EIGEN_DEVICE_FUNC ExpressionType& Eigen::VectorwiseOp< ExpressionType, Direction >::operator-= | ( | const DenseBase< OtherDerived > & | other | ) | [inline] |
Substracts the vector other to each subvector of *this
Definition at line 510 of file VectorwiseOp.h.
{ EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived) return const_cast<ExpressionType&>(m_matrix -= extendedTo(other.derived())); }
EIGEN_DEVICE_FUNC CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type> Eigen::VectorwiseOp< ExpressionType, Direction >::operator/ | ( | const DenseBase< OtherDerived > & | other | ) | const [inline] |
Returns the expression where each subvector is the quotient of the corresponding subvector of *this
by the vector other
Definition at line 588 of file VectorwiseOp.h.
{ EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType) EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived) return m_matrix / extendedTo(other.derived()); }
EIGEN_DEVICE_FUNC ExpressionType& Eigen::VectorwiseOp< ExpressionType, Direction >::operator/= | ( | const DenseBase< OtherDerived > & | other | ) | [inline] |
Divides each subvector of *this
by the vector other
Definition at line 532 of file VectorwiseOp.h.
{ EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_ARRAYXPR(ExpressionType) EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived) m_matrix /= extendedTo(other.derived()); return const_cast<ExpressionType&>(m_matrix); }
EIGEN_DEVICE_FUNC ExpressionType& Eigen::VectorwiseOp< ExpressionType, Direction >::operator= | ( | const DenseBase< OtherDerived > & | other | ) | [inline] |
Copies the vector other to each subvector of *this
Definition at line 489 of file VectorwiseOp.h.
{ EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_SAME_XPR_KIND(ExpressionType, OtherDerived) //eigen_assert((m_matrix.isNull()) == (other.isNull())); FIXME return const_cast<ExpressionType&>(m_matrix = extendedTo(other.derived())); }
EIGEN_DEVICE_FUNC const ProdReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::prod | ( | ) | const [inline] |
Example:
Output:
Definition at line 447 of file VectorwiseOp.h.
{ return ProdReturnType(_expression()); }
EIGEN_DEVICE_FUNC const ReduxReturnType<BinaryOp>::Type Eigen::VectorwiseOp< ExpressionType, Direction >::redux | ( | const BinaryOp & | func = BinaryOp() | ) | const [inline] |
*this
reduxed by func The template parameter BinaryOp is the type of the functor of the custom redux operator. Note that func must be an associative operator.
Definition at line 271 of file VectorwiseOp.h.
{ return typename ReduxReturnType<BinaryOp>::Type(_expression(), internal::member_redux<BinaryOp,Scalar>(func)); }
const VectorwiseOp< ExpressionType, Direction >::ReplicateReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::replicate | ( | Index | factor | ) | const |
*this
Example:
Output:
Definition at line 134 of file Replicate.h.
{ return typename VectorwiseOp<ExpressionType,Direction>::ReplicateReturnType (_expression(),Direction==Vertical?factor:1,Direction==Horizontal?factor:1); }
const Replicate<ExpressionType,isVertical*Factor+isHorizontal,isHorizontal*Factor+isVertical> EIGEN_DEVICE_FUNC Eigen::VectorwiseOp< ExpressionType, Direction >::replicate | ( | Index | factor = Factor | ) | const [inline] |
*this
Example:
Output:
Definition at line 478 of file VectorwiseOp.h.
{ return Replicate<ExpressionType,(isVertical?Factor:1),(isHorizontal?Factor:1)> (_expression(),isVertical?factor:1,isHorizontal?factor:1); }
EIGEN_DEVICE_FUNC const ReverseReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::reverse | ( | ) | const [inline] |
Example:
Output:
Definition at line 459 of file VectorwiseOp.h.
{ return ReverseReturnType( _expression() ); }
void Eigen::VectorwiseOp< ExpressionType, Direction >::reverseInPlace | ( | ) | [inline] |
This is the "in place" version of VectorwiseOp::reverse: it reverses each column or row of *this
.
In most cases it is probably better to simply use the reversed expression of a matrix. However, when reversing the matrix data itself is really needed, then this "in-place" version is probably the right choice because it provides the following additional benefits:
m = m.reverse().eval();
Definition at line 204 of file Reverse.h.
{ internal::vectorwise_reverse_inplace_impl<Direction>::run(_expression().const_cast_derived()); }
EIGEN_DEVICE_FUNC const SquaredNormReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::squaredNorm | ( | ) | const [inline] |
Example:
Output:
Definition at line 328 of file VectorwiseOp.h.
{ return SquaredNormReturnType(_expression()); }
EIGEN_DEVICE_FUNC const StableNormReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::stableNorm | ( | ) | const [inline] |
Definition at line 375 of file VectorwiseOp.h.
{ return StableNormReturnType(_expression()); }
EIGEN_DEVICE_FUNC SubVector Eigen::VectorwiseOp< ExpressionType, Direction >::subVector | ( | Index | i | ) | [inline, protected] |
Direction
Definition at line 196 of file VectorwiseOp.h.
EIGEN_DEVICE_FUNC Index Eigen::VectorwiseOp< ExpressionType, Direction >::subVectors | ( | ) | const [inline, protected] |
Direction
Definition at line 204 of file VectorwiseOp.h.
{ return isVertical?m_matrix.cols():m_matrix.rows(); }
EIGEN_DEVICE_FUNC const SumReturnType Eigen::VectorwiseOp< ExpressionType, Direction >::sum | ( | ) | const [inline] |
Example:
Output:
Definition at line 397 of file VectorwiseOp.h.
{ return SumReturnType(_expression()); }
ExpressionTypeNested Eigen::VectorwiseOp< ExpressionType, Direction >::m_matrix [protected] |
Definition at line 651 of file VectorwiseOp.h.