42 inline typename PB_DS_CLASS_C_DEC::point_iterator
44 find(key_const_reference r_key)
46 node_pointer p_found = find_imp(r_key);
47 if (p_found != base_type::m_p_head)
49 return point_iterator(p_found);
53 inline typename PB_DS_CLASS_C_DEC::point_const_iterator
55 find(key_const_reference r_key)
const
57 const node_pointer p_found = find_imp(r_key);
58 if (p_found != base_type::m_p_head)
59 const_cast<PB_DS_CLASS_C_DEC*
>(
this)->splay(p_found);
60 return point_iterator(p_found);
64 inline typename PB_DS_CLASS_C_DEC::node_pointer
66 find_imp(key_const_reference r_key)
68 _GLIBCXX_DEBUG_ONLY(base_type::structure_only_assert_valid(__FILE__,
70 node_pointer p_nd = base_type::m_p_head->m_p_parent;
72 if (!Cmp_Fn::operator()(PB_DS_V2F(p_nd->m_value), r_key))
74 if (!Cmp_Fn::operator()(r_key, PB_DS_V2F(p_nd->m_value)))
76 p_nd = p_nd->m_p_left;
79 p_nd = p_nd->m_p_right;
80 return base_type::m_p_head;
84 inline const typename PB_DS_CLASS_C_DEC::node_pointer
86 find_imp(key_const_reference r_key)
const
88 PB_DS_ASSERT_VALID((*
this))
89 node_pointer p_nd = base_type::m_p_head->m_p_parent;
91 if (!Cmp_Fn::operator()(PB_DS_V2F(p_nd->m_value), r_key))
93 if (!Cmp_Fn::operator()(r_key, PB_DS_V2F(p_nd->m_value)))
95 p_nd = p_nd->m_p_left;
98 p_nd = p_nd->m_p_right;
99 return base_type::m_p_head;