libstdc++
__gnu_pbds::detail::pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc > Class Template Reference
Inheritance diagram for __gnu_pbds::detail::pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc >:

Public Types

typedef traits_type::access_traits access_traits
 
typedef _Alloc allocator_type
 
typedef std::pair< size_type,
size_type > 
comp_hash
 
typedef point_const_iterator const_iterator
 
typedef traits_base::const_pointer const_pointer
 
typedef
traits_base::const_reference 
const_reference
 
typedef
traits_type::const_reverse_iterator 
const_reverse_iterator
 
typedef pat_trie_tag container_category
 
typedef _Alloc::difference_type difference_type
 
typedef point_iterator iterator
 
typedef
traits_base::key_const_pointer 
key_const_pointer
 
typedef
traits_base::key_const_reference 
key_const_reference
 
typedef traits_base::key_pointer key_pointer
 
typedef traits_base::key_reference key_reference
 
typedef traits_base::key_type key_type
 
typedef
traits_base::mapped_const_pointer 
mapped_const_pointer
 
typedef
traits_base::mapped_const_reference 
mapped_const_reference
 
typedef traits_base::mapped_pointer mapped_pointer
 
typedef
traits_base::mapped_reference 
mapped_reference
 
typedef traits_base::mapped_type mapped_type
 
typedef __nothrowcopy::indicator no_throw_indicator
 
typedef
traits_type::node_const_iterator 
node_const_iterator
 
typedef traits_type::node_iterator node_iterator
 
enum  node_type { i_node, leaf_node, head_node }
 
typedef traits_type::node_update node_update
 
typedef traits_type::const_iterator point_const_iterator
 
typedef traits_type::iterator point_iterator
 
typedef traits_base::pointer pointer
 
typedef traits_base::reference reference
 
typedef
traits_type::reverse_iterator 
reverse_iterator
 
typedef _Alloc::size_type size_type
 
typedef integral_constant< int,
Store_Hash > 
store_extra
 
typedef traits_base::value_type value_type
 

Public Member Functions

 pat_trie_map (const access_traits &)
 
 pat_trie_map (const pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc > &)
 
iterator begin ()
 
const_iterator begin () const
 
void clear ()
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
bool erase (key_const_reference)
 
const_iterator erase (const_iterator)
 
iterator erase (iterator)
 
const_reverse_iterator erase (const_reverse_iterator)
 
reverse_iterator erase (reverse_iterator)
 
template<typename Pred >
pat_trie_map< Key, Mapped,
Node_And_It_Traits, _Alloc >
::size_type 
erase_if (Pred pred)
 
template<typename Pred >
size_type erase_if (Pred)
 
point_iterator find (key_const_reference)
 
point_const_iterator find (key_const_reference) const
 
access_traits & get_access_traits ()
 
const access_traits & get_access_traits () const
 
node_update & get_node_update ()
 
const node_update & get_node_update () const
 
std::pair< point_iterator, bool > insert (const_reference)
 
void join (pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc > &)
 
point_iterator lower_bound (key_const_reference)
 
point_const_iterator lower_bound (key_const_reference) const
 
size_type max_size () const
 
node_const_iterator node_begin () const
 
node_iterator node_begin ()
 
node_const_iterator node_end () const
 
node_iterator node_end ()
 
mapped_reference operator[] (key_const_reference r_key)
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
size_type size () const
 
void split (key_const_reference, pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc > &)
 
void swap (pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc > &)
 
point_iterator upper_bound (key_const_reference)
 
point_const_iterator upper_bound (key_const_reference) const
 

Public Attributes

no_throw_indicator m_no_throw_copies_indicator
 
store_extra m_store_extra_indicator
 

Protected Member Functions

template<typename It >
void copy_from_range (It, It)
 
node_pointer recursive_copy_node (node_const_pointer)
 
void value_swap (pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc > &)
 

Detailed Description

template<typename Key, typename Mapped, typename Node_And_It_Traits, typename _Alloc>
class __gnu_pbds::detail::pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc >

PATRICIA trie.

This implementation loosely borrows ideas from: 1) Fast Mergeable Integer Maps, Okasaki, Gill 1998 2) Ptset: Sets of integers implemented as Patricia trees, Jean-Christophe Filliatr, 2000.

Definition at line 102 of file pat_trie_.hpp.

Member Enumeration Documentation

Three types of nodes.

i_node is used by _Inode, leaf_node by _Leaf, and head_node by _Head.

Definition at line 58 of file pat_trie_base.hpp.

Member Function Documentation

template<typename Key , typename Mapped , typename Node_And_It_Traits , typename _Alloc >
pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc >::node_const_iterator __gnu_pbds::detail::pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc >::node_begin ( ) const
inline

Returns a const node_iterator corresponding to the node at the root of the tree.

Definition at line 101 of file pat_trie_.hpp.

template<typename Key , typename Mapped , typename Node_And_It_Traits , typename _Alloc >
pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc >::node_iterator __gnu_pbds::detail::pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc >::node_begin ( )
inline

Returns a node_iterator corresponding to the node at the root of the tree.

Definition at line 107 of file pat_trie_.hpp.

template<typename Key , typename Mapped , typename Node_And_It_Traits , typename _Alloc >
pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc >::node_const_iterator __gnu_pbds::detail::pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc >::node_end ( ) const
inline

Returns a const node_iterator corresponding to a node just after a leaf of the tree.

Definition at line 113 of file pat_trie_.hpp.

template<typename Key , typename Mapped , typename Node_And_It_Traits , typename _Alloc >
pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc >::node_iterator __gnu_pbds::detail::pat_trie_map< Key, Mapped, Node_And_It_Traits, _Alloc >::node_end ( )
inline

Returns a node_iterator corresponding to a node just after a leaf of the tree.

Definition at line 119 of file pat_trie_.hpp.


The documentation for this class was generated from the following file: