SeqAn3  3.2.0-rc.1
The Modern C++ library for sequence analysis.
search/configuration/detail.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 
14 #pragma once
15 
17 
18 namespace seqan3::detail
19 {
20 
21 // ----------------------------------------------------------------------------
22 // search_config_id
23 // ----------------------------------------------------------------------------
24 
42 enum struct search_config_id : uint8_t
43 {
44  max_error_total,
45  max_error_substitution,
46  max_error_insertion,
47  max_error_deletion,
48  on_result,
49  output_query_id,
50  output_reference_id,
51  output_reference_begin_position,
52  output_index_cursor,
53  hit,
54  parallel,
55  result_type,
57  // ATTENTION: Must always be the last item; will be used to determine the number of ids.
58  SIZE
60 };
61 
62 // ----------------------------------------------------------------------------
63 // search_config_validation_matrix
64 // ----------------------------------------------------------------------------
65 
77 template <>
78 inline constexpr std::array<std::array<bool, static_cast<uint8_t>(search_config_id::SIZE)>,
79  static_cast<uint8_t>(search_config_id::SIZE)>
80  compatibility_table<search_config_id> = {{
81  // max_error_total,
82  // | max_error_substitution,
83  // | | max_error_insertion,
84  // | | | max_error_deletion,
85  // | | | | on_result,
86  // | | | | | output_query_id,
87  // | | | | | | output_reference_id,
88  // | | | | | | | output_reference_begin_position,
89  // | | | | | | | | output_index_cursor,
90  // | | | | | | | | | hit,
91  // | | | | | | | | | | parallel,
92  // | | | | | | | | | | | result_type
93  {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // max_error_total
94  {1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // max_error_substitution
95  {1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // max_error_insertion
96  {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1}, // max_error_deletion
97  {1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1}, // on_result
98  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1}, // output_query_id
99  {1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1}, // output_reference_id
100  {1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1}, // output_reference_begin_position
101  {1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1}, // output_index_cursor
102  {1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1}, // hit
103  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}, // parallel
104  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0} // result_type
105  }};
106 
107 } // namespace seqan3::detail
Provides concepts for the configuration classes.
seqan3::detail::parallel_mode< std::integral_constant< seqan3::detail::align_config_id, seqan3::detail::align_config_id::parallel > > parallel
Enables the parallel execution of the alignment algorithm if possible for the given configuration.
Definition: align_config_parallel.hpp:38
on_result(callback_t &&) -> on_result< std::decay_t< callback_t >>
Deduces the callback type from a forwarding constructor argument.