65 #ifdef PB_DS_DATA_TRUE_INDICATOR
66 #define PB_DS_PAT_TRIE_NAME pat_trie_map
69 #ifdef PB_DS_DATA_FALSE_INDICATOR
70 #define PB_DS_PAT_TRIE_NAME pat_trie_set
73 #define PB_DS_CLASS_T_DEC \
74 template<typename Key, typename Mapped, typename Node_And_It_Traits, \
77 #define PB_DS_CLASS_C_DEC \
78 PB_DS_PAT_TRIE_NAME<Key, Mapped, Node_And_It_Traits, _Alloc>
80 #define PB_DS_PAT_TRIE_TRAITS_BASE \
81 types_traits<Key, Mapped, _Alloc, false>
84 #define PB_DS_DEBUG_MAP_BASE_C_DEC \
85 debug_map_base<Key, eq_by_less<Key, std::less<Key> >, \
86 typename _Alloc::template rebind<Key>::other::const_reference>
99 template<
typename Key,
typename Mapped,
typename Node_And_It_Traits,
102 #ifdef _GLIBCXX_DEBUG
103 public PB_DS_DEBUG_MAP_BASE_C_DEC,
105 public Node_And_It_Traits::synth_access_traits,
106 public Node_And_It_Traits::node_update,
118 typedef typename traits_type::node
node;
123 typedef typename traits_type::head
head;
128 typedef typename traits_type::leaf
leaf;
134 typedef typename traits_type::inode
inode;
184 #ifdef _GLIBCXX_DEBUG
185 typedef std::_GLIBCXX_STD_C::list<__inp, __rebind_inp>
bag_type;
198 m_bag.push_back(p_nd);
218 while (!
m_bag.empty())
228 {
return m_bag.empty(); }
231 #ifdef _GLIBCXX_DEBUG
232 typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
254 typedef typename traits_base::pointer
pointer;
303 inline std::pair<point_iterator, bool>
309 #ifdef PB_DS_DATA_TRUE_INDICATOR
313 return traits_base::s_null_type;
344 #ifdef PB_DS_DATA_TRUE_INDICATOR
352 #ifdef PB_DS_DATA_TRUE_INDICATOR
357 template<
typename Pred>
411 #ifdef PB_DS_PAT_TRIE_TRACE_
417 template<
typename It>
434 template<
typename Node_Update_>
473 typename access_traits::const_iterator,
474 typename access_traits::const_iterator,
475 typename access_traits::const_iterator);
525 #ifdef _GLIBCXX_DEBUG
527 assert_valid(
const char*,
int)
const;
530 assert_iterators(
const char*,
int)
const;
533 assert_reverse_iterators(
const char*,
int)
const;
539 #ifdef PB_DS_PAT_TRIE_TRACE_
543 template<
typename Metadata_>
570 #define PB_DS_ASSERT_NODE_VALID(X) \
571 _GLIBCXX_DEBUG_ONLY(X->assert_valid(this, __FILE__, __LINE__);)
573 #define PB_DS_RECURSIVE_COUNT_LEAFS(X) \
574 recursive_count_leafs(X, __FILE__, __LINE__)
588 #undef PB_DS_RECURSIVE_COUNT_LEAFS
589 #undef PB_DS_ASSERT_NODE_VALID
590 #undef PB_DS_CLASS_C_DEC
591 #undef PB_DS_CLASS_T_DEC
592 #undef PB_DS_PAT_TRIE_NAME
593 #undef PB_DS_PAT_TRIE_TRAITS_BASE
594 #undef PB_DS_DEBUG_MAP_BASE_C_DEC
leaf_pointer split_prep(key_const_reference, PB_DS_CLASS_C_DEC &, branch_bag &)
traits_base::mapped_type mapped_type
Definition: pat_trie_.hpp:248
point_const_iterator const_iterator
Definition: pat_trie_.hpp:262
void value_swap(PB_DS_CLASS_C_DEC &)
PB_DS_PAT_TRIE_TRAITS_BASE traits_base
Definition: pat_trie_.hpp:112
traits_base::reference reference
Definition: pat_trie_.hpp:256
__rebind_n::other::pointer node_pointer
Definition: pat_trie_.hpp:121
traits_type::node_update node_update
Definition: pat_trie_.hpp:269
__rebind_l::other leaf_allocator
Definition: pat_trie_.hpp:130
traits_base::key_reference key_reference
Definition: pat_trie_.hpp:246
__rebind_n::other::const_pointer node_const_pointer
Definition: pat_trie_.hpp:120
traits_type::inode inode
Definition: pat_trie_.hpp:134
size_type m_size
Definition: pat_trie_.hpp:567
pat_trie_tag container_category
Definition: pat_trie_.hpp:238
node_pointer recursive_copy_node(node_const_pointer)
node_const_iterator node_begin() const
traits_type::null_node_update_pointer null_node_update_pointer
Definition: pat_trie_.hpp:235
traits_type::iterator point_iterator
Definition: pat_trie_.hpp:261
traits_base::key_type key_type
Definition: pat_trie_.hpp:243
#define false
Definition: stdbool.h:35
bool empty() const
Definition: pat_trie_.hpp:227
traits_base::key_const_pointer key_const_pointer
Definition: pat_trie_.hpp:245
static leaf_allocator s_leaf_allocator
Definition: pat_trie_.hpp:564
static a_const_iterator pref_end(node_const_pointer)
Branch bag, for split-join.
Definition: pat_trie_.hpp:178
node_pointer upper_bound_imp(key_const_reference)
bool join_prep(PB_DS_CLASS_C_DEC &, branch_bag &)
#define __try
Definition: exception_defines.h:35
traits_type::node_const_iterator node_const_iterator
Definition: pat_trie_.hpp:267
traits_base::pointer pointer
Definition: pat_trie_.hpp:254
#define _GLIBCXX_DEBUG_ASSERT(_Condition)
Definition: debug.h:61
#define __throw_exception_again
Definition: exception_defines.h:37
bool erase(key_const_reference)
_Alloc::template rebind< leaf > __rebind_l
Definition: pat_trie_.hpp:129
void update_min_max_for_erased_leaf(leaf_pointer)
inode_pointer insert_branch(node_pointer, node_pointer, branch_bag &)
traits_base::key_const_reference key_const_reference
Definition: pat_trie_.hpp:247
std::list< __inp, __rebind_inp > bag_type
Definition: pat_trie_.hpp:187
head_pointer m_p_head
Definition: pat_trie_.hpp:566
Node_And_It_Traits traits_type
Definition: pat_trie_.hpp:113
std::pair< point_iterator, bool > insert(const_reference)
traits_type::node_iterator node_iterator
Definition: pat_trie_.hpp:268
traits_base::key_pointer key_pointer
Definition: pat_trie_.hpp:244
cond_dealtor(leaf_pointer p_nd)
Definition: pat_trie_.hpp:152
void erase_fixup(inode_pointer)
_Alloc::difference_type difference_type
Definition: pat_trie_.hpp:241
void split(key_const_reference, PB_DS_CLASS_C_DEC &)
traits_type::reverse_iterator reverse_iterator
Definition: pat_trie_.hpp:265
Base type for PATRICIA trees.
Definition: pat_trie_base.hpp:51
inode::iterator inode_iterator
Definition: pat_trie_.hpp:135
base_type::const_iterator const_iterator
Definition: synth_access_traits.hpp:62
Conditional deallocator.
Definition: pat_trie_.hpp:144
node_pointer find_imp(key_const_reference)
void swap(PB_DS_CLASS_C_DEC &)
__rebind_in::other __rebind_ina
Definition: pat_trie_.hpp:137
static head_allocator s_head_allocator
Definition: pat_trie_.hpp:562
void add_branch()
Definition: pat_trie_.hpp:193
__rebind_ina::pointer inode_pointer
Definition: pat_trie_.hpp:139
size_type keys_diff_ind(typename access_traits::const_iterator, typename access_traits::const_iterator, typename access_traits::const_iterator, typename access_traits::const_iterator)
node_pointer rec_split(node_pointer, a_const_iterator, a_const_iterator, PB_DS_CLASS_C_DEC &, branch_bag &)
_Alloc::template rebind< inode > __rebind_in
Definition: pat_trie_.hpp:136
leaf_pointer m_p_nd
Definition: pat_trie_.hpp:147
node_pointer lower_bound_imp(key_const_reference)
point_iterator iterator
Definition: pat_trie_.hpp:263
__rebind_ina::const_pointer inode_const_pointer
Definition: pat_trie_.hpp:140
traits_base::const_reference const_reference
Definition: pat_trie_.hpp:257
void set_no_action_dtor()
Definition: pat_trie_.hpp:157
PATRICIA trie.
Definition: tag_and_trait.hpp:165
void apply_update(node_pointer, null_node_update_pointer)
bool m_call_destructor
Definition: pat_trie_.hpp:149
traits_base::mapped_pointer mapped_pointer
Definition: pat_trie_.hpp:249
synth_access_traits::const_iterator a_const_iterator
Definition: pat_trie_.hpp:116
~cond_dealtor()
Definition: pat_trie_.hpp:164
void copy_from_range(It, It)
Definition: type_utils.hpp:160
bool m_no_action_dtor
Definition: pat_trie_.hpp:148
void join(PB_DS_CLASS_C_DEC &)
node_pointer rec_join(node_pointer, node_pointer, size_type, branch_bag &)
void actual_erase_leaf(leaf_pointer)
void erase_leaf(leaf_pointer)
~branch_bag()
Definition: pat_trie_.hpp:216
node_update & get_node_update()
head_allocator::pointer head_pointer
Definition: pat_trie_.hpp:126
point_iterator find(key_const_reference)
reverse_iterator rbegin()
node_const_iterator node_end() const
traits_base::mapped_const_reference mapped_const_reference
Definition: pat_trie_.hpp:252
traits_type::const_iterator point_const_iterator
Definition: pat_trie_.hpp:260
static inode_allocator s_inode_allocator
Definition: pat_trie_.hpp:563
void rec_join_prep(node_const_pointer, node_const_pointer, branch_bag &)
traits_type::head head
Definition: pat_trie_.hpp:123
traits_type::leaf leaf
Definition: pat_trie_.hpp:128
__rebind_h::other head_allocator
Definition: pat_trie_.hpp:125
point_iterator upper_bound(key_const_reference)
traits_type::synth_access_traits synth_access_traits
Definition: pat_trie_.hpp:115
traits_type::access_traits access_traits
Definition: pat_trie_.hpp:259
_Alloc::template rebind< __inp >::other __rebind_inp
Definition: pat_trie_.hpp:182
static leaf_const_pointer rightmost_descendant(node_const_pointer)
_Alloc::template rebind< node > __rebind_n
Definition: pat_trie_.hpp:119
void split_insert_branch(size_type, a_const_iterator, inode_iterator, size_type, branch_bag &)
traits_type::const_reverse_iterator const_reverse_iterator
Definition: pat_trie_.hpp:266
#define __catch(X)
Definition: exception_defines.h:36
_Alloc allocator_type
Definition: pat_trie_.hpp:239
inode_pointer get_branch()
Definition: pat_trie_.hpp:208
void set_call_destructor()
Definition: pat_trie_.hpp:161
__rebind_in::other inode_allocator
Definition: pat_trie_.hpp:138
#define PB_DS_PAT_TRIE_TRAITS_BASE
Definition: pat_trie_.hpp:80
pat_trie_base base_type
Definition: pat_trie_.hpp:111
size_type max_size() const
traits_base::mapped_reference mapped_reference
Definition: pat_trie_.hpp:251
traits_type::node node
Definition: pat_trie_.hpp:118
void update_min_max_for_inserted_leaf(leaf_pointer)
static a_const_iterator pref_begin(node_const_pointer)
PATRICIA trie.This implementation loosely borrows ideas from: 1) Fast Mergeable Integer Maps...
Definition: pat_trie_.hpp:101
access_traits & get_access_traits()
point_iterator lower_bound(key_const_reference)
leaf_allocator::const_pointer leaf_const_pointer
Definition: pat_trie_.hpp:132
traits_base::const_pointer const_pointer
Definition: pat_trie_.hpp:255
void clear_imp(node_pointer)
traits_base::mapped_const_pointer mapped_const_pointer
Definition: pat_trie_.hpp:250
inode_pointer __inp
Definition: pat_trie_.hpp:181
leaf_allocator::pointer leaf_pointer
Definition: pat_trie_.hpp:131
mapped_reference operator[](key_const_reference r_key)
Definition: pat_trie_.hpp:307
_Alloc::size_type size_type
Definition: pat_trie_.hpp:240
bag_type m_bag
Definition: pat_trie_.hpp:190
#define PB_DS_CLASS_C_DEC
Definition: pat_trie_.hpp:77
static leaf_const_pointer leftmost_descendant(node_const_pointer)
_Alloc::template rebind< head > __rebind_h
Definition: pat_trie_.hpp:124
traits_base::value_type value_type
Definition: pat_trie_.hpp:253