SeqAn3  3.2.0
The Modern C++ library for sequence analysis.
max_error.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2022, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2022, 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 
15 #pragma once
16 
17 #include <variant>
18 
23 
24 namespace seqan3::search_cfg
25 {
37 {
38 public:
41 
45  max_error_total() = default;
46  max_error_total(max_error_total const &) = default;
48  max_error_total & operator=(max_error_total const &) = default;
50  ~max_error_total() = default;
51 
55  constexpr explicit max_error_total(error_count error) : error{std::move(error)}
56  {}
57 
61  constexpr explicit max_error_total(error_rate error) : error{std::move(error)}
62  {}
64 
67  static constexpr detail::search_config_id id{detail::search_config_id::max_error_total};
68 };
69 
82 {
83 public:
86 
90  max_error_substitution() = default;
96 
100  constexpr explicit max_error_substitution(error_count error) : error{std::move(error)}
101  {}
102 
106  constexpr explicit max_error_substitution(error_rate error) : error{std::move(error)}
107  {}
109 
112  static constexpr detail::search_config_id id{detail::search_config_id::max_error_substitution};
113 };
114 
127 {
128 public:
131 
135  max_error_insertion() = default;
140  ~max_error_insertion() = default;
141 
145  constexpr explicit max_error_insertion(error_count error) : error{std::move(error)}
146  {}
147 
151  constexpr explicit max_error_insertion(error_rate error) : error{std::move(error)}
152  {}
154 
157  static constexpr detail::search_config_id id{detail::search_config_id::max_error_insertion};
158 };
159 
173 {
174 public:
177 
181  max_error_deletion() = default;
186  ~max_error_deletion() = default;
187 
191  constexpr explicit max_error_deletion(error_count error) : error{std::move(error)}
192  {}
193 
197  constexpr explicit max_error_deletion(error_rate error) : error{std::move(error)}
198  {}
200 
203  static constexpr detail::search_config_id id{detail::search_config_id::max_error_deletion};
204 };
205 
206 } // namespace seqan3::search_cfg
Configuration element that represents the number or rate of deletion errors.
Definition: max_error.hpp:173
max_error_deletion & operator=(max_error_deletion &&)=default
Defaulted.
max_error_deletion & operator=(max_error_deletion const &)=default
Defaulted.
constexpr max_error_deletion(error_count error)
Initialises the deletion error with the given seqan3::search_cfg::error_count.
Definition: max_error.hpp:191
max_error_deletion(max_error_deletion &&)=default
Defaulted.
max_error_deletion(max_error_deletion const &)=default
Defaulted.
constexpr max_error_deletion(error_rate error)
Initialises the deletion error with the given seqan3::search_cfg::error_rate.
Definition: max_error.hpp:197
std::variant< error_count, error_rate > error
The error count or error rate.
Definition: max_error.hpp:176
Configuration element that represents the number or rate of insertion errors.
Definition: max_error.hpp:127
max_error_insertion(max_error_insertion &&)=default
Defaulted.
max_error_insertion(max_error_insertion const &)=default
Defaulted.
max_error_insertion & operator=(max_error_insertion &&)=default
Defaulted.
std::variant< error_count, error_rate > error
The error count or error rate.
Definition: max_error.hpp:130
constexpr max_error_insertion(error_rate error)
Initialises the insertion error with the given seqan3::search_cfg::error_rate.
Definition: max_error.hpp:151
max_error_insertion & operator=(max_error_insertion const &)=default
Defaulted.
constexpr max_error_insertion(error_count error)
Initialises the insertion error with the given seqan3::search_cfg::error_count.
Definition: max_error.hpp:145
Configuration element that represents the number or rate of substitution errors.
Definition: max_error.hpp:82
max_error_substitution & operator=(max_error_substitution &&)=default
Defaulted.
max_error_substitution & operator=(max_error_substitution const &)=default
Defaulted.
constexpr max_error_substitution(error_count error)
Initialises the substitution error with the given seqan3::search_cfg::error_count.
Definition: max_error.hpp:100
max_error_substitution(max_error_substitution const &)=default
Defaulted.
constexpr max_error_substitution(error_rate error)
Initialises the substitution error with the given seqan3::search_cfg::error_rate.
Definition: max_error.hpp:106
max_error_substitution(max_error_substitution &&)=default
Defaulted.
std::variant< error_count, error_rate > error
The error count or error rate.
Definition: max_error.hpp:85
Configuration element that represents the number or rate of total errors.
Definition: max_error.hpp:37
constexpr max_error_total(error_count error)
Initialises the total error with the given seqan3::search_cfg::error_count.
Definition: max_error.hpp:55
max_error_total(max_error_total &&)=default
Defaulted.
~max_error_total()=default
Defaulted.
max_error_total & operator=(max_error_total &&)=default
Defaulted.
std::variant< error_count, error_rate > error
The error count or error rate.
Definition: max_error.hpp:40
max_error_total & operator=(max_error_total const &)=default
Defaulted.
constexpr max_error_total(error_rate error)
Initialises the total error with the given seqan3::search_cfg::error_rate.
Definition: max_error.hpp:61
max_error_total(max_error_total const &)=default
Defaulted.
max_error_total()=default
Defaulted.
Provides the error types for maximum number of errors.
A special sub namespace for the search configurations.
SeqAn specific customisations in the standard namespace.
Provides seqan3::pipeable_config_element.
Provides data structures used by different search algorithms.
Adds pipe interface to configuration elements.
Definition: pipeable_config_element.hpp:32
A strong type of underlying type uint8_t that represents the number of errors.
Definition: max_error_common.hpp:32
A strong type of underlying type double that represents the rate of errors.
Definition: max_error_common.hpp:46