xtensor_adaptor

Defined in xtensor/xtensor.hpp

template <class EC, std::size_t N, layout_type L>
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.
  • L: The layout_type of the adaptor.

Inherits from xt::xstrided_container< xtensor_adaptor< EC, N, L >, L >, xt::xadaptor_semantic< xtensor_adaptor< EC, N, L > >

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_type l = layout_type::row_major)

Constructs an xtensor_adaptor of the given stl-like container, with the specified shape and layout_type.

Parameters

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

Extended copy semantic

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

The extended assignment operator.