Lines Matching full:active
33 Active.Node = Root;
185 if (Active.Len == 0) {
186 // If not, then say the active index is the end index.
187 Active.Idx = EndIdx;
190 assert(Active.Idx <= EndIdx && "Start index can't be after end index!");
193 unsigned FirstChar = Str[Active.Idx];
196 if (Active.Node->Children.count(FirstChar) == 0) {
198 insertLeaf(*Active.Node, EndIdx, FirstChar);
200 // The active node is an internal node, and we visited it, so it must
203 NeedsLink->setLink(Active.Node);
209 SuffixTreeNode *NextNode = Active.Node->Children[FirstChar];
215 if (Active.Len >= SubstringLen) {
220 Active.Idx += SubstringLen;
221 Active.Len -= SubstringLen;
222 Active.Node = cast<SuffixTreeInternalNode>(NextNode);
231 if (Str[NextNode->getStartIdx() + Active.Len] == LastChar) {
235 if (NeedsLink && !Active.Node->isRoot()) {
236 NeedsLink->setLink(Active.Node);
240 Active.Len++;
259 Active.Node, NextNode->getStartIdx(),
260 NextNode->getStartIdx() + Active.Len - 1, FirstChar);
268 NextNode->incrementStartIdx(Active.Len);
282 if (Active.Node->isRoot()) {
283 if (Active.Len > 0) {
284 Active.Len--;
285 Active.Idx = EndIdx - SuffixesToAdd + 1;
289 Active.Node = Active.Node->getLink();