Loading...
Searching...
No Matches
hamming_scoring_scheme.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <concepts>
#include <seqan3/core/platform.hpp>
namespace seqan3
{
class hamming_scoring_scheme
{
public:
using alphabet_type = char;
using score_type = int32_t;
hamming_scoring_scheme() noexcept = default;
hamming_scoring_scheme(hamming_scoring_scheme const &) = default;
hamming_scoring_scheme(hamming_scoring_scheme &&) noexcept = default;
hamming_scoring_scheme & operator=(hamming_scoring_scheme const &) = default;
hamming_scoring_scheme & operator=(hamming_scoring_scheme &&) noexcept = default;
~hamming_scoring_scheme() = default;
template <typename alph1_t, typename alph2_t>
requires std::equality_comparable_with<alph1_t, alph2_t>
constexpr score_type score(alph1_t const alph1, alph2_t const alph2) const noexcept
{
return alph1 == alph2 ? 0 : -1;
}
constexpr bool operator==(hamming_scoring_scheme const &) const noexcept
{
return true;
}
constexpr bool operator!=(hamming_scoring_scheme const &) const noexcept
{
return false;
}
};
} // 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