SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
policy_scoring_scheme.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
14#include <seqan3/utility/simd/concept.hpp>
15
16namespace seqan3::detail
17{
18
30template <typename alignment_configuration_t, typename scoring_scheme_t>
31class policy_scoring_scheme
32{
33protected:
35 scoring_scheme_t scoring_scheme{};
36
40 policy_scoring_scheme() = default;
41 policy_scoring_scheme(policy_scoring_scheme const &) = default;
42 policy_scoring_scheme(policy_scoring_scheme &&) = default;
43 policy_scoring_scheme & operator=(policy_scoring_scheme const &) = default;
44 policy_scoring_scheme & operator=(policy_scoring_scheme &&) = default;
45 ~policy_scoring_scheme() = default;
46
50 explicit policy_scoring_scheme(alignment_configuration_t const & config) :
51 scoring_scheme{seqan3::get<align_cfg::scoring_scheme>(config).scheme}
52 {}
54
70 template <typename alphabet_t>
71 requires simd_concept<std::remove_cvref_t<alphabet_t>>
72 auto scoring_scheme_profile_column(alphabet_t && alphabet) const noexcept
73 {
74 return scoring_scheme.make_score_profile(std::forward<alphabet_t>(alphabet));
75 }
76
78 template <semialphabet alphabet_t>
79 alphabet_t scoring_scheme_profile_column(alphabet_t && alphabet) const noexcept
80 {
81 return std::forward<alphabet_t>(alphabet);
82 }
83};
84
85} // namespace seqan3::detail
Provides seqan3::align_cfg::scoring_scheme.
Provides seqan3::configuration and utility functions.
The generic alphabet concept that covers most data types used in ranges.
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
constexpr auto const & get(configuration< configs_t... > const &config) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition configuration.hpp:412
Hide me