SDSL 3.0.1
Succinct Data Structure Library
Loading...
Searching...
No Matches
config.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.
4#ifndef SDSL_CONFIG
5#define SDSL_CONFIG
6
7#include <map>
8#include <string>
9
10#include <sdsl/uintx_t.hpp>
11
12#ifndef MSVC_COMPILER
13#define SDSL_UNUSED __attribute__((unused))
14#else
15#define SDSL_UNUSED
16#endif
17
18namespace sdsl
19{
20
21// forward declarations
22namespace util
23{
24template <typename T>
25std::string to_string(const T & t, int w = 1);
26uint64_t pid();
27uint64_t id();
28} // namespace util
29
30namespace conf // namespace for library constant
31{
32// size of the buffer for reading and writing data in elements (not in bytes)
33const uint64_t SDSL_BLOCK_SIZE = (uint64_t)1 << 22;
34
35constexpr char KEY_BWT[] = "bwt";
36constexpr char KEY_BWT_INT[] = "bwt_int";
37constexpr char KEY_SA[] = "sa";
38constexpr char KEY_CSA[] = "csa";
39constexpr char KEY_CST[] = "cst";
40constexpr char KEY_ISA[] = "isa";
41constexpr char KEY_TEXT[] = "text";
42constexpr char KEY_TEXT_INT[] = "text_int";
43constexpr char KEY_PSI[] = "psi";
44constexpr char KEY_LCP[] = "lcp";
45constexpr char KEY_SAMPLE_CHAR[] = "sample_char";
46} // namespace conf
47
48typedef uint64_t int_vector_size_type;
49
50typedef std::map<std::string, std::string> tMSS;
51
53{
57};
58
60{
63};
64
67{
68 bool delete_files; // Flag which indicates if all files which were created
69 bool delete_data; // Flag which indicates if the original data can be deleted
70 // during construction should be deleted.
71 std::string dir; // Directory for temporary files.
72 std::string id; // Identifier is part of temporary file names. If
73 // id is the empty string, then it will be replace
74 // a concatenation of PID and a unique ID inside the
75 // current process.
76 tMSS file_map; // Files stored during the construction process.
77 cache_config(bool f_delete_files = true, std::string f_dir = "./", std::string f_id = "", tMSS f_file_map = tMSS())
78 : delete_files(f_delete_files)
79 , delete_data(false)
80 , dir(f_dir)
81 , id(f_id)
82 , file_map(f_file_map)
83 {
85 }
86};
87
89template <uint8_t width, typename T = void>
91{
92 static const char * KEY_TEXT;
93};
94
95template <typename T>
97{
98 static const char * KEY_TEXT;
99};
100
101template <typename T>
103{
104 static const char * KEY_TEXT;
105};
106
108template <uint8_t width, typename T = void>
110{
111 static const char * KEY_BWT;
112};
113
114template <typename T>
116{
117 static const char * KEY_BWT;
118};
119
120template <typename T>
122{
123 static const char * KEY_BWT;
124};
125
126template <typename T>
128
129template <typename T>
131
132template <typename T>
134
135template <typename T>
137
138template <uint8_t width>
140
141template <uint8_t width>
143
144} // namespace sdsl
145
146#endif
constexpr char KEY_CSA[]
Definition: config.hpp:38
constexpr char KEY_SAMPLE_CHAR[]
Definition: config.hpp:45
constexpr char KEY_SA[]
Definition: config.hpp:37
constexpr char KEY_CST[]
Definition: config.hpp:39
const uint64_t SDSL_BLOCK_SIZE
Definition: config.hpp:33
constexpr char KEY_BWT_INT[]
Definition: config.hpp:36
constexpr char KEY_TEXT[]
Definition: config.hpp:41
constexpr char KEY_LCP[]
Definition: config.hpp:44
constexpr char KEY_TEXT_INT[]
Definition: config.hpp:42
constexpr char KEY_PSI[]
Definition: config.hpp:43
constexpr char KEY_ISA[]
Definition: config.hpp:40
constexpr char KEY_BWT[]
Definition: config.hpp:35
uint64_t id()
uint64_t pid()
std::string to_string(const T &t, int w=1)
Namespace for the succinct data structure library.
std::map< std::string, std::string > tMSS
Definition: config.hpp:50
byte_sa_algo_type
Definition: config.hpp:60
@ LIBDIVSUFSORT
Definition: config.hpp:61
@ SE_SAIS
Definition: config.hpp:62
uint64_t int_vector_size_type
Definition: config.hpp:48
format_type
Definition: config.hpp:53
@ JSON_FORMAT
Definition: config.hpp:54
@ R_FORMAT
Definition: config.hpp:55
@ HTML_FORMAT
Definition: config.hpp:56
Helper class for construction process.
Definition: config.hpp:67
cache_config(bool f_delete_files=true, std::string f_dir="./", std::string f_id="", tMSS f_file_map=tMSS())
Definition: config.hpp:77
std::string id
Definition: config.hpp:72
std::string dir
Definition: config.hpp:71
static const char * KEY_BWT
Definition: config.hpp:117
static const char * KEY_BWT
Definition: config.hpp:123
Helper classes to transform width=0 and width=8 to corresponding bwt key.
Definition: config.hpp:110
static const char * KEY_BWT
Definition: config.hpp:111
static const char * KEY_TEXT
Definition: config.hpp:98
static const char * KEY_TEXT
Definition: config.hpp:104
Helper classes to transform width=0 and width=8 to corresponding text key.
Definition: config.hpp:91
static const char * KEY_TEXT
Definition: config.hpp:92