44 #include <sdsl/suffix_arrays.hpp> 66 concept sdsl_index_concept = requires (t sdsl_index)
68 typename t::size_type;
70 { sdsl_index.size() } ->
typename t::size_type;
72 { sdsl_index.comp2char[0] } -> uint8_t;
73 { sdsl_index.char2comp[0] } -> uint8_t;
77 requires requires (t sdsl_index,
typename t::char_type
const c,
typename t::size_type
const lb,
78 typename t::size_type
const rb, sdsl::int_vector<8>
const text)
80 { sdsl_index.bwt.rank(lb, c) };
81 { sdsl_index.wavelet_tree.lex_count(lb, rb, c) };
82 { sdsl::construct_im(sdsl_index, text, 0) };
120 template <
typename t>
122 concept fm_index_traits_concept = requires (t v)
124 typename t::sdsl_index_type;
126 requires detail::sdsl_index_concept<typename t::sdsl_index_type>;
150 template <
typename t>
154 typename t::text_type;
155 typename t::char_type;
156 typename t::size_type;
157 typename t::iterator_type;
162 requires requires (t index, std::vector<typename t::char_type>
const text)
165 { index.construct(text) } -> void;
168 { index.begin() } ->
typename t::iterator_type;
170 { index.size() } ->
typename t::size_type;
171 { index.empty() } -> bool;
173 { index.load(std::string{}) } ->
bool;
174 { index.store(std::string{}) } ->
bool;
212 template <
typename t>
216 typename t::index_type;
217 typename t::size_type;
219 requires fm_index_concept<typename t::index_type>;
221 requires requires (
typename t::index_type
const index) { { t(index) } };
223 requires requires (t it,
typename t::index_type::char_type
const c,
224 std::vector<typename t::index_type::char_type>
const seq)
226 { it.extend_right() } -> bool;
227 { it.extend_right(c) } -> bool;
228 { it.extend_right(seq) } -> bool;
229 { it.cycle_back() } -> bool;
232 { it.last_char() } ->
typename t::index_type::char_type;
233 { it.query_length() } ->
typename t::size_type;
234 { it.query() } ->
auto;
236 { it.count() } ->
typename t::size_type;
237 { it.locate() } -> std::vector<typename t::size_type>;
238 { it.lazy_locate() } ->
auto;
268 template <
typename t>
270 concept bi_fm_index_traits_concept = requires (t v)
272 requires fm_index_traits_concept<typename t::fm_index_traits>;
273 requires fm_index_traits_concept<typename t::rev_fm_index_traits>;
275 requires
std::Same<
typename t::fm_index_traits::sdsl_index_type::size_type,
276 typename t::rev_fm_index_traits::sdsl_index_type::size_type>;
306 template <
typename t>
308 concept bi_fm_index_concept = fm_index_concept<t> && requires (t index)
310 typename t::iterator_type;
311 typename t::fwd_iterator_type;
312 typename t::rev_iterator_type;
317 { index.fwd_begin() } ->
typename t::fwd_iterator_type;
318 { index.rev_begin() } ->
typename t::rev_iterator_type;
352 template <
typename t>
354 concept bi_fm_index_iterator_concept = fm_index_iterator_concept<t> && requires (t it)
356 requires bi_fm_index_concept<typename t::index_type>;
358 requires requires (
typename t::index_type
const index) { { t(index) } };
360 requires requires (t it,
typename t::index_type::char_type
const c,
361 std::vector<typename t::index_type::char_type>
const seq)
363 { it.extend_left() } -> bool;
364 { it.extend_left(c) } -> bool;
365 { it.extend_left(seq) } -> bool;
366 { it.cycle_front() } -> bool;
Subsumes std::Copyable and std::DefaultConstructible.
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:58
Additional non-standard concepts for ranges.
The concept std::Same<T, U> is satisfied if and only if T and U denote the same type.
Definition: aligned_sequence_concept.hpp:288
Provides C++20 additions to the type_traits header.
Provides various metafunctions used by the range module.
Contains seqan3::dna4, container aliases and string literals.