-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSelfGrammarIndexPTS.h
59 lines (32 loc) · 1.51 KB
/
SelfGrammarIndexPTS.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// Created by alpachec on 20-09-18.
//
#ifndef IMPROVED_GRAMMAR_INDEX_SELFGRAMMARINDEXPTS_H
#define IMPROVED_GRAMMAR_INDEX_SELFGRAMMARINDEXPTS_H
#include "SelfGrammarIndexPT.h"
class SelfGrammarIndexPTS:SelfGrammarIndexPT{
protected:
uint8_t sampling;
public:
SelfGrammarIndexPTS(const uint8_t &);
virtual ~SelfGrammarIndexPTS();
void build(const std::string& ) override ;
void build(const SelfGrammarIndex::grammar_representation & G,
const SelfGrammarIndex::range_search2d & R,
const m_patricia::compact_patricia_tree &sfx,
const m_patricia::compact_patricia_tree &rules,
const unsigned int &);
unsigned long size_in_bytes() const override ;
void locate( std::string& , sdsl::bit_vector &) override ;
void locate( std::string & , std::vector<uint> & );
void locate2( std::string & , sdsl::bit_vector & );
auto get_grammar(){ return _g;}
void display(const std::size_t& , const std::size_t&, std::string & ) override ;
void save(std::fstream& ) override;
void load(std::fstream& ) override;
protected:
void sampling_range_suff(size_t& i, size_t& j, std::string::iterator& , std::string::iterator& )const;
void sampling_range_rules(size_t &i, size_t &j, std::string::iterator& , std::string::iterator& )const;
size_t _st(const size_t & i)const;
};
#endif //IMPROVED_GRAMMAR_INDEX_SELFGRAMMARINDEXPTS_H