SeqAn3 3.3.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// -----------------------------------------------------------------------------------------------------
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
33template <typename alignment_configuration_t, typename scoring_scheme_t>
35{
36protected:
38 scoring_scheme_t scoring_scheme{};
39
49
53 explicit policy_scoring_scheme(alignment_configuration_t const & config) :
54 scoring_scheme{seqan3::get<align_cfg::scoring_scheme>(config).scheme}
55 {}
57
73 template <typename alphabet_t>
75 auto scoring_scheme_profile_column(alphabet_t && alphabet) const noexcept
76 {
77 return scoring_scheme.make_score_profile(std::forward<alphabet_t>(alphabet));
78 }
79
81 template <semialphabet alphabet_t>
82 alphabet_t scoring_scheme_profile_column(alphabet_t && alphabet) const noexcept
83 {
84 return std::forward<alphabet_t>(alphabet);
85 }
86};
87
88} // namespace seqan3::detail
Provides seqan3::align_cfg::scoring_scheme.
Stores the configured scoring scheme used for this algorithm.
Definition: policy_scoring_scheme.hpp:35
~policy_scoring_scheme()=default
Defaulted.
policy_scoring_scheme & operator=(policy_scoring_scheme &&)=default
Defaulted.
scoring_scheme_t scoring_scheme
The scoring scheme used for this alignment algorithm.
Definition: policy_scoring_scheme.hpp:38
policy_scoring_scheme(alignment_configuration_t const &config)
Construction and initialisation using the alignment configuration.
Definition: policy_scoring_scheme.hpp:53
policy_scoring_scheme(policy_scoring_scheme const &)=default
Defaulted.
policy_scoring_scheme()=default
Defaulted.
policy_scoring_scheme(policy_scoring_scheme &&)=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: policy_scoring_scheme.hpp:75
policy_scoring_scheme & operator=(policy_scoring_scheme const &)=default
Defaulted.
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: policy_scoring_scheme.hpp:82
Provides seqan3::configuration and utility functions.
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
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
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:415
Provides seqan3::simd::simd_concept.