diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-11-24 13:19:28 +0000 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-11-24 16:26:49 +0000 |
commit | 0d1f0af81ad2a368bc3216451a87111be8b9f6f5 (patch) | |
tree | 15d54f0ae8e79ffff5e06d66799855dd8bd37a63 /extractor/mocks | |
parent | 9cc2e002a064a2e14444669178126d1e96be8230 (diff) |
Reduce memory overhead for constructing the intersector.
Diffstat (limited to 'extractor/mocks')
-rw-r--r-- | extractor/mocks/mock_data_array.h | 4 | ||||
-rw-r--r-- | extractor/mocks/mock_precomputation.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/extractor/mocks/mock_data_array.h b/extractor/mocks/mock_data_array.h index 6f85abb4..4bdcf21f 100644 --- a/extractor/mocks/mock_data_array.h +++ b/extractor/mocks/mock_data_array.h @@ -6,9 +6,11 @@ namespace extractor { class MockDataArray : public DataArray { public: - MOCK_CONST_METHOD0(GetData, const vector<int>&()); + MOCK_CONST_METHOD0(GetData, vector<int>()); MOCK_CONST_METHOD1(AtIndex, int(int index)); MOCK_CONST_METHOD1(GetWordAtIndex, string(int index)); + MOCK_CONST_METHOD2(GetWordIds, vector<int>(int start_index, int size)); + MOCK_CONST_METHOD2(GetWords, vector<string>(int start_index, int size)); MOCK_CONST_METHOD0(GetSize, int()); MOCK_CONST_METHOD0(GetVocabularySize, int()); MOCK_CONST_METHOD1(HasWord, bool(const string& word)); diff --git a/extractor/mocks/mock_precomputation.h b/extractor/mocks/mock_precomputation.h index 8753343e..5f7aa999 100644 --- a/extractor/mocks/mock_precomputation.h +++ b/extractor/mocks/mock_precomputation.h @@ -6,7 +6,8 @@ namespace extractor { class MockPrecomputation : public Precomputation { public: - MOCK_CONST_METHOD0(GetCollocations, const Index&()); + MOCK_CONST_METHOD1(Contains, bool(const vector<int>& pattern)); + MOCK_CONST_METHOD1(GetCollocations, vector<int>(const vector<int>& pattern)); }; } // namespace extractor |