79 constexpr
bool add_enum_bitwise_operators<seqan3::free_ends_at> =
true;
90 template <free_ends_at val = free_ends_at::none>
91 struct align_config_sequence_ends
100 struct align_config_sequence_ends_deferred :
public detail::deferred_config_element_base<align_config_sequence_ends_deferred>
113 template <
typename fn_t,
typename configuration_t>
114 constexpr
auto invoke(fn_t && fn, configuration_t && cfg)
const 116 requires detail::is_algorithm_configuration_v<remove_cvref_t<configuration_t>>
119 switch (static_cast<uint8_t>(value))
121 case 0b0000:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
122 align_config_sequence_ends<static_cast<free_ends_at>(0b0000)>{}));
124 case 0b0001:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
125 align_config_sequence_ends<static_cast<free_ends_at>(0b0001)>{}));
127 case 0b0010:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
128 align_config_sequence_ends<static_cast<free_ends_at>(0b0010)>{}));
130 case 0b0011:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
131 align_config_sequence_ends<static_cast<free_ends_at>(0b0011)>{}));
133 case 0b0100:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
134 align_config_sequence_ends<static_cast<free_ends_at>(0b0100)>{}));
136 case 0b0101:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
137 align_config_sequence_ends<static_cast<free_ends_at>(0b0101)>{}));
139 case 0b0110:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
140 align_config_sequence_ends<static_cast<free_ends_at>(0b0110)>{}));
142 case 0b0111:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
143 align_config_sequence_ends<static_cast<free_ends_at>(0b0111)>{}));
145 case 0b1000:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
146 align_config_sequence_ends<static_cast<free_ends_at>(0b1000)>{}));
148 case 0b1001:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
149 align_config_sequence_ends<static_cast<free_ends_at>(0b1001)>{}));
151 case 0b1010:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
152 align_config_sequence_ends<static_cast<free_ends_at>(0b1010)>{}));
154 case 0b1011:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
155 align_config_sequence_ends<static_cast<free_ends_at>(0b1011)>{}));
157 case 0b1100:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
158 align_config_sequence_ends<static_cast<free_ends_at>(0b1100)>{}));
160 case 0b1101:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
161 align_config_sequence_ends<static_cast<free_ends_at>(0b1101)>{}));
163 case 0b1110:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
164 align_config_sequence_ends<static_cast<free_ends_at>(0b1110)>{}));
166 case 0b1111:
return fn(std::forward<configuration_t>(cfg).replace_with(*
this,
167 align_config_sequence_ends<static_cast<free_ends_at>(0b1111)>{}));
169 default:
throw std::invalid_argument(
"Enum value out of bounds for seqan3::free_ends_at.");
178 template <free_ends_at val>
179 struct align_config_sequence_ends_adaptor :
public configuration_fn_base<align_config_sequence_ends_adaptor<val>>
187 template <
typename configuration_type>
189 requires is_algorithm_configuration_v<remove_cvref_t<configuration_type>>
191 constexpr
auto invoke(configuration_type && cfg,
free_ends_at const _val)
const 196 align_config_sequence_ends_deferred tmp;
198 return std::forward<configuration_type>(cfg).push_front(std::move(tmp));
207 template <
typename configuration_type>
209 requires is_algorithm_configuration_v<remove_cvref_t<configuration_type>>
211 constexpr
auto invoke(configuration_type && cfg)
const 216 return std::forward<configuration_type>(cfg).push_front(align_config_sequence_ends<val>{});
228 template <config_element_concept cfg>
229 using invoke = std::conditional_t<is_value_specialisation_of_v<cfg, align_config_sequence_ends>,
231 typename std::is_same<cfg, align_config_sequence_ends_deferred>::type>;
238 template <free_ends_at val>
239 struct align_config_type_to_id<align_config_sequence_ends<val>>
249 struct align_config_type_to_id<align_config_sequence_ends_deferred>
267 template <free_ends_at val = free_ends_at::none>
268 inline constexpr detail::align_config_sequence_ends_adaptor<val>
sequence_ends;
Provides seqan3::add_enum_bitwise_operators.
Identifier for free ends configuration.
Provides seqan3::type_list and auxiliary metafunctions.
Continuous gaps in the beginning and end of both sequences are not scored.
No flag is set.
Definition: debug_stream.hpp:65
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:58
A special sub namespace for the alignment configurations.
Definition: align_config_band.hpp:151
Continuous gaps in the beginning of the second sequence are not scored.
constexpr detail::align_config_sequence_ends_adaptor< val > sequence_ends
A configuration adaptor for gaps at the sequence ends.
Definition: align_config_sequence_ends.hpp:268
Provides functionality to access get function by enum values.
Continuous gaps in the beginning and end of the second sequence are not scored.
Continuous gaps at the end of the second sequence are not scored.
Continuous gaps in the beginning and end of the first sequence are not scored.
Definition: aligned_sequence_concept.hpp:288
Continuous gaps at the end of the first sequence are not scored.
id
Specifies an id for every configuration element.
Definition: utility.hpp:66
Meta-Header for components of the algorithm submodule.
Continuous gaps in the beginning of the first sequence are not scored.
free_ends_at
Enum class for all supported sequence ends specifications.
Definition: align_config_sequence_ends.hpp:57