STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Types | List of all members
__gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc > Class Template Reference

#include <ext/pb_ds/assoc_container.hpp>

Inheritance diagram for __gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >:

Public Types

typedef _ATraits access_traits
 Element access traits type. More...
 

Public Member Functions

 trie ()
 
 trie (const access_traits &t)
 
template<typename It >
 trie (It first, It last)
 
template<typename It >
 trie (It first, It last, const access_traits &t)
 
 trie (const trie &other)
 
virtual ~trie ()
 
trieoperator= (const trie &other)
 
void swap (trie &other)
 

Private Types

typedef PB_DS_TRIE_BASE base_type
 

Detailed Description

template<typename Key, typename Mapped, typename _ATraits = typename detail::default_trie_access_traits<Key>::type, typename Tag = pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename _ATraits_, typename _Alloc_ > class Node_Update = null_node_update, typename _Alloc = std::allocator<char>>
class __gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >

A trie-based container.

Template Parameters
KeyKey type.
MappedMap type.
_ATraitsElement access traits.
TagInstantiating data structure type, see container_tag.
Node_UpdateUpdates trie internal-nodes, restores invariants when invalidated. XXX See design::tree-based-containers::node invariants.
_AllocAllocator type.

Base tag choice is pat_trie_tag.

Base is basic_branch.

Member Typedef Documentation

template<typename Key , typename Mapped , typename _ATraits = typename detail::default_trie_access_traits<Key>::type, typename Tag = pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename _ATraits_, typename _Alloc_ > class Node_Update = null_node_update, typename _Alloc = std::allocator<char>>
typedef _ATraits __gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::access_traits

Element access traits type.

template<typename Key , typename Mapped , typename _ATraits = typename detail::default_trie_access_traits<Key>::type, typename Tag = pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename _ATraits_, typename _Alloc_ > class Node_Update = null_node_update, typename _Alloc = std::allocator<char>>
typedef PB_DS_TRIE_BASE __gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::base_type
private

Constructor & Destructor Documentation

template<typename Key , typename Mapped , typename _ATraits = typename detail::default_trie_access_traits<Key>::type, typename Tag = pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename _ATraits_, typename _Alloc_ > class Node_Update = null_node_update, typename _Alloc = std::allocator<char>>
__gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::trie ( )
inline
740 { }
template<typename Key , typename Mapped , typename _ATraits = typename detail::default_trie_access_traits<Key>::type, typename Tag = pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename _ATraits_, typename _Alloc_ > class Node_Update = null_node_update, typename _Alloc = std::allocator<char>>
__gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::trie ( const access_traits t)
inline

Constructor taking some policy objects. r_access_traits will be copied by the _ATraits object of the container object.

745  : base_type(t) { }
PB_DS_TRIE_BASE base_type
Definition: assoc_container.hpp:734
template<typename Key , typename Mapped , typename _ATraits = typename detail::default_trie_access_traits<Key>::type, typename Tag = pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename _ATraits_, typename _Alloc_ > class Node_Update = null_node_update, typename _Alloc = std::allocator<char>>
template<typename It >
__gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::trie ( It  first,
It  last 
)
inline

Constructor taking __iterators to a range of value_types. The value_types between first_it and last_it will be inserted into the container object.

752  { base_type::copy_from_range(first, last); }
template<typename Key , typename Mapped , typename _ATraits = typename detail::default_trie_access_traits<Key>::type, typename Tag = pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename _ATraits_, typename _Alloc_ > class Node_Update = null_node_update, typename _Alloc = std::allocator<char>>
template<typename It >
__gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::trie ( It  first,
It  last,
const access_traits t 
)
inline

Constructor taking __iterators to a range of value_types and some policy objects. The value_types between first_it and last_it will be inserted into the container object.

759  : base_type(t)
760  { base_type::copy_from_range(first, last); }
PB_DS_TRIE_BASE base_type
Definition: assoc_container.hpp:734
template<typename Key , typename Mapped , typename _ATraits = typename detail::default_trie_access_traits<Key>::type, typename Tag = pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename _ATraits_, typename _Alloc_ > class Node_Update = null_node_update, typename _Alloc = std::allocator<char>>
__gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::trie ( const trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc > &  other)
inline
763  : base_type((const base_type&)other) { }
PB_DS_TRIE_BASE base_type
Definition: assoc_container.hpp:734
template<typename Key , typename Mapped , typename _ATraits = typename detail::default_trie_access_traits<Key>::type, typename Tag = pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename _ATraits_, typename _Alloc_ > class Node_Update = null_node_update, typename _Alloc = std::allocator<char>>
virtual __gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::~trie ( )
inlinevirtual
766 { }

Member Function Documentation

template<typename Key , typename Mapped , typename _ATraits = typename detail::default_trie_access_traits<Key>::type, typename Tag = pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename _ATraits_, typename _Alloc_ > class Node_Update = null_node_update, typename _Alloc = std::allocator<char>>
trie& __gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::operator= ( const trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc > &  other)
inline
770  {
771  if (this != &other)
772  {
773  trie tmp(other);
774  swap(tmp);
775  }
776  return *this;
777  }
void swap(trie &other)
Definition: assoc_container.hpp:780
trie()
Definition: assoc_container.hpp:740
template<typename Key , typename Mapped , typename _ATraits = typename detail::default_trie_access_traits<Key>::type, typename Tag = pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename _ATraits_, typename _Alloc_ > class Node_Update = null_node_update, typename _Alloc = std::allocator<char>>
void __gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::swap ( trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc > &  other)
inline
781  { base_type::swap(other); }
void swap(exception_ptr &__lhs, exception_ptr &__rhs)
Definition: exception_ptr.h:160

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