SDSL  3.0.0
Succinct Data Structure Library
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 
13 namespace sdsl
14 {
15 
16 struct bv_tag
17 {}; // bitvector tag
18 struct iv_tag
19 {}; // int_vector tag
20 
21 struct csa_tag
22 {}; // compressed suffix array (CSAs) tag
23 struct cst_tag
24 {}; // compressed suffix tree (CST) tag
25 struct wt_tag
26 {}; // wavelet tree tag
27 
28 struct psi_tag
29 {}; // tag for CSAs based on the psi function
30 struct lf_tag
31 {}; // tag for CSAs based on the LF function
32 
34 {}; // tag for text, bwt, LF, \Psi members of CSA
35 
36 struct 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 
63 template <class t_T, class t_r = void>
65 {
66  typedef t_r type;
67 };
68 
69 template <class t_idx, class t_enable = void>
70 struct index_tag
71 {
72  typedef t_enable type;
73 };
74 
75 template <class t_idx>
76 struct 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 
81 template <class t_sampling, class t_enable = void>
83 {
84  typedef t_enable type;
85 };
86 
87 template <class t_sampling>
88 struct 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 
93 template <class t_enc_vec, class t_enable = void>
94 struct is_enc_vec
95 {
96  static constexpr bool value = false;
97 };
98 
99 template <class t_enc_vec>
100 struct 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 
105 template <class t_alphabet, class t_enable = void>
107 {
108  static constexpr bool value = false;
109 };
110 
111 template <class t_alphabet>
112 struct 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