SeqAn3
max_error_common.hpp
Go to the documentation of this file.
1 // ============================================================================
2 // SeqAn - The Library for Sequence Analysis
3 // ============================================================================
4 //
5 // Copyright (c) 2006-2018, Knut Reinert & Freie Universitaet Berlin
6 // Copyright (c) 2016-2018, Knut Reinert & MPI Molekulare Genetik
7 // All rights reserved.
8 //
9 // Redistribution and use in source and binary forms, with or without
10 // modification, are permitted provided that the following conditions are met:
11 //
12 // * Redistributions of source code must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
14 // * Redistributions in binary form must reproduce the above copyright
15 // notice, this list of conditions and the following disclaimer in the
16 // documentation and/or other materials provided with the distribution.
17 // * Neither the name of Knut Reinert or the FU Berlin nor the names of
18 // its contributors may be used to endorse or promote products derived
19 // from this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 // ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
25 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
31 // DAMAGE.
32 //
33 // ============================================================================
34 
40 #pragma once
41 
44 #include <seqan3/std/concepts>
45 
46 namespace seqan3::search_cfg
47 {
48 
53 template <typename value_t>
55  requires arithmetic_concept<value_t>
57 struct total : detail::strong_type<value_t, total<value_t>, detail::strong_type_skill::convert>
58 {
59  using detail::strong_type<value_t, total<value_t>, detail::strong_type_skill::convert>::strong_type;
60 };
61 
66 template <std::Integral value_t>
67 total(value_t) -> total<uint8_t>;
68 
69 template <typename value_t>
73 total(value_t) -> total<double>;
75 
81 template <typename value_t>
85 struct substitution : detail::strong_type<value_t, substitution<value_t>, detail::strong_type_skill::convert>
86 {
87  using detail::strong_type<value_t, substitution<value_t>, detail::strong_type_skill::convert>::strong_type;
88 };
89 
94 template <std::Integral value_t>
96 
97 template <typename value_t>
103 
108 template <typename value_t>
112 struct insertion : detail::strong_type<value_t, insertion<value_t>, detail::strong_type_skill::convert>
113 {
114  using detail::strong_type<value_t, insertion<value_t>, detail::strong_type_skill::convert>::strong_type;
115 };
116 
121 template <std::Integral value_t>
122 insertion(value_t) -> insertion<uint8_t>;
123 
124 template <typename value_t>
128 insertion(value_t) -> insertion<double>;
130 
135 template <typename value_t>
139 struct deletion : detail::strong_type<value_t, deletion<value_t>, detail::strong_type_skill::convert>
140 {
141  using detail::strong_type<value_t, deletion<value_t>, detail::strong_type_skill::convert>::strong_type;
142 };
143 
148 template <std::Integral value_t>
149 deletion(value_t) -> deletion<uint8_t>;
150 
151 template <typename value_t>
155 deletion(value_t) -> deletion<double>;
157 
158 } // namespace seqan3::search_cfg
Contains basic data structure for strong types.
Provides concepts for core language types and relations that don&#39;t have concepts in C++20 (yet)...
A special sub namespace for the search configurations.
A strong type of underlying type uint8_t or double that represents the number or rate of deletions...
Definition: max_error_common.hpp:139
A type that satisfies std::is_arithmetic_v<t>.
A strong type of underlying type uint8_t or double that represents the number or rate of total errors...
Definition: max_error_common.hpp:57
The Concepts library.
A strong type of underlying type uint8_t or double that represents the number or rate of substitution...
Definition: max_error_common.hpp:85
An arithmetic type that also satisfies std::is_floating_point_v<t>.
A strong type of underlying type uint8_t or double that represents the number or rate of insertions...
Definition: max_error_common.hpp:112