xtensor
Loading...
Searching...
No Matches
xt::xtensor_adaptor< EC, N, L, Tag > Class Template Reference

Dense multidimensional container adaptor with tensor semantics and fixed dimension. More...

#include <xtensor.hpp>

Inheritance diagram for xt::xtensor_adaptor< EC, N, L, Tag >:
xt::xstrided_container< xtensor_adaptor< EC, N, L, Tag > > xt::xcontainer_semantic< xtensor_adaptor< EC, N, L, Tag > > xt::xcontainer< D > xt::xsemantic_base< D > xt::xcontiguous_iterable< D > xt::xaccessible< D > xt::xiterable< D >

Public Types

using container_closure_type = EC
 
using self_type = xtensor_adaptor<EC, N, L, Tag>
 
using base_type = xstrided_container<self_type>
 
using semantic_base = xcontainer_semantic<self_type>
 
using extension_base = extension::xtensor_adaptor_base_t<EC, N, L, Tag>
 
using storage_type = typename base_type::storage_type
 
using allocator_type = typename base_type::allocator_type
 
using shape_type = typename base_type::shape_type
 
using strides_type = typename base_type::strides_type
 
using backstrides_type = typename base_type::backstrides_type
 
using temporary_type = typename semantic_base::temporary_type
 
using expression_tag = Tag
 
- Public Types inherited from xt::xstrided_container< xtensor_adaptor< EC, N, L, Tag > >
using base_type
 
using storage_type
 
using value_type
 
using reference
 
using const_reference
 
using pointer
 
using const_pointer
 
using size_type
 
using shape_type
 
using strides_type
 
using inner_shape_type
 
using inner_strides_type
 
using inner_backstrides_type
 
- Public Types inherited from xt::xcontainer< D >
using derived_type = D
 
using inner_types = xcontainer_inner_types<D>
 
using storage_type = typename inner_types::storage_type
 
using allocator_type = allocator_type_t<std::decay_t<storage_type>>
 
using value_type = typename storage_type::value_type
 
using reference = typename inner_types::reference
 
using const_reference = typename inner_types::const_reference
 
using pointer = typename storage_type::pointer
 
using const_pointer = typename storage_type::const_pointer
 
using size_type = typename inner_types::size_type
 
using difference_type = typename storage_type::difference_type
 
using simd_value_type = xt_simd::simd_type<value_type>
 
using bool_load_type = xt::bool_load_type<value_type>
 
using shape_type = typename inner_types::shape_type
 
using strides_type = typename inner_types::strides_type
 
using backstrides_type = typename inner_types::backstrides_type
 
using inner_shape_type = typename inner_types::inner_shape_type
 
using inner_strides_type = typename inner_types::inner_strides_type
 
using inner_backstrides_type = typename inner_types::inner_backstrides_type
 
using iterable_base = xcontiguous_iterable<D>
 
using stepper = typename iterable_base::stepper
 
using const_stepper = typename iterable_base::const_stepper
 
using accessible_base = xaccessible<D>
 
using data_alignment = xt_simd::container_alignment_t<storage_type>
 
using simd_type = xt_simd::simd_type<value_type>
 
using linear_iterator = typename iterable_base::linear_iterator
 
using const_linear_iterator = typename iterable_base::const_linear_iterator
 
using reverse_linear_iterator = typename iterable_base::reverse_linear_iterator
 
using const_reverse_linear_iterator = typename iterable_base::const_reverse_linear_iterator
 
template<class requested_type >
using simd_return_type = xt_simd::simd_return_type<value_type, requested_type>
 
using container_iterator = linear_iterator
 
using const_container_iterator = const_linear_iterator
 
- Public Types inherited from xt::xcontiguous_iterable< D >
using derived_type = D
 
using inner_types = xcontainer_inner_types<D>
 
using iterable_base = xiterable<D>
 
using stepper = typename iterable_base::stepper
 
using const_stepper = typename iterable_base::const_stepper
 
template<layout_type L>
using layout_iterator = typename iterable_base::template layout_iterator<L>
 
template<layout_type L>
using const_layout_iterator = typename iterable_base::template const_layout_iterator<L>
 
template<layout_type L>
using reverse_layout_iterator = typename iterable_base::template reverse_layout_iterator<L>
 
template<layout_type L>
using const_reverse_layout_iterator = typename iterable_base::template const_reverse_layout_iterator<L>
 
template<class S , layout_type L>
using broadcast_iterator = typename iterable_base::template broadcast_iterator<S, L>
 
template<class S , layout_type L>
using const_broadcast_iterator = typename iterable_base::template const_broadcast_iterator<S, L>
 
template<class S , layout_type L>
using reverse_broadcast_iterator = typename iterable_base::template reverse_broadcast_iterator<S, L>
 
template<class S , layout_type L>
using const_reverse_broadcast_iterator = typename iterable_base::template const_reverse_broadcast_iterator<S, L>
 
using linear_traits = detail::linear_iterator_traits<D>
 
using linear_iterator = typename linear_traits::linear_iterator
 
using const_linear_iterator = typename linear_traits::const_linear_iterator
 
using reverse_linear_iterator = typename linear_traits::reverse_linear_iterator
 
using const_reverse_linear_iterator = typename linear_traits::const_reverse_linear_iterator
 
template<layout_type L, class It1 , class It2 >
using select_iterator_impl = std::conditional_t<L == static_layout, It1, It2>
 
template<layout_type L>
using select_iterator = select_iterator_impl<L, linear_iterator, layout_iterator<L>>
 
template<layout_type L>
using select_const_iterator = select_iterator_impl<L, const_linear_iterator, const_layout_iterator<L>>
 
template<layout_type L>
using select_reverse_iterator = select_iterator_impl<L, reverse_linear_iterator, reverse_layout_iterator<L>>
 
template<layout_type L>
using select_const_reverse_iterator
 
using iterator = select_iterator< ::xt::layout_type::row_major >
 
using const_iterator = select_const_iterator< ::xt::layout_type::row_major >
 
using reverse_iterator = select_reverse_iterator< ::xt::layout_type::row_major >
 
using const_reverse_iterator = select_const_reverse_iterator< ::xt::layout_type::row_major >
 
- Public Types inherited from xt::xcontainer_semantic< xtensor_adaptor< EC, N, L, Tag > >
using base_type
 
using derived_type
 
using temporary_type
 
- Public Types inherited from xt::xsemantic_base< D >
using base_type = select_expression_base_t<D>
 
using derived_type = typename base_type::derived_type
 
using temporary_type = typename xcontainer_inner_types<D>::temporary_type
 

Public Member Functions

 xtensor_adaptor (const xtensor_adaptor &)=default
 
 xtensor_adaptor (xtensor_adaptor &&)=default
 
template<class E >
xtensor_adaptoroperator= (const xexpression< E > &e)
 
Constructors
 xtensor_adaptor (storage_type &&storage)
 Constructs an xtensor_adaptor of the given stl-like container.
 
 xtensor_adaptor (const storage_type &storage)
 Constructs an xtensor_adaptor of the given stl-like container.
 
template<class D >
 xtensor_adaptor (D &&storage, const shape_type &shape, layout_type l=L)
 Constructs an xtensor_adaptor of the given stl-like container, with the specified shape and layout_type.
 
template<class D >
 xtensor_adaptor (D &&storage, const shape_type &shape, const strides_type &strides)
 Constructs an xtensor_adaptor of the given stl-like container, with the specified shape and strides.
 
xtensor_adaptoroperator= (const xtensor_adaptor &)
 
xtensor_adaptoroperator= (xtensor_adaptor &&)
 
xtensor_adaptoroperator= (temporary_type &&)
 
- Public Member Functions inherited from xt::xstrided_container< xtensor_adaptor< EC, N, L, Tag > >
void resize (S &&shape, bool force=false)
 Resizes the container.
 
void resize (S &&shape, layout_type l)
 Resizes the container.
 
void resize (S &&shape, const strides_type &strides)
 Resizes the container.
 
autoreshape (S &&shape, layout_type layout=base_type::static_layout) &
 Reshapes the container and keeps old elements.
 
autoreshape (std::initializer_list< T > shape, layout_type layout=base_type::static_layout) &
 
layout_type layout () const noexcept
 Return the layout_type of the container.
 
bool is_contiguous () const noexcept
 
- Public Member Functions inherited from xt::xcontainer< D >
template<class... Args>
reference operator() (Args... args)
 
template<class... Args>
const_reference operator() (Args... args) const
 
template<class... Args>
reference unchecked (Args... args)
 
template<class... Args>
const_reference unchecked (Args... args) const
 
template<class It >
reference element (It first, It last)
 
template<class It >
const_reference element (It first, It last) const
 
template<class S >
stepper stepper_begin (const S &shape) noexcept
 
template<class S >
stepper stepper_end (const S &shape, layout_type l) noexcept
 
template<class S >
const_stepper stepper_begin (const S &shape) const noexcept
 
template<class S >
const_stepper stepper_end (const S &shape, layout_type l) const noexcept
 
template<class align , class requested_type = value_type, std::size_t N = xt_simd::simd_traits<requested_type>::size>
container_simd_return_type_t< storage_type, value_type, requested_typeload_simd (size_type i) const
 
template<class... Args>
reference at (Args... args)
 
template<class... Args>
auto at (Args... args) -> reference
 Returns a reference to the element at the specified position in the expression, after dimension and bounds checking.
 
template<class... Args>
const_reference at (Args... args) const
 
template<class... Args>
auto at (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the expression, after dimension and bounds checking.
 
reference back ()
 Returns a reference to the last element of the expression.
 
const_reference back () const
 Returns a constant reference to last the element of the expression.
 
reference front ()
 Returns a reference to the first element of the expression.
 
const_reference front () const
 Returns a constant reference to first the element of the expression.
 
template<class... Args>
reference periodic (Args... args)
 
template<class... Args>
auto periodic (Args... args) -> reference
 Returns a reference to the element at the specified position in the expression, after applying periodicity to the indices (negative and 'overflowing' indices are changed).
 
template<class... Args>
const_reference periodic (Args... args) const
 
template<class... Args>
auto periodic (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the expression, after applying periodicity to the indices (negative and 'overflowing' indices are changed).
 
size_type size () const noexcept
 Returns the number of element in the container.
 
constexpr size_type dimension () const noexcept
 Returns the number of dimensions of the container.
 
constexpr const inner_shape_type & shape () const noexcept
 Returns the shape of the container.
 
constexpr const inner_strides_type & strides () const noexcept
 Returns the strides of the container.
 
constexpr const inner_backstrides_type & backstrides () const noexcept
 Returns the backstrides of the container.
 
template<class T >
void fill (const T &value)
 Fills the container with the given value.
 
storage_type & storage () noexcept
 Returns a reference to the buffer containing the elements of the container.
 
const storage_type & storage () const noexcept
 Returns a constant reference to the buffer containing the elements of the container.
 
pointer data () noexcept
 Returns a pointer to the underlying array serving as element storage.
 
const_pointer data () const noexcept
 Returns a constant pointer to the underlying array serving as element storage.
 
const size_type data_offset () const noexcept
 Returns the offset to the first element in the container.
 
template<class... Args>
auto operator() (Args... args) -> reference
 Returns a reference to the element at the specified position in the container.
 
template<class... Args>
auto operator() (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the container.
 
template<class... Args>
auto unchecked (Args... args) -> reference
 Returns a reference to the element at the specified position in the container.
 
template<class... Args>
auto unchecked (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the container.
 
template<class It >
auto element (It first, It last) -> reference
 Returns a reference to the element at the specified position in the container.
 
template<class It >
auto element (It first, It last) const -> const_reference
 Returns a reference to the element at the specified position in the container.
 
template<class S >
bool broadcast_shape (S &shape, bool reuse_cache=false) const
 Broadcast the shape of the container to the specified parameter.
 
template<class S >
bool has_linear_assign (const S &strides) const noexcept
 Checks whether the xcontainer can be linearly assigned to an expression with the specified strides.
 
reference data_element (size_type i)
 
const_reference data_element (size_type i) const
 
reference flat (size_type i)
 Returns a reference to the element at the specified position in the container storage (as if it was one dimensional).
 
const_reference flat (size_type i) const
 Returns a constant reference to the element at the specified position in the container storage (as if it was one dimensional).
 
template<class align , class simd >
void store_simd (size_type i, const simd &e)
 
linear_iterator linear_begin () noexcept
 
linear_iterator linear_end () noexcept
 
const_linear_iterator linear_begin () const noexcept
 
const_linear_iterator linear_end () const noexcept
 
const_linear_iterator linear_cbegin () const noexcept
 
const_linear_iterator linear_cend () const noexcept
 
reverse_linear_iterator linear_rbegin () noexcept
 
reverse_linear_iterator linear_rend () noexcept
 
const_reverse_linear_iterator linear_rbegin () const noexcept
 
const_reverse_linear_iterator linear_rend () const noexcept
 
const_reverse_linear_iterator linear_crbegin () const noexcept
 
const_reverse_linear_iterator linear_crend () const noexcept
 
template<class S >
auto stepper_begin (const S &shape) noexcept -> stepper
 
template<class S >
auto stepper_end (const S &shape, layout_type l) noexcept -> stepper
 
template<class S >
auto stepper_begin (const S &shape) const noexcept -> const_stepper
 
template<class S >
auto stepper_end (const S &shape, layout_type l) const noexcept -> const_stepper
 
template<class alignment , class requested_type , std::size_t N>
auto load_simd (size_type i) const -> container_simd_return_type_t< storage_type, value_type, requested_type >
 
- Public Member Functions inherited from xt::xcontiguous_iterable< D >
template<layout_type L = ::xt::layout_type::row_major>
select_iterator< Lbegin () noexcept
 
template<layout_type L = ::xt::layout_type::row_major>
select_iterator< Lend () noexcept
 
template<layout_type L = ::xt::layout_type::row_major>
select_const_iterator< Lbegin () const noexcept
 
template<layout_type L = ::xt::layout_type::row_major>
select_const_iterator< Lend () const noexcept
 
template<layout_type L = ::xt::layout_type::row_major>
select_const_iterator< Lcbegin () const noexcept
 
template<layout_type L = ::xt::layout_type::row_major>
select_const_iterator< Lcend () const noexcept
 
template<layout_type L = ::xt::layout_type::row_major>
select_reverse_iterator< Lrbegin () noexcept
 
template<layout_type L = ::xt::layout_type::row_major>
select_reverse_iterator< Lrend () noexcept
 
template<layout_type L = ::xt::layout_type::row_major>
select_const_reverse_iterator< Lrbegin () const noexcept
 
template<layout_type L = ::xt::layout_type::row_major>
select_const_reverse_iterator< Lrend () const noexcept
 
template<layout_type L = ::xt::layout_type::row_major>
select_const_reverse_iterator< Lcrbegin () const noexcept
 
template<layout_type L = ::xt::layout_type::row_major>
select_const_reverse_iterator< Lcrend () const noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
broadcast_iterator< S, Lbegin (const S &shape) noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
broadcast_iterator< S, Lend (const S &shape) noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
const_broadcast_iterator< S, Lbegin (const S &shape) const noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
const_broadcast_iterator< S, Lend (const S &shape) const noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
const_broadcast_iterator< S, Lcbegin (const S &shape) const noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
const_broadcast_iterator< S, Lcend (const S &shape) const noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
reverse_broadcast_iterator< S, Lrbegin (const S &shape) noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
reverse_broadcast_iterator< S, Lrend (const S &shape) noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
const_reverse_broadcast_iterator< S, Lrbegin (const S &shape) const noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
const_reverse_broadcast_iterator< S, Lrend (const S &shape) const noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
const_reverse_broadcast_iterator< S, Lcrbegin (const S &shape) const noexcept
 
template<layout_type L = ::xt::layout_type::row_major, class S >
const_reverse_broadcast_iterator< S, Lcrend (const S &shape) const noexcept
 
template<layout_type L>
auto begin () noexcept -> select_iterator< L >
 Returns an iterator to the first element of the expression.
 
template<layout_type L>
auto end () noexcept -> select_iterator< L >
 Returns an iterator to the element following the last element of the expression.
 
template<layout_type L>
auto begin () const noexcept -> select_const_iterator< L >
 Returns a constant iterator to the first element of the expression.
 
template<layout_type L>
auto end () const noexcept -> select_const_iterator< L >
 Returns a constant iterator to the element following the last element of the expression.
 
template<layout_type L>
auto cbegin () const noexcept -> select_const_iterator< L >
 Returns a constant iterator to the first element of the expression.
 
template<layout_type L>
auto cend () const noexcept -> select_const_iterator< L >
 Returns a constant iterator to the element following the last element of the expression.
 
template<layout_type L>
auto rbegin () noexcept -> select_reverse_iterator< L >
 Returns an iterator to the first element of the reversed expression.
 
template<layout_type L>
auto rend () noexcept -> select_reverse_iterator< L >
 Returns an iterator to the element following the last element of the reversed expression.
 
template<layout_type L>
auto rbegin () const noexcept -> select_const_reverse_iterator< L >
 Returns a constant iterator to the first element of the reversed expression.
 
template<layout_type L>
auto rend () const noexcept -> select_const_reverse_iterator< L >
 Returns a constant iterator to the element following the last element of the reversed expression.
 
template<layout_type L>
auto crbegin () const noexcept -> select_const_reverse_iterator< L >
 Returns a constant iterator to the first element of the reversed expression.
 
template<layout_type L>
auto crend () const noexcept -> select_const_reverse_iterator< L >
 Returns a constant iterator to the element following the last element of the reversed expression.
 
template<layout_type L, class S >
auto begin (const S &shape) noexcept -> broadcast_iterator< S, L >
 Returns an iterator to the first element of the expression.
 
template<layout_type L, class S >
auto end (const S &shape) noexcept -> broadcast_iterator< S, L >
 Returns an iterator to the element following the last element of the expression.
 
template<layout_type L, class S >
auto begin (const S &shape) const noexcept -> const_broadcast_iterator< S, L >
 Returns a constant iterator to the first element of the expression.
 
template<layout_type L, class S >
auto end (const S &shape) const noexcept -> const_broadcast_iterator< S, L >
 Returns a constant iterator to the element following the last element of the expression.
 
template<layout_type L, class S >
auto cbegin (const S &shape) const noexcept -> const_broadcast_iterator< S, L >
 Returns a constant iterator to the first element of the expression.
 
template<layout_type L, class S >
auto cend (const S &shape) const noexcept -> const_broadcast_iterator< S, L >
 Returns a constant iterator to the element following the last element of the expression.
 
template<layout_type L, class S >
auto rbegin (const S &shape) noexcept -> reverse_broadcast_iterator< S, L >
 Returns an iterator to the first element of the reversed expression.
 
template<layout_type L, class S >
auto rend (const S &shape) noexcept -> reverse_broadcast_iterator< S, L >
 Returns an iterator to the element following the last element of the reversed expression.
 
template<layout_type L, class S >
auto rbegin (const S &shape) const noexcept -> const_reverse_broadcast_iterator< S, L >
 Returns a constant iterator to the first element of the reversed expression.
 
template<layout_type L, class S >
auto rend (const S &shape) const noexcept -> const_reverse_broadcast_iterator< S, L >
 Returns a constant iterator to the element following the last element of the reversed expression.
 
template<layout_type L, class S >
auto crbegin (const S &shape) const noexcept -> const_reverse_broadcast_iterator< S, L >
 Returns a constant iterator to the first element of the reversed expression.
 
template<layout_type L, class S >
auto crend (const S &shape) const noexcept -> const_reverse_broadcast_iterator< S, L >
 Returns a constant iterator to the element following the last element of the reversed expression.
 
- Public Member Functions inherited from xt::xcontainer_semantic< xtensor_adaptor< EC, N, L, Tag > >
derived_typeassign_xexpression (const xexpression< E > &e)
 
derived_typecomputed_assign (const xexpression< E > &e)
 
derived_typescalar_computed_assign (const E &e, F &&f)
 
derived_typeassign_temporary (temporary_type &&)
 Assigns the temporary tmp to *this.
 
auto assign_xexpression (const xexpression< E > &e) -> derived_type &
 
auto computed_assign (const xexpression< E > &e) -> derived_type &
 
auto scalar_computed_assign (const E &e, F &&f) -> derived_type &
 
auto operator= (const xexpression< E > &e) -> derived_type &
 
- Public Member Functions inherited from xt::xsemantic_base< D >
template<class E >
disable_xexpression< E, derived_type & > operator+= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator-= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator*= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator/= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator%= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator&= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator|= (const E &)
 
template<class E >
disable_xexpression< E, derived_type & > operator^= (const E &)
 
template<class E >
derived_type & operator+= (const xexpression< E > &)
 
template<class E >
derived_type & operator-= (const xexpression< E > &)
 
template<class E >
derived_type & operator*= (const xexpression< E > &)
 
template<class E >
derived_type & operator/= (const xexpression< E > &)
 
template<class E >
derived_type & operator%= (const xexpression< E > &)
 
template<class E >
derived_type & operator&= (const xexpression< E > &)
 
template<class E >
derived_type & operator|= (const xexpression< E > &)
 
template<class E >
derived_type & operator^= (const xexpression< E > &)
 
template<class E >
derived_type & assign (const xexpression< E > &)
 
template<class E >
derived_type & plus_assign (const xexpression< E > &)
 
template<class E >
derived_type & minus_assign (const xexpression< E > &)
 
template<class E >
derived_type & multiplies_assign (const xexpression< E > &)
 
template<class E >
derived_type & divides_assign (const xexpression< E > &)
 
template<class E >
derived_type & modulus_assign (const xexpression< E > &)
 
template<class E >
derived_type & bit_and_assign (const xexpression< E > &)
 
template<class E >
derived_type & bit_or_assign (const xexpression< E > &)
 
template<class E >
derived_type & bit_xor_assign (const xexpression< E > &)
 
template<class E >
auto operator+= (const E &e) -> disable_xexpression< E, derived_type & >
 Adds the scalar e to *this.
 
template<class E >
auto operator-= (const E &e) -> disable_xexpression< E, derived_type & >
 Subtracts the scalar e from *this.
 
template<class E >
auto operator*= (const E &e) -> disable_xexpression< E, derived_type & >
 Multiplies *this with the scalar e.
 
template<class E >
auto operator/= (const E &e) -> disable_xexpression< E, derived_type & >
 Divides *this by the scalar e.
 
template<class E >
auto operator%= (const E &e) -> disable_xexpression< E, derived_type & >
 Computes the remainder of *this after division by the scalar e.
 
template<class E >
auto operator&= (const E &e) -> disable_xexpression< E, derived_type & >
 Computes the bitwise and of *this and the scalar e and assigns it to *this.
 
template<class E >
auto operator|= (const E &e) -> disable_xexpression< E, derived_type & >
 Computes the bitwise or of *this and the scalar e and assigns it to *this.
 
template<class E >
auto operator^= (const E &e) -> disable_xexpression< E, derived_type & >
 Computes the bitwise xor of *this and the scalar e and assigns it to *this.
 
template<class E >
auto operator+= (const xexpression< E > &e) -> derived_type &
 Adds the xexpression e to *this.
 
template<class E >
auto operator-= (const xexpression< E > &e) -> derived_type &
 Subtracts the xexpression e from *this.
 
template<class E >
auto operator*= (const xexpression< E > &e) -> derived_type &
 Multiplies *this with the xexpression e.
 
template<class E >
auto operator/= (const xexpression< E > &e) -> derived_type &
 Divides *this by the xexpression e.
 
template<class E >
auto operator%= (const xexpression< E > &e) -> derived_type &
 Computes the remainder of *this after division by the xexpression e.
 
template<class E >
auto operator&= (const xexpression< E > &e) -> derived_type &
 Computes the bitwise and of *this and the xexpression e and assigns it to *this.
 
template<class E >
auto operator|= (const xexpression< E > &e) -> derived_type &
 Computes the bitwise or of *this and the xexpression e and assigns it to *this.
 
template<class E >
auto operator^= (const xexpression< E > &e) -> derived_type &
 Computes the bitwise xor of *this and the xexpression e and assigns it to *this.
 
template<class E >
auto assign (const xexpression< E > &e) -> derived_type &
 Assigns the xexpression e to *this.
 
template<class E >
auto plus_assign (const xexpression< E > &e) -> derived_type &
 Adds the xexpression e to *this.
 
template<class E >
auto minus_assign (const xexpression< E > &e) -> derived_type &
 Subtracts the xexpression e to *this.
 
template<class E >
auto multiplies_assign (const xexpression< E > &e) -> derived_type &
 Multiplies *this with the xexpression e.
 
template<class E >
auto divides_assign (const xexpression< E > &e) -> derived_type &
 Divides *this by the xexpression e.
 
template<class E >
auto modulus_assign (const xexpression< E > &e) -> derived_type &
 Computes the remainder of *this after division by the xexpression e.
 
template<class E >
auto bit_and_assign (const xexpression< E > &e) -> derived_type &
 Computes the bitwise and of e to *this.
 
template<class E >
auto bit_or_assign (const xexpression< E > &e) -> derived_type &
 Computes the bitwise or of e to *this.
 
template<class E >
auto bit_xor_assign (const xexpression< E > &e) -> derived_type &
 Computes the bitwise xor of e to *this.
 
template<class E >
auto operator= (const xexpression< E > &e) -> derived_type &
 

Static Public Attributes

static constexpr std::size_t rank = N
 
- Static Public Attributes inherited from xt::xcontainer< D >
static constexpr layout_type static_layout = inner_types::layout
 
static constexpr bool contiguous_layout = static_layout != layout_type::dynamic
 
- Static Public Attributes inherited from xt::xcontiguous_iterable< D >
static constexpr layout_type static_layout = inner_types::layout
 

Friends

class xcontainer< xtensor_adaptor< EC, N, L, Tag > >
 

Extended copy semantic

template<class P , class S >
void reset_buffer (P &&pointer, S &&size)
 
template<class E >
auto operator= (const xexpression< E > &e) -> self_type &
 The extended assignment operator.
 

Additional Inherited Members

- Protected Member Functions inherited from xt::xstrided_container< xtensor_adaptor< EC, N, L, Tag > >
 xstrided_container (const xstrided_container &)=default
 
 xstrided_container (xstrided_container &&)=default
 
xstrided_containeroperator= (const xstrided_container &)=default
 
xstrided_containeroperator= (xstrided_container &&)=default
 
 xstrided_container (inner_shape_type &&, inner_strides_type &&) noexcept
 
 xstrided_container (inner_shape_type &&, inner_strides_type &&, inner_backstrides_type &&, layout_type &&) noexcept
 
inner_shape_type & shape_impl () noexcept
 
const inner_shape_type & shape_impl () const noexcept
 
inner_strides_type & strides_impl () noexcept
 
const inner_strides_type & strides_impl () const noexcept
 
inner_backstrides_type & backstrides_impl () noexcept
 
const inner_backstrides_type & backstrides_impl () const noexcept
 
void reshape_impl (S &&shape, std::true_type, layout_type layout=base_type::static_layout)
 
void reshape_impl (S &&shape, std::false_type, layout_type layout=base_type::static_layout)
 
layout_typemutable_layout () noexcept
 
- Protected Member Functions inherited from xt::xcontainer< D >
 xcontainer (const xcontainer &)=default
 
xcontaineroperator= (const xcontainer &)=default
 
 xcontainer (xcontainer &&)=default
 
xcontaineroperator= (xcontainer &&)=default
 
container_iterator data_xbegin () noexcept
 
const_container_iterator data_xbegin () const noexcept
 
container_iterator data_xend (layout_type l, size_type offset) noexcept
 
const_container_iterator data_xend (layout_type l, size_type offset) const noexcept
 
derived_type & derived_cast () &noexcept
 
const derived_type & derived_cast () const &noexcept
 
derived_type derived_cast () &&noexcept
 
- Protected Member Functions inherited from xt::xcontainer_semantic< xtensor_adaptor< EC, N, L, Tag > >
 xcontainer_semantic (const xcontainer_semantic &)=default
 
 xcontainer_semantic (xcontainer_semantic &&)=default
 
xcontainer_semanticoperator= (const xcontainer_semantic &)=default
 
xcontainer_semanticoperator= (xcontainer_semantic &&)=default
 
derived_typeoperator= (const xexpression< E > &)
 
- Protected Member Functions inherited from xt::xsemantic_base< D >
 xsemantic_base (const xsemantic_base &)=default
 
xsemantic_baseoperator= (const xsemantic_base &)=default
 
 xsemantic_base (xsemantic_base &&)=default
 
xsemantic_baseoperator= (xsemantic_base &&)=default
 
template<class E >
derived_type & operator= (const xexpression< E > &)
 

Detailed Description

template<class EC, std::size_t N, layout_type L, class Tag>
class xt::xtensor_adaptor< EC, N, L, Tag >

Dense multidimensional container adaptor with tensor semantics and fixed dimension.

The xtensor_adaptor class implements a dense multidimensional container adaptor with tensor semantics and fixed dimension. It is used to provide a multidimensional container semantic and a tensor semantic to stl-like containers.

Template Parameters
ECThe closure for the container type to adapt.
NThe dimension of the adaptor.
LThe layout_type of the adaptor.
TagThe expression tag.
See also
xstrided_container, xcontainer

Definition at line 209 of file xtensor.hpp.

Member Typedef Documentation

◆ allocator_type

template<class EC , std::size_t N, layout_type L, class Tag >
using xt::xtensor_adaptor< EC, N, L, Tag >::allocator_type = typename base_type::allocator_type

Definition at line 222 of file xtensor.hpp.

◆ backstrides_type

template<class EC , std::size_t N, layout_type L, class Tag >
using xt::xtensor_adaptor< EC, N, L, Tag >::backstrides_type = typename base_type::backstrides_type

Definition at line 225 of file xtensor.hpp.

◆ base_type

template<class EC , std::size_t N, layout_type L, class Tag >
using xt::xtensor_adaptor< EC, N, L, Tag >::base_type = xstrided_container<self_type>

Definition at line 218 of file xtensor.hpp.

◆ container_closure_type

template<class EC , std::size_t N, layout_type L, class Tag >
using xt::xtensor_adaptor< EC, N, L, Tag >::container_closure_type = EC

Definition at line 215 of file xtensor.hpp.

◆ expression_tag

template<class EC , std::size_t N, layout_type L, class Tag >
using xt::xtensor_adaptor< EC, N, L, Tag >::expression_tag = Tag

Definition at line 227 of file xtensor.hpp.

◆ extension_base

template<class EC , std::size_t N, layout_type L, class Tag >
using xt::xtensor_adaptor< EC, N, L, Tag >::extension_base = extension::xtensor_adaptor_base_t<EC, N, L, Tag>

Definition at line 220 of file xtensor.hpp.

◆ self_type

template<class EC , std::size_t N, layout_type L, class Tag >
using xt::xtensor_adaptor< EC, N, L, Tag >::self_type = xtensor_adaptor<EC, N, L, Tag>

Definition at line 217 of file xtensor.hpp.

◆ semantic_base

template<class EC , std::size_t N, layout_type L, class Tag >
using xt::xtensor_adaptor< EC, N, L, Tag >::semantic_base = xcontainer_semantic<self_type>

Definition at line 219 of file xtensor.hpp.

◆ shape_type

template<class EC , std::size_t N, layout_type L, class Tag >
using xt::xtensor_adaptor< EC, N, L, Tag >::shape_type = typename base_type::shape_type

Definition at line 223 of file xtensor.hpp.

◆ storage_type

template<class EC , std::size_t N, layout_type L, class Tag >
using xt::xtensor_adaptor< EC, N, L, Tag >::storage_type = typename base_type::storage_type

Definition at line 221 of file xtensor.hpp.

◆ strides_type

template<class EC , std::size_t N, layout_type L, class Tag >
using xt::xtensor_adaptor< EC, N, L, Tag >::strides_type = typename base_type::strides_type

Definition at line 224 of file xtensor.hpp.

◆ temporary_type

template<class EC , std::size_t N, layout_type L, class Tag >
using xt::xtensor_adaptor< EC, N, L, Tag >::temporary_type = typename semantic_base::temporary_type

Definition at line 226 of file xtensor.hpp.

Constructor & Destructor Documentation

◆ xtensor_adaptor() [1/4]

template<class EC , std::size_t N, layout_type L, class Tag >
xt::xtensor_adaptor< EC, N, L, Tag >::xtensor_adaptor ( storage_type && storage)
inline

Constructs an xtensor_adaptor of the given stl-like container.

Parameters
storagethe container to adapt

Definition at line 612 of file xtensor.hpp.

◆ xtensor_adaptor() [2/4]

template<class EC , std::size_t N, layout_type L, class Tag >
xt::xtensor_adaptor< EC, N, L, Tag >::xtensor_adaptor ( const storage_type & storage)
inline

Constructs an xtensor_adaptor of the given stl-like container.

Parameters
storagethe container to adapt

Definition at line 623 of file xtensor.hpp.

◆ xtensor_adaptor() [3/4]

template<class EC , std::size_t N, layout_type L, class Tag >
template<class D >
xt::xtensor_adaptor< EC, N, L, Tag >::xtensor_adaptor ( D && storage,
const shape_type & shape,
layout_type l = L )
inline

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

Parameters
storagethe container to adapt
shapethe shape of the xtensor_adaptor
lthe layout_type of the xtensor_adaptor

Definition at line 638 of file xtensor.hpp.

◆ xtensor_adaptor() [4/4]

template<class EC , std::size_t N, layout_type L, class Tag >
template<class D >
xt::xtensor_adaptor< EC, N, L, Tag >::xtensor_adaptor ( D && storage,
const shape_type & shape,
const strides_type & strides )
inline

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

Parameters
storagethe container to adapt
shapethe shape of the xtensor_adaptor
stridesthe strides of the xtensor_adaptor

Definition at line 654 of file xtensor.hpp.

Member Function Documentation

◆ operator=() [1/4]

template<class EC , std::size_t N, layout_type L, class Tag >
template<class E >
auto xt::xtensor_adaptor< EC, N, L, Tag >::operator= ( const xexpression< E > & e) -> self_type&
inline

The extended assignment operator.

Definition at line 702 of file xtensor.hpp.

◆ operator=() [2/4]

template<class EC , std::size_t N, layout_type L, class Tag >
auto xt::xtensor_adaptor< EC, N, L, Tag >::operator= ( const xtensor_adaptor< EC, N, L, Tag > & rhs)
inline

Definition at line 668 of file xtensor.hpp.

◆ operator=() [3/4]

template<class EC , std::size_t N, layout_type L, class Tag >
auto xt::xtensor_adaptor< EC, N, L, Tag >::operator= ( temporary_type && rhs)
inline

Definition at line 684 of file xtensor.hpp.

◆ operator=() [4/4]

template<class EC , std::size_t N, layout_type L, class Tag >
auto xt::xtensor_adaptor< EC, N, L, Tag >::operator= ( xtensor_adaptor< EC, N, L, Tag > && rhs)
inline

Definition at line 676 of file xtensor.hpp.

◆ reset_buffer()

template<class EC , std::size_t N, layout_type L, class Tag >
template<class P , class S >
void xt::xtensor_adaptor< EC, N, L, Tag >::reset_buffer ( P && pointer,
S && size )
inline

Definition at line 723 of file xtensor.hpp.

Friends And Related Symbol Documentation

◆ xcontainer< xtensor_adaptor< EC, N, L, Tag > >

template<class EC , std::size_t N, layout_type L, class Tag >
friend class xcontainer< xtensor_adaptor< EC, N, L, Tag > >
friend

Definition at line 259 of file xtensor.hpp.

Member Data Documentation

◆ rank

template<class EC , std::size_t N, layout_type L, class Tag >
constexpr std::size_t xt::xtensor_adaptor< EC, N, L, Tag >::rank = N
staticconstexpr

Definition at line 228 of file xtensor.hpp.


The documentation for this class was generated from the following file: