xiterable¶
Defined in xtensor/xiterable.hpp
- template <class D>
-
class
xt::
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::xexpression_const_iterable< D >, xt::xiterable< D >
Constant broadcast iterators
- template <layout_type L>
-
auto
xbegin
() const¶ Returns a constant iterator to the first element of the expression.
- Template Parameters
L
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <layout_type L>
-
auto
xend
() const¶ Returns a constant iterator to the element following the last element of the expression.
- Template Parameters
L
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <layout_type L>
-
auto
cxbegin
() const¶ Returns a constant iterator to the first element of the expression.
- Template Parameters
L
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <layout_type L>
-
auto
cxend
() const¶ Returns a constant iterator to the element following the last element of the expression.
- Template Parameters
L
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class S, layout_type L>
-
auto
xbegin
(const S &shape) const¶ 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
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class S, layout_type L>
-
auto
xend
(const S &shape) const¶ 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
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class S, layout_type L>
-
auto
cxbegin
(const S &shape) const¶ 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
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class S, layout_type L>
-
auto
cxend
(const S &shape) const¶ 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
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
Constant reverse broadcast iterators
- template <layout_type L>
-
auto
xrbegin
() const¶ Returns a constant iterator to the first element of the reversed expression.
- Template Parameters
L
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <layout_type L>
-
auto
xrend
() const¶ Returns a constant iterator to the element following the last element of the reversed expression.
- Template Parameters
L
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <layout_type L>
-
auto
cxrbegin
() const¶ Returns a constant iterator to the first element of the reversed expression.
- Template Parameters
L
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <layout_type L>
-
auto
cxrend
() const¶ Returns a constant iterator to the element following the last element of the reversed expression.
- Template Parameters
L
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class S, layout_type L>
-
auto
xrbegin
(const S &shape) const¶ 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
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class S, layout_type L>
-
auto
xrend
(const S &shape) const¶ 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
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class S, layout_type L>
-
auto
cxrbegin
(const S &shape) const¶ 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
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class S, layout_type L>
-
auto
cxrend
(const S &shape) const¶ 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
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class D>
-
class
xt::
xiterable
¶ 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.
Inherits from xt::xconst_iterable< D >
Subclassed by xt::xcontainer< D >, xt::xexpression_iterable< D >
Broadcast iterators
- template <layout_type L>
-
auto
xbegin
()¶ Returns an iterator to the first element of the expression.
- Template Parameters
L
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <layout_type L>
-
auto
xend
()¶ Returns an iterator to the element following the last element of the expression.
- Template Parameters
L
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class S, layout_type L>
-
auto
xbegin
(const S &shape)¶ 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
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class S, layout_type L>
-
auto
xend
(const S &shape)¶ 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
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
Reverse broadcast iterators
- template <layout_type L>
-
auto
xrbegin
()¶ Returns an iterator to the first element of the reversed expression.
- Template Parameters
L
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <layout_type L>
-
auto
xrend
()¶ Returns an iterator to the element following the last element of the reversed expression.
- Template Parameters
L
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class S, layout_type L>
-
auto
xrbegin
(const S &shape)¶ 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
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class S, layout_type L>
-
auto
xrend
(const S &shape)¶ 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
: layout used for the traversal. Default value isDEFAULT_LAYOUT
.
- template <class D>
-
class
xt::
xexpression_const_iterable
¶ Base class for multidimensional iterable constant expressions that don’t store any data.
The xexpression_const_iterable class defines the interface for multidimensional constant expressions that don’t store any data and that can be iterated.
- Template Parameters
D
: The derived type, i.e. the inheriting class for which xexpression_const_iterable provides the interface.
Inherits from xt::xconst_iterable< D >
Constant Iterators
-
auto
begin
() const¶ Returns a constant iterator to the first element of the expression.
-
auto
end
() const¶ Returns a constant iterator to the element following the last element of the expression.
-
auto
cbegin
() const¶ Returns a constant iterator to the first element of the expression.
-
auto
cend
() const¶ Returns a constant iterator to the element following the last element of the expression.
Constant Reverse Iterators
-
auto
rbegin
() const¶ Returns a constant iterator to the first element of the reversed expression.
-
auto
rend
() const¶ Returns a constant iterator to the element following the last element of the reversed expression.
-
auto
crbegin
() const¶ Returns a constant iterator to the first element of the reversed expression.
-
auto
crend
() const¶ Returns a constant iterator to the element following the last element of the reversed expression.
- template <class D>
-
class
xt::
xexpression_iterable
¶ Base class for multidimensional iterable expressions that don’t store any data.
The xexpression_iterable class defines the interface for multidimensional expressions that don’t store any data and that can be iterated.
- Template Parameters
D
: The derived type, i.e.the inheriting class for which xexpression_iterable provides the interface.
Inherits from xt::xiterable< D >
Iterators
-
auto
begin
()¶ Returns an iterator to the first element of the expression.
-
auto
end
()¶ Returns an iterator to the element following the last element of the expression.
Reverse Iterators
-
auto
rbegin
()¶ Returns an iterator to the first element of the reversed expression.
-
auto
rend
()¶ Returns an iterator to the element following the last element of the reversed expression.
Constant Iterators
-
auto
begin
() const¶ Returns a constant iterator to the first element of the expression.
-
auto
end
() const¶ Returns a constant iterator to the element following the last element of the expression.
-
auto
cbegin
() const¶ Returns a constant iterator to the first element of the expression.
-
auto
cend
() const¶ Returns a constant iterator to the element following the last element of the expression.
Constant Reverse Iterators
-
auto
rbegin
() const¶ Returns a constant iterator to the first element of the reversed expression.
-
auto
rend
() const¶ Returns a constant iterator to the element following the last element of the reversed expression.
-
auto
crbegin
() const¶ Returns a constant iterator to the first element of the reversed expression.
-
auto
crend
() const¶ Returns a constant iterator to the element following the last element of the reversed expression.