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

Dense multidimensional container with tensor semantic. More...

#include <xarray.hpp>

Inheritance diagram for xt::xarray_container< EC, L, SC, Tag >:
xt::xstrided_container< xarray_container< EC, L, SC, Tag > > xt::xcontainer_semantic< xarray_container< EC, L, SC, Tag > > xt::xcontainer< xarray_container< EC, L, SC, Tag > > xt::xsemantic_base< xarray_container< EC, L, SC, Tag > > xt::xcontiguous_iterable< xarray_container< EC, L, SC, Tag > > xt::xaccessible< xarray_container< EC, L, SC, Tag > > xt::xiterable< xarray_container< EC, L, SC, Tag > >

Public Types

using self_type = xarray_container<EC, L, SC, Tag>
 
using base_type = xstrided_container<self_type>
 
using semantic_base = xcontainer_semantic<self_type>
 
using extension_base = extension::xarray_container_base_t<EC, L, SC, Tag>
 
using storage_type = typename base_type::storage_type
 
using allocator_type = typename base_type::allocator_type
 
using value_type = typename base_type::value_type
 
using reference = typename base_type::reference
 
using const_reference = typename base_type::const_reference
 
using pointer = typename base_type::pointer
 
using const_pointer = typename base_type::const_pointer
 
using shape_type = typename base_type::shape_type
 
using inner_shape_type = typename base_type::inner_shape_type
 
using strides_type = typename base_type::strides_type
 
using backstrides_type = typename base_type::backstrides_type
 
using inner_strides_type = typename base_type::inner_strides_type
 
using inner_backstrides_type = typename base_type::inner_backstrides_type
 
using temporary_type = typename semantic_base::temporary_type
 
using expression_tag = Tag
 
- Public Types inherited from xt::xstrided_container< xarray_container< EC, L, SC, 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< xarray_container< EC, L, SC, Tag > >
using derived_type
 
using inner_types
 
using storage_type
 
using allocator_type
 
using value_type
 
using reference
 
using const_reference
 
using pointer
 
using const_pointer
 
using size_type
 
using difference_type
 
using simd_value_type
 
using bool_load_type
 
using shape_type
 
using strides_type
 
using backstrides_type
 
using inner_shape_type
 
using inner_strides_type
 
using inner_backstrides_type
 
using iterable_base
 
using stepper
 
using const_stepper
 
using accessible_base
 
using data_alignment
 
using simd_type
 
using linear_iterator
 
using const_linear_iterator
 
using reverse_linear_iterator
 
using const_reverse_linear_iterator
 
using simd_return_type
 
using container_iterator
 
using const_container_iterator
 
- Public Types inherited from xt::xcontiguous_iterable< xarray_container< EC, L, SC, Tag > >
using derived_type
 
using inner_types
 
using iterable_base
 
using stepper
 
using const_stepper
 
using layout_iterator
 
using const_layout_iterator
 
using reverse_layout_iterator
 
using const_reverse_layout_iterator
 
using broadcast_iterator
 
using const_broadcast_iterator
 
using reverse_broadcast_iterator
 
using const_reverse_broadcast_iterator
 
using linear_traits
 
using linear_iterator
 
using const_linear_iterator
 
using reverse_linear_iterator
 
using const_reverse_linear_iterator
 
using select_iterator_impl
 
using select_iterator
 
using select_const_iterator
 
using select_reverse_iterator
 
using select_const_reverse_iterator
 
using iterator
 
using const_iterator
 
using reverse_iterator
 
using const_reverse_iterator
 
- Public Types inherited from xt::xcontainer_semantic< xarray_container< EC, L, SC, Tag > >
using base_type
 
using derived_type
 
using temporary_type
 
- Public Types inherited from xt::xsemantic_base< xarray_container< EC, L, SC, Tag > >
using base_type
 
using derived_type
 
using temporary_type
 

Public Member Functions

 xarray_container (const xarray_container &)=default
 
xarray_containeroperator= (const xarray_container &)=default
 
 xarray_container (xarray_container &&)=default
 
xarray_containeroperator= (xarray_container &&)=default
 
template<std::size_t N>
xarray_containeroperator= (xtensor_container< EC, N, L, Tag > &&rhs)
 
template<class E>
xarray_containeroperator= (const xexpression< E > &e)
 
Constructors
 xarray_container ()
 Allocates an uninitialized xarray_container that holds 0 element.
 
 xarray_container (const shape_type &shape, layout_type l=L)
 Allocates an uninitialized xarray_container with the specified shape and layout_type.
 
 xarray_container (const shape_type &shape, const_reference value, layout_type l=L)
 Allocates an xarray_container with the specified shape and layout_type.
 
 xarray_container (const shape_type &shape, const strides_type &strides)
 Allocates an uninitialized xarray_container with the specified shape and strides.
 
 xarray_container (const shape_type &shape, const strides_type &strides, const_reference value)
 Allocates an uninitialized xarray_container with the specified shape and strides.
 
 xarray_container (storage_type &&storage, inner_shape_type &&shape, inner_strides_type &&strides)
 Allocates an xarray_container by moving specified data, shape and strides.
 
 xarray_container (const value_type &t)
 Allocates an xarray_container that holds a single element initialized to the specified value.
 
Constructors from initializer list
 xarray_container (nested_initializer_list_t< value_type, 1 > t)
 Allocates a one-dimensional xarray_container.
 
 xarray_container (nested_initializer_list_t< value_type, 2 > t)
 Allocates a two-dimensional xarray_container.
 
 xarray_container (nested_initializer_list_t< value_type, 3 > t)
 Allocates a three-dimensional xarray_container.
 
 xarray_container (nested_initializer_list_t< value_type, 4 > t)
 Allocates a four-dimensional xarray_container.
 
 xarray_container (nested_initializer_list_t< value_type, 5 > t)
 Allocates a five-dimensional xarray_container.
 
template<std::size_t N>
 xarray_container (xtensor_container< EC, N, L, Tag > &&rhs)
 
template<class S>
xarray_container< EC, L, SC, Tag > from_shape (S &&s)
 Allocates and returns an xarray_container with the specified shape.
 
template<std::size_t N>
xarray_container< EC, L, SC, Tag > & operator= (xtensor_container< EC, N, L, Tag > &&rhs)
 
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.
 
auto & reshape (S &&shape, layout_type layout=base_type::static_layout) &
 Reshapes the container and keeps old elements.
 
auto & reshape (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< xarray_container< EC, L, SC, Tag > >
reference at (Args... args)
 
const_reference at (Args... args) const
 
disable_integral_t< S, reference > operator[] (const S &index)
 
reference operator[] (std::initializer_list< I > index)
 
reference operator[] (size_type i)
 
disable_integral_t< S, const_reference > operator[] (const S &index) const
 
const_reference operator[] (std::initializer_list< I > index) const
 
const_reference operator[] (size_type i) const
 
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.
 
reference periodic (Args... args)
 
const_reference periodic (Args... args) const
 
reference operator() (Args... args)
 
const_reference operator() (Args... args) const
 
reference unchecked (Args... args)
 
const_reference unchecked (Args... args) const
 
reference element (It first, It last)
 
const_reference element (It first, It last) const
 
stepper stepper_begin (const S &shape) noexcept
 
const_stepper stepper_begin (const S &shape) const noexcept
 
stepper stepper_end (const S &shape, layout_type l) noexcept
 
const_stepper stepper_end (const S &shape, layout_type l) const noexcept
 
container_simd_return_type_t< storage_type, value_type, requested_type > load_simd (size_type i) const
 
reference at (Args... args)
 
const_reference at (Args... args) const
 
disable_integral_t< S, reference > operator[] (const S &index)
 
reference operator[] (std::initializer_list< I > index)
 
reference operator[] (size_type i)
 
disable_integral_t< S, const_reference > operator[] (const S &index) const
 
const_reference operator[] (std::initializer_list< I > index) const
 
const_reference operator[] (size_type i) const
 
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.
 
reference periodic (Args... args)
 
const_reference periodic (Args... args) const
 
auto operator() (Args... args) -> reference
 Returns a reference to the element at the specified position in the container.
 
auto operator() (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the container.
 
auto unchecked (Args... args) -> reference
 Returns a reference to the element at the specified position in the container.
 
auto unchecked (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the container.
 
auto element (It first, It last) -> reference
 Returns a reference to the element at the specified position in the container.
 
auto element (It first, It last) const -> const_reference
 Returns a reference to the element at the specified position in the container.
 
void fill (const T &value)
 Fills the container with the given value.
 
auto operator() (Args... args) -> reference
 Returns a reference to the element at the specified position in the container.
 
auto operator() (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the container.
 
auto unchecked (Args... args) -> reference
 Returns a reference to the element at the specified position in the container.
 
auto unchecked (Args... args) const -> const_reference
 Returns a constant reference to the element at the specified position in the container.
 
auto element (It first, It last) -> reference
 Returns a reference to the element at the specified position in the container.
 
auto element (It first, It last) const -> const_reference
 Returns a reference to the element at the specified position in the container.
 
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.
 
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.
 
auto stepper_begin (const S &shape) noexcept -> stepper
 
auto stepper_end (const S &shape, layout_type l) noexcept -> stepper
 
auto stepper_begin (const S &shape) const noexcept -> const_stepper
 
auto stepper_end (const S &shape, layout_type l) const noexcept -> const_stepper
 
auto load_simd (size_type i) const -> container_simd_return_type_t< storage_type, value_type, requested_type >
 
bool broadcast_shape (S &shape, bool reuse_cache=false) const
 Broadcast the shape of the container to the specified parameter.
 
bool has_linear_assign (const S &strides) const noexcept
 Checks whether the xcontainer can be linearly assigned to an expression with the specified strides.
 
auto stepper_begin (const S &shape) noexcept -> stepper
 
auto stepper_begin (const S &shape) const noexcept -> const_stepper
 
auto stepper_end (const S &shape, layout_type l) noexcept -> stepper
 
auto stepper_end (const S &shape, layout_type l) const noexcept -> const_stepper
 
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).
 
void store_simd (size_type i, const simd &e)
 
auto load_simd (size_type i) const -> container_simd_return_type_t< storage_type, value_type, requested_type >
 
linear_iterator linear_begin () noexcept
 
const_linear_iterator linear_begin () const noexcept
 
linear_iterator linear_end () 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
 
const_reverse_linear_iterator linear_rbegin () const noexcept
 
reverse_linear_iterator linear_rend () 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
 
- Public Member Functions inherited from xt::xcontiguous_iterable< xarray_container< EC, L, SC, Tag > >
select_iterator< L > begin () noexcept
 
select_const_iterator< L > begin () const noexcept
 
broadcast_iterator< S, L > begin (const S &shape) noexcept
 
const_broadcast_iterator< S, L > begin (const S &shape) const noexcept
 
select_iterator< L > end () noexcept
 
select_const_iterator< L > end () const noexcept
 
broadcast_iterator< S, L > end (const S &shape) noexcept
 
const_broadcast_iterator< S, L > end (const S &shape) const noexcept
 
select_const_iterator< L > cbegin () const noexcept
 
const_broadcast_iterator< S, L > cbegin (const S &shape) const noexcept
 
select_const_iterator< L > cend () const noexcept
 
const_broadcast_iterator< S, L > cend (const S &shape) const noexcept
 
select_reverse_iterator< L > rbegin () noexcept
 
select_const_reverse_iterator< L > rbegin () const noexcept
 
reverse_broadcast_iterator< S, L > rbegin (const S &shape) noexcept
 
const_reverse_broadcast_iterator< S, L > rbegin (const S &shape) const noexcept
 
select_reverse_iterator< L > rend () noexcept
 
select_const_reverse_iterator< L > rend () const noexcept
 
reverse_broadcast_iterator< S, L > rend (const S &shape) noexcept
 
const_reverse_broadcast_iterator< S, L > rend (const S &shape) const noexcept
 
select_const_reverse_iterator< L > crbegin () const noexcept
 
const_reverse_broadcast_iterator< S, L > crbegin (const S &shape) const noexcept
 
select_const_reverse_iterator< L > crend () const noexcept
 
const_reverse_broadcast_iterator< S, L > crend (const S &shape) const noexcept
 
auto begin () noexcept -> select_iterator< L >
 Returns an iterator to the first element of the expression.
 
auto end () noexcept -> select_iterator< L >
 Returns an iterator to the element following the last element of the expression.
 
auto begin () const noexcept -> select_const_iterator< L >
 Returns a constant iterator to the first element of the expression.
 
auto end () const noexcept -> select_const_iterator< L >
 Returns a constant iterator to the element following the last element of the expression.
 
auto cbegin () const noexcept -> select_const_iterator< L >
 Returns a constant iterator to the first element of the expression.
 
auto cend () const noexcept -> select_const_iterator< L >
 Returns a constant iterator to the element following the last element of the expression.
 
auto begin () noexcept -> select_iterator< L >
 Returns an iterator to the first element of the expression.
 
auto begin () const noexcept -> select_const_iterator< L >
 Returns a constant iterator to the first element of the expression.
 
auto end () noexcept -> select_iterator< L >
 Returns an iterator to the element following the last element of the expression.
 
auto end () const noexcept -> select_const_iterator< L >
 Returns a constant iterator to the element following the last element of the expression.
 
auto cbegin () const noexcept -> select_const_iterator< L >
 Returns a constant iterator to the first element of the expression.
 
auto cend () const noexcept -> select_const_iterator< L >
 Returns a constant iterator to the element following the last element of the expression.
 
auto rbegin () noexcept -> select_reverse_iterator< L >
 Returns an iterator to the first element of the reversed expression.
 
auto rend () noexcept -> select_reverse_iterator< L >
 Returns an iterator to the element following the last element of the reversed expression.
 
auto rbegin () const noexcept -> select_const_reverse_iterator< L >
 Returns a constant iterator to the first element of the reversed expression.
 
auto rend () const noexcept -> select_const_reverse_iterator< L >
 Returns a constant iterator to the element following the last element of the reversed expression.
 
auto crbegin () const noexcept -> select_const_reverse_iterator< L >
 Returns a constant iterator to the first element of the reversed expression.
 
auto crend () const noexcept -> select_const_reverse_iterator< L >
 Returns a constant iterator to the element following the last element of the reversed expression.
 
auto rbegin () noexcept -> select_reverse_iterator< L >
 Returns an iterator to the first element of the reversed expression.
 
auto rbegin () const noexcept -> select_const_reverse_iterator< L >
 Returns a constant iterator to the first element of the reversed expression.
 
auto rend () noexcept -> select_reverse_iterator< L >
 Returns an iterator to the element following the last element of the reversed expression.
 
auto rend () const noexcept -> select_const_reverse_iterator< L >
 Returns a constant iterator to the element following the last element of the reversed expression.
 
auto crbegin () const noexcept -> select_const_reverse_iterator< L >
 Returns a constant iterator to the first element of the reversed expression.
 
auto crend () const noexcept -> select_const_reverse_iterator< L >
 Returns a constant iterator to the element following the last element of the reversed expression.
 
auto begin (const S &shape) noexcept -> broadcast_iterator< S, L >
 Returns an iterator to the first element of the expression.
 
auto end (const S &shape) noexcept -> broadcast_iterator< S, L >
 Returns an iterator to the element following the last element of the expression.
 
auto begin (const S &shape) const noexcept -> const_broadcast_iterator< S, L >
 Returns a constant iterator to the first element of the expression.
 
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.
 
auto cbegin (const S &shape) const noexcept -> const_broadcast_iterator< S, L >
 Returns a constant iterator to the first element of the expression.
 
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.
 
auto begin (const S &shape) noexcept -> broadcast_iterator< S, L >
 Returns an iterator to the first element of the expression.
 
auto begin (const S &shape) const noexcept -> const_broadcast_iterator< S, L >
 Returns a constant iterator to the first element of the expression.
 
auto end (const S &shape) noexcept -> broadcast_iterator< S, L >
 Returns an iterator to the element following the last element of the expression.
 
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.
 
auto cbegin (const S &shape) const noexcept -> const_broadcast_iterator< S, L >
 Returns a constant iterator to the first element of the expression.
 
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.
 
auto rbegin (const S &shape) noexcept -> reverse_broadcast_iterator< S, L >
 Returns an iterator to the first element of the reversed expression.
 
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.
 
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.
 
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.
 
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.
 
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.
 
auto rbegin (const S &shape) noexcept -> reverse_broadcast_iterator< S, L >
 Returns an iterator to the first element of the reversed expression.
 
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.
 
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.
 
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.
 
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.
 
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< xarray_container< EC, L, SC, Tag > >
derived_typeassign_xexpression (const xexpression< E > &e)
 
derived_typecomputed_assign (const xexpression< E > &e)
 
derived_typescalar_computed_assign (const E &e, F &&f)
 
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 &
 
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< xarray_container< EC, L, SC, Tag > >
disable_xexpression< E, derived_type & > operator+= (const E &)
 
derived_type & operator+= (const xexpression< E > &)
 
disable_xexpression< E, derived_type & > operator-= (const E &)
 
derived_type & operator-= (const xexpression< E > &)
 
disable_xexpression< E, derived_type & > operator*= (const E &)
 
derived_type & operator*= (const xexpression< E > &)
 
disable_xexpression< E, derived_type & > operator/= (const E &)
 
derived_type & operator/= (const xexpression< E > &)
 
disable_xexpression< E, derived_type & > operator%= (const E &)
 
derived_type & operator%= (const xexpression< E > &)
 
disable_xexpression< E, derived_type & > operator&= (const E &)
 
derived_type & operator&= (const xexpression< E > &)
 
disable_xexpression< E, derived_type & > operator|= (const E &)
 
derived_type & operator|= (const xexpression< E > &)
 
disable_xexpression< E, derived_type & > operator^= (const E &)
 
derived_type & operator^= (const xexpression< E > &)
 
derived_type & assign (const xexpression< E > &)
 
derived_type & plus_assign (const xexpression< E > &)
 
derived_type & minus_assign (const xexpression< E > &)
 
derived_type & multiplies_assign (const xexpression< E > &)
 
derived_type & divides_assign (const xexpression< E > &)
 
derived_type & modulus_assign (const xexpression< E > &)
 
derived_type & bit_and_assign (const xexpression< E > &)
 
derived_type & bit_or_assign (const xexpression< E > &)
 
derived_type & bit_xor_assign (const xexpression< E > &)
 
auto operator+= (const E &e) -> disable_xexpression< E, derived_type & >
 Adds the scalar e to *this.
 
auto operator-= (const E &e) -> disable_xexpression< E, derived_type & >
 Subtracts the scalar e from *this.
 
auto operator*= (const E &e) -> disable_xexpression< E, derived_type & >
 Multiplies *this with the scalar e.
 
auto operator/= (const E &e) -> disable_xexpression< E, derived_type & >
 Divides *this by the scalar e.
 
auto operator%= (const E &e) -> disable_xexpression< E, derived_type & >
 Computes the remainder of *this after division by the scalar 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.
 
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.
 
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.
 
auto operator+= (const xexpression< E > &e) -> derived_type &
 Adds the xexpression e to *this.
 
auto operator-= (const xexpression< E > &e) -> derived_type &
 Subtracts the xexpression e from *this.
 
auto operator*= (const xexpression< E > &e) -> derived_type &
 Multiplies *this with the xexpression e.
 
auto operator/= (const xexpression< E > &e) -> derived_type &
 Divides *this by the xexpression e.
 
auto operator%= (const xexpression< E > &e) -> derived_type &
 Computes the remainder of *this after division by the xexpression e.
 
auto operator&= (const xexpression< E > &e) -> derived_type &
 Computes the bitwise and of *this and the xexpression e and assigns it to *this.
 
auto operator|= (const xexpression< E > &e) -> derived_type &
 Computes the bitwise or of *this and the xexpression e and assigns it to *this.
 
auto operator^= (const xexpression< E > &e) -> derived_type &
 Computes the bitwise xor of *this and the xexpression e and assigns it to *this.
 
auto operator+= (const E &e) -> disable_xexpression< E, derived_type & >
 Adds the scalar e to *this.
 
auto operator+= (const xexpression< E > &e) -> derived_type &
 Adds the xexpression e to *this.
 
auto operator-= (const E &e) -> disable_xexpression< E, derived_type & >
 Subtracts the scalar e from *this.
 
auto operator-= (const xexpression< E > &e) -> derived_type &
 Subtracts the xexpression e from *this.
 
auto operator*= (const E &e) -> disable_xexpression< E, derived_type & >
 Multiplies *this with the scalar e.
 
auto operator*= (const xexpression< E > &e) -> derived_type &
 Multiplies *this with the xexpression e.
 
auto operator/= (const E &e) -> disable_xexpression< E, derived_type & >
 Divides *this by the scalar e.
 
auto operator/= (const xexpression< E > &e) -> derived_type &
 Divides *this by the xexpression e.
 
auto operator%= (const E &e) -> disable_xexpression< E, derived_type & >
 Computes the remainder of *this after division by the scalar e.
 
auto operator%= (const xexpression< E > &e) -> derived_type &
 Computes the remainder of *this after division by the xexpression 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.
 
auto operator&= (const xexpression< E > &e) -> derived_type &
 Computes the bitwise and of *this and the xexpression e and assigns it to *this.
 
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.
 
auto operator|= (const xexpression< E > &e) -> derived_type &
 Computes the bitwise or of *this and the xexpression e and assigns it to *this.
 
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.
 
auto operator^= (const xexpression< E > &e) -> derived_type &
 Computes the bitwise xor of *this and the xexpression e and assigns it to *this.
 
auto assign (const xexpression< E > &e) -> derived_type &
 Assigns the xexpression e to *this.
 
auto plus_assign (const xexpression< E > &e) -> derived_type &
 Adds the xexpression e to *this.
 
auto minus_assign (const xexpression< E > &e) -> derived_type &
 Subtracts the xexpression e to *this.
 
auto multiplies_assign (const xexpression< E > &e) -> derived_type &
 Multiplies *this with the xexpression e.
 
auto divides_assign (const xexpression< E > &e) -> derived_type &
 Divides *this by the xexpression e.
 
auto modulus_assign (const xexpression< E > &e) -> derived_type &
 Computes the remainder of *this after division by the xexpression e.
 
auto bit_and_assign (const xexpression< E > &e) -> derived_type &
 Computes the bitwise and of e to *this.
 
auto bit_or_assign (const xexpression< E > &e) -> derived_type &
 Computes the bitwise or of e to *this.
 
auto bit_xor_assign (const xexpression< E > &e) -> derived_type &
 Computes the bitwise xor of e to *this.
 
auto operator= (const xexpression< E > &e) -> derived_type &
 
auto assign (const xexpression< E > &e) -> derived_type &
 Assigns the xexpression e to *this.
 
auto plus_assign (const xexpression< E > &e) -> derived_type &
 Adds the xexpression e to *this.
 
auto minus_assign (const xexpression< E > &e) -> derived_type &
 Subtracts the xexpression e to *this.
 
auto multiplies_assign (const xexpression< E > &e) -> derived_type &
 Multiplies *this with the xexpression e.
 
auto divides_assign (const xexpression< E > &e) -> derived_type &
 Divides *this by the xexpression e.
 
auto modulus_assign (const xexpression< E > &e) -> derived_type &
 Computes the remainder of *this after division by the xexpression e.
 
auto bit_and_assign (const xexpression< E > &e) -> derived_type &
 Computes the bitwise and of e to *this.
 
auto bit_or_assign (const xexpression< E > &e) -> derived_type &
 Computes the bitwise or of e to *this.
 
auto bit_xor_assign (const xexpression< E > &e) -> derived_type &
 Computes the bitwise xor of e to *this.
 
auto operator= (const xexpression< E > &e) -> derived_type &
 

Static Public Member Functions

template<class S = shape_type>
static xarray_container from_shape (S &&s)
 

Static Public Attributes

static constexpr std::size_t rank = SIZE_MAX
 
- Static Public Attributes inherited from xt::xcontainer< xarray_container< EC, L, SC, Tag > >
static constexpr layout_type static_layout
 
static constexpr bool contiguous_layout
 
- Static Public Attributes inherited from xt::xcontiguous_iterable< xarray_container< EC, L, SC, Tag > >
static constexpr layout_type static_layout
 

Friends

class xcontainer< xarray_container< EC, L, SC, Tag > >
 

Extended copy semantic

template<class E>
 xarray_container (const xexpression< E > &e)
 The extended copy constructor.
 
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< xarray_container< EC, L, SC, 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< xarray_container< EC, L, SC, Tag > >
 xcontainer (const xcontainer &)=default
 
 xcontainer (xcontainer &&)=default
 
xcontaineroperator= (const 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_typederived_cast () &noexcept
 
const derived_typederived_cast () const &noexcept
 
derived_type derived_cast () &&noexcept
 
- Protected Member Functions inherited from xt::xcontainer_semantic< xarray_container< EC, L, SC, 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< xarray_container< EC, L, SC, Tag > >
 xsemantic_base (const xsemantic_base &)=default
 
 xsemantic_base (xsemantic_base &&)=default
 
xsemantic_baseoperator= (const xsemantic_base &)=default
 
xsemantic_baseoperator= (xsemantic_base &&)=default
 
derived_type & operator= (const xexpression< E > &)
 

Detailed Description

template<class EC, layout_type L, class SC, class Tag>
class xt::xarray_container< EC, L, SC, Tag >

Dense multidimensional container with tensor semantic.

The xarray_container class implements a dense multidimensional container with tensor semantic.

Template Parameters
ECThe type of the container holding the elements.
LThe layout_type of the container.
SCThe type of the containers holding the shape and the strides.
TagThe expression tag.
See also
xarray, xstrided_container, xcontainer

Definition at line 82 of file xarray.hpp.

Member Typedef Documentation

◆ allocator_type

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::allocator_type = typename base_type::allocator_type

Definition at line 93 of file xarray.hpp.

◆ backstrides_type

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::backstrides_type = typename base_type::backstrides_type

Definition at line 102 of file xarray.hpp.

◆ base_type

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::base_type = xstrided_container<self_type>

Definition at line 89 of file xarray.hpp.

◆ const_pointer

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::const_pointer = typename base_type::const_pointer

Definition at line 98 of file xarray.hpp.

◆ const_reference

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::const_reference = typename base_type::const_reference

Definition at line 96 of file xarray.hpp.

◆ expression_tag

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::expression_tag = Tag

Definition at line 106 of file xarray.hpp.

◆ extension_base

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::extension_base = extension::xarray_container_base_t<EC, L, SC, Tag>

Definition at line 91 of file xarray.hpp.

◆ inner_backstrides_type

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::inner_backstrides_type = typename base_type::inner_backstrides_type

Definition at line 104 of file xarray.hpp.

◆ inner_shape_type

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::inner_shape_type = typename base_type::inner_shape_type

Definition at line 100 of file xarray.hpp.

◆ inner_strides_type

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::inner_strides_type = typename base_type::inner_strides_type

Definition at line 103 of file xarray.hpp.

◆ pointer

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::pointer = typename base_type::pointer

Definition at line 97 of file xarray.hpp.

◆ reference

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::reference = typename base_type::reference

Definition at line 95 of file xarray.hpp.

◆ self_type

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::self_type = xarray_container<EC, L, SC, Tag>

Definition at line 88 of file xarray.hpp.

◆ semantic_base

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::semantic_base = xcontainer_semantic<self_type>

Definition at line 90 of file xarray.hpp.

◆ shape_type

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::shape_type = typename base_type::shape_type

Definition at line 99 of file xarray.hpp.

◆ storage_type

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::storage_type = typename base_type::storage_type

Definition at line 92 of file xarray.hpp.

◆ strides_type

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::strides_type = typename base_type::strides_type

Definition at line 101 of file xarray.hpp.

◆ temporary_type

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::temporary_type = typename semantic_base::temporary_type

Definition at line 105 of file xarray.hpp.

◆ value_type

template<class EC, layout_type L, class SC, class Tag>
using xt::xarray_container< EC, L, SC, Tag >::value_type = typename base_type::value_type

Definition at line 94 of file xarray.hpp.

Constructor & Destructor Documentation

◆ xarray_container() [1/14]

template<class EC, layout_type L, class SC, class Tag>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( )
inline

Allocates an uninitialized xarray_container that holds 0 element.

Definition at line 281 of file xarray.hpp.

◆ xarray_container() [2/14]

template<class EC, layout_type L, class SC, class Tag>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( const shape_type & shape,
layout_type l = L )
inlineexplicit

Allocates an uninitialized xarray_container with the specified shape and layout_type.

Parameters
shapethe shape of the xarray_container
lthe layout_type of the xarray_container

Definition at line 294 of file xarray.hpp.

◆ xarray_container() [3/14]

template<class EC, layout_type L, class SC, class Tag>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( const shape_type & shape,
const_reference value,
layout_type l = L )
inlineexplicit

Allocates an xarray_container with the specified shape and layout_type.

Elements are initialized to the specified value.

Parameters
shapethe shape of the xarray_container
valuethe value of the elements
lthe layout_type of the xarray_container

Definition at line 308 of file xarray.hpp.

◆ xarray_container() [4/14]

template<class EC, layout_type L, class SC, class Tag>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( const shape_type & shape,
const strides_type & strides )
inlineexplicit

Allocates an uninitialized xarray_container with the specified shape and strides.

Parameters
shapethe shape of the xarray_container
stridesthe strides of the xarray_container

Definition at line 325 of file xarray.hpp.

◆ xarray_container() [5/14]

template<class EC, layout_type L, class SC, class Tag>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( const shape_type & shape,
const strides_type & strides,
const_reference value )
inlineexplicit

Allocates an uninitialized xarray_container with the specified shape and strides.

Elements are initialized to the specified value.

Parameters
shapethe shape of the xarray_container
stridesthe strides of the xarray_container
valuethe value of the elements

Definition at line 339 of file xarray.hpp.

◆ xarray_container() [6/14]

template<class EC, layout_type L, class SC, class Tag>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( storage_type && storage,
inner_shape_type && shape,
inner_strides_type && strides )
inlineexplicit

Allocates an xarray_container by moving specified data, shape and strides.

Parameters
storagethe data for the xarray_container
shapethe shape of the xarray_container
stridesthe strides of the xarray_container

Definition at line 371 of file xarray.hpp.

◆ xarray_container() [7/14]

template<class EC, layout_type L, class SC, class Tag>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( const value_type & t)
inline

Allocates an xarray_container that holds a single element initialized to the specified value.

Parameters
tthe value of the element

Definition at line 356 of file xarray.hpp.

◆ xarray_container() [8/14]

template<class EC, layout_type L, class SC, class Tag>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( nested_initializer_list_t< value_type, 1 > t)
inline

Allocates a one-dimensional xarray_container.

Parameters
tthe elements of the xarray_container

Definition at line 392 of file xarray.hpp.

◆ xarray_container() [9/14]

template<class EC, layout_type L, class SC, class Tag>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( nested_initializer_list_t< value_type, 2 > t)
inline

Allocates a two-dimensional xarray_container.

Parameters
tthe elements of the xarray_container

Definition at line 405 of file xarray.hpp.

◆ xarray_container() [10/14]

template<class EC, layout_type L, class SC, class Tag>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( nested_initializer_list_t< value_type, 3 > t)
inline

Allocates a three-dimensional xarray_container.

Parameters
tthe elements of the xarray_container

Definition at line 418 of file xarray.hpp.

◆ xarray_container() [11/14]

template<class EC, layout_type L, class SC, class Tag>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( nested_initializer_list_t< value_type, 4 > t)
inline

Allocates a four-dimensional xarray_container.

Parameters
tthe elements of the xarray_container

Definition at line 431 of file xarray.hpp.

◆ xarray_container() [12/14]

template<class EC, layout_type L, class SC, class Tag>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( nested_initializer_list_t< value_type, 5 > t)
inline

Allocates a five-dimensional xarray_container.

Parameters
tthe elements of the xarray_container

Definition at line 444 of file xarray.hpp.

◆ xarray_container() [13/14]

template<class EC, layout_type L, class SC, class Tag>
template<std::size_t N>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( xtensor_container< EC, N, L, Tag > && rhs)
inlineexplicit

Definition at line 468 of file xarray.hpp.

◆ xarray_container() [14/14]

template<class EC, layout_type L, class SC, class Tag>
template<class E>
xt::xarray_container< EC, L, SC, Tag >::xarray_container ( const xexpression< E > & e)
inline

The extended copy constructor.

Definition at line 501 of file xarray.hpp.

Member Function Documentation

◆ from_shape()

template<class EC, layout_type L, class SC, class Tag>
template<class S>
xarray_container< EC, L, SC, Tag > xt::xarray_container< EC, L, SC, Tag >::from_shape ( S && s)
inline

Allocates and returns an xarray_container with the specified shape.

Parameters
sthe shape of the xarray_container

Definition at line 460 of file xarray.hpp.

◆ operator=() [1/2]

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

The extended assignment operator.

Definition at line 518 of file xarray.hpp.

◆ operator=() [2/2]

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

Definition at line 482 of file xarray.hpp.

Friends And Related Symbol Documentation

◆ xcontainer< xarray_container< EC, L, SC, Tag > >

template<class EC, layout_type L, class SC, class Tag>
friend class xcontainer< xarray_container< EC, L, SC, Tag > >
friend

Definition at line 150 of file xarray.hpp.

Member Data Documentation

◆ rank

template<class EC, layout_type L, class SC, class Tag>
std::size_t xt::xarray_container< EC, L, SC, Tag >::rank = SIZE_MAX
staticconstexpr

Definition at line 107 of file xarray.hpp.


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