20 #ifndef ANTKEEPER_GENETICS_AMINO_ACID_HPP
21 #define ANTKEEPER_GENETICS_AMINO_ACID_HPP
23 #include <type_traits>
28 namespace amino_acid {
38 template <
class Matrix>
39 typename std::remove_all_extents<Matrix>::type
score(
char a,
char b,
const Matrix& matrix);
41 template <
class Matrix>
42 typename std::remove_all_extents<Matrix>::type
score(
char a,
char b,
const Matrix& matrix)
44 int i = (a < 'A' || a >
'Z') ? ((a ==
'*') ? 26 : -1) : a -
'A';
45 int j = (b < 'A' || b >
'Z') ? ((b ==
'*') ? 26 : -1) : b -
'A';
std::remove_all_extents< Matrix >::type score(char a, char b, const Matrix &matrix)
Scores two amino acids using a substitution matrix.