xtensor
Loading...
Searching...
No Matches
xt::xiterable< D > Class Template Reference

Base class for multidimensional iterable expressions. More...

#include <xiterable.hpp>

Inheritance diagram for xt::xiterable< D >:
xt::xconst_iterable< D > xt::xdynamic_view< uvt, S, L, typename FST::template rebind_t< uvt > > xt::xdynamic_view< uft, S, L, typename FST::template rebind_t< uft > > xt::xdynamic_view< ucvt, S, L, typename FST::template rebind_t< ucvt > > xt::xdynamic_view< ucft, S, L, typename FST::template rebind_t< ucft > > xt::xdynamic_view< CT, S, L, FST > xt::xdynamic_view< E, S, L, typename FST::template rebind_t< E > > xt::xindex_view< uvt, I > xt::xindex_view< uft, I > xt::xindex_view< ucvt, I > xt::xindex_view< ucft, I > xt::xindex_view< E, I > xt::xscalar< xtl::closure_type_t< E > > xt::xscalar< xtl::const_closure_type_t< E > > xt::xscalar< T > xt::xscalar< bool > xt::xscalar< std::conditional_t< is_const, const_value_closure, value_closure > > xt::xscalar< std::conditional_t< is_const, const_flag_closure, flag_closure > > xt::xscalar< const_value_closure > xt::xscalar< const_flag_closure > xt::xcontiguous_iterable< D > xt::xdynamic_view< CT, S, L, FST > xt::xoptional_assembly_base< D >

Public Types

using derived_type = D
using base_type = xconst_iterable<D>
using inner_shape_type = typename base_type::inner_shape_type
using stepper = typename base_type::stepper
using const_stepper = typename base_type::const_stepper
using linear_iterator = typename base_type::linear_iterator
using reverse_linear_iterator = typename base_type::reverse_linear_iterator
template<layout_type L>
using layout_iterator = typename base_type::template layout_iterator<L>
template<layout_type L>
using const_layout_iterator = typename base_type::template const_layout_iterator<L>
template<layout_type L>
using reverse_layout_iterator = typename base_type::template reverse_layout_iterator<L>
template<layout_type L>
using const_reverse_layout_iterator = typename base_type::template const_reverse_layout_iterator<L>
template<class S, layout_type L>
using broadcast_iterator = typename base_type::template broadcast_iterator<S, L>
template<class S, layout_type L>
using const_broadcast_iterator = typename base_type::template const_broadcast_iterator<S, L>
template<class S, layout_type L>
using reverse_broadcast_iterator = typename base_type::template reverse_broadcast_iterator<S, L>
template<class S, layout_type L>
using const_reverse_broadcast_iterator = typename base_type::template const_reverse_broadcast_iterator<S, L>
using iterator = typename base_type::iterator
using const_iterator = typename base_type::const_iterator
using reverse_iterator = typename base_type::reverse_iterator
using const_reverse_iterator = typename base_type::const_reverse_iterator
Public Types inherited from xt::xconst_iterable< D >
using derived_type = D
using iterable_types = xiterable_inner_types<D>
using inner_shape_type = typename iterable_types::inner_shape_type
using stepper = typename iterable_types::stepper
using const_stepper = typename iterable_types::const_stepper
template<layout_type L>
using layout_iterator = xiterator<stepper, inner_shape_type*, L>
template<layout_type L>
using const_layout_iterator = xiterator<const_stepper, inner_shape_type*, L>
template<layout_type L>
using reverse_layout_iterator = std::reverse_iterator<layout_iterator<L>>
template<layout_type L>
using const_reverse_layout_iterator = std::reverse_iterator<const_layout_iterator<L>>
using linear_iterator = layout_iterator< ::xt::layout_type::row_major >
using const_linear_iterator = const_layout_iterator< ::xt::layout_type::row_major >
using reverse_linear_iterator = reverse_layout_iterator< ::xt::layout_type::row_major >
using const_reverse_linear_iterator = const_reverse_layout_iterator< ::xt::layout_type::row_major >
template<class S, layout_type L>
using broadcast_iterator = xiterator<stepper, S, L>
template<class S, layout_type L>
using const_broadcast_iterator = xiterator<const_stepper, S, L>
template<class S, layout_type L>
using reverse_broadcast_iterator = std::reverse_iterator<broadcast_iterator<S, L>>
template<class S, layout_type L>
using const_reverse_broadcast_iterator = std::reverse_iterator<const_broadcast_iterator<S, L>>
using iterator = layout_iterator< ::xt::layout_type::row_major >
using const_iterator = const_layout_iterator< ::xt::layout_type::row_major >
using reverse_iterator = reverse_layout_iterator< ::xt::layout_type::row_major >
using const_reverse_iterator = const_reverse_layout_iterator< ::xt::layout_type::row_major >

Public Member Functions

template<layout_type L = ::xt::layout_type::row_major>
const_layout_iterator< L > begin () const noexcept
 Returns a constant iterator to the first element of the expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
const_broadcast_iterator< S, L > begin (const S &shape) const noexcept
 Returns a constant iterator to the first element of the expression.
template<layout_type L = ::xt::layout_type::row_major>
const_layout_iterator< L > end () const noexcept
 Returns a constant iterator to the element following the last element of the expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
const_broadcast_iterator< S, L > end (const S &shape) const noexcept
 Returns a constant iterator to the element following the last element of the expression.
template<layout_type L = ::xt::layout_type::row_major>
const_reverse_layout_iterator< L > rbegin () const noexcept
 Returns a constant iterator to the first element of the reversed expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
const_reverse_broadcast_iterator< S, L > rbegin (const S &shape) const noexcept
 Returns a constant iterator to the first element of the reversed expression.
template<layout_type L = ::xt::layout_type::row_major>
const_reverse_layout_iterator< L > rend () const noexcept
 Returns a constant iterator to the element following the last element of the reversed expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
const_reverse_broadcast_iterator< S, L > rend (const S &shape) const noexcept
 Returns a constant iterator to the element following the last element of the reversed expression.
Iterators
template<layout_type L = ::xt::layout_type::row_major>
layout_iterator< L > begin () noexcept
 Returns an iterator to the first element of the expression.
template<layout_type L = ::xt::layout_type::row_major>
layout_iterator< L > end () noexcept
 Returns an iterator to the element following the last element of the expression.
Reverse iterators
template<layout_type L = ::xt::layout_type::row_major>
reverse_layout_iterator< L > rbegin () noexcept
 Returns an iterator to the first element of the reversed expression.
template<layout_type L = ::xt::layout_type::row_major>
reverse_layout_iterator< L > rend () noexcept
 Returns an iterator to the element following the last element of the reversed expression.
Broadcast iterators
template<layout_type L = ::xt::layout_type::row_major, class S>
broadcast_iterator< S, L > begin (const S &shape) noexcept
 Returns an iterator to the first element of the expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
broadcast_iterator< S, L > end (const S &shape) noexcept
 Returns an iterator to the element following the last element of the expression.
Public Member Functions inherited from xt::xconst_iterable< D >
template<layout_type L = ::xt::layout_type::row_major>
const_layout_iterator< L > begin () const noexcept
 Returns a constant iterator to the first element of the expression.
template<layout_type L = ::xt::layout_type::row_major>
const_layout_iterator< L > end () const noexcept
 Returns a constant iterator to the element following the last element of the expression.
template<layout_type L = ::xt::layout_type::row_major>
const_layout_iterator< L > cbegin () const noexcept
 Returns a constant iterator to the first element of the expression.
template<layout_type L = ::xt::layout_type::row_major>
const_layout_iterator< L > cend () const noexcept
 Returns a constant iterator to the element following the last element of the expression.
template<layout_type L = ::xt::layout_type::row_major>
const_reverse_layout_iterator< L > rbegin () const noexcept
 Returns a constant iterator to the first element of the reversed expression.
template<layout_type L = ::xt::layout_type::row_major>
const_reverse_layout_iterator< L > rend () const noexcept
 Returns a constant iterator to the element following the last element of the reversed expression.
template<layout_type L = ::xt::layout_type::row_major>
const_reverse_layout_iterator< L > crbegin () const noexcept
 Returns a constant iterator to the first element of the reversed expression.
template<layout_type L = ::xt::layout_type::row_major>
const_reverse_layout_iterator< L > crend () const noexcept
 Returns a constant iterator to the element following the last element of the reversed expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
const_broadcast_iterator< S, L > begin (const S &shape) const noexcept
 Returns a constant iterator to the first element of the expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
const_broadcast_iterator< S, L > end (const S &shape) const noexcept
 Returns a constant iterator to the element following the last element of the expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
const_broadcast_iterator< S, L > cbegin (const S &shape) const noexcept
 Returns a constant iterator to the first element of the expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
const_broadcast_iterator< S, L > cend (const S &shape) const noexcept
 Returns a constant iterator to the element following the last element of the expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
const_reverse_broadcast_iterator< S, L > rbegin (const S &shape) const noexcept
 Returns a constant iterator to the first element of the reversed expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
const_reverse_broadcast_iterator< S, L > rend (const S &shape) const noexcept
 Returns a constant iterator to the element following the last element of the reversed expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
const_reverse_broadcast_iterator< S, L > crbegin (const S &shape) const noexcept
 Returns a constant iterator to the first element of the reversed expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
const_reverse_broadcast_iterator< S, L > crend (const S &shape) const noexcept
 Returns a constant iterator to the element following the last element of the reversed expression.

Reverse broadcast iterators

template<layout_type L = ::xt::layout_type::row_major, class S>
reverse_broadcast_iterator< S, L > rbegin (const S &shape) noexcept
 Returns an iterator to the first element of the reversed expression.
template<layout_type L = ::xt::layout_type::row_major, class S>
reverse_broadcast_iterator< S, L > rend (const S &shape) noexcept
 Returns an iterator to the element following the last element of the reversed expression.

Additional Inherited Members

const inner_shape_type & get_shape () const

Detailed Description

template<class D>
class xt::xiterable< D >

Base class for multidimensional iterable expressions.

The xiterable class defines the interface for multidimensional expressions that can be iterated.

Template Parameters
DThe derived type, i.e. the inheriting class for which xiterable provides the interface.

Definition at line 151 of file xiterable.hpp.

Member Typedef Documentation

◆ base_type

template<class D>
using xt::xiterable< D >::base_type = xconst_iterable<D>

Definition at line 157 of file xiterable.hpp.

◆ broadcast_iterator

template<class D>
template<class S, layout_type L>
using xt::xiterable< D >::broadcast_iterator = typename base_type::template broadcast_iterator<S, L>

Definition at line 176 of file xiterable.hpp.

◆ const_broadcast_iterator

template<class D>
template<class S, layout_type L>
using xt::xiterable< D >::const_broadcast_iterator = typename base_type::template const_broadcast_iterator<S, L>

Definition at line 178 of file xiterable.hpp.

◆ const_iterator

template<class D>
using xt::xiterable< D >::const_iterator = typename base_type::const_iterator

Definition at line 185 of file xiterable.hpp.

◆ const_layout_iterator

template<class D>
template<layout_type L>
using xt::xiterable< D >::const_layout_iterator = typename base_type::template const_layout_iterator<L>

Definition at line 169 of file xiterable.hpp.

◆ const_reverse_broadcast_iterator

template<class D>
template<class S, layout_type L>
using xt::xiterable< D >::const_reverse_broadcast_iterator = typename base_type::template const_reverse_broadcast_iterator<S, L>

Definition at line 182 of file xiterable.hpp.

◆ const_reverse_iterator

template<class D>
using xt::xiterable< D >::const_reverse_iterator = typename base_type::const_reverse_iterator

Definition at line 187 of file xiterable.hpp.

◆ const_reverse_layout_iterator

template<class D>
template<layout_type L>
using xt::xiterable< D >::const_reverse_layout_iterator = typename base_type::template const_reverse_layout_iterator<L>

Definition at line 173 of file xiterable.hpp.

◆ const_stepper

template<class D>
using xt::xiterable< D >::const_stepper = typename base_type::const_stepper

Definition at line 161 of file xiterable.hpp.

◆ derived_type

template<class D>
using xt::xiterable< D >::derived_type = D

Definition at line 155 of file xiterable.hpp.

◆ inner_shape_type

template<class D>
using xt::xiterable< D >::inner_shape_type = typename base_type::inner_shape_type

Definition at line 158 of file xiterable.hpp.

◆ iterator

template<class D>
using xt::xiterable< D >::iterator = typename base_type::iterator

Definition at line 184 of file xiterable.hpp.

◆ layout_iterator

template<class D>
template<layout_type L>
using xt::xiterable< D >::layout_iterator = typename base_type::template layout_iterator<L>

Definition at line 167 of file xiterable.hpp.

◆ linear_iterator

template<class D>
using xt::xiterable< D >::linear_iterator = typename base_type::linear_iterator

Definition at line 163 of file xiterable.hpp.

◆ reverse_broadcast_iterator

template<class D>
template<class S, layout_type L>
using xt::xiterable< D >::reverse_broadcast_iterator = typename base_type::template reverse_broadcast_iterator<S, L>

Definition at line 180 of file xiterable.hpp.

◆ reverse_iterator

template<class D>
using xt::xiterable< D >::reverse_iterator = typename base_type::reverse_iterator

Definition at line 186 of file xiterable.hpp.

◆ reverse_layout_iterator

template<class D>
template<layout_type L>
using xt::xiterable< D >::reverse_layout_iterator = typename base_type::template reverse_layout_iterator<L>

Definition at line 171 of file xiterable.hpp.

◆ reverse_linear_iterator

template<class D>
using xt::xiterable< D >::reverse_linear_iterator = typename base_type::reverse_linear_iterator

Definition at line 164 of file xiterable.hpp.

◆ stepper

template<class D>
using xt::xiterable< D >::stepper = typename base_type::stepper

Definition at line 160 of file xiterable.hpp.

Member Function Documentation

◆ begin() [1/4]

template<class D>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xconst_iterable< D >::begin ( ) const -> const_layout_iterator< L >
inlinenoexcept

Returns a constant iterator to the first element of the expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 77 of file xiterable.hpp.

◆ begin() [2/4]

template<class D>
template<layout_type L>
auto xt::xiterable< D >::begin ( ) -> layout_iterator< L >
inlinenoexcept

Returns an iterator to the first element of the expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 741 of file xiterable.hpp.

◆ begin() [3/4]

template<class D>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xconst_iterable< D >::begin ( const S & shape) const
inlinenoexcept

Returns a constant iterator to the first element of the expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 95 of file xiterable.hpp.

◆ begin() [4/4]

template<class D>
template<layout_type L, class S>
auto xt::xiterable< D >::begin ( const S & shape)
inlinenoexcept

Returns an iterator to the first element of the expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 802 of file xiterable.hpp.

◆ end() [1/4]

template<class D>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xconst_iterable< D >::end ( ) const -> const_layout_iterator< L >
inlinenoexcept

Returns a constant iterator to the element following the last element of the expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 79 of file xiterable.hpp.

◆ end() [2/4]

template<class D>
template<layout_type L>
auto xt::xiterable< D >::end ( ) -> layout_iterator< L >
inlinenoexcept

Returns an iterator to the element following the last element of the expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 753 of file xiterable.hpp.

◆ end() [3/4]

template<class D>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xconst_iterable< D >::end ( const S & shape) const
inlinenoexcept

Returns a constant iterator to the element following the last element of the expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 97 of file xiterable.hpp.

◆ end() [4/4]

template<class D>
template<layout_type L, class S>
auto xt::xiterable< D >::end ( const S & shape)
inlinenoexcept

Returns an iterator to the element following the last element of the expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 816 of file xiterable.hpp.

◆ rbegin() [1/4]

template<class D>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xconst_iterable< D >::rbegin ( ) const -> const_reverse_layout_iterator< L >
inlinenoexcept

Returns a constant iterator to the first element of the reversed expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 86 of file xiterable.hpp.

◆ rbegin() [2/4]

template<class D>
template<layout_type L>
auto xt::xiterable< D >::rbegin ( ) -> reverse_layout_iterator< L >
inlinenoexcept

Returns an iterator to the first element of the reversed expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 770 of file xiterable.hpp.

◆ rbegin() [3/4]

template<class D>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xconst_iterable< D >::rbegin ( const S & shape) const
inlinenoexcept

Returns a constant iterator to the first element of the reversed expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 104 of file xiterable.hpp.

◆ rbegin() [4/4]

template<class D>
template<layout_type L, class S>
auto xt::xiterable< D >::rbegin ( const S & shape)
inlinenoexcept

Returns an iterator to the first element of the reversed expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 836 of file xiterable.hpp.

◆ rend() [1/4]

template<class D>
template<layout_type L = ::xt::layout_type::row_major>
auto xt::xconst_iterable< D >::rend ( ) const -> const_reverse_layout_iterator< L >
inlinenoexcept

Returns a constant iterator to the element following the last element of the reversed expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 88 of file xiterable.hpp.

◆ rend() [2/4]

template<class D>
template<layout_type L>
auto xt::xiterable< D >::rend ( ) -> reverse_layout_iterator< L >
inlinenoexcept

Returns an iterator to the element following the last element of the reversed expression.

Template Parameters
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 782 of file xiterable.hpp.

◆ rend() [3/4]

template<class D>
template<layout_type L = ::xt::layout_type::row_major, class S>
auto xt::xconst_iterable< D >::rend ( const S & shape) const
inlinenoexcept

Returns a constant iterator to the element following the last element of the reversed expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 106 of file xiterable.hpp.

◆ rend() [4/4]

template<class D>
template<layout_type L, class S>
auto xt::xiterable< D >::rend ( const S & shape)
inlinenoexcept

Returns an iterator to the element following the last element of the reversed expression.

The iteration is broadcasted to the specified shape.

Parameters
shapethe shape used for broadcasting
Template Parameters
Stype of the shape parameter.
Lorder used for the traversal. Default value is XTENSOR_DEFAULT_TRAVERSAL.

Definition at line 850 of file xiterable.hpp.


The documentation for this class was generated from the following file:
  • /home/runner/work/xtensor/xtensor/include/xtensor/core/xiterable.hpp