SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
The type returned by seqan3::views::kmer_hash. More...
#include <seqan3/search/views/kmer_hash.hpp>
Classes | |
class | basic_iterator |
Iterator for calculating hash values via a given seqan3::shape. More... | |
Public Member Functions | |
auto | size () |
Returns the size of the range, if the underlying range is a std::ranges::sized_range. | |
auto | size () const |
Returns the size of the range, if the underlying range is a std::ranges::sized_range. | |
Constructors, destructor and assignment | |
kmer_hash_view ()=default | |
Defaulted. | |
kmer_hash_view (kmer_hash_view const &rhs)=default | |
Defaulted. | |
kmer_hash_view (kmer_hash_view &&rhs)=default | |
Defaulted. | |
kmer_hash_view & | operator= (kmer_hash_view const &rhs)=default |
Defaulted. | |
kmer_hash_view & | operator= (kmer_hash_view &&rhs)=default |
Defaulted. | |
~kmer_hash_view ()=default | |
Defaulted. | |
kmer_hash_view (urng_t urange_, shape const &s_) | |
Construct from a view and a given shape. | |
template<typename rng_t > requires (!std::same_as<std::remove_cvref_t<rng_t>, kmer_hash_view>) && std::ranges::viewable_range<rng_t> && std::constructible_from<urng_t, std::ranges::ref_view<std::remove_reference_t<rng_t>>> | |
kmer_hash_view (rng_t &&urange_, shape const &s_) | |
Construct from a non-view that can be view-wrapped and a given shape. | |
Iterators | |
auto | begin () noexcept |
Returns an iterator to the first element of the range. | |
auto | begin () const noexcept |
Returns an iterator to the first element of the range. | |
auto | end () noexcept |
Returns an iterator to the element following the last element of the range. | |
auto | end () const noexcept |
Returns an iterator to the element following the last element of the range. | |
Private Member Functions | |
void | shape_too_long_error () const |
Throws the exception for validate_shape(). | |
void | validate_shape () const |
Checks that the shape is not too long for the given alphabet. | |
Private Attributes | |
shape | shape_ |
The shape to use. | |
urng_t | urange |
The underlying range. | |
Static Private Attributes | |
static int | max_shape_count = 64 / std::log2(alphabet_size<std::ranges::range_reference_t<urng_t>>) |
The maximum shape count for the given alphabet. | |
The type returned by seqan3::views::kmer_hash.
urng_t | The type of the underlying ranges, must model std::forward_range, the reference type must model seqan3::semialphabet. |
Note that most members of this class are generated by std::ranges::view_interface which is not yet documented here.
|
inlineexplicit |
Construct from a view and a given shape.
std::invalid_argument | if hashes resulting from the shape/alphabet combination cannot be represented in uint64_t , i.e. \(s>\frac{64}{\log_2\sigma}\) with shape size \(s\) and alphabet size \(\sigma\). |
|
inlineexplicit |
Construct from a non-view that can be view-wrapped and a given shape.
std::invalid_argument | if hashes resulting from the shape/alphabet combination cannot be represented in uint64_t , i.e. \(s>\frac{64}{\log_2\sigma}\) with shape size \(s\) and alphabet size \(\sigma\). |
|
inlinenoexcept |
Returns an iterator to the first element of the range.
Constant.
No-throw guarantee.
|
inlinenoexcept |
Returns an iterator to the first element of the range.
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.
|
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, if the underlying range is a std::ranges::sized_range.
|
inline |
Returns the size of the range, if the underlying range is a std::ranges::sized_range.