Iterator for dividing an forward range into chunks.
More...
#include <seqan3/utility/views/chunk.hpp>
|
constexpr it_t | get_former_start_of_chunk (it_t end_of_chunk) const |
| Move to the start of the former chunk.
|
|
constexpr it_t | get_next_end_of_chunk (it_t start_of_chunk) const |
| Move to the end of the next chunk.
|
|
|
std::ranges::range_difference_t< urng_t > | chunk_size |
| The chunk size, e.g. the length of the subrange returned by this iterator.
|
|
value_type | current_chunk |
| The current chunk stored as a subrange.
|
|
it_t | urng_begin |
| Points to the start of the underlying range.
|
|
sentinel_t | urng_end |
| Points to the end of the underlying range.
|
|
|
constexpr basic_iterator | operator+ (difference_type const skip, basic_iterator const &it) noexcept |
| Non-member operator+ delegates to non-friend operator+. More...
|
|
constexpr difference_type | operator- (basic_iterator const &lhs, basic_iterator const &rhs) noexcept |
| Return offset between two iterator's positions. More...
|
|
constexpr difference_type | operator- (basic_iterator const &lhs, sentinel_t const &rhs) noexcept |
| Return offset this and remote sentinel's position. More...
|
|
constexpr basic_iterator | operator- (difference_type const skip, basic_iterator const &it) noexcept |
| Non-member operator- delegates to non-friend operator-. More...
|
|
constexpr difference_type | operator- (sentinel_t const &, basic_iterator const &rhs) noexcept |
| Return offset between remote sentinel's position and this. More...
|
|
|
|
constexpr bool | operator== (basic_iterator const &lhs, sentinel_t const &rhs) noexcept |
| Compare to end of underlying range.
|
|
constexpr bool | operator== (basic_iterator const &lhs, basic_iterator const &rhs) noexcept |
| Compare to another basic_iterator.
|
|
constexpr bool | operator!= (basic_iterator const &lhs, sentinel_t const &rhs) noexcept |
| Compare to underlying range sentinel type.
|
|
constexpr bool | operator!= (basic_iterator const &lhs, basic_iterator const &rhs) noexcept |
| Compare to another basic_iterator.
|
|
constexpr bool | operator< (basic_iterator const &lhs, basic_iterator const &rhs) noexcept |
| Compare to another basic_iterator.
|
|
constexpr bool | operator> (basic_iterator const &lhs, basic_iterator const &rhs) noexcept |
| Compare to another basic_iterator.
|
|
constexpr bool | operator<= (basic_iterator const &lhs, basic_iterator const &rhs) noexcept |
| Compare to another basic_iterator.
|
|
constexpr bool | operator>= (basic_iterator const &lhs, basic_iterator const &rhs) noexcept |
| Compare to another basic_iterator.
|
|
template<std::ranges::input_range urng_t>
template<bool const_range>
requires std::ranges::view<urng_t>
class seqan3::detail::chunk_view< urng_t >::basic_iterator< const_range >
Iterator for dividing an forward range into chunks.
- Template Parameters
-
urng_t | The type of the underlying range. Must model std::ranges::view and std::forward_range. |
The basic_iterator can be used to iterate over an underlying forward range in chunks. It holds the start and end iterator of the underlying range, the chunk size and the subrange of the current chunk. The current chunk is represented by a subrange on the underlying range.
◆ basic_iterator()
template<std::ranges::input_range urng_t>
template<bool const_range>
Construct from the start and end of the underlying range and a chunk size. /param[in] it_start Iterator pointing to the first position of the underlying range. /param[in] it_end Sentinel pointing to the end of the underlying range. /param[in] size_of_chunk The chunk size, e.g. the length of the subrange returned by this iterator.
Complexity
Linear in chunk_size for non-random_access ranges. Constant else.
◆ operator+()
template<std::ranges::input_range urng_t>
template<bool const_range>
Forward copy of this iterator.
- Attention
- This function is only available if
it_t
models std::random_access_iterator.
◆ operator+=()
template<std::ranges::input_range urng_t>
template<bool const_range>
Forward this iterator.
- Attention
- This function is only available if
it_t
models std::random_access_iterator.
◆ operator-()
template<std::ranges::input_range urng_t>
template<bool const_range>
Return decremented copy of this iterator.
- Attention
- This function is only available if
it_t
models std::random_access_iterator.
◆ operator--() [1/2]
template<std::ranges::input_range urng_t>
template<bool const_range>
Pre-decrement.
- Attention
- This function is only available if
it_t
models std::bidirectional_iterator.
◆ operator--() [2/2]
template<std::ranges::input_range urng_t>
template<bool const_range>
Post-decrement.
- Attention
- This function is only available if
it_t
models std::bidirectional_iterator.
◆ operator-=()
template<std::ranges::input_range urng_t>
template<bool const_range>
Decrement iterator by skip
.
- Attention
- This function is only available if
it_t
models std::random_access_iterator.
◆ operator[]()
template<std::ranges::input_range urng_t>
template<bool const_range>
Move the iterator by a given offset and return the corresponding chunk (subrange).
- Attention
- This function is only available if
it_t
models std::random_access_iterator.
◆ operator+
template<std::ranges::input_range urng_t>
template<bool const_range>
Non-member operator+ delegates to non-friend operator+.
- Attention
- This function is only available if
it_t
models std::random_access_iterator.
◆ operator- [1/4]
template<std::ranges::input_range urng_t>
template<bool const_range>
Return offset between two iterator's positions.
operator-difference
- Attention
- This function is only available if
it_t
models std::sized_sentinel_for<it_t, it_t>.
◆ operator- [2/4]
template<std::ranges::input_range urng_t>
template<bool const_range>
Return offset this and remote sentinel's position.
- Attention
- This function is only available if it_t and sentinel_t model std::sized_sentinel_for.
◆ operator- [3/4]
template<std::ranges::input_range urng_t>
template<bool const_range>
Non-member operator- delegates to non-friend operator-.
- Attention
- This function is only available if
it_t
models std::random_access_iterator.
◆ operator- [4/4]
template<std::ranges::input_range urng_t>
template<bool const_range>
Return offset between remote sentinel's position and this.
- Attention
- This function is only available if sentinel_t and it_t model std::sized_sentinel_for.
The documentation for this class was generated from the following file: