SeqAn3  3.0.0
The Modern C++ library for sequence analysis.
complement.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2019, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2019, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
13 #pragma once
14 
17 #include <seqan3/std/ranges>
18 
19 namespace seqan3::view
20 {
21 
70 inline auto const complement = deep{std::view::transform([] (auto const in)
71 {
72  static_assert(NucleotideAlphabet<decltype(in)>,
73  "The innermost value type must satisfy the NucleotideAlphabet.");
74  // call element-wise complement from the NucleotideAlphabet
75  return seqan3::complement(in);
76 })};
77 
79 
80 } // namespace seqan3::view
constexpr auto complement
Return the complement of a nucleotide object.
Definition: concept.hpp:104
Provides seqan3::view::deep.
Provides seqan3::NucleotideAlphabet.
Adaptations of concepts from the Ranges TS.
The SeqAn3 namespace for views.
auto const complement
A view that converts a range of nucleotides to their complement.
Definition: complement.hpp:70
A concept that indicates whether an alphabet represents nucleotides.
A wrapper type around an existing view adaptor that enables "deep view" behaviour for that view...
Definition: deep.hpp:101
constexpr auto transform
A range adaptor that takes a invocable and returns a view of the elements with the invocable applied...
Definition: ranges:911