xiterable¶
Defined in xtensor/xiterable.hpp
-
template<class
D
>
classxt
::
xconst_iterable
¶ Base class for multidimensional iterable constant expressions.
The xconst_iterable class defines the interface for multidimensional constant expressions that can be iterated.
- Template Parameters
D
: The derived type, i.e. the inheriting class for which xconst_iterable provides the interface.
Subclassed by xt::xiterable< xscalar< CT > >, xt::xiterable< xindex_view< CT, I > >, xt::xiterable< xdynamic_view< CT, S, layout_type::dynamic, detail::flat_storage_getter< CT, ::xt::layout_type::row_major > > >, xt::xiterable< xmasked_view< CTD, CTM > >, xt::xiterable< xchunked_array< chunk_storage > >, xt::xiterable< D >
Constant iterators
-
template<layout_type
L
>
autobegin
() const noexcept -> const_layout_iterator<L>¶ Returns a constant iterator to the first element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autoend
() const noexcept -> const_layout_iterator<L>¶ Returns a constant iterator to the element following the last element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autocbegin
() const noexcept -> const_layout_iterator<L>¶ Returns a constant iterator to the first element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autocend
() const noexcept -> const_layout_iterator<L>¶ Returns a constant iterator to the element following the last element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
Constant reverse iterators
-
template<layout_type
L
>
autorbegin
() const noexcept -> const_reverse_layout_iterator<L>¶ Returns a constant iterator to the first element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autorend
() const noexcept -> const_reverse_layout_iterator<L>¶ Returns a constant iterator to the element following the last element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autocrbegin
() const noexcept -> const_reverse_layout_iterator<L>¶ Returns a constant iterator to the first element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autocrend
() const noexcept -> const_reverse_layout_iterator<L>¶ Returns a constant iterator to the element following the last element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
Constant broadcast iterators
-
template<layout_type
L
, classS
>
autobegin
(const S &shape) const noexcept -> const_broadcast_iterator<S, L>¶ Returns a constant iterator to the first element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autoend
(const S &shape) const noexcept -> const_broadcast_iterator<S, L>¶ Returns a constant iterator to the element following the last element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autocbegin
(const S &shape) const noexcept -> const_broadcast_iterator<S, L>¶ Returns a constant iterator to the first element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autocend
(const S &shape) const noexcept -> const_broadcast_iterator<S, L>¶ Returns a constant iterator to the element following the last element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
Constant reverse broadcast iterators
-
template<layout_type
L
, classS
>
autorbegin
(const S &shape) const noexcept -> const_reverse_broadcast_iterator<S, L>¶ Returns a constant iterator to the first element of the reversed expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autorend
(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.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autocrbegin
(const S &shape) const noexcept -> const_reverse_broadcast_iterator<S, L>¶ Returns a constant iterator to the first element of the reversed expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autocrend
(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.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<class
D
>
classxt
::
xiterable
: public xt::xconst_iterable<D>¶ Base class for multidimensional iterable expressions.
The xiterable class defines the interface for multidimensional expressions that can be iterated.
- Template Parameters
D
: The derived type, i.e. the inheriting class for which xiterable provides the interface.
Subclassed by xt::xoptional_assembly_base< xoptional_assembly< VE, FE > >, xt::xoptional_assembly_base< xoptional_assembly_adaptor< VEC, FEC > >, xt::xcontiguous_iterable< D >, xt::xoptional_assembly_base< D >
Iterators
-
template<layout_type
L
>
autobegin
() noexcept -> layout_iterator<L>¶ Returns an iterator to the first element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autoend
() noexcept -> layout_iterator<L>¶ Returns an iterator to the element following the last element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
Reverse iterators
-
template<layout_type
L
>
autorbegin
() noexcept -> reverse_layout_iterator<L>¶ Returns an iterator to the first element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autorend
() noexcept -> reverse_layout_iterator<L>¶ Returns an iterator to the element following the last element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
Broadcast iterators
-
template<layout_type
L
, classS
>
autobegin
(const S &shape) noexcept -> broadcast_iterator<S, L>¶ Returns an iterator to the first element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autoend
(const S &shape) noexcept -> broadcast_iterator<S, L>¶ Returns an iterator to the element following the last element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
Reverse broadcast iterators
-
template<layout_type
L
, classS
>
autorbegin
(const S &shape) noexcept -> reverse_broadcast_iterator<S, L>¶ Returns an iterator to the first element of the reversed expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autorend
(const S &shape) noexcept -> reverse_broadcast_iterator<S, L>¶ Returns an iterator to the element following the last element of the reversed expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
Public Functions
-
template<layout_type
L
>
autobegin
() const noexcept -> const_layout_iterator<L>¶ Returns a constant iterator to the first element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autobegin
(const S &shape) const noexcept -> const_broadcast_iterator<S, L>¶ Returns a constant iterator to the first element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autoend
() const noexcept -> const_layout_iterator<L>¶ Returns a constant iterator to the element following the last element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autoend
(const S &shape) const noexcept -> const_broadcast_iterator<S, L>¶ Returns a constant iterator to the element following the last element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autorbegin
() const noexcept -> const_reverse_layout_iterator<L>¶ Returns a constant iterator to the first element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autorbegin
(const S &shape) const noexcept -> const_reverse_broadcast_iterator<S, L>¶ Returns a constant iterator to the first element of the reversed expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autorend
() const noexcept -> const_reverse_layout_iterator<L>¶ Returns a constant iterator to the element following the last element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autorend
(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.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<class
D
>
classxt
::
xcontiguous_iterable
: private xt::xiterable<D>¶ Base class for multidimensional iterable expressions with contiguous storage.
The xcontiguous_iterable class defines the interface for multidimensional expressions with contiguous that can be iterated.
- Template Parameters
D
: The derived type, i.e. the inheriting class for which xcontiguous_iterable provides the interface.
Subclassed by xt::xcontainer< xfixed_container< ET, S, L, SH, Tag > >, xt::xcontainer< xfixed_adaptor< EC, S, L, SH, Tag > >, xt::xcontainer< D >
Iterators
-
template<layout_type
L
>
autobegin
() noexcept -> select_iterator<L>¶ Returns an iterator to the first element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autoend
() noexcept -> select_iterator<L>¶ Returns an iterator to the element following the last element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autobegin
() const noexcept -> select_const_iterator<L>¶ Returns a constant iterator to the first element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autoend
() const noexcept -> select_const_iterator<L>¶ Returns a constant iterator to the element following the last element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autocbegin
() const noexcept -> select_const_iterator<L>¶ Returns a constant iterator to the first element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autocend
() const noexcept -> select_const_iterator<L>¶ Returns a constant iterator to the element following the last element of the expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
Reverse iterators
-
template<layout_type
L
>
autorbegin
() noexcept -> select_reverse_iterator<L>¶ Returns an iterator to the first element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autorend
() noexcept -> select_reverse_iterator<L>¶ Returns an iterator to the element following the last element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autorbegin
() const noexcept -> select_const_reverse_iterator<L>¶ Returns a constant iterator to the first element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autorend
() const noexcept -> select_const_reverse_iterator<L>¶ Returns a constant iterator to the element following the last element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autocrbegin
() const noexcept -> select_const_reverse_iterator<L>¶ Returns a constant iterator to the first element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
>
autocrend
() const noexcept -> select_const_reverse_iterator<L>¶ Returns a constant iterator to the element following the last element of the reversed expression.
- Template Parameters
L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
Broadcast iterators
-
template<layout_type
L
, classS
>
autobegin
(const S &shape) noexcept -> broadcast_iterator<S, L>¶ Returns an iterator to the first element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autoend
(const S &shape) noexcept -> broadcast_iterator<S, L>¶ Returns an iterator to the element following the last element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autobegin
(const S &shape) const noexcept -> const_broadcast_iterator<S, L>¶ Returns a constant iterator to the first element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autoend
(const S &shape) const noexcept -> const_broadcast_iterator<S, L>¶ Returns a constant iterator to the element following the last element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autocbegin
(const S &shape) const noexcept -> const_broadcast_iterator<S, L>¶ Returns a constant iterator to the first element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autocend
(const S &shape) const noexcept -> const_broadcast_iterator<S, L>¶ Returns a constant iterator to the element following the last element of the expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
Reverse broadcast iterators
-
template<layout_type
L
, classS
>
autorbegin
(const S &shape) noexcept -> reverse_broadcast_iterator<S, L>¶ Returns an iterator to the first element of the reversed expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autorend
(const S &shape) noexcept -> reverse_broadcast_iterator<S, L>¶ Returns an iterator to the element following the last element of the reversed expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autorbegin
(const S &shape) const noexcept -> const_reverse_broadcast_iterator<S, L>¶ Returns a constant iterator to the first element of the reversed expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autorend
(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.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autocrbegin
(const S &shape) const noexcept -> const_reverse_broadcast_iterator<S, L>¶ Returns a constant iterator to the first element of the reversed expression.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.
-
template<layout_type
L
, classS
>
autocrend
(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.
The iteration is broadcasted to the specified shape.
- Parameters
shape
: the shape used for broadcasting
- Template Parameters
S
: type of theshape
parameter.L
: order used for the traversal. Default value isXTENSOR_DEFAULT_TRAVERSAL
.