• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/tre-0.8.0/lib/

Lines Matching defs:reach

82 /* Prints the `reach' array in a readable fashion with DPRINT. */
84 tre_print_reach(const tre_tnfa_t *tnfa, tre_tnfa_approx_reach_t *reach,
90 DPRINT((" reach:\n"));
94 if (reach[id].pos < pos)
97 for (i = 0; i <= reach[id].depth; i++)
102 DPRINT(("%2d", reach[id].costs[i][j]));
107 if (i + 1 <= reach[id].depth)
113 DPRINT(("%02d", reach[id].tags[i]));
124 /* Sets the matching parameters in `reach' to the ones defined in the `pa'
128 tre_set_params(tre_tnfa_approx_reach_t *reach,
137 if (value > reach->depth)
140 for (i = reach->depth + 1; i <= value; i++)
142 reach->costs[i][j] = 0;
144 reach->depth = value;
149 reach->params.cost_ins = default_params.cost_ins;
151 reach->params.cost_ins = value;
156 reach->params.cost_del = default_params.cost_del;
158 reach->params.cost_del = value;
163 reach->params.cost_subst = default_params.cost_subst;
165 reach->params.cost_subst = value;
170 reach->params.max_cost = default_params.max_cost;
172 reach->params.max_cost = value;
177 reach->params.max_ins = default_params.max_ins;
179 reach->params.max_ins = value;
184 reach->params.max_del = default_params.max_del;
186 reach->params.max_del = value;
191 reach->params.max_subst = default_params.max_subst;
193 reach->params.max_subst = value;
198 reach->params.max_err = default_params.max_err;
200 reach->params.max_err = value;
229 /* The reach tables. */
230 tre_tnfa_approx_reach_t *reach, *reach_next;
271 /* Space needed for one reach table. */
294 /* Allocate `reach' from `buf'. */
295 reach = (void *)buf_cursor;
304 /* Allocate tag arrays for `reach' and `reach_next' from `buf'. */
307 reach[i].tags = (void *)buf_cursor;
318 /* Mark the reach arrays empty. */
320 reach[i].pos = reach_next[i].pos = -2;
388 transition from each state in `reach' back to the same state.
396 if (reach[id].pos != prev_pos)
402 depth = reach[id].depth;
405 cost = reach[id].costs[depth][TRE_M_COST];
406 if (reach[id].params.cost_ins != TRE_PARAM_UNSET)
407 cost += reach[id].params.cost_ins;
408 if (cost > reach[id].params.max_cost)
412 if (reach[id].costs[depth][TRE_M_NUM_INS] + 1
413 > reach[id].params.max_ins)
417 if (reach[id].costs[depth][TRE_M_NUM_ERR] + 1
418 > reach[id].params.max_err)
425 cost0 = reach[id].costs[0][TRE_M_COST];
426 if (reach[id].params.cost_ins != TRE_PARAM_UNSET)
427 cost0 += reach[id].params.cost_ins;
433 reach[id].costs[depth][TRE_M_COST]));
443 reach_next[id].state = reach[id].state;
446 reach_next[id].tags[i] = reach[id].tags[i];
447 reach_next[id].params = reach[id].params;
448 reach_next[id].depth = reach[id].depth;
451 memcpy(reach_next[id].costs, reach[id].costs,
649 /* Swap `reach' and `reach_next'. */
652 tmp = reach;
653 reach = reach_next;
662 if (reach[id].pos < prev_pos)
664 for (trans = reach[id].state; trans->state; trans++)
678 depth = reach[id].depth;
681 cost = reach[id].costs[depth][TRE_M_COST];
682 cost0 = reach[id].costs[0][TRE_M_COST];
694 cost = reach[id].costs[depth][TRE_M_COST];
695 if (reach[id].params.cost_subst != TRE_PARAM_UNSET)
696 cost += reach[id].params.cost_subst;
697 if (cost > reach[id].params.max_cost)
701 if (reach[id].costs[depth][TRE_M_NUM_SUBST] + 1
702 > reach[id].params.max_subst)
706 if (reach[id].costs[depth][TRE_M_NUM_ERR] + 1
707 > reach[id].params.max_err)
714 cost0 = reach[id].costs[0][TRE_M_COST];
715 if (reach[id].params.cost_subst != TRE_PARAM_UNSET)
716 cost0 += reach[id].params.cost_subst;
729 tmp_tags[i] = reach[id].tags[i];
756 reach_next[dest_id].depth = reach[id].depth;
759 reach_next[dest_id].params = reach[id].params;
766 reach[id].costs,
767 sizeof(reach[id].costs[0][0])