SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
View to force random access range iterator for seqan3::pseudo_random_access_range. More...
#include <seqan3/utility/views/enforce_random_access.hpp>
Classes | |
class | basic_iterator |
Iterator wrapper for the underlying range iterator enforcing std::random_access_iterator_tag. More... | |
Public Member Functions | |
Constructors, destructor and assignment | |
constexpr | view_enforce_random_access ()=default |
Defaulted. | |
constexpr | view_enforce_random_access (view_enforce_random_access const &)=default |
Defaulted. | |
constexpr | view_enforce_random_access (view_enforce_random_access &&)=default |
Defaulted. | |
constexpr view_enforce_random_access & | operator= (view_enforce_random_access const &)=default |
Defaulted. | |
constexpr view_enforce_random_access & | operator= (view_enforce_random_access &&)=default |
Defaulted. | |
~view_enforce_random_access ()=default | |
Defaulted. | |
constexpr | view_enforce_random_access (urng_t &&range) |
Construction from the underlying view. | |
template<typename viewable_rng_t > requires (!std::same_as<std::remove_cvref_t<viewable_rng_t>, view_enforce_random_access>) && std::ranges::viewable_range<viewable_rng_t> && std::constructible_from<urng_t, std::ranges::ref_view<std::remove_reference_t<viewable_rng_t>>> | |
constexpr | view_enforce_random_access (viewable_rng_t &&range) |
Construction from the underlying viewable range. | |
Iterators | |
constexpr auto | begin () noexcept |
Returns the iterator to the begin of the range. | |
constexpr auto | begin () const noexcept |
Returns the iterator to the begin of the range. | |
constexpr auto | end () noexcept |
Returns the sentinel to the end of the range. | |
constexpr auto | end () const noexcept |
Returns the sentinel to the end of the range. | |
Public Attributes | |
urng_t | urng |
The underlying range. | |
Related Symbols | |
(Note that these are not member symbols.) | |
Type deduction guides | |
template<std::ranges::viewable_range rng_t> | |
view_enforce_random_access (rng_t &&) -> view_enforce_random_access< std::views::all_t< rng_t > > | |
A deduction guide for the view class template. | |
View to force random access range iterator for seqan3::pseudo_random_access_range.
urng_t | The underlying range type; must model std::ranges::view and seqan3::pseudo_random_access_range. |
Wraps the iterator of a seqan3::pseudo_random_access_range and overwrites the iterator category to be std::random_access_iterator_tag. Thus, the resulting range can be used in algorithms or other contexts that require random access, although the time complexity still depends on the underlying range, that is it is not guaranteed to be constant.
|
inlineconstexprnoexcept |
Returns the iterator to the begin of the range.
|
inlineconstexprnoexcept |
Returns the sentinel to the end of the range.
If the underlying range is a common range this functions returns seqan3::detail::view_enforce_random_access::basic_iterator initialised with the end of the underlying range. Otherwise it returns the sentinel of the underlying range.
|
inlineconstexprnoexcept |
Returns the sentinel to the end of the range.
If the underlying range is a common range this functions returns seqan3::detail::view_enforce_random_access::basic_iterator initialised with the end of the underlying range. Otherwise it returns the sentinel of the underlying range.