Pseudo expression providing partial reduction operations. More...
Public Types | |
typedef ExpressionType::PlainMatrixType | CrossReturnType |
typedef ei_meta_if < ei_must_nest_by_value < ExpressionType >::ret, ExpressionType, const ExpressionType & >::ret | ExpressionTypeNested |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef ei_traits < ExpressionType >::Scalar | Scalar |
Public Member Functions | |
const ExpressionType & | _expression () const |
const ReturnType < ei_member_all >::Type | all () const |
const ReturnType < ei_member_any >::Type | any () const |
const PartialReduxExpr < ExpressionType, ei_member_count< int > , Direction > | count () const |
template<typename OtherDerived > | |
const CrossReturnType | cross (const MatrixBase< OtherDerived > &other) const |
const ReturnType < ei_member_maxCoeff >::Type | maxCoeff () const |
const ReturnType < ei_member_minCoeff >::Type | minCoeff () const |
const ReturnType < ei_member_norm, RealScalar > ::Type | norm () const |
PartialRedux (const ExpressionType &matrix) | |
template<typename BinaryOp > | |
const ReduxReturnType < BinaryOp >::Type | redux (const BinaryOp &func=BinaryOp()) const |
const ReturnType < ei_member_squaredNorm, RealScalar >::Type | squaredNorm () const |
const ReturnType < ei_member_sum >::Type | sum () const |
Protected Attributes | |
ExpressionTypeNested | m_matrix |
Pseudo expression providing partial reduction operations.
This is defined in the Array module.
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 MatrixBase::colwise() and MatrixBase::rowwise() and most of the time this is the only way it is used.
Example:
Output:
Here is the matrix m: 0.0277 0.0691 0.404 -0.649 0.895 -0.547 -0.383 -0.657 -0.0105 Here is the sum of each column: -1 0.308 -0.153 Here is the maximum absolute value of each column: 0.649 0.895 0.547
|
inline |
true
.
|
inline |
true
.
|
inline |
true
coefficients of each respective column (or row).Example:
Output:
Here is the matrix m: 0.0277 0.0691 0.404 -0.649 0.895 -0.547 -0.383 -0.657 -0.0105 Here is the count of elements larger or equal than 0.5 of each row: 0 1 0
|
inline |
This is defined in the Geometry module.
|
inline |
Example:
Output:
Here is the matrix m: 0.0277 0.0691 0.404 -0.649 0.895 -0.547 -0.383 -0.657 -0.0105 Here is the maximum of each column: 0.0277 0.895 0.404
|
inline |
Example:
Output:
Here is the matrix m: 0.0277 0.0691 0.404 -0.649 0.895 -0.547 -0.383 -0.657 -0.0105 Here is the minimum of each column: -0.649 -0.657 -0.547
|
inline |
Example:
Output:
Here is the matrix m: 0.0277 0.0691 0.404 -0.649 0.895 -0.547 -0.383 -0.657 -0.0105 Here is the norm of each column: 0.754 1.11 0.681
const PartialRedux< ExpressionType, Direction >::template ReduxReturnType< BinaryOp >::Type redux | ( | const BinaryOp & | func = BinaryOp() | ) | const |
*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.
|
inline |
Example:
Output:
Here is the matrix m: 0.0277 0.0691 0.404 -0.649 0.895 -0.547 -0.383 -0.657 -0.0105 Here is the square norm of each row: 0.169 1.52 0.578
|
inline |
Example:
Output:
Here is the matrix m: 0.0277 0.0691 0.404 -0.649 0.895 -0.547 -0.383 -0.657 -0.0105 Here is the sum of each row: 0.501 -0.3 -1.05