Lines Matching refs:TextIdx

27 typedef uint32_t TextIdx;  typedef
40 TextIdx to = 0; in rewriteText()
41 for (TextIdx from = 0; from < text->size(); ++from) { in rewriteText()
59 for (TextIdx i = 0; i < text->size(); ++i) { in remapTerminators()
76 std::vector<TextChar>* full_text, std::vector<TextIdx>* file_map, in buildFullText()
77 std::vector<TextIdx>* file_offset, TextChar* next_terminator) { in buildFullText()
81 for (TextIdx i = 0; i < data->size(); ++i) { in buildFullText()
93 static void buildLcp(std::vector<TextChar>* text, std::vector<TextIdx>* sa, in buildLcp()
94 std::vector<TextIdx>* lcp, std::vector<TextIdx>* invese_sa) { in buildLcp()
95 TextIdx size = static_cast<TextIdx>(text->size()); in buildLcp()
97 TextIdx k = 0; in buildLcp()
99 for (TextIdx i = 0; i < size; ++i) { in buildLcp()
105 TextIdx j = sa->at(invese_sa->at(i) + 1); in buildLcp()
118 TextIdx lcp;
119 TextIdx l;
120 TextIdx r;
125 static void poisonData(TextIdx pos, TextIdx length, in poisonData()
126 std::vector<std::vector<TextChar>>* data, std::vector<TextIdx>* file_map, in poisonData()
127 std::vector<TextIdx>* file_offset, TextChar* next_terminator) { in poisonData()
128 TextIdx f = file_map->at(pos / CHUNK_SIZE); in poisonData()
131 TextIdx l = (length == CUT_MATCH) ? CUT_MATCH : 1; in poisonData()
132 for (TextIdx j = 0; j < l; j++, pos++) { in poisonData()
147 static void cutMatch(std::vector<std::vector<TextChar>>* data, TextIdx index, in cutMatch()
148 TextIdx length, std::vector<TextIdx>* sa, std::vector<TextIdx>* lcp, in cutMatch()
149 std::vector<TextIdx>* invese_sa, TextChar* next_terminator, in cutMatch()
150 std::vector<TextIdx>* file_map, std::vector<TextIdx>* file_offset) { in cutMatch()
152 TextIdx i = index; in cutMatch()
172 TextIdx tmp = static_cast<TextIdx>(dictionary_size_limit); in DM_generate()
185 TextIdx offset = 0; in DM_generate()
189 TextIdx delta = static_cast<TextIdx>(sample_sizes[n]); in DM_generate()
198 TextIdx next_offset = offset + delta; in DM_generate()
212 std::vector<TextIdx> file_map; in DM_generate()
213 std::vector<TextIdx> file_offset; in DM_generate()
214 std::vector<TextIdx> sa; in DM_generate()
215 std::vector<TextIdx> invese_sa; in DM_generate()
216 std::vector<TextIdx> lcp; in DM_generate()
219 TextIdx total = 0; in DM_generate()
220 TextIdx total_cost = 0; in DM_generate()
221 TextIdx best_cost; in DM_generate()
226 TextIdx max_match = static_cast<TextIdx>(dictionary_size_limit) - total; in DM_generate()
233 for (TextIdx i = 0; i < full_text.size(); ++i) { in DM_generate()
245 for (TextIdx i = 0; i < lcp.size(); ++i) { in DM_generate()
246 TextIdx l = i; in DM_generate()
257 TextIdx effective_lcp = top.lcp; in DM_generate()
260 TextIdx cost = count * effective_lcp; in DM_generate()