42 #include <range/v3/view/sliding.hpp> 57 class kmer_hash_fn :
public pipable_adaptor_base<kmer_hash_fn>
61 using base_t = pipable_adaptor_base<kmer_hash_fn>;
72 template <std::ranges::ViewableRange urng_t>
74 requires semi_alphabet_concept<reference_t<urng_t>>
76 static auto impl(urng_t && urange,
size_t const k)
78 return std::forward<urng_t>(urange) | ranges::view::sliding(k) |
view::transform(
81 std::hash<decltype(in)> h{};
132 inline auto constexpr
kmer_hash = detail::kmer_hash_fn{};
constexpr auto transform
A range adaptor that takes a invocable and returns a view of the elements with the invocable applied...
Definition: transform.hpp:95
auto constexpr kmer_hash
A view that calls std::hash on each substring of length k in the input range.
Definition: kmer_hash.hpp:132
Auxiliary header for the view submodule .
The SeqAn3 namespace for views.
Definition: aligned_sequence_concept.hpp:288
Core alphabet concept and free function/metafunction wrappers.
Provides various metafunctions used by the range module.
Meta-include for standard library views.