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.68 0.597 -0.33 -0.211 0.823 0.536 0.566 -0.605 -0.444 Here is the sum of each column: 1.04 0.815 -0.238 Here is the maximum absolute value of each column: 0.68 0.823 0.536
|
inline |
true
.
|
inline |
true
.
|
inline |
true
coefficients of each respective column (or row).Example:
Output:
Here is the matrix m: 0.68 0.597 -0.33 -0.211 0.823 0.536 0.566 -0.605 -0.444 Here is the count of elements larger or equal than 0.5 of each row: 2 2 1
|
inline |
This is defined in the Geometry module.
|
inline |
Example:
Output:
Here is the matrix m: 0.68 0.597 -0.33 -0.211 0.823 0.536 0.566 -0.605 -0.444 Here is the maximum of each column: 0.68 0.823 0.536
|
inline |
Example:
Output:
Here is the matrix m: 0.68 0.597 -0.33 -0.211 0.823 0.536 0.566 -0.605 -0.444 Here is the minimum of each column: -0.211 -0.605 -0.444
|
inline |
Example:
Output:
Here is the matrix m: 0.68 0.597 -0.33 -0.211 0.823 0.536 0.566 -0.605 -0.444 Here is the norm of each column: 0.91 1.18 0.771
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.68 0.597 -0.33 -0.211 0.823 0.536 0.566 -0.605 -0.444 Here is the square norm of each row: 0.928 1.01 0.884
|
inline |
Example:
Output:
Here is the matrix m: 0.68 0.597 -0.33 -0.211 0.823 0.536 0.566 -0.605 -0.444 Here is the sum of each row: 0.948 1.15 -0.483