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 | f528ac27dab11770f01595b043675dba2947a263 (patch) | |
tree | 0f340a74879772fc8a5d8c4484df27457f25f11e /extractor/data_array.h | |
parent | 79206291f78fba893fda6a61ff0ae9264d00bb82 (diff) |
Reduce memory overhead for constructing the intersector.
Diffstat (limited to 'extractor/data_array.h')
-rw-r--r-- | extractor/data_array.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/extractor/data_array.h b/extractor/data_array.h index 5207366d..e3823d18 100644 --- a/extractor/data_array.h +++ b/extractor/data_array.h @@ -51,7 +51,7 @@ class DataArray { virtual ~DataArray(); // Returns a vector containing the word ids. - virtual const vector<int>& GetData() const; + virtual vector<int> GetData() const; // Returns the word id at the specified position. virtual int AtIndex(int index) const; @@ -59,6 +59,14 @@ class DataArray { // Returns the original word at the specified position. virtual string GetWordAtIndex(int index) const; + // Returns the substring of word ids starting at the specified position and + // having the specified length. + virtual vector<int> GetWordIds(int start_index, int size) const; + + // Returns the substring of words starting at the specified position and + // having the specified length. + virtual vector<string> GetWords(int start_index, int size) const; + // Returns the size of the data array. virtual int GetSize() const; |