template<typename UnaryOp, typename XprType>
Eigen::CwiseUnaryOp class

Generic expression where a coefficient-wise unary operator is applied to an expression.

Template parameters
UnaryOp template functor implementing the operator
XprType the type of the expression to which we are applying the unary operator

Contents

This class represents an expression where a unary operator is applied to an expression. It is the return type of all operations taking exactly 1 input expression, regardless of the presence of other inputs such as scalars. For example, the operator* in the expression 3*matrix is considered unary, because only the right-hand side is an expression, and its return type is a specialization of CwiseUnaryOp.

Most of the time, this is the only way that it is used, so you typically don't have to name CwiseUnaryOp types explicitly.

Public functions

auto functor() const -> const UnaryOp&
auto nestedExpression() const -> const internal::remove_all<XprTypeNested>::type&
auto nestedExpression() -> internal::remove_all<XprTypeNested>::type&

Function documentation

template<typename UnaryOp, typename XprType>
const UnaryOp& Eigen::CwiseUnaryOp<UnaryOp, XprType>::functor() const

Returns the functor representing the unary operation

template<typename UnaryOp, typename XprType>
const internal::remove_all<XprTypeNested>::type& Eigen::CwiseUnaryOp<UnaryOp, XprType>::nestedExpression() const

Returns the nested expression

template<typename UnaryOp, typename XprType>
internal::remove_all<XprTypeNested>::type& Eigen::CwiseUnaryOp<UnaryOp, XprType>::nestedExpression()

Returns the nested expression