SeqAn3  3.0.1
The Modern C++ library for sequence analysis.
nucleotide_scoring_scheme.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2020, 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 
14 #pragma once
15 
18 
19 namespace seqan3
20 {
21 
36 template <arithmetic score_type = int8_t>
37 class nucleotide_scoring_scheme : public scoring_scheme_base<nucleotide_scoring_scheme<score_type>, dna15, score_type>
38 {
39 private:
42 
44  friend base_t;
45 
46 public:
49  using typename base_t::matrix_type;
51 
55  constexpr nucleotide_scoring_scheme() noexcept = default;
58  template <arithmetic score_arg_t>
60  : base_t{ms, mms}
61  {}
63  constexpr nucleotide_scoring_scheme(matrix_type const & matrix) noexcept
64  : base_t{matrix}
65  {}
67 };
68 
76 
80 template <arithmetic score_arg_type>
83 
85 template <arithmetic score_arg_type>
88 
89 } // namespace seqan3
A CRTP base class for scoring schemes.
Definition: scoring_scheme_base.hpp:100
The main SeqAn3 namespace.
constexpr nucleotide_scoring_scheme() noexcept=default
The default constructor (delegates to set_hamming_distance()).
A strong type of underlying type score_type that represents the score of two matching characters...
Definition: scoring_scheme_base.hpp:42
A strong type of underlying type score_type that represents the score two different characters...
Definition: scoring_scheme_base.hpp:67
A data structure for managing and computing the score of two nucleotides.
Definition: nucleotide_scoring_scheme.hpp:37
constexpr nucleotide_scoring_scheme(matrix_type const &matrix) noexcept
Constructor for a custom scheme (delegates to set_custom_matrix()).
Definition: nucleotide_scoring_scheme.hpp:63
Provides seqan3::scoring_scheme_base.
std::array< std::array< score_type, matrix_size >, matrix_size > matrix_type
Type of the internal matrix (a two-dimensional array).
Definition: scoring_scheme_base.hpp:121
constexpr nucleotide_scoring_scheme(match_score< score_arg_t > const ms, mismatch_score< score_arg_t > const mms)
Constructor for the simple scheme (delegates to set_simple_scheme()).
Definition: nucleotide_scoring_scheme.hpp:59
Provides seqan3::dna15, container aliases and string literals.