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::xiterable< D >

Constant iterators

template <layout_type L>
auto xt::xconst_iterablebegin() const

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

Template Parameters
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <layout_type L>
auto xt::xconst_iterableend() 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 is XTENSOR_DEFAULT_LAYOUT.

template <layout_type L>
auto xt::xconst_iterablecbegin() const

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

Template Parameters
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <layout_type L>
auto xt::xconst_iterablecend() 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 is XTENSOR_DEFAULT_LAYOUT.

Constant reverse iterators

template <layout_type L>
auto xt::xconst_iterablerbegin() const

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

Template Parameters
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <layout_type L>
auto xt::xconst_iterablerend() 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 is XTENSOR_DEFAULT_LAYOUT.

template <layout_type L>
auto xt::xconst_iterablecrbegin() const

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

Template Parameters
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <layout_type L>
auto xt::xconst_iterablecrend() 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 is XTENSOR_DEFAULT_LAYOUT.

Constant broadcast iterators

template <class S, layout_type L>
auto xt::xconst_iterablebegin(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 the shape parameter.
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <class S, layout_type L>
auto xt::xconst_iterableend(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 the shape parameter.
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <class S, layout_type L>
auto xt::xconst_iterablecbegin(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 the shape parameter.
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <class S, layout_type L>
auto xt::xconst_iterablecend(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 the shape parameter.
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

Constant reverse broadcast iterators

template <class S, layout_type L>
auto xt::xconst_iterablerbegin(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 the shape parameter.
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <class S, layout_type L>
auto xt::xconst_iterablerend(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 the shape parameter.
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <class S, layout_type L>
auto xt::xconst_iterablecrbegin(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 the shape parameter.
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <class S, layout_type L>
auto xt::xconst_iterablecrend(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 the shape parameter.
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_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< xarray_adaptor< EC, L, SC, Tag > >, xt::xcontainer< xarray_container< EC, L, SC, Tag > >, xt::xcontainer< xfixed_adaptor< EC, S, L, Tag > >, xt::xcontainer< xfixed_container< ET, S, L, Tag > >, xt::xcontainer< xtensor_adaptor< EC, N, L, Tag > >, xt::xcontainer< xtensor_container< EC, N, L, Tag > >, xt::xcontainer< D >, xt::xoptional_assembly_base< D >

Iterators

template <layout_type L>
auto xt::xiterablebegin()

Returns an iterator to the first element of the expression.

Template Parameters
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <layout_type L>
auto xt::xiterableend()

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

Template Parameters
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

Broadcast iterators

template <class S, layout_type L>
auto xt::xiterablebegin(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 the shape parameter.
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <class S, layout_type L>
auto xt::xiterableend(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 the shape parameter.
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

Reverse iterators

template <layout_type L>
auto xt::xiterablerbegin()

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

Template Parameters
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <layout_type L>
auto xt::xiterablerend()

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

Template Parameters
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

Reverse broadcast iterators

template <class S, layout_type L>
auto xt::xiterablerbegin(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 the shape parameter.
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.

template <class S, layout_type L>
auto xt::xiterablerend(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 the shape parameter.
  • L: layout used for the traversal. Default value is XTENSOR_DEFAULT_LAYOUT.