xtensor
Loading...
Searching...
No Matches
xt::xfixed_container< ET, S, L, SH, Tag > Class Template Reference

Dense multidimensional container with tensor semantic and fixed dimension. More...

#include <xfixed.hpp>

Inheritance diagram for xt::xfixed_container< ET, S, L, SH, Tag >:
xt::xcontainer< xfixed_container< ET, S, L, SH, Tag > > xt::xcontainer_semantic< xfixed_container< ET, S, L, SH, Tag > > xt::xcontiguous_iterable< D > xt::xaccessible< D > xt::xsemantic_base< D > xt::xiterable< D >

Public Types

using self_type = xfixed_container<ET, S, L, SH, Tag>
 
using base_type = xcontainer<self_type>
 
using semantic_base = xcontainer_semantic<self_type>
 
using storage_type = typename base_type::storage_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_backstrides_type = typename base_type::inner_backstrides_type
 
using inner_strides_type = typename base_type::inner_strides_type
 
using temporary_type = typename semantic_base::temporary_type
 
using expression_tag = Tag
 
- Public Types inherited from xt::xcontainer< xfixed_container< ET, S, L, SH, 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< 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< xfixed_container< ET, S, L, SH, 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

 xfixed_container (const xfixed_container &)=default
 
xfixed_containeroperator= (const xfixed_container &)=default
 
 xfixed_container (xfixed_container &&)=default
 
xfixed_containeroperator= (xfixed_container &&)=default
 
template<class E >
xfixed_containeroperator= (const xexpression< E > &e)
 
Constructors
 xfixed_container (const value_type &v)
 
 xfixed_container (const inner_shape_type &shape, layout_type l=L)
 Create an uninitialized xfixed_container.
 
 xfixed_container (const inner_shape_type &shape, value_type v, layout_type l=L)
 Create an xfixed_container, and initialize with the value of v.
 
template<class IX = std::integral_constant<std::size_t, N>, class EN = std::enable_if_t<IX::value != 0, int>>
 xfixed_container (nested_initializer_list_t< value_type, N > t)
 Allocates an xfixed_container with shape S with values from a C array.
 
template<class ST >
xfixed_container< ET, S, L, SH, Tagfrom_shape (ST &&shape)
 
- Public Member Functions inherited from xt::xcontainer< xfixed_container< ET, S, L, SH, Tag > >
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_typeload_simd (size_type i) const
 
reference at (Args... args)
 
auto at (Args... args) -> reference
 Returns a reference to the element at the specified position in the expression, after dimension and bounds checking.
 
const_reference at (Args... args) const
 
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.
 
reference periodic (Args... 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).
 
const_reference periodic (Args... args) const
 
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.
 
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.
 
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< 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< xfixed_container< ET, S, L, SH, 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 Member Functions

template<class ST = std::array<std::size_t, N>>
static xfixed_container from_shape (ST &&)
 

Static Public Attributes

static constexpr std::size_t N = std::tuple_size<shape_type>::value
 
static constexpr std::size_t rank = N
 
- Static Public Attributes inherited from xt::xcontainer< xfixed_container< ET, S, L, SH, Tag > >
static constexpr layout_type static_layout
 
static constexpr bool contiguous_layout
 
- Static Public Attributes inherited from xt::xcontiguous_iterable< D >
static constexpr layout_type static_layout = inner_types::layout
 

Friends

class xcontainer< xfixed_container< ET, S, L, SH, Tag > >
 

Extended copy semantic

template<class E >
 xfixed_container (const xexpression< E > &e)
 The extended copy constructor.
 
template<class ST = std::array<std::size_t, N>>
void resize (ST &&shape, bool force=false) const
 Note that the xfixed_container cannot be resized.
 
template<class ST = shape_type>
void resize (ST &&shape, layout_type l) const
 Note that the xfixed_container cannot be resized.
 
template<class ST = shape_type>
void resize (ST &&shape, const strides_type &strides) const
 Note that the xfixed_container cannot be resized.
 
template<class ST = std::array<std::size_t, N>>
const autoreshape (ST &&shape, layout_type layout=L) const
 Note that the xfixed_container cannot be reshaped to a shape different from S.
 
template<class ST >
bool broadcast_shape (ST &s, bool reuse_cache=false) const
 
constexpr layout_type layout () const noexcept
 
bool is_contiguous () const noexcept
 
template<class E >
auto operator= (const xexpression< E > &e) -> self_type &
 The extended assignment operator.
 

Additional Inherited Members

- Protected Member Functions inherited from xt::xcontainer< xfixed_container< ET, S, L, SH, 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< xfixed_container< ET, S, L, SH, 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 ET, class S, layout_type L, bool SH, class Tag>
class xt::xfixed_container< ET, S, L, SH, Tag >

Dense multidimensional container with tensor semantic and fixed dimension.

The xfixed_container class implements a dense multidimensional container with tensor semantic and fixed dimension

Template Parameters
ETThe type of the elements.
SThe xshape template paramter of the container.
LThe layout_type of the tensor.
SHWether the tensor can be used as a shared expression.
TagThe expression tag.
See also
xtensor_fixed

Definition at line 296 of file xfixed.hpp.

Member Typedef Documentation

◆ backstrides_type

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::backstrides_type = typename base_type::backstrides_type

Definition at line 314 of file xfixed.hpp.

◆ base_type

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::base_type = xcontainer<self_type>

Definition at line 302 of file xfixed.hpp.

◆ const_pointer

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::const_pointer = typename base_type::const_pointer

Definition at line 310 of file xfixed.hpp.

◆ const_reference

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::const_reference = typename base_type::const_reference

Definition at line 308 of file xfixed.hpp.

◆ expression_tag

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::expression_tag = Tag

Definition at line 318 of file xfixed.hpp.

◆ inner_backstrides_type

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::inner_backstrides_type = typename base_type::inner_backstrides_type

Definition at line 315 of file xfixed.hpp.

◆ inner_shape_type

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::inner_shape_type = typename base_type::inner_shape_type

Definition at line 312 of file xfixed.hpp.

◆ inner_strides_type

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::inner_strides_type = typename base_type::inner_strides_type

Definition at line 316 of file xfixed.hpp.

◆ pointer

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::pointer = typename base_type::pointer

Definition at line 309 of file xfixed.hpp.

◆ reference

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::reference = typename base_type::reference

Definition at line 307 of file xfixed.hpp.

◆ self_type

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::self_type = xfixed_container<ET, S, L, SH, Tag>

Definition at line 301 of file xfixed.hpp.

◆ semantic_base

Definition at line 303 of file xfixed.hpp.

◆ shape_type

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::shape_type = typename base_type::shape_type

Definition at line 311 of file xfixed.hpp.

◆ storage_type

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::storage_type = typename base_type::storage_type

Definition at line 305 of file xfixed.hpp.

◆ strides_type

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::strides_type = typename base_type::strides_type

Definition at line 313 of file xfixed.hpp.

◆ temporary_type

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::temporary_type = typename semantic_base::temporary_type

Definition at line 317 of file xfixed.hpp.

◆ value_type

template<class ET , class S , layout_type L, bool SH, class Tag >
using xt::xfixed_container< ET, S, L, SH, Tag >::value_type = typename base_type::value_type

Definition at line 306 of file xfixed.hpp.

Constructor & Destructor Documentation

◆ xfixed_container() [1/5]

template<class ET , class S , layout_type L, bool SH, class Tag >
xt::xfixed_container< ET, S, L, SH, Tag >::xfixed_container ( const value_type & v)
inline

Definition at line 563 of file xfixed.hpp.

◆ xfixed_container() [2/5]

template<class ET , class S , layout_type L, bool SH, class Tag >
xt::xfixed_container< ET, S, L, SH, Tag >::xfixed_container ( const inner_shape_type & shape,
layout_type l = L )
inlineexplicit

Create an uninitialized xfixed_container.

Note this function is only provided for homogeneity, and the shape & layout argument is disregarded (the template shape is always used).

Parameters
shapethe shape of the xfixed_container (unused!)
lthe layout_type of the xfixed_container (unused!)

Definition at line 554 of file xfixed.hpp.

◆ xfixed_container() [3/5]

template<class ET , class S , layout_type L, bool SH, class Tag >
xt::xfixed_container< ET, S, L, SH, Tag >::xfixed_container ( const inner_shape_type & shape,
value_type v,
layout_type l = L )
inlineexplicit

Create an xfixed_container, and initialize with the value of v.

Note, the shape argument to this function is only provided for homogeneity, and the shape argument is disregarded (the template shape is always used).

Parameters
shapethe shape of the xfixed_container (unused!)
vthe fill value
lthe layout_type of the xfixed_container (unused!)

Definition at line 582 of file xfixed.hpp.

◆ xfixed_container() [4/5]

template<class ET , class S , layout_type L, bool SH, class Tag >
template<class IX , class EN >
xt::xfixed_container< ET, S, L, SH, Tag >::xfixed_container ( nested_initializer_list_t< value_type, N > t)
inline

Allocates an xfixed_container with shape S with values from a C array.

The type returned by get_init_type_t is raw C array value_type[X][Y][Z] for xt::xshape<X, Y, Z>. C arrays can be initialized with the initializer list syntax, but the size is checked at compile time to prevent errors. Note: for clang < 3.8 this is an initializer_list and the size is not checked at compile-or runtime.

Definition at line 643 of file xfixed.hpp.

◆ xfixed_container() [5/5]

template<class ET , class S , layout_type L, bool SH, class Tag >
template<class E >
xt::xfixed_container< ET, S, L, SH, Tag >::xfixed_container ( const xexpression< E > & e)
inline

The extended copy constructor.

Definition at line 664 of file xfixed.hpp.

Member Function Documentation

◆ broadcast_shape()

template<class ET , class S , layout_type L, bool SH, class Tag >
template<class ST >
bool xt::xfixed_container< ET, S, L, SH, Tag >::broadcast_shape ( ST & s,
bool reuse_cache = false ) const
inline

Definition at line 741 of file xfixed.hpp.

◆ from_shape()

template<class ET , class S , layout_type L, bool SH, class Tag >
template<class ST >
xfixed_container< ET, S, L, SH, Tag > xt::xfixed_container< ET, S, L, SH, Tag >::from_shape ( ST && shape)
inline

Definition at line 626 of file xfixed.hpp.

◆ is_contiguous()

template<class ET , class S , layout_type L, bool SH, class Tag >
bool xt::xfixed_container< ET, S, L, SH, Tag >::is_contiguous ( ) const
inlinenoexcept

Definition at line 753 of file xfixed.hpp.

◆ layout()

template<class ET , class S , layout_type L, bool SH, class Tag >
constexpr layout_type xt::xfixed_container< ET, S, L, SH, Tag >::layout ( ) const
constexprnoexcept

Definition at line 747 of file xfixed.hpp.

◆ operator=()

template<class ET , class S , layout_type L, bool SH, class Tag >
template<class E >
auto xt::xfixed_container< ET, S, L, SH, Tag >::operator= ( const xexpression< E > & e) -> self_type&
inline

The extended assignment operator.

Definition at line 674 of file xfixed.hpp.

◆ reshape()

template<class ET , class S , layout_type L, bool SH, class Tag >
template<class ST >
const auto & xt::xfixed_container< ET, S, L, SH, Tag >::reshape ( ST && shape,
layout_type layout = L ) const
inline

Note that the xfixed_container cannot be reshaped to a shape different from S.

Definition at line 729 of file xfixed.hpp.

◆ resize() [1/3]

template<class ET , class S , layout_type L, bool SH, class Tag >
template<class ST >
void xt::xfixed_container< ET, S, L, SH, Tag >::resize ( ST && shape,
bool force = false ) const
inline

Note that the xfixed_container cannot be resized.

Attempting to resize with a different size throws an assert in debug mode.

Definition at line 687 of file xfixed.hpp.

◆ resize() [2/3]

template<class ET , class S , layout_type L, bool SH, class Tag >
template<class ST >
void xt::xfixed_container< ET, S, L, SH, Tag >::resize ( ST && shape,
const strides_type & strides ) const
inline

Note that the xfixed_container cannot be resized.

Attempting to resize with a different size throws an assert in debug mode.

Definition at line 714 of file xfixed.hpp.

◆ resize() [3/3]

template<class ET , class S , layout_type L, bool SH, class Tag >
template<class ST >
void xt::xfixed_container< ET, S, L, SH, Tag >::resize ( ST && shape,
layout_type l ) const
inline

Note that the xfixed_container cannot be resized.

Attempting to resize with a different size throws an assert in debug mode.

Definition at line 699 of file xfixed.hpp.

Friends And Related Symbol Documentation

◆ xcontainer< xfixed_container< ET, S, L, SH, Tag > >

template<class ET , class S , layout_type L, bool SH, class Tag >
friend class xcontainer< xfixed_container< ET, S, L, SH, Tag > >
friend

Definition at line 379 of file xfixed.hpp.

Member Data Documentation

◆ N

template<class ET , class S , layout_type L, bool SH, class Tag >
constexpr std::size_t xt::xfixed_container< ET, S, L, SH, Tag >::N = std::tuple_size<shape_type>::value
staticconstexpr

Definition at line 320 of file xfixed.hpp.

◆ rank

template<class ET , class S , layout_type L, bool SH, class Tag >
constexpr std::size_t xt::xfixed_container< ET, S, L, SH, Tag >::rank = N
staticconstexpr

Definition at line 321 of file xfixed.hpp.


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