SeqAn3
3.4.0
The Modern C++ library for sequence analysis.
Toggle main menu visibility
Loading...
Searching...
No Matches
hamming_scoring_scheme.hpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
2
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
3
// SPDX-License-Identifier: BSD-3-Clause
4
9
10
#pragma once
11
12
#include <concepts>
13
14
#include <
seqan3/core/platform.hpp
>
15
16
namespace
seqan3
17
{
18
32
class
hamming_scoring_scheme
33
{
34
public
:
37
using
alphabet_type = char;
39
41
using
score_type
= int32_t;
42
46
hamming_scoring_scheme
() noexcept = default;
47
hamming_scoring_scheme
(
hamming_scoring_scheme
const &) = default;
48
hamming_scoring_scheme
(
hamming_scoring_scheme
&&) noexcept = default;
49
hamming_scoring_scheme
& operator=(
hamming_scoring_scheme
const &) = default;
50
hamming_scoring_scheme
& operator=(
hamming_scoring_scheme
&&) noexcept = default;
51
~
hamming_scoring_scheme
() = default;
53
57
72
template <typename alph1_t, typename alph2_t>
73
requires
std
::equality_comparable_with<alph1_t, alph2_t>
74
constexpr
score_type
score
(alph1_t const alph1, alph2_t const alph2) const noexcept
75
{
76
return
alph1 == alph2 ? 0 : -1;
77
}
78
79
82
84
constexpr
bool
operator==
(
hamming_scoring_scheme
const
&)
const
noexcept
85
{
86
return
true
;
87
}
88
90
constexpr
bool
operator!=
(
hamming_scoring_scheme
const
&)
const
noexcept
91
{
92
return
false
;
93
}
94
95
};
96
97
}
// namespace seqan3
seqan3::hamming_scoring_scheme::score_type
int32_t score_type
The underlying score type.
Definition
hamming_scoring_scheme.hpp:41
seqan3::hamming_scoring_scheme::operator==
constexpr bool operator==(hamming_scoring_scheme const &) const noexcept
Always true.
Definition
hamming_scoring_scheme.hpp:84
seqan3::hamming_scoring_scheme::operator!=
constexpr bool operator!=(hamming_scoring_scheme const &) const noexcept
Always false.
Definition
hamming_scoring_scheme.hpp:90
seqan3::hamming_scoring_scheme::score
constexpr score_type score(alph1_t const alph1, alph2_t const alph2) const noexcept
Returns the score of two letters.
Definition
hamming_scoring_scheme.hpp:74
seqan3::hamming_scoring_scheme::hamming_scoring_scheme
hamming_scoring_scheme() noexcept=default
Defaulted.
seqan3
The main SeqAn3 namespace.
Definition
aligned_sequence_concept.hpp:26
std
SeqAn specific customisations in the standard namespace.
platform.hpp
Provides platform and dependency checks.
Hide me
Version:
seqan3
alignment
scoring
hamming_scoring_scheme.hpp
Generated on
for SeqAn3 by
1.17.0