xarray_adaptor
Defined in xtensor/xarray.hpp
-
template<class EC, layout_type L = ::xt::layout_type::row_major, class SC = xt::svector<typename uvector<typename EC::value_type, std::allocator<typename EC::size_type>>::size_type, 4, std::allocator<typename EC::size_type>, true>, class Tag = xtensor_expression_tag>
class xarray_adaptor : public xstrided_container<xarray_adaptor<EC, ::xt::layout_type::row_major, xt::svector<typename uvector<typename EC::value_type, std::allocator<typename EC::size_type>>::size_type, 4, std::allocator<typename EC::size_type>, true>, xtensor_expression_tag>>, public xcontainer_semantic<xarray_adaptor<EC, ::xt::layout_type::row_major, xt::svector<typename uvector<typename EC::value_type, std::allocator<typename EC::size_type>>::size_type, 4, std::allocator<typename EC::size_type>, true>, xtensor_expression_tag>>, public extension::xarray_adaptor_base_t<EC, ::xt::layout_type::row_major, xt::svector<typename uvector<typename EC::value_type, std::allocator<typename EC::size_type>>::size_type, 4, std::allocator<typename EC::size_type>, true>, xtensor_expression_tag> Dense multidimensional container adaptor with tensor semantic.
The xarray_adaptor class implements a dense multidimensional container adaptor with tensor semantic. It is used to provide a multidimensional container semantic and a tensor semantic to stl-like containers.
See also
- Template Parameters:
EC – The closure for the container type to adapt.
L – The layout_type of the adaptor.
SC – The type of the containers holding the shape and the strides.
Tag – The expression tag.
Constructors
-
inline xarray_adaptor(storage_type &&storage)
Constructs an xarray_adaptor of the given stl-like container.
- Parameters:
storage – the container to adapt
-
inline xarray_adaptor(const storage_type &storage)
Constructs an xarray_adaptor of the given stl-like container.
- Parameters:
storage – the container to adapt
-
template<class D>
inline xarray_adaptor(D &&storage, const shape_type &shape, layout_type l = L) Constructs an xarray_adaptor of the given stl-like container, with the specified shape and layout_type.
- Parameters:
storage – the container to adapt
shape – the shape of the xarray_adaptor
l – the layout_type of the xarray_adaptor
-
template<class D>
inline xarray_adaptor(D &&storage, const shape_type &shape, const strides_type &strides) Constructs an xarray_adaptor of the given stl-like container, with the specified shape and strides.
- Parameters:
storage – the container to adapt
shape – the shape of the xarray_adaptor
strides – the strides of the xarray_adaptor
Extended copy semantic
-
template<class E>
inline self_type &operator=(const xexpression<E> &e) The extended assignment operator.