Lines Matching refs:Active
21 Active.Node = Root;
103 if (Active.Len == 0) {
105 Active.Idx = EndIdx;
108 assert(Active.Idx <= EndIdx && "Start index can't be after end index!");
111 unsigned FirstChar = Str[Active.Idx];
114 if (Active.Node->Children.count(FirstChar) == 0) {
116 insertLeaf(*Active.Node, EndIdx, FirstChar);
121 NeedsLink->Link = Active.Node;
127 SuffixTreeNode *NextNode = Active.Node->Children[FirstChar];
133 if (Active.Len >= SubstringLen) {
136 Active.Idx += SubstringLen;
137 Active.Len -= SubstringLen;
138 Active.Node = NextNode;
147 if (Str[NextNode->StartIdx + Active.Len] == LastChar) {
151 if (NeedsLink && !Active.Node->isRoot()) {
152 NeedsLink->Link = Active.Node;
156 Active.Len++;
175 insertInternalNode(Active.Node, NextNode->StartIdx,
176 NextNode->StartIdx + Active.Len - 1, FirstChar);
184 NextNode->StartIdx += Active.Len;
198 if (Active.Node->isRoot()) {
199 if (Active.Len > 0) {
200 Active.Len--;
201 Active.Idx = EndIdx - SuffixesToAdd + 1;
205 Active.Node = Active.Node->Link;