SDSL 3.0.1
Succinct Data Structure Library
Loading...
Searching...
No Matches
sdsl_concepts.hpp
Go to the documentation of this file.
1// Copyright (c) 2016, the SDSL Project Authors. All rights reserved.
2// Please see the AUTHORS file for details. Use of this source code is governed
3// by a BSD license that can be found in the LICENSE file.
8#ifndef INCLUDED_SDSL_CONCEPTS
9#define INCLUDED_SDSL_CONCEPTS
10
11#include <sdsl/uintx_t.hpp> // for uint8_t
12
13namespace sdsl
14{
15
16struct bv_tag
17{}; // bitvector tag
18struct iv_tag
19{}; // int_vector tag
20
21struct csa_tag
22{}; // compressed suffix array (CSAs) tag
23struct cst_tag
24{}; // compressed suffix tree (CST) tag
25struct wt_tag
26{}; // wavelet tree tag
27
28struct psi_tag
29{}; // tag for CSAs based on the psi function
30struct lf_tag
31{}; // tag for CSAs based on the LF function
32
34{}; // tag for text, bwt, LF, \Psi members of CSA
35
36struct lcp_tag
37{};
39{};
41{};
43{};
45{};
46
48{};
50{
51 static const uint8_t WIDTH = 8;
52};
54{
55 static const uint8_t WIDTH = 0;
56};
57
59{};
61{};
62
63template <class t_T, class t_r = void>
65{
66 typedef t_r type;
67};
68
69template <class t_idx, class t_enable = void>
71{
72 typedef t_enable type;
73};
74
75template <class t_idx>
76struct index_tag<t_idx, typename enable_if_type<typename t_idx::index_category>::type>
77{
78 using type = typename t_idx::index_category;
79};
80
81template <class t_sampling, class t_enable = void>
83{
84 typedef t_enable type;
85};
86
87template <class t_sampling>
88struct sampling_tag<t_sampling, typename enable_if_type<typename t_sampling::sampling_category>::type>
89{
90 using type = typename t_sampling::sampling_category;
91};
92
93template <class t_enc_vec, class t_enable = void>
95{
96 static constexpr bool value = false;
97};
98
99template <class t_enc_vec>
100struct is_enc_vec<t_enc_vec, typename enable_if_type<typename t_enc_vec::enc_vec_type>::type>
101{
102 static constexpr bool value = true;
103};
104
105template <class t_alphabet, class t_enable = void>
107{
108 static constexpr bool value = false;
109};
110
111template <class t_alphabet>
112struct is_alphabet<t_alphabet, typename enable_if_type<typename t_alphabet::alphabet_category>::type>
113{
114 static constexpr bool value = true;
115};
116
117} // end namespace sdsl
118
119#endif
Namespace for the succinct data structure library.
static const uint8_t WIDTH
static const uint8_t WIDTH
static constexpr bool value
static constexpr bool value