SeqAn3 3.2.0
The Modern C++ library for sequence analysis.
concept.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2006-2022, Knut Reinert & Freie Universität Berlin
3// Copyright (c) 2016-2022, 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
13#pragma once
14
15#include <concepts>
16#include <type_traits>
17
18#include <sdsl/suffix_arrays.hpp>
19
21
22namespace seqan3::detail
23{
24
25// ============================================================================
26// sdsl_index
27// ============================================================================
28
34template <typename t>
35concept sdsl_index = requires (t sdsl_index) {
36 typename t::size_type;
37
38 {
39 sdsl_index.size()
40 } -> std::same_as<typename t::size_type>;
41 {
42 sdsl_index[0]
43 }; // suffix array access
44 {
45 sdsl_index.comp2char[0]
46 } -> std::same_as<uint8_t>;
47 {
48 sdsl_index.char2comp[0]
49 } -> std::same_as<uint8_t>;
50 {
51 sdsl_index.sigma
52 };
53 {
54 sdsl_index.C[0]
55 };
56
57 requires requires (t sdsl_index,
58 typename t::char_type const c,
59 typename t::size_type const lb,
60 typename t::size_type const rb,
61 sdsl::int_vector<8> const text) {
62 {
63 sdsl_index.bwt.rank(lb, c)
64 };
65 {
66 sdsl_index.wavelet_tree.lex_count(lb, rb, c)
67 };
68 {
69 sdsl::construct_im(sdsl_index, text, 0)
70 };
71 };
72 };
74
84} // namespace seqan3::detail
85
86namespace seqan3
87{
90enum text_layout : bool
91{
96};
97
98} // namespace seqan3
text_layout
The possible text layouts (single, collection) the seqan3::fm_index and seqan3::bi_fm_index can suppo...
Definition: concept.hpp:91
@ single
The text is a single range.
Definition: concept.hpp:93
@ collection
The text is a range of ranges.
Definition: concept.hpp:95
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Provides platform and dependency checks.