SeqAn3 3.4.1-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
search/fm_index/concept.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
12#include <concepts>
13#include <type_traits>
14
15#include <seqan3/contrib/sdsl-lite.hpp>
17
18namespace seqan3::detail
19{
20
21// ============================================================================
22// sdsl_index
23// ============================================================================
24
30template <typename t>
31concept sdsl_index = requires (t sdsl_index) {
32 typename t::size_type;
33
34 { sdsl_index.size() } -> std::same_as<typename t::size_type>;
35 { sdsl_index[0] }; // suffix array access
36 { sdsl_index.comp2char[0] } -> std::same_as<uint8_t>;
37 { sdsl_index.char2comp[0] } -> std::same_as<uint8_t>;
38 { sdsl_index.sigma };
39 { sdsl_index.C[0] };
40
41 requires requires (t sdsl_index,
42 typename t::char_type const c,
43 typename t::size_type const lb,
44 typename t::size_type const rb,
45 seqan3::contrib::sdsl::int_vector<8> const text) {
46 { sdsl_index.bwt.rank(lb, c) };
47 { sdsl_index.wavelet_tree.lex_count(lb, rb, c) };
48 { seqan3::contrib::sdsl::construct_im(sdsl_index, text, 0) };
49 };
50};
52
62} // namespace seqan3::detail
63
64namespace seqan3
65{
68enum text_layout : bool
69{
74};
75
76} // namespace seqan3
text_layout
The possible text layouts (single, collection) the seqan3::fm_index and seqan3::bi_fm_index can suppo...
Definition search/fm_index/concept.hpp:69
@ single
The text is a single range.
Definition search/fm_index/concept.hpp:71
@ collection
The text is a range of ranges.
Definition search/fm_index/concept.hpp:73
Concept for SDSL FM indices (which are called compressed suffix arrays in the SDSL).
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
Provides platform and dependency checks.
Hide me