The type returned by seqan3::views::chunk. More...
#include <seqan3/utility/views/chunk.hpp>
Classes | |
class | basic_input_iterator |
Iterator for dividing an input range into chunks. More... | |
class | basic_iterator |
Iterator for dividing an forward range into chunks. More... | |
Public Member Functions | |
auto | size () |
Returns the size of the range, iff the underlying range is a std::ranges::sized_range. More... | |
auto | size () const |
Returns the size of the range, iff the underlying range is a std::ranges::sized_range. More... | |
Constructors, destructor and assignment | |
chunk_view ()=default | |
Defaulted. | |
chunk_view (chunk_view const &rhs)=default | |
Defaulted. | |
chunk_view (chunk_view &&rhs)=default | |
Defaulted. | |
chunk_view & | operator= (chunk_view const &rhs)=default |
Defaulted. | |
chunk_view & | operator= (chunk_view &&rhs)=default |
Defaulted. | |
~chunk_view ()=default | |
Defaulted. | |
constexpr | chunk_view (urng_t urng, std::ranges::range_difference_t< urng_t > const size_of_chunk) |
Construct from a view and the chunk size. More... | |
Iterators | |
auto | begin () noexcept |
Returns an iterator to the first element of the range. More... | |
auto | begin () const noexcept |
Returns an iterator to the first element of the range. More... | |
auto | end () noexcept |
Returns an iterator to the element following the last element of the range. More... | |
auto | end () const noexcept |
Returns an iterator to the element following the last element of the range. More... | |
Private Attributes | |
std::ranges::range_difference_t< urng_t > | chunk_size |
The chunk size to use. | |
urng_t | urange |
The underlying range. | |
The type returned by seqan3::views::chunk.
urng_t | The type of the underlying range, must model std::ranges::view and std::ranges::input_range. |
Note that most members of this class are generated by std::ranges::view_interface which is not yet documented here.
|
inlineexplicitconstexpr |
Construct from a view and the chunk size.
[in] | urng | The underlying range to divide into chunks. |
[in] | size_of_chunk | The size of the chunks, e.g., the length of the subrange returned at each position. |
|
inlinenoexcept |
Returns an iterator to the first element of the range.
Constant. For std::forward_ranges, O(c) when c
is the chunk size, O(1) otherwise.
No-throw guarantee.
|
inlinenoexcept |
Returns an iterator to the first element of the range.
Constant. For std::forward_ranges, O(c) when c
is the chunk size, O(1) otherwise.
No-throw guarantee.
|
inlinenoexcept |
Returns an iterator to the element following the last element of the range.
This element acts as a placeholder; attempting to dereference it results in undefined behaviour.
Constant.
No-throw guarantee.
|
inlinenoexcept |
Returns an iterator to the element following the last element of the range.
This element acts as a placeholder; attempting to dereference it results in undefined behaviour.
Constant.
No-throw guarantee.
|
inline |
Returns the size of the range, iff the underlying range is a std::ranges::sized_range.
|
inline |
Returns the size of the range, iff the underlying range is a std::ranges::sized_range.