Main MRPT website > C++ reference
MRPT logo
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
Eigen::VectorwiseOp Class Reference

Detailed Description

Pseudo expression providing partial reduction operations.

Parameters:
ExpressionTypethe type of the object on which to do partial reductions
Directionindicates 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:

See also:
DenseBase::colwise(), DenseBase::rowwise(), class PartialReduxExpr

List of all members.

Classes

struct  ExtendedType
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 ExpressionType::Index Index
typedef internal::conditional
< internal::must_nest_by_value
< ExpressionType >::ret,
ExpressionType, ExpressionType & >
::type 
ExpressionTypeNested
typedef internal::remove_all
< ExpressionTypeNested >::type 
ExpressionTypeNestedCleaned
typedef Replicate
< ExpressionType, Direction==Vertical?Dynamic:1,
Direction==Horizontal?Dynamic:1 > 
ReplicateReturnType
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

 VectorwiseOp (ExpressionType &matrix)
const ExpressionType & _expression () const
template<typename BinaryOp >
const ReduxReturnType
< BinaryOp >::Type 
redux (const BinaryOp &func=BinaryOp()) const
const ReturnType
< internal::member_minCoeff >
::Type 
minCoeff () const
const ReturnType
< internal::member_maxCoeff >
::Type 
maxCoeff () const
const ReturnType
< internal::member_squaredNorm,
RealScalar >::Type 
squaredNorm () const
const ReturnType
< internal::member_norm,
RealScalar >::Type 
norm () const
const ReturnType
< internal::member_blueNorm,
RealScalar >::Type 
blueNorm () const
const ReturnType
< internal::member_stableNorm,
RealScalar >::Type 
stableNorm () const
const ReturnType
< internal::member_hypotNorm,
RealScalar >::Type 
hypotNorm () const
const ReturnType
< internal::member_sum >::Type 
sum () const
const ReturnType
< internal::member_mean >
::Type 
mean () const
const ReturnType
< internal::member_all >::Type 
all () const
const ReturnType
< internal::member_any >::Type 
any () const
const PartialReduxExpr
< ExpressionType,
internal::member_count< Index >
, Direction > 
count () const
const ReturnType
< internal::member_prod >
::Type 
prod () const
const Reverse< ExpressionType,
Direction > 
reverse () const
const ReplicateReturnType replicate (Index factor) const
template<int Factor>
const Replicate
< ExpressionType,(IsVertical?Factor:1),(IsHorizontal?Factor:1)> 
replicate (Index factor=Factor) const
template<typename OtherDerived >
ExpressionType & operator= (const DenseBase< OtherDerived > &other)
 Copies the vector other to each subvector of *this.
template<typename OtherDerived >
ExpressionType & operator+= (const DenseBase< OtherDerived > &other)
 Adds the vector other to each subvector of *this.
template<typename OtherDerived >
ExpressionType & operator-= (const DenseBase< OtherDerived > &other)
 Substracts the vector other to each subvector of *this.
template<typename OtherDerived >
EIGEN_STRONG_INLINE
CwiseBinaryOp
< internal::scalar_sum_op
< Scalar >, const
ExpressionTypeNestedCleaned,
const typename ExtendedType
< OtherDerived >::Type > 
operator+ (const DenseBase< OtherDerived > &other) const
 Returns the expression of the sum of the vector other to each subvector of *this.
template<typename OtherDerived >
CwiseBinaryOp
< internal::scalar_difference_op
< Scalar >, const
ExpressionTypeNestedCleaned,
const typename ExtendedType
< OtherDerived >::Type > 
operator- (const DenseBase< OtherDerived > &other) const
 Returns the expression of the difference between each subvector of *this and the vector other.
Homogeneous< ExpressionType,
Direction > 
homogeneous () const
 
template<typename OtherDerived >
const CrossReturnType cross (const MatrixBase< OtherDerived > &other) const
const HNormalizedReturnType hnormalized () const
 

Protected Types

typedef internal::conditional
< Direction==Vertical,
typename
ExpressionType::ColXpr,
typename
ExpressionType::RowXpr >::type 
SubVector

Protected Member Functions

SubVector subVector (Index i)
Index subVectors () const
template<typename OtherDerived >
ExtendedType< OtherDerived >::Type extendedTo (const DenseBase< OtherDerived > &other) const

Protected Attributes

ExpressionTypeNested m_matrix

Member Typedef Documentation

typedef ExpressionType::PlainObject Eigen::VectorwiseOp::CrossReturnType

Definition at line 476 of file Core.

typedef internal::conditional<internal::must_nest_by_value<ExpressionType>::ret, ExpressionType, ExpressionType&>::type Eigen::VectorwiseOp::ExpressionTypeNested

Definition at line 187 of file Core.

Definition at line 188 of file Core.

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::HNormalized_Block

Definition at line 490 of file Core.

typedef Block<const ExpressionType, Direction==Vertical ? 1 : int(internal::traits<ExpressionType>::RowsAtCompileTime), Direction==Horizontal ? 1 : int(internal::traits<ExpressionType>::ColsAtCompileTime)> Eigen::VectorwiseOp::HNormalized_Factors

Definition at line 494 of file Core.

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::HNormalizedReturnType

Definition at line 500 of file Core.

typedef ExpressionType::Index Eigen::VectorwiseOp::Index

Definition at line 185 of file Core.

typedef ExpressionType::RealScalar Eigen::VectorwiseOp::RealScalar

Definition at line 184 of file Core.

typedef Replicate<ExpressionType,Direction==Vertical?Dynamic:1,Direction==Horizontal?Dynamic:1> Eigen::VectorwiseOp::ReplicateReturnType

Definition at line 396 of file Core.

typedef ExpressionType::Scalar Eigen::VectorwiseOp::Scalar

Definition at line 183 of file Core.

typedef internal::conditional<Direction==Vertical, typename ExpressionType::ColXpr, typename ExpressionType::RowXpr>::type Eigen::VectorwiseOp::SubVector [protected]

Definition at line 218 of file Core.


Member Enumeration Documentation

anonymous enum
Enumerator:
IsVertical 
IsHorizontal 

Definition at line 207 of file Core.

anonymous enum
Enumerator:
HNormalized_Size 
HNormalized_SizeMinusOne 

Definition at line 480 of file Core.


Constructor & Destructor Documentation

Eigen::VectorwiseOp::VectorwiseOp ( ExpressionType &  matrix) [inline]

Definition at line 250 of file Core.


Member Function Documentation

const ExpressionType& Eigen::VectorwiseOp::_expression ( ) const [inline]

Definition at line 253 of file Core.

const ReturnType<internal::member_all>::Type Eigen::VectorwiseOp::all ( void  ) const [inline]
Returns:
a row (or column) vector expression representing whether all coefficients of each respective column (or row) are true.
See also:
DenseBase::all()

Definition at line 355 of file Core.

const ReturnType<internal::member_any>::Type Eigen::VectorwiseOp::any ( void  ) const [inline]
Returns:
a row (or column) vector expression representing whether at least one coefficient of each respective column (or row) is true.
See also:
DenseBase::any()

Definition at line 362 of file Core.

const ReturnType<internal::member_blueNorm,RealScalar>::Type Eigen::VectorwiseOp::blueNorm ( ) const [inline]
Returns:
a row (or column) vector expression of the norm of each column (or row) of the referenced expression, using blue's algorithm.
See also:
DenseBase::blueNorm()

Definition at line 313 of file Core.

const PartialReduxExpr<ExpressionType, internal::member_count<Index>, Direction> Eigen::VectorwiseOp::count ( void  ) const [inline]
Returns:
a row (or column) vector expression representing the number of true coefficients of each respective column (or row).

Example:

Output:

See also:
DenseBase::count()

Definition at line 372 of file Core.

template<typename OtherDerived >
const VectorwiseOp< ExpressionType, Direction >::CrossReturnType Eigen::VectorwiseOp::cross ( const MatrixBase< OtherDerived > &  other) const
Returns:
a matrix expression of the cross product of each column or row of the referenced expression with the other vector.

The referenced matrix must have one dimension equal to 3. The result matrix has the same dimensions than the referenced one.

See also:
MatrixBase::cross()

Definition at line 115 of file Geometry.

template<typename OtherDerived >
ExtendedType<OtherDerived>::Type Eigen::VectorwiseOp::extendedTo ( const DenseBase< OtherDerived > &  other) const [inline, protected]

Definition at line 239 of file Core.

const VectorwiseOp< ExpressionType, Direction >::HNormalizedReturnType Eigen::VectorwiseOp::hnormalized ( ) const [inline]

Returns:
an expression of the homogeneous normalized vector of *this

Example:

Output:

See also:
MatrixBase::hnormalized()

Definition at line 190 of file Geometry.

Homogeneous< ExpressionType, Direction > Eigen::VectorwiseOp::homogeneous ( ) const [inline]

Returns:
a matrix expression of homogeneous column (or row) vectors

Example:

Output:

See also:
MatrixBase::homogeneous()

Definition at line 157 of file Geometry.

const ReturnType<internal::member_hypotNorm,RealScalar>::Type Eigen::VectorwiseOp::hypotNorm ( ) const [inline]
Returns:
a row (or column) vector expression of the norm of each column (or row) of the referenced expression, avoiding underflow and overflow using a concatenation of hypot() calls.
See also:
DenseBase::hypotNorm()

Definition at line 331 of file Core.

const ReturnType<internal::member_maxCoeff>::Type Eigen::VectorwiseOp::maxCoeff ( ) const [inline]
Returns:
a row (or column) vector expression of the largest coefficient of each column (or row) of the referenced expression.

Example:

Output:

See also:
DenseBase::maxCoeff()

Definition at line 284 of file Core.

const ReturnType<internal::member_mean>::Type Eigen::VectorwiseOp::mean ( ) const [inline]
Returns:
a row (or column) vector expression of the mean of each column (or row) of the referenced expression.
See also:
DenseBase::mean()

Definition at line 348 of file Core.

const ReturnType<internal::member_minCoeff>::Type Eigen::VectorwiseOp::minCoeff ( ) const [inline]
Returns:
a row (or column) vector expression of the smallest coefficient of each column (or row) of the referenced expression.

Example:

Output:

See also:
DenseBase::minCoeff()

Definition at line 274 of file Core.

const ReturnType<internal::member_norm,RealScalar>::Type Eigen::VectorwiseOp::norm ( ) const [inline]
Returns:
a row (or column) vector expression of the norm of each column (or row) of the referenced expression.

Example:

Output:

See also:
DenseBase::norm()

Definition at line 304 of file Core.

template<typename OtherDerived >
EIGEN_STRONG_INLINE CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type> Eigen::VectorwiseOp::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 453 of file Core.

template<typename OtherDerived >
ExpressionType& Eigen::VectorwiseOp::operator+= ( const DenseBase< OtherDerived > &  other) [inline]

Adds the vector other to each subvector of *this.

Definition at line 430 of file Core.

template<typename OtherDerived >
CwiseBinaryOp<internal::scalar_difference_op<Scalar>, const ExpressionTypeNestedCleaned, const typename ExtendedType<OtherDerived>::Type> Eigen::VectorwiseOp::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 464 of file Core.

template<typename OtherDerived >
ExpressionType& Eigen::VectorwiseOp::operator-= ( const DenseBase< OtherDerived > &  other) [inline]

Substracts the vector other to each subvector of *this.

Definition at line 440 of file Core.

template<typename OtherDerived >
ExpressionType& Eigen::VectorwiseOp::operator= ( const DenseBase< OtherDerived > &  other) [inline]

Copies the vector other to each subvector of *this.

Definition at line 419 of file Core.

const ReturnType<internal::member_prod>::Type Eigen::VectorwiseOp::prod ( ) const [inline]
Returns:
a row (or column) vector expression of the product of each column (or row) of the referenced expression.

Example:

Output:

See also:
DenseBase::prod()

Definition at line 382 of file Core.

template<typename BinaryOp >
const ReduxReturnType<BinaryOp>::Type Eigen::VectorwiseOp::redux ( const BinaryOp &  func = BinaryOp()) const [inline]
Returns:
a row or column vector expression of *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.

See also:
class VectorwiseOp, DenseBase::colwise(), DenseBase::rowwise()

Definition at line 264 of file Core.

const VectorwiseOp< ExpressionType, Direction >::ReplicateReturnType Eigen::VectorwiseOp::replicate ( Index  factor) const
Returns:
an expression of the replication of each column (or row) of *this

Example:

Output:

See also:
VectorwiseOp::replicate(), DenseBase::replicate(), class Replicate

Definition at line 178 of file Core.

template<int Factor>
const Replicate<ExpressionType,(IsVertical?Factor:1),(IsHorizontal?Factor:1)> Eigen::VectorwiseOp::replicate ( Index  factor = Factor) const [inline]
Returns:
an expression of the replication of each column (or row) of *this

Example:

Output:

See also:
VectorwiseOp::replicate(Index), DenseBase::replicate(), class Replicate

Definition at line 409 of file Core.

const Reverse<ExpressionType, Direction> Eigen::VectorwiseOp::reverse ( ) const [inline]
Returns:
a matrix expression where each column (or row) are reversed.

Example:

Output:

See also:
DenseBase::reverse()

Definition at line 393 of file Core.

const ReturnType<internal::member_squaredNorm,RealScalar>::Type Eigen::VectorwiseOp::squaredNorm ( ) const [inline]
Returns:
a row (or column) vector expression of the squared norm of each column (or row) of the referenced expression.

Example:

Output:

See also:
DenseBase::squaredNorm()

Definition at line 294 of file Core.

const ReturnType<internal::member_stableNorm,RealScalar>::Type Eigen::VectorwiseOp::stableNorm ( ) const [inline]
Returns:
a row (or column) vector expression of the norm of each column (or row) of the referenced expression, avoiding underflow and overflow.
See also:
DenseBase::stableNorm()

Definition at line 322 of file Core.

SubVector Eigen::VectorwiseOp::subVector ( Index  i) [inline, protected]

Definition at line 219 of file Core.

Index Eigen::VectorwiseOp::subVectors ( ) const [inline, protected]

Definition at line 226 of file Core.

const ReturnType<internal::member_sum>::Type Eigen::VectorwiseOp::sum ( ) const [inline]
Returns:
a row (or column) vector expression of the sum of each column (or row) of the referenced expression.

Example:

Output:

See also:
DenseBase::sum()

Definition at line 341 of file Core.


Member Data Documentation

Definition at line 505 of file Core.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011