blob: c3c7111e4d7694a54892b0df811f71a29c96706c (
plain)
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
|
#ifndef _LINEAR_MERGER_H_
#define _LINEAR_MERGER_H_
#include <memory>
#include <vector>
using namespace std;
class MatchingComparator;
class Phrase;
class PhraseLocation;
class DataArray;
class Vocabulary;
class LinearMerger {
public:
LinearMerger(shared_ptr<Vocabulary> vocabulary,
shared_ptr<DataArray> data_array,
shared_ptr<MatchingComparator> comparator);
virtual ~LinearMerger();
virtual void Merge(
vector<int>& locations, const Phrase& phrase, const Phrase& suffix,
vector<int>::iterator prefix_start, vector<int>::iterator prefix_end,
vector<int>::iterator suffix_start, vector<int>::iterator suffix_end,
int prefix_subpatterns, int suffix_subpatterns);
protected:
LinearMerger();
private:
shared_ptr<Vocabulary> vocabulary;
shared_ptr<DataArray> data_array;
shared_ptr<MatchingComparator> comparator;
};
#endif
|