SeqAn3
The Modern C++ library for sequence analysis.
alignment_optimum.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2019, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2019, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
13 #pragma once
14 
15 #include <type_traits>
16 
20 #include <seqan3/std/concepts>
21 
22 namespace seqan3::detail
23 {
24 
34 template <Arithmetic score_t>
35 struct alignment_optimum
36 {
38  score_t score{std::numeric_limits<score_t>::lowest()};
40  alignment_coordinate coordinate{};
41 };
42 
46 alignment_optimum() -> alignment_optimum<int32_t>;
48 
50 template <Arithmetic score_t>
51 alignment_optimum(score_t const, alignment_coordinate const) ->
52  alignment_optimum<std::remove_reference_t<score_t>>;
54 
62 struct alignment_optimum_compare_less
63 {
64 
76  template <typename lhs_t, typename rhs_t>
78  requires (is_type_specialisation_of_v<lhs_t, alignment_optimum> &&
79  is_type_specialisation_of_v<rhs_t, alignment_optimum>)
81  constexpr bool operator()(lhs_t const & lhs, rhs_t const & rhs) const
82  {
83  return lhs.score < rhs.score;
84  }
85 };
86 
87 } // namespace seqan3::detail
Provides concepts for core language types and relations that don&#39;t have concepts in C++20 (yet)...
Provides seqan3::type_list and auxiliary type traits.
T lowest(T... args)
The Concepts library.
Definition: aligned_sequence_concept.hpp:35
Provides seqan3::detail::alignment_coordinate.