STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | List of all members
__gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc > Class Template Referenceabstract

Functor updating ranks of entrees. More...

#include <ext/pb_ds/tree_policy.hpp>

Inheritance diagram for __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >:

Public Types

typedef Cmp_Fn cmp_fn
 
typedef _Alloc allocator_type
 
typedef allocator_type::size_type size_type
 
typedef base_type::key_type key_type
 
typedef
base_type::key_const_reference 
key_const_reference
 
typedef size_type metadata_type
 
typedef Node_CItr node_const_iterator
 
typedef Node_Itr node_iterator
 
typedef
node_const_iterator::value_type 
const_iterator
 
typedef node_iterator::value_type iterator
 

Public Member Functions

const_iterator find_by_order (size_type) const
 
iterator find_by_order (size_type)
 
size_type order_of_key (key_const_reference) const
 

Protected Member Functions

void operator() (node_iterator, node_const_iterator) const
 
virtual ~tree_order_statistics_node_update ()
 

Private Types

typedef PB_DS_BRANCH_POLICY_BASE base_type
 
typedef base_type::const_reference const_reference
 Const reference to the container's value-type. More...
 
typedef base_type::const_pointer const_pointer
 Const pointer to the container's value-type. More...
 
typedef _Alloc::template
rebind< metadata_type >::other 
__rebind_m
 
typedef __rebind_m::const_reference metadata_const_reference
 Const metadata reference. More...
 
typedef __rebind_m::reference metadata_reference
 Metadata reference. More...
 

Private Member Functions

virtual node_const_iterator node_begin () const =0
 Returns the node_const_iterator associated with the tree's root node. More...
 
virtual node_iterator node_begin ()=0
 Returns the node_iterator associated with the tree'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...
 
virtual cmp_fnget_cmp_fn ()=0
 Access to the cmp_fn object. More...
 

Detailed Description

template<typename Node_CItr, typename Node_Itr, typename Cmp_Fn, typename _Alloc>
class __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >

Functor updating ranks of entrees.

Member Typedef Documentation

template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef _Alloc::template rebind<metadata_type>::other __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::__rebind_m
private
template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef _Alloc __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::allocator_type
template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef PB_DS_BRANCH_POLICY_BASE __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::base_type
private
template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef Cmp_Fn __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::cmp_fn
template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef node_const_iterator::value_type __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::const_iterator
template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef base_type::const_pointer __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::const_pointer
private

Const pointer to the container's value-type.

template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef base_type::const_reference __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::const_reference
private

Const reference to the container's value-type.

template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef node_iterator::value_type __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::iterator
template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef base_type::key_const_reference __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::key_const_reference
template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef base_type::key_type __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::key_type
template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef __rebind_m::const_reference __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::metadata_const_reference
private

Const metadata reference.

template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef __rebind_m::reference __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::metadata_reference
private

Metadata reference.

template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef size_type __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::metadata_type
template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef Node_CItr __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::node_const_iterator
template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef Node_Itr __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::node_iterator
template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
typedef allocator_type::size_type __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::size_type

Constructor & Destructor Documentation

template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
virtual __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::~tree_order_statistics_node_update ( )
protectedvirtual

Member Function Documentation

template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
const_iterator __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::find_by_order ( size_type  ) const
inline

Finds an entry by __order. Returns a const_iterator to the entry with the __order order, or a const_iterator to the container object's end if order is at least the size of the container object.

template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
iterator __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::find_by_order ( size_type  )
inline

Finds an entry by __order. Returns an iterator to the entry with the __order order, or an iterator to the container object's end if order is at least the size of the container object.

template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
virtual cmp_fn& __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::get_cmp_fn ( )
privatepure virtual

Access to the cmp_fn object.

template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
virtual node_const_iterator __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::node_begin ( ) const
privatepure virtual

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

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

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

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

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

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

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

template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
void __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::operator() ( node_iterator  ,
node_const_iterator   
) const
inlineprotected

Updates the rank of a node through a node_iterator node_it; end_nd_it is the end node iterator.

template<typename Node_CItr , typename Node_Itr , typename Cmp_Fn , typename _Alloc >
size_type __gnu_pbds::tree_order_statistics_node_update< Node_CItr, Node_Itr, Cmp_Fn, _Alloc >::order_of_key ( key_const_reference  ) const
inline

Returns the order of a key within a sequence. For exapmle, if r_key is the smallest key, this method will return 0; if r_key is a key between the smallest and next key, this method will return 1; if r_key is a key larger than the largest key, this method will return the size of r_c.


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