SeqAn3 3.4.0rc.1
The Modern C++ library for sequence analysis.

A scoring scheme that assigns a score of 0
to matching letters and 1
to mismatching letters.
More...
#include <seqan3/alignment/scoring/hamming_scoring_scheme.hpp>
Public Types  
using  score_type = int32_t 
The underlying score type.  
Public Member Functions  
Constructors, destructor and assignment  
hamming_scoring_scheme () noexcept=default  
Defaulted.  
hamming_scoring_scheme (hamming_scoring_scheme const &)=default  
Defaulted.  
hamming_scoring_scheme (hamming_scoring_scheme &&) noexcept=default  
Defaulted.  
hamming_scoring_scheme &  operator= (hamming_scoring_scheme const &)=default 
Defaulted.  
hamming_scoring_scheme &  operator= (hamming_scoring_scheme &&) noexcept=default 
Defaulted.  
~hamming_scoring_scheme ()=default  
Accessors  
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 
Returns the score of two letters.  
Comparison operators  
constexpr bool  operator== (hamming_scoring_scheme const &) const noexcept 
Always true.  
constexpr bool  operator!= (hamming_scoring_scheme const &) const noexcept 
Always false.  
A scoring scheme that assigns a score of 0
to matching letters and 1
to mismatching letters.
This stateless scoring scheme is equivalent to the Hamming distance and assigns a score of 0
to matching letters and 1
to mismatching letters. This scheme is independent of the alphabet type and can be used whenever the two compared alphabets model the std::equality_comparable_with concept. Use this scheme if you want to use the use the more efficient bitparallel alignment algorithm often used in the context of computing the edit distance. See the documentation for seqan3::align_cfg::edit_scheme for more details.

default 
Defaulted.

inlineconstexprnoexcept 
Returns the score of two letters.
alph1_t  The type of the first letter. 
alph2_t  The type of the second letter. 
[in]  alph1  The first letter to compare. 
[in]  alph2  The second letter to compare. 
This function returns 0
if the two letters are equal and 1
otherwise. Note that both alphabet types of the compared letters must model the std::equality_comparable_with concept or no overload of this function is available.
0
if the letters are equal, 1
otherwise.