SeqAn3 3.4.0-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-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 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 <sdsl/suffix_arrays.hpp>
16
18
19namespace seqan3::detail
20{
21
22// ============================================================================
23// sdsl_index
24// ============================================================================
25
31template <typename t>
32concept sdsl_index = requires (t sdsl_index) {
33 typename t::size_type;
34
35 {
36 sdsl_index.size()
37 } -> std::same_as<typename t::size_type>;
38 {
39 sdsl_index[0]
40 }; // suffix array access
41 {
42 sdsl_index.comp2char[0]
43 } -> std::same_as<uint8_t>;
44 {
45 sdsl_index.char2comp[0]
46 } -> std::same_as<uint8_t>;
47 {
48 sdsl_index.sigma
49 };
50 {
51 sdsl_index.C[0]
52 };
53
54 requires requires (t sdsl_index,
55 typename t::char_type const c,
56 typename t::size_type const lb,
57 typename t::size_type const rb,
58 sdsl::int_vector<8> const text) {
59 {
60 sdsl_index.bwt.rank(lb, c)
61 };
62 {
63 sdsl_index.wavelet_tree.lex_count(lb, rb, c)
64 };
65 {
66 sdsl::construct_im(sdsl_index, text, 0)
67 };
68 };
69 };
71
81} // namespace seqan3::detail
82
83namespace seqan3
84{
87enum text_layout : bool
88{
93};
94
95} // 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:88
@ single
The text is a single range.
Definition search/fm_index/concept.hpp:90
@ collection
The text is a range of ranges.
Definition search/fm_index/concept.hpp:92
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
Provides platform and dependency checks.
Hide me