Home | History | Annotate | Download | only in pat_trie_

Lines Matching refs:p_r

102 rec_join_prep(const_node_pointer p_l, const_node_pointer p_r, split_join_branch_bag& r_bag)
106 if (p_r->m_type == pat_trie_leaf_node_type)
109 static_cast<const_leaf_pointer>(p_r), r_bag);
113 _GLIBCXX_DEBUG_ASSERT(p_r->m_type == pat_trie_internal_node_type);
115 static_cast<const_internal_node_pointer>(p_r), r_bag);
120 if (p_r->m_type == pat_trie_leaf_node_type)
123 static_cast<const_leaf_pointer>(p_r), r_bag);
127 _GLIBCXX_DEBUG_ASSERT(p_r->m_type == pat_trie_internal_node_type);
130 static_cast<const_internal_node_pointer>(p_r), r_bag);
136 rec_join_prep(const_leaf_pointer /*p_l*/, const_leaf_pointer /*p_r*/,
143 rec_join_prep(const_leaf_pointer /*p_l*/, const_internal_node_pointer /*p_r*/,
150 rec_join_prep(const_internal_node_pointer /*p_l*/, const_leaf_pointer /*p_r*/,
157 rec_join_prep(const_internal_node_pointer p_l, const_internal_node_pointer p_r,
160 if (p_l->get_e_ind() == p_r->get_e_ind() &&
162 p_r->pref_b_it(), p_r->pref_e_it()))
164 for (typename internal_node::const_iterator it = p_r->begin();
165 it != p_r->end(); ++ it)
174 if (p_r->get_e_ind() < p_l->get_e_ind() &&
175 p_r->should_be_mine(p_l->pref_b_it(), p_l->pref_e_it(), 0, this))
177 const_node_pointer p_r_join_child = p_r->get_join_child(p_l, this);
183 if (p_r->get_e_ind() < p_l->get_e_ind() &&
184 p_r->should_be_mine(p_l->pref_b_it(), p_l->pref_e_it(), 0, this))
186 const_node_pointer p_r_join_child = p_r->get_join_child(p_l, this);
197 rec_join(node_pointer p_l, node_pointer p_r, size_type checked_ind, split_join_branch_bag& r_bag)
199 _GLIBCXX_DEBUG_ASSERT(p_r != 0);
202 apply_update(p_r, (node_update* )this);
203 return (p_r);
208 if (p_r->m_type == pat_trie_leaf_node_type)
211 static_cast<leaf_pointer>(p_r), r_bag);
216 _GLIBCXX_DEBUG_ASSERT(p_r->m_type == pat_trie_internal_node_type);
218 static_cast<internal_node_pointer>(p_r),
225 if (p_r->m_type == pat_trie_leaf_node_type)
228 static_cast<leaf_pointer>(p_r),
234 _GLIBCXX_DEBUG_ASSERT(p_r->m_type == pat_trie_internal_node_type);
236 static_cast<internal_node_pointer>(p_r),
246 rec_join(leaf_pointer p_l, leaf_pointer p_r, split_join_branch_bag& r_bag)
248 _GLIBCXX_DEBUG_ASSERT(p_r != 0);
250 return (p_r);
251 node_pointer p_ret = insert_branch(p_l, p_r, r_bag);
259 rec_join(leaf_pointer p_l, internal_node_pointer p_r, size_type checked_ind,
264 const size_type rhs_leafs = recursive_count_leafs(p_r);
267 _GLIBCXX_DEBUG_ASSERT(p_r != 0);
268 node_pointer p_ret = rec_join(p_r, p_l, checked_ind, r_bag);
276 rec_join(internal_node_pointer p_l, leaf_pointer p_r, size_type checked_ind, split_join_branch_bag& r_bag)
279 _GLIBCXX_DEBUG_ASSERT(p_r != 0);
283 const size_type rhs_leafs = recursive_count_leafs(p_r);
286 if (!p_l->should_be_mine(pref_begin(p_r), pref_end(p_r), checked_ind, this))
288 node_pointer p_ret = insert_branch(p_l, p_r, r_bag);
295 node_pointer p_pot_child = p_l->add_child(p_r, pref_begin(p_r),
296 pref_end(p_r), this);
297 if (p_pot_child != p_r)
299 node_pointer p_new_child = rec_join(p_pot_child, p_r, p_l->get_e_ind(),
314 rec_join(internal_node_pointer p_l, internal_node_pointer p_r, split_join_branch_bag& r_bag)
317 _GLIBCXX_DEBUG_ASSERT(p_r != 0);
321 const size_type rhs_leafs = recursive_count_leafs(p_r);
324 if (p_l->get_e_ind() == p_r->get_e_ind() &&
326 p_r->pref_b_it(), p_r->pref_e_it()))
328 for (typename internal_node::iterator it = p_r->begin();
329 it != p_r->end(); ++ it)
337 p_r->~internal_node();
338 s_internal_node_allocator.deallocate(p_r, 1);
344 if (p_l->get_e_ind() < p_r->get_e_ind() &&
345 p_l->should_be_mine(p_r->pref_b_it(), p_r->pref_e_it(), 0, this))
347 node_pointer p_new_child = rec_join(p_l->get_join_child(p_r, this),
348 p_r, 0, r_bag);
355 if (p_r->get_e_ind() < p_l->get_e_ind() &&
356 p_r->should_be_mine(p_l->pref_b_it(), p_l->pref_e_it(), 0, this))
358 node_pointer p_new_child = rec_join(p_r->get_join_child(p_l, this), p_l,
361 p_r->replace_child(p_new_child, pref_begin(p_new_child),
364 _GLIBCXX_DEBUG_ONLY(p_r->assert_valid(this);)
365 _GLIBCXX_DEBUG_ASSERT(recursive_count_leafs(p_r) == lhs_leafs + rhs_leafs);
366 return p_r;
369 node_pointer p_ret = insert_branch(p_l, p_r, r_bag);
432 insert_branch(node_pointer p_l, node_pointer p_r, split_join_branch_bag& r_bag)
436 typename synth_e_access_traits::const_iterator right_b_it = pref_begin(p_r);
437 typename synth_e_access_traits::const_iterator right_e_it = pref_end(p_r);
445 p_new_nd->add_child(p_r, right_b_it, right_e_it, this);
447 p_r->m_p_parent = p_new_nd;