The SeqAn namespace for views. More...
Classes | |
class | deep |
A wrapper type around an existing view adaptor that enables "deep view" behaviour for that view. More... | |
Variables | |
constexpr auto | async_input_buffer |
A view adapter that returns a concurrent-queue-like view over the underlying range. More... | |
template<alphabet alphabet_type> | |
auto const | char_to |
A view over an alphabet, given a range of characters. More... | |
constexpr auto | chunk = ::ranges::views::chunk |
A chunk view. More... | |
auto const | complement |
A view that converts a range of nucleotides to their complement. More... | |
template<typename out_t > | |
constexpr auto | convert |
A view that converts each element in the input range (implicitly or via static_cast ). More... | |
template<auto index> | |
constexpr auto | elements |
A view calling get on each element in a range. More... | |
constexpr auto | enforce_random_access |
A view adaptor that converts a pseudo random access range to a std::ranges::random_access_range. More... | |
constexpr auto | interleave |
A view that interleaves a given range into another range at regular intervals. More... | |
template<simd_concept index_simd_t> | |
constexpr detail::iota_simd_view_fn< index_simd_t > | iota_simd |
An iota view over a simd vector. More... | |
constexpr auto | join_with = ::ranges::views::join |
A join view, please use std::views::join if you don't need a separator. More... | |
constexpr auto | kmer_hash |
Computes hash values for each position of a range via a given shape. More... | |
constexpr auto | minimiser |
Computes minimisers for a range of comparable values. A minimiser is the smallest value in a window. More... | |
constexpr auto | pairwise_combine |
A view adaptor that generates all pairwise combinations of the elements of the underlying range. More... | |
template<typename alphabet_type > | |
auto const | rank_to |
A view over an alphabet, given a range of ranks. More... | |
constexpr detail::repeat_fn | repeat |
A view factory that repeats a given value infinitely. More... | |
constexpr auto | repeat_n |
A view factory that repeats a given value n times. More... | |
constexpr auto | single_pass_input |
A view adapter that decays most of the range properties and adds single pass behavior. More... | |
constexpr auto | slice |
A view adaptor that returns a half-open interval on the underlying range. More... | |
constexpr auto | to |
A to view. More... | |
auto const | to_char |
A view that calls seqan3::to_char() on each element in the input range. More... | |
auto const | to_rank |
A view that calls seqan3::to_rank() on each element in the input range. More... | |
template<simd::simd_concept simd_t> | |
constexpr auto | to_simd |
A view that transforms a range of ranges into chunks of seqan3::simd vectors. More... | |
constexpr auto | translate |
A view that translates nucleotide into aminoacid alphabet with 1, 2, 3 or 6 frames. More... | |
constexpr auto | translate_join |
A view that translates nucleotide into aminoacid alphabet with 1, 2, 3 or 6 frames. Input and output range are always two-dimensional. More... | |
constexpr auto | trim_quality |
A view that does quality-threshold trimming on a range of seqan3::quality_alphabet. More... | |
constexpr auto | type_reduce |
A view adaptor that behaves like std::views::all, but type erases certain ranges. More... | |
constexpr auto | zip = ::ranges::views::zip |
A zip view. More... | |
Alphabet related views | |
constexpr auto | translate_single |
A view that translates nucleotide into aminoacid alphabet for one of the six frames. More... | |
constexpr auto | minimiser_hash |
Computes minimisers for a range with a given shape, window size and seed. More... | |
The SeqAn namespace for views.
[adaptor_def]
Since views often have name clashes with regular functions and ranges they are implemented in the sub namespace view
.
See the views submodule of the range module for more details.
|
no-apiinlineconstexpr |
An iota view over a simd vector.
index_simd_t | The represented index type; must model seqan3::simd::simd_concept. |
This view is an equivalent implementation to:
However, benchmarks showed that increasing a simd vector is faster than constructing it every time (up-to 2x speed-up). This speed-up justifies an own class that does this task more efficiently.
This view is a lightweight wrapper around a seqan3::detail::counted_simd_iterator pair. Note the regular std::views::iota view cannot be used with two simd types:
because the return type of the comparison of two simd vector types is not convertible to bool
.
Concepts and traits | rrng_t (returned range type) |
---|---|
std::ranges::input_range | guaranteed |
std::ranges::forward_range | guaranteed |
std::ranges::bidirectional_range | lost |
std::ranges::random_access_range | lost |
std::ranges::contiguous_range | lost |
std::ranges::viewable_range | guaranteed |
std::ranges::view | guaranteed |
std::ranges::sized_range | guaranteed |
std::ranges::common_range | guaranteed |
std::ranges::output_range | lost |
std::ranges::borrowed_range | guaranteed |
seqan3::const_iterable_range | guaranteed |
std::ranges::range_reference_t | index_simd_t |
This is a source view. For more details, see views.
|
no-apiinlineconstexpr |
A view that transforms a range of ranges into chunks of seqan3::simd vectors.
urng_t | The type of the range being processed. |
simd_t | The target simd vector type. |
[in] | urange | The range being processed. |
[in] | padding | An optional padding value. |
Header File
#include <seqan3/utility/simd/views/to_simd.hpp>
This view can be used to transform a collection of sequences into chunks of simd vectors. This transformation is also known as Array-of-Structure to Structure-of-Array transformation. It is used to transform the memory layout of the sequences to a more efficient form when used in vectorised algorithms. The number of sequences contained in the range to be transformed cannot be larger than the number of elements stored in the target simd vector, i.e. the size of urange
<= simd_traits<simd_t>::length. After applying the transformation one column of the outer range is transposed into a simd vector. This means that the characters of all sequences at a given position x
are stored in a simd vector retaining the original order. The returned range itself is a range-of-ranges. When dereferencing the iterator a std::span over a std::array with at most simd length many vectors is returned. If a sequence is empty or ends before the largest sequence in the collection, it can be padded with an optional value.
Concepts and traits | urng_t (underlying range type) | rrng_t (returned range type) |
---|---|---|
std::ranges::input_range | required | preserved |
std::ranges::forward_range | required | lost |
std::ranges::bidirectional_range | lost | |
std::ranges::random_access_range | lost | |
std::ranges::contiguous_range | lost | |
std::ranges::viewable_range | required | guaranteed |
std::ranges::view | guaranteed | |
std::ranges::sized_range | preserved (iff std::ranges::sized_range<std::ranges::range_value_t<urng_t>> is true ) | |
std::ranges::common_range | lost | |
std::ranges::output_range | lost | |
seqan3::const_iterable_range | lost | |
std::ranges::range_reference_t | std::span<simd_t> |
urng_t
is the type of the range modified by this view (input).std::ranges::input_range<std::ranges::range_value_t<urng_t>
must evaluate to true
std::default_initializable<std::ranges::range_value_t<urng_t>>
must evaluate to true
semialphabet<std::ranges::range_value_t<std::ranges::range_value_t<urng_t>>>
must evaluate to true
rrng_type
is the type of the range returned by this view.The output is as follows: