SeqAn3 3.3.0-rc.1
The Modern C++ library for sequence analysis.
 
Loading...
Searching...
No Matches
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
19namespace seqan3::detail
20{
21
32template <typename alignment_algorithm_t, typename scoring_scheme_t>
34{
35private:
38
43 constexpr scoring_scheme_policy() = default;
45 constexpr scoring_scheme_policy(scoring_scheme_policy const &) = 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>
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.
The CRTP-policy that stores the scoring scheme used for this alignment algorithm.
Definition: scoring_scheme_policy.hpp:34
alphabet_t scoring_scheme_profile_column(alphabet_t &&alphabet) const noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: scoring_scheme_policy.hpp:83
constexpr scoring_scheme_policy(scoring_scheme_policy const &)=default
Defaulted.
~scoring_scheme_policy()=default
Defaulted.
auto scoring_scheme_profile_column(alphabet_t &&alphabet) const noexcept
Maybe converts the given sequence value to a specific profile used by the underlying scoring scheme.
Definition: scoring_scheme_policy.hpp:76
constexpr scoring_scheme_policy & operator=(scoring_scheme_policy &&)=default
Defaulted.
constexpr scoring_scheme_policy(scoring_scheme_policy &&)=default
Defaulted.
scoring_scheme_policy(configuration_t const &)
Initialise the policy.
Definition: scoring_scheme_policy.hpp:57
constexpr scoring_scheme_policy()=default
Defaulted.
friend alignment_algorithm_t
Befriends the derived class to grant it access to the private members.
Definition: scoring_scheme_policy.hpp:37
scoring_scheme_t scoring_scheme
The scoring scheme used for this alignment algorithm.
Definition: scoring_scheme_policy.hpp:62
constexpr scoring_scheme_policy & operator=(scoring_scheme_policy const &)=default
Defaulted.
The generic alphabet concept that covers most data types used in ranges.
The generic simd concept.
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Provides seqan3::simd::simd_concept.