xtensor_adaptor¶
Defined in xtensor/xtensor.hpp
- template <class EC, std::size_t N>
-
class
xt::
xtensor_adaptor
¶ Dense multidimensional container adaptor with tensor semantic and fixed dimension.
The xtensor_adaptor class implements a dense multidimensional container adaptor with tensor semantic and fixed dimension. It is used to provide a multidimensional container semantic and a tensor semantic to stl-like containers.
- Template Parameters
EC
: The container type to adapt.N
: The dimension of the adaptor.
Inherits from xt::xstrided_container< xtensor_adaptor< EC, N > >, xt::xadaptor_semantic< xtensor_adaptor< EC, N > >
Constructors
-
xtensor_adaptor
(container_type &data)¶ Constructs an xtensor_adaptor of the given stl-like container.
- Parameters
data
: the container to adapt
-
xtensor_adaptor
(container_type &data, const shape_type &shape, layout l = layout::row_major)¶ Constructs an xtensor_adaptor of the given stl-like container, with the specified shape and layout.
- Parameters
data
: the container to adaptshape
: the shape of the xtensor_adaptorl
: the layout of the xtensor_adaptor
-
xtensor_adaptor
(container_type &data, const shape_type &shape, const strides_type &strides)¶ Constructs an xtensor_adaptor of the given stl-like container, with the specified shape and strides.
- Parameters
data
: the container to adaptshape
: the shape of the xtensor_adaptorstrides
: the strides of the xtensor_adaptor
Extended copy semantic
- template <class E>
-
auto
operator=
(const xexpression<E> &e)¶ The extended assignment operator.