Lines Matching refs:depth

69   int depth;			/* Depth of this node from the root. */  member
114 kwset->trie->depth = 0; in kwsalloc()
133 register int depth; in kwsincr() local
154 depth = 1; in kwsincr()
158 links[depth] = link; in kwsincr()
160 dirs[depth++] = L, link = link->llink; in kwsincr()
162 dirs[depth++] = R, link = link->rlink; in kwsincr()
185 link->trie->depth = trie->depth + 1; in kwsincr()
191 if (dirs[--depth] == L) in kwsincr()
192 links[depth]->llink = link; in kwsincr()
194 links[depth]->rlink = link; in kwsincr()
197 while (depth && !links[depth]->balance) in kwsincr()
199 if (dirs[depth] == L) in kwsincr()
200 --links[depth]->balance; in kwsincr()
202 ++links[depth]->balance; in kwsincr()
203 --depth; in kwsincr()
207 if (depth && ((dirs[depth] == L && --links[depth]->balance) in kwsincr()
208 || (dirs[depth] == R && ++links[depth]->balance))) in kwsincr()
210 switch (links[depth]->balance) in kwsincr()
213 switch (dirs[depth + 1]) in kwsincr()
216 r = links[depth], t = r->llink, rl = t->rlink; in kwsincr()
221 r = links[depth], l = r->llink, t = l->rlink; in kwsincr()
233 switch (dirs[depth + 1]) in kwsincr()
236 l = links[depth], t = l->rlink, lr = t->llink; in kwsincr()
241 l = links[depth], r = l->rlink, t = r->llink; in kwsincr()
256 if (dirs[depth - 1] == L) in kwsincr()
257 links[depth - 1]->llink = t; in kwsincr()
259 links[depth - 1]->rlink = t; in kwsincr()
273 if (trie->depth < kwset->mind) in kwsincr()
274 kwset->mind = trie->depth; in kwsincr()
275 if (trie->depth > kwset->maxd) in kwsincr()
276 kwset->maxd = trie->depth; in kwsincr()
333 register unsigned int depth, in treedelta() argument
338 treedelta(tree->llink, depth, delta); in treedelta()
339 treedelta(tree->rlink, depth, delta); in treedelta()
340 if (depth < delta[tree->label]) in treedelta()
341 delta[tree->label] = depth; in treedelta()
432 treedelta(curr->links, curr->depth, delta); in kwsprep()
445 if (curr->depth - fail->depth < fail->shift) in kwsprep()
446 fail->shift = curr->depth - fail->depth; in kwsprep()
451 if (curr->accepting && fail->maxshift > curr->depth - fail->depth) in kwsprep()
452 fail->maxshift = curr->depth - fail->depth; in kwsprep()
732 kwsmatch->size[0] = accept->depth; in cwexec()