PB_DS_CLASS_T_DEC
std::pair<
  typename PB_DS_CLASS_C_DEC::iterator,
  typename PB_DS_CLASS_C_DEC::iterator>
PB_DS_CLASS_C_DEC::
prefix_range(typename e_access_traits::const_iterator b, typename e_access_traits::const_iterator e)
{
  Node_Iterator nd_it = node_begin();
  Node_Iterator end_nd_it = node_end();

  const e_access_traits& r_traits =
    get_e_access_traits();

  const size_type given_range_length = std::distance(b, e);

  while (true)
    {
      if (nd_it == end_nd_it)
	return (std::make_pair(end(), end()));

      const size_type common_range_length =
	PB_DS_BASE_C_DEC::common_prefix_len(nd_it, b, e, r_traits);

      if (common_range_length >= given_range_length)
        {
	  iterator ret_b = leftmost_it(nd_it);

	  iterator ret_e = rightmost_it(nd_it);

	  return (std::make_pair(ret_b, ++ret_e));
        }

      nd_it = next_child(nd_it, b, e, end_nd_it, r_traits);
    }
}
    PB_DS_CLASS_T_DEC
    typename PB_DS_CLASS_C_DEC::iterator
    PB_DS_CLASS_C_DEC::
    rightmost_it(node_iterator nd_it)
    {
      const size_type num_children = nd_it.num_children();

      if (num_children == 0)
	return (*nd_it);

      return (rightmost_it(nd_it.get_child(num_children - 1)));
    }