Loading...
Searching...
No Matches
alignment/pairwise/detail/concept.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 <ranges>
#include <tuple>
#include <seqan3/alphabet/concept.hpp>
#include <seqan3/utility/tuple/concept.hpp>
namespace seqan3::detail
{
template <typename t>
concept sequence_pair = requires () {
requires tuple_like<t>;
requires std::tuple_size_v<t> == 2;
requires std::ranges::forward_range<std::tuple_element_t<0, t>>;
requires std::ranges::forward_range<std::tuple_element_t<1, t>>;
requires semialphabet<std::ranges::range_value_t<std::tuple_element_t<0, t>>>;
requires semialphabet<std::ranges::range_value_t<std::tuple_element_t<1, t>>>;
};
template <typename t>
concept sequence_pair_range = std::ranges::forward_range<t> && sequence_pair<std::ranges::range_value_t<t>>;
template <typename t>
concept indexed_sequence_pair_range = std::ranges::forward_range<t> && requires (std::ranges::range_value_t<t> value) {
requires tuple_like<decltype(value)>;
requires std::tuple_size_v<decltype(value)> == 2;
requires sequence_pair<std::tuple_element_t<0, decltype(value)>>;
requires std::copy_constructible<std::tuple_element_t<1, decltype(value)>>;
};
template <typename t>
concept align_pairwise_single_input =
(sequence_pair<std::remove_reference_t<t>> && std::is_lvalue_reference_v<t>)
|| (std::ranges::viewable_range<std::tuple_element_t<0, std::remove_reference_t<t>>>
&& std::ranges::viewable_range<std::tuple_element_t<1, std::remove_reference_t<t>>>);
template <typename t>
concept align_pairwise_range_input =
std::ranges::forward_range<t> && sequence_pair<std::ranges::range_value_t<t>>
&& ((std::ranges::viewable_range<t> && std::is_lvalue_reference_v<std::ranges::range_reference_t<t>>)
|| align_pairwise_single_input<std::remove_reference_t<std::ranges::range_reference_t<t>>>);
} // namespace seqan3::detail
concept.hpp
Core alphabet concept and free function/type trait wrappers.
std::is_lvalue_reference_v
T is_lvalue_reference_v
tuple
std::tuple_size_v
T tuple_size_v
concept.hpp
Provides seqan3::tuple_like.
Hide me