# xfunctor_view

Defined in `xtensor/xfunctor_view.hpp`

template<class F, class CT>
class xt::xfunctor_view : public xt::xfunctor_applier_base<xfunctor_view<F, CT>>, public xt::xview_semantic<xfunctor_view<F, CT>>, public extension::xfunctor_view_base_t<F, CT>

  View of an xexpression .

  The xfunctor_view class is an expression addressing its elements by applying a functor to the corresponding element of an underlying expression. Unlike e.g. xgenerator, an xfunctor_view is an lvalue. It is used e.g. to access real and imaginary parts of complex expressions.

  xfunctor_view has a view semantics and can be used on any expression. For a similar feature with a container semantics, one can use xfunctor_adaptor.

  xfunctor_view is not meant to be used directly, but through helper functions such as real or imag.

  See

    real, imag

  tparam F

    the functor type to be applied to the elements of specified expression.

  tparam CT

    the closure type of the xexpression type underlying this view

  Extended copy semantic

  template<class E>
  inline auto operator=(const xexpression<E> &e) -> self_type&

    The extended assignment operator.

Defined in `xtensor/xcomplex.hpp`

Warning

doxygenfunction: Unable to resolve function “xt::real” with arguments (E&&) in doxygen xml output for project “xtensor” from directory: ../xml. Potential matches:

    - template<class E> decltype(auto) real(E &&e) noexcept

Warning

doxygenfunction: Unable to resolve function “xt::imag” with arguments (E&&) in doxygen xml output for project “xtensor” from directory: ../xml. Potential matches:

    - template<class E> decltype(auto) imag(E &&e) noexcept