SeqAn3  3.0.2
The Modern C++ library for sequence analysis.
detail.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2020, 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 
41 enum struct search_config_id : uint8_t
42 {
43  max_error_total,
44  max_error_substitution,
45  max_error_insertion,
46  max_error_deletion,
47  on_result,
48  output_query_id,
49  output_reference_id,
50  output_reference_begin_position,
51  output_index_cursor,
52  hit,
53  parallel,
54  result_type,
55  // ATTENTION: Must always be the last item; will be used to determine the number of ids.
57  SIZE
58 };
60 
61 // ----------------------------------------------------------------------------
62 // search_config_validation_matrix
63 // ----------------------------------------------------------------------------
64 
75 template <>
76 inline constexpr std::array<std::array<bool, static_cast<uint8_t>(search_config_id::SIZE)>,
77  static_cast<uint8_t>(search_config_id::SIZE)> compatibility_table<search_config_id> =
78 {
79  {
80  // max_error_total,
81  // | max_error_substitution,
82  // | | max_error_insertion,
83  // | | | max_error_deletion,
84  // | | | | on_result,
85  // | | | | | output_query_id,
86  // | | | | | | output_reference_id,
87  // | | | | | | | output_reference_begin_position,
88  // | | | | | | | | output_index_cursor,
89  // | | | | | | | | | hit,
90  // | | | | | | | | | | parallel,
91  // | | | | | | | | | | | result_type
92  { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // max_error_total
93  { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // max_error_substitution
94  { 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // max_error_insertion
95  { 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1}, // max_error_deletion
96  { 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1}, // on_result
97  { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1}, // output_query_id
98  { 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1}, // output_reference_id
99  { 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1}, // output_reference_begin_position
100  { 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1}, // output_index_cursor
101  { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1}, // hit
102  { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}, // parallel
103  { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0} // result_type
104  }
105 };
106 
107 } // namespace seqan3::detail
seqan3::align_cfg::parallel
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:40
seqan3::align_cfg::on_result
on_result(callback_t &&) -> on_result< std::decay_t< callback_t >>
Deduces the callback type from a forwarding constructor argument.
std::array
configuration_utility.hpp
Provides functionality to access get function by enum values.