SeqAn3  3.2.0
The Modern C++ library for sequence analysis.
scoring_scheme_policy.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2022, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2022, 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 
18 
19 namespace seqan3::detail
20 {
21 
32 template <typename alignment_algorithm_t, typename scoring_scheme_t>
33 class scoring_scheme_policy
34 {
35 private:
37  friend alignment_algorithm_t;
38 
43  constexpr scoring_scheme_policy() = default;
45  constexpr scoring_scheme_policy(scoring_scheme_policy const &) = default;
47  constexpr scoring_scheme_policy(scoring_scheme_policy &&) = default;
49  constexpr scoring_scheme_policy & operator=(scoring_scheme_policy const &) = default;
51  constexpr scoring_scheme_policy & operator=(scoring_scheme_policy &&) = default;
53  ~scoring_scheme_policy() = default;
54 
56  template <typename configuration_t>
57  scoring_scheme_policy(configuration_t const & /*config*/)
58  {}
60 
62  scoring_scheme_t scoring_scheme{};
63 
74  template <typename alphabet_t>
75  requires simd_concept<std::remove_cvref_t<alphabet_t>>
76  auto scoring_scheme_profile_column(alphabet_t && alphabet) const noexcept
77  {
78  return scoring_scheme.make_score_profile(std::forward<alphabet_t>(alphabet));
79  }
80 
82  template <semialphabet alphabet_t>
83  alphabet_t scoring_scheme_profile_column(alphabet_t && alphabet) const noexcept
84  {
85  return std::forward<alphabet_t>(alphabet);
86  }
87 };
88 
89 } // namespace seqan3::detail
Core alphabet concept and free function/type trait wrappers.
Provides various type traits on generic types.
requires requires
The rank_type of the semi-alphabet; defined as the return type of seqan3::to_rank....
Definition: alphabet/concept.hpp:164
The generic alphabet concept that covers most data types used in ranges.
Provides seqan3::simd::simd_concept.