xfunctor_view¶
Defined in xtensor/xfunctor_view.hpp
-
template<class
F
, classCT
>
classxfunctor_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
- Template Parameters
F
: the functor type to be applied to the elements of specified expression.CT
: the closure type of the xexpression type underlying this view
Extended copy semantic
-
template<class
E
>
autooperator=
(const xexpression<E> &e)¶ The extended assignment operator.
Defined in xtensor/xcomplex.hpp
-
template<class
E
>
decltype(auto)xt
::
real
(E &&e)¶ Returns an xexpression representing the real part of the given expression.
The returned expression either hold a const reference to
e
or a copy depending on whethere
is an lvalue or an rvalue.- Template Parameters
e
: the xexpression
-
template<class
E
>
decltype(auto)xt
::
imag
(E &&e)¶ Returns an xexpression representing the imaginary part of the given expression.
The returned expression either hold a const reference to
e
or a copy depending on whethere
is an lvalue or an rvalue.- Template Parameters
e
: the xexpression