GNU g++  v5.2.1
GNU Standard C++
__gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc > Class Template Referenceabstract

A node updator that allows tries to be searched for the range of values that match a certain prefix. More...

#include <trie_policy.hpp>

Inheritance diagram for __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >:
Collaboration diagram for __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >:

Public Types

typedef access_traits::const_iterator a_const_iterator
 Const element iterator. More...
 
typedef _ATraits access_traits
 Element access traits. More...
 
typedef _Alloc allocator_type
 _Alloc type. More...
 
typedef node_const_iterator::value_type const_iterator
 
typedef node_iterator::value_type iterator
 
typedef base_type::key_const_reference key_const_reference
 
typedef base_type::key_type key_type
 
typedef null_type metadata_type
 
typedef Node_CItr node_const_iterator
 
typedef Node_Itr node_iterator
 
typedef allocator_type::size_type size_type
 Size type. More...
 

Public Member Functions

std::pair< const_iterator, const_iteratorprefix_range (key_const_reference) const
 Finds the const iterator range corresponding to all values whose prefixes match r_key. More...
 
std::pair< iterator, iteratorprefix_range (key_const_reference)
 Finds the iterator range corresponding to all values whose prefixes match r_key. More...
 
std::pair< const_iterator, const_iteratorprefix_range (a_const_iterator, a_const_iterator) const
 Finds the const iterator range corresponding to all values whose prefixes match [b, e). More...
 
std::pair< iterator, iteratorprefix_range (a_const_iterator, a_const_iterator)
 Finds the iterator range corresponding to all values whose prefixes match [b, e). More...
 

Protected Member Functions

void operator() (node_iterator node_it, node_const_iterator end_nd_it) const
 Called to update a node's metadata. More...
 

Private Types

typedef detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc > base_type
 
typedef rebind_v::const_pointer const_pointer
 
typedef rebind_v::const_reference const_reference
 
typedef Node_Itr::value_type it_type
 
typedef remove_const< key_type >::type rckey_type
 
typedef remove_const< value_type >::type rcvalue_type
 
typedef _Alloc::template rebind< rckey_type >::other rebind_k
 
typedef _Alloc::template rebind< rcvalue_type >::other rebind_v
 
typedef rebind_v::reference reference
 
typedef std::iterator_traits< it_type >::value_type value_type
 

Private Member Functions

virtual const_iterator end () const =0
 Returns the const iterator associated with the just-after last element. More...
 
virtual iterator end ()=0
 Returns the iterator associated with the just-after last element. More...
 
it_type end_iterator () const
 
virtual const access_traitsget_access_traits () const =0
 Access to the cmp_fn object. More...
 
node_iterator next_child (node_iterator, a_const_iterator, a_const_iterator, node_iterator, const access_traits &)
 
virtual node_const_iterator node_begin () const =0
 Returns the node_const_iterator associated with the trie's root node. More...
 
virtual node_iterator node_begin ()=0
 Returns the node_iterator associated with the trie's root node. More...
 
virtual node_const_iterator node_end () const =0
 Returns the node_const_iterator associated with a just-after leaf node. More...
 
virtual node_iterator node_end ()=0
 Returns the node_iterator associated with a just-after leaf node. More...
 

Static Private Member Functions

static size_type common_prefix_len (node_iterator, e_const_iterator, e_const_iterator, const access_traits &)
 
static key_const_reference extract_key (const_reference r_val)
 
static iterator leftmost_it (node_iterator)
 
static bool less (e_const_iterator, e_const_iterator, e_const_iterator, e_const_iterator, const access_traits &)
 
static iterator rightmost_it (node_iterator)
 

Detailed Description

template<typename Node_CItr, typename Node_Itr, typename _ATraits, typename _Alloc>
class __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >

A node updator that allows tries to be searched for the range of values that match a certain prefix.

Member Typedef Documentation

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
typedef access_traits::const_iterator __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::a_const_iterator

Const element iterator.

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
typedef _ATraits __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::access_traits

Element access traits.

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
typedef _Alloc __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::allocator_type

_Alloc type.

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
typedef detail::trie_policy_base<Node_CItr,Node_Itr,_ATraits, _Alloc> __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::base_type
private
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
typedef node_const_iterator::value_type __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::const_iterator
template<typename Node_CItr , typename Node_Itr , typename _Alloc >
typedef rebind_v::const_pointer __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc >::const_pointer
protectedinherited
template<typename Node_CItr , typename Node_Itr , typename _Alloc >
typedef rebind_v::const_reference __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc >::const_reference
protectedinherited
template<typename Node_CItr , typename Node_Itr , typename _Alloc >
typedef Node_Itr::value_type __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc >::it_type
protectedinherited
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
typedef node_iterator::value_type __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::iterator
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
typedef base_type::key_const_reference __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::key_const_reference
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
typedef base_type::key_type __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::key_type
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
typedef null_type __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::metadata_type
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
typedef Node_CItr __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::node_const_iterator
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
typedef Node_Itr __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::node_iterator
template<typename Node_CItr , typename Node_Itr , typename _Alloc >
typedef remove_const<key_type>::type __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc >::rckey_type
protectedinherited
template<typename Node_CItr , typename Node_Itr , typename _Alloc >
typedef remove_const<value_type>::type __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc >::rcvalue_type
protectedinherited
template<typename Node_CItr , typename Node_Itr , typename _Alloc >
typedef _Alloc::template rebind<rckey_type>::other __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc >::rebind_k
protectedinherited
template<typename Node_CItr , typename Node_Itr , typename _Alloc >
typedef _Alloc::template rebind<rcvalue_type>::other __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc >::rebind_v
protectedinherited
template<typename Node_CItr , typename Node_Itr , typename _Alloc >
typedef rebind_v::reference __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc >::reference
protectedinherited
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
typedef allocator_type::size_type __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::size_type

Size type.

template<typename Node_CItr , typename Node_Itr , typename _Alloc >
typedef std::iterator_traits<it_type>::value_type __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc >::value_type
protectedinherited

Member Function Documentation

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >::size_type __gnu_pbds::detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >::common_prefix_len ( node_iterator  nd_it,
e_const_iterator  b_r,
e_const_iterator  e_r,
const access_traits r_traits 
)
staticprotectedinherited

References std::__exception_ptr::swap().

Here is the call graph for this function:

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
virtual const_iterator __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::end ( ) const
privatepure virtual

Returns the const iterator associated with the just-after last element.

Implements __gnu_pbds::detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >.

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
virtual iterator __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::end ( )
privatepure virtual

Returns the iterator associated with the just-after last element.

Implements __gnu_pbds::detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >.

template<typename Node_CItr , typename Node_Itr , typename _Alloc >
it_type __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc >::end_iterator ( ) const
inlineprotectedinherited

References __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc >::end().

Here is the call graph for this function:

template<typename Node_CItr , typename Node_Itr , typename _Alloc >
static key_const_reference __gnu_pbds::detail::branch_policy< Node_CItr, Node_Itr, _Alloc >::extract_key ( const_reference  r_val)
inlinestaticprotectedinherited
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
virtual const access_traits& __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::get_access_traits ( ) const
privatepure virtual
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >::iterator __gnu_pbds::detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >::leftmost_it ( node_iterator  nd_it)
staticprotectedinherited
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
bool __gnu_pbds::detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >::less ( e_const_iterator  b_l,
e_const_iterator  e_l,
e_const_iterator  b_r,
e_const_iterator  e_r,
const access_traits r_traits 
)
staticprotectedinherited
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
node_iterator __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::next_child ( node_iterator  ,
a_const_iterator  ,
a_const_iterator  ,
node_iterator  ,
const access_traits  
)
private
template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
virtual node_const_iterator __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::node_begin ( ) const
privatepure virtual

Returns the node_const_iterator associated with the trie's root node.

Implements __gnu_pbds::detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >.

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
virtual node_iterator __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::node_begin ( )
privatepure virtual

Returns the node_iterator associated with the trie's root node.

Implements __gnu_pbds::detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >.

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
virtual node_const_iterator __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::node_end ( ) const
privatepure virtual

Returns the node_const_iterator associated with a just-after leaf node.

Implements __gnu_pbds::detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >.

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
virtual node_iterator __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::node_end ( )
privatepure virtual

Returns the node_iterator associated with a just-after leaf node.

Implements __gnu_pbds::detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >.

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
void __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::operator() ( node_iterator  node_it,
node_const_iterator  end_nd_it 
) const
inlineprotected

Called to update a node's metadata.

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
std::pair<const_iterator, const_iterator> __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::prefix_range ( key_const_reference  ) const

Finds the const iterator range corresponding to all values whose prefixes match r_key.

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
std::pair<iterator, iterator> __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::prefix_range ( key_const_reference  )

Finds the iterator range corresponding to all values whose prefixes match r_key.

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
std::pair<const_iterator, const_iterator> __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::prefix_range ( a_const_iterator  ,
a_const_iterator   
) const

Finds the const iterator range corresponding to all values whose prefixes match [b, e).

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
std::pair<iterator, iterator> __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::prefix_range ( a_const_iterator  ,
a_const_iterator   
)

Finds the iterator range corresponding to all values whose prefixes match [b, e).

template<typename Node_CItr , typename Node_Itr , typename _ATraits , typename _Alloc >
trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >::iterator __gnu_pbds::detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >::rightmost_it ( node_iterator  nd_it)
staticprotectedinherited

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