BioC++ core-0.7.0
The Modern C++ libraries for Bioinformatics.
 
Loading...
Searching...
No Matches
bio::ranges::views Namespace Reference

The BioC++ namespace for views. More...

Classes

class  deep
 A wrapper type around an existing view adaptor that enables "deep view" behaviour for that view. More...
 

Typedefs

template<alphabet::alphabet alph_t>
using char_conversion_view_t = decltype(std::string_view{}|bio::views::char_strictly_to< alph_t >)
 A shortcut for decltype(std::string_view{} | bio::views::char_strictly_to<alph_t>).
 

Variables

constexpr auto zip = detail::zip_fn{}
 A view adaptor that produces a tuple-like value of all passed views.
 
Alphabet related views
constexpr auto add_reverse_complement
 A view that adds the reverse complement of every inner range in a range-of-ranges after the respective inner range.
 
template<typename alphabet_type >
auto const char_strictly_to
 A view over an alphabet, given a range of characters.
 
template<typename alphabet_type >
constexpr auto char_to
 A view over an alphabet, given a range of characters.
 
auto const complement
 A view that converts a range of nucleotides to their complement.
 
template<typename alphabet_type >
auto const rank_to
 A view over an alphabet, given a range of ranks.
 
auto const to_char
 A view that calls bio::alphabet::to_char() on each element in the input range.
 
auto const to_rank
 A view that calls bio::alphabet::to_rank() on each element in the input range.
 
constexpr auto translate
 A view that translates nucleotide into aminoacid alphabet with 1, 2, 3 or 6 frames.
 
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.
 
constexpr auto translate_single
 A view that translates nucleotide into aminoacid alphabet for one of the six frames.
 
constexpr auto trim_quality
 A view that does quality-threshold trimming on a range of bio::alphabet::quality.
 
template<alphabet::alphabet alphabet_type>
auto const validate_char_for
 An identity view that throws if an encountered character is not valid for the given alphabet.
 
General purpose views
template<typename out_t >
auto const convert
 A view that converts each element in the input range (implicitly or via static_cast).
 
constexpr auto interleave
 A view that interleaves a given range into another range at regular intervals.
 
constexpr auto pairwise_combine
 A view adaptor that generates all pairwise combinations of the elements of the underlying range.
 
constexpr auto persist
 A view adaptor that wraps rvalue references of non-views.
 
constexpr detail::repeat_fn repeat
 A view factory that repeats a given value infinitely.
 
constexpr auto repeat_n
 A view factory that repeats a given value n times.
 
constexpr auto single_pass_input
 A view adapter that decays most of the range properties and adds single pass behavior.
 
constexpr auto slice
 A view adaptor that returns a half-open interval on the underlying range.
 
constexpr auto take_exactly
 A view adaptor that returns the first size elements from the underlying range (or less if the underlying range is shorter); also provides size information.
 
constexpr auto take_exactly_or_throw
 A view adaptor that returns the first size elements from the underlying range and also exposes size information; throws if the underlying range is smaller than size.
 
auto const to_lower
 A view that converts each element to lower case.
 
auto const to_upper
 A view that converts each element to upper case.
 
constexpr auto transform_by_pos
 A view adaptor similar to std::views::transform. Calls the invocable with two arguments: underlying range and position.
 
constexpr auto type_reduce
 A view adaptor that behaves like std::views::all, but type erases certain ranges.
 

Detailed Description

The BioC++ 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.

The namespace is aliased into bio:: so you can write bio::views::foo instead of bio::ranges::views::foo.

Variable Documentation

◆ zip

constexpr auto bio::ranges::views::zip = detail::zip_fn{}
inlineconstexpr

A view adaptor that produces a tuple-like value of all passed views.

This is a implementation of the C++23 zip_view. It will be replaced with std::views::zip.

See also
https://en.cppreference.com/w/cpp/ranges/zip_view