395 select_const_reverse_iterator<L>
crend() const noexcept;
397 template <
layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class S>
398 broadcast_iterator<S, L>
begin(const S& shape) noexcept;
399 template <
layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class S>
400 broadcast_iterator<S, L>
end(const S& shape) noexcept;
402 template <
layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class S>
403 const_broadcast_iterator<S, L>
begin(const S& shape) const noexcept;
404 template <
layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class S>
405 const_broadcast_iterator<S, L>
end(const S& shape) const noexcept;
406 template <
layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class S>
407 const_broadcast_iterator<S, L>
cbegin(const S& shape) const noexcept;
408 template <
layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class S>
409 const_broadcast_iterator<S, L>
cend(const S& shape) const noexcept;
411 template <
layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class S>
412 reverse_broadcast_iterator<S, L>
rbegin(const S& shape) noexcept;
413 template <
layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class S>
414 reverse_broadcast_iterator<S, L>
rend(const S& shape) noexcept;
416 template <
layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class S>
417 const_reverse_broadcast_iterator<S, L>
rbegin(const S& shape) const noexcept;
418 template <
layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class S>
419 const_reverse_broadcast_iterator<S, L>
rend(const S& shape) const noexcept;
420 template <
layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class S>
421 const_reverse_broadcast_iterator<S, L>
crbegin(const S& shape) const noexcept;
422 template <
layout_type L = XTENSOR_DEFAULT_TRAVERSAL, class S>
423 const_reverse_broadcast_iterator<S, L>
crend(const S& shape) const noexcept;
427 derived_type& derived_cast();
428 const derived_type& derived_cast() const;
459 template <layout_type L>
462 return this->
template cend<L>();
470 template <layout_type L>
473 return this->
template get_cbegin<L>(
false);
482 template <layout_type L>
485 return this->
template get_cend<L>(
true);
499 template <layout_type L>
511 template <layout_type L>
522 template <layout_type L>
525 return const_reverse_layout_iterator<L>(get_cend<L>(
true));
534 template <layout_type L>
537 return const_reverse_layout_iterator<L>(get_cbegin<L>(
false));
554 template <layout_type L,
class S>
568 template <layout_type L,
class S>
582 template <layout_type L,
class S>
585 return get_cbegin<L, S>(shape,
false);
596 template <layout_type L,
class S>
599 return get_cend<L, S>(shape,
true);
616 template <layout_type L,
class S>
618 -> const_reverse_broadcast_iterator<S, L>
631 template <layout_type L,
class S>
633 -> const_reverse_broadcast_iterator<S, L>
646 template <layout_type L,
class S>
648 -> const_reverse_broadcast_iterator<S, L>
650 return const_reverse_broadcast_iterator<S, L>(get_cend<L, S>(shape,
true));
661 template <layout_type L,
class S>
663 -> const_reverse_broadcast_iterator<S, L>
665 return const_reverse_broadcast_iterator<S, L>(get_cbegin<L, S>(shape,
false));
671 template <layout_type L>
672 inline auto xconst_iterable<D>::get_cbegin(
bool end_index)
const noexcept -> const_layout_iterator<L>
674 return const_layout_iterator<L>(get_stepper_begin(get_shape()), &get_shape(), end_index);
678 template <layout_type L>
679 inline auto xconst_iterable<D>::get_cend(
bool end_index)
const noexcept -> const_layout_iterator<L>
681 return const_layout_iterator<L>(get_stepper_end(get_shape(), L), &get_shape(), end_index);
685 template <layout_type L,
class S>
686 inline auto xconst_iterable<D>::get_cbegin(
const S& shape,
bool end_index)
const noexcept
687 -> const_broadcast_iterator<S, L>
689 return const_broadcast_iterator<S, L>(get_stepper_begin(shape), shape, end_index);
693 template <layout_type L,
class S>
694 inline auto xconst_iterable<D>::get_cend(
const S& shape,
bool end_index)
const noexcept
695 -> const_broadcast_iterator<S, L>
697 return const_broadcast_iterator<S, L>(get_stepper_end(shape, L), shape, end_index);
702 inline auto xconst_iterable<D>::get_stepper_begin(
const S& shape)
const noexcept -> const_stepper
704 return derived_cast().stepper_begin(shape);
709 inline auto xconst_iterable<D>::get_stepper_end(
const S& shape, layout_type l)
const noexcept
712 return derived_cast().stepper_end(shape, l);
716 inline auto xconst_iterable<D>::get_shape() const -> const inner_shape_type&
718 return derived_cast().shape();
722 inline auto xconst_iterable<D>::derived_cast() const -> const derived_type&
724 return *
static_cast<const derived_type*
>(
this);
740 template <layout_type L>
743 return get_begin<L>(
false);
752 template <layout_type L>
755 return get_end<L>(
true);
769 template <layout_type L>
772 return reverse_layout_iterator<L>(get_end<L>(
true));
781 template <layout_type L>
784 return reverse_layout_iterator<L>(get_begin<L>(
false));
801 template <layout_type L,
class S>
804 return get_begin<L, S>(shape,
false);
815 template <layout_type L,
class S>
818 return get_end<L, S>(shape,
true);
835 template <layout_type L,
class S>
838 return reverse_broadcast_iterator<S, L>(get_end<L, S>(shape,
true));
849 template <layout_type L,
class S>
852 return reverse_broadcast_iterator<S, L>(get_begin<L, S>(shape,
false));
858 template <layout_type L>
859 inline auto xiterable<D>::get_begin(
bool end_index)
noexcept -> layout_iterator<L>
861 return layout_iterator<L>(get_stepper_begin(this->get_shape()), &(this->get_shape()), end_index);
865 template <layout_type L>
866 inline auto xiterable<D>::get_end(
bool end_index)
noexcept -> layout_iterator<L>
868 return layout_iterator<L>(get_stepper_end(this->get_shape(), L), &(this->get_shape()), end_index);
872 template <layout_type L,
class S>
873 inline auto xiterable<D>::get_begin(
const S& shape,
bool end_index)
noexcept -> broadcast_iterator<S, L>
875 return broadcast_iterator<S, L>(get_stepper_begin(shape), shape, end_index);
879 template <layout_type L,
class S>
880 inline auto xiterable<D>::get_end(
const S& shape,
bool end_index)
noexcept -> broadcast_iterator<S, L>
882 return broadcast_iterator<S, L>(get_stepper_end(shape, L), shape, end_index);
887 inline auto xiterable<D>::get_stepper_begin(
const S& shape)
noexcept -> stepper
889 return derived_cast().stepper_begin(shape);
894 inline auto xiterable<D>::get_stepper_end(
const S& shape, layout_type l)
noexcept -> stepper
896 return derived_cast().stepper_end(shape, l);
901 inline auto xiterable<D>::get_stepper_begin(
const S& shape)
const noexcept -> const_stepper
903 return derived_cast().stepper_begin(shape);
908 inline auto xiterable<D>::get_stepper_end(
const S& shape, layout_type l)
const noexcept -> const_stepper
910 return derived_cast().stepper_end(shape, l);
914 inline auto xiterable<D>::derived_cast() -> derived_type&
916 return *
static_cast<derived_type*
>(
this);
932 template <layout_type L>
935 if constexpr (L == static_layout)
937 return derived_cast().linear_begin();
941 return iterable_base::template
begin<L>();
951 template <layout_type L>
954 if constexpr (L == static_layout)
956 return derived_cast().linear_end();
960 return iterable_base::template
end<L>();
969 template <layout_type L>
981 template <layout_type L>
984 return this->
template cend<L>();
992 template <layout_type L>
995 if constexpr (L == static_layout)
997 return derived_cast().linear_cbegin();
1001 return iterable_base::template
cbegin<L>();
1011 template <layout_type L>
1014 if constexpr (L == static_layout)
1016 return derived_cast().linear_cend();
1020 return iterable_base::template
cend<L>();
1035 template <layout_type L>
1038 if constexpr (L == static_layout)
1040 return derived_cast().linear_rbegin();
1044 return iterable_base::template
rbegin<L>();
1054 template <layout_type L>
1057 if constexpr (L == static_layout)
1059 return derived_cast().linear_rend();
1063 return iterable_base::template
rend<L>();
1072 template <layout_type L>
1084 template <layout_type L>
1095 template <layout_type L>
1098 if constexpr (L == static_layout)
1100 return derived_cast().linear_crbegin();
1114 template <layout_type L>
1117 if constexpr (L == static_layout)
1119 return derived_cast().linear_crend();
1123 return iterable_base::template
crend<L>();