Lines Matching defs:group
251 void addToSparseIndex (SparseIndexNode* group, const deUint32* words, size_t numWords, deUint32 index)
256 for (size_t childNdx = 0; childNdx < group->children.size(); childNdx++)
258 if (group->children[childNdx]->word == curWord)
260 child = group->children[childNdx];
269 group->children.reserve(group->children.size()+1);
270 group->children.push_back(new SparseIndexNode(curWord, numWords == 1 ? index : 0));
272 child = group->children.back();
283 void normalizeSparseIndex (SparseIndexNode* group)
287 for (size_t childNdx = 0; childNdx < group->children.size(); childNdx++)
289 normalizeSparseIndex(group->children[childNdx]);
291 if (group->children[childNdx]->word == 0)
301 while (zeroChildPos != (int)group->children.size()-1)
303 std::swap(group->children[zeroChildPos], group->children[zeroChildPos+1]);
307 else if (!group->children.empty())
309 group->children.reserve(group->children.size()+1);
310 group->children.push_back(new SparseIndexNode(0, 0));
314 deUint32 getIndexSize (const SparseIndexNode* group)
316 size_t numNodes = group->children.size();
318 for (size_t childNdx = 0; childNdx < group->children.size(); childNdx++)
319 numNodes += getIndexSize(group->children[childNdx]);
326 deUint32 addAndCountNodes (BinaryIndexNode* index, deUint32 baseOffset, const SparseIndexNode* group)
328 const deUint32 numLocalNodes = (deUint32)group->children.size();
332 DE_ASSERT(group->children.empty() || group->children.back()->word == 0);
336 const SparseIndexNode* child = group->children[childNdx];
548 // Even in empty index there is always terminating node for the root group