blob: 7bfb92468701cb726191fffb027127a12badd7e4 (
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
|
#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) const;
private:
shared_ptr<Vocabulary> vocabulary;
shared_ptr<DataArray> data_array;
shared_ptr<MatchingComparator> comparator;
};
#endif
|