21 namespace seqan3::detail
26 template <
typename score_type>
40 template <
typename matrix_t>
41 concept matrix =
requires (std::remove_cvref_t<matrix_t> m) {
47 typename std::remove_cvref_t<matrix_t>::value_type;
51 typename std::remove_cvref_t<matrix_t>::reference;
55 typename std::remove_cvref_t<matrix_t>::size_type;
63 } -> std::same_as<typename std::remove_cvref_t<matrix_t>::size_type>;
72 } -> std::same_as<typename std::remove_cvref_t<matrix_t>::size_type>;
81 } -> std::same_as<typename std::remove_cvref_t<matrix_t>::reference>;
100 template <matrix matrix1_t, matrix matrix2_t>
101 requires std::equality_comparable_with<typename matrix1_t::reference, typename matrix2_t::reference>
102 inline bool operator==(matrix1_t
const & lhs, matrix2_t
const & rhs) noexcept
104 if (lhs.rows() != rhs.rows())
107 if (lhs.cols() != rhs.cols())
110 for (
size_t row = 0u; row < lhs.rows(); ++row)
111 for (
size_t col = 0u; col < lhs.cols(); ++col)
112 if (
matrix_coordinate co{row_index_type{row}, column_index_type{col}}; lhs.at(co) != rhs.at(co))
124 template <matrix matrix1_t, matrix matrix2_t>
125 requires std::equality_comparable_with<typename matrix1_t::reference, typename matrix2_t::reference>
126 inline bool operator!=(matrix1_t
const & lhs, matrix2_t
const & rhs) noexcept
128 return !(lhs == rhs);
The <concepts> header from C++20's standard library.
requires requires
The rank_type of the semi-alphabet; defined as the return type of seqan3::to_rank....
Definition: alphabet/concept.hpp:164
Provides seqan3::detail::matrix_index, seqan3::detail::matrix_coordinate and associated strong types.
matrix_index< size_t > matrix_coordinate
A coordinate type to access an element inside of a two-dimensional matrix.
Definition: matrix_coordinate.hpp:178