41 #ifndef PB_DS_TREE_POLICY_HPP
42 #define PB_DS_TREE_POLICY_HPP
51 #define PB_DS_CLASS_T_DEC \
52 template<typename Node_CItr, typename Node_Itr, typename Cmp_Fn, \
55 #define PB_DS_CLASS_C_DEC \
56 tree_order_statistics_node_update<Node_CItr, Node_Itr, Cmp_Fn, _Alloc>
58 #define PB_DS_BRANCH_POLICY_BASE \
59 detail::branch_policy<Node_CItr, Node_Itr, _Alloc>
62 template<
typename Node_CItr,
typename Node_Itr,
63 typename Cmp_Fn,
typename _Alloc>
67 typedef PB_DS_BRANCH_POLICY_BASE
base_type;
70 typedef Cmp_Fn cmp_fn;
71 typedef _Alloc allocator_type;
72 typedef typename allocator_type::size_type size_type;
73 typedef typename base_type::key_type key_type;
74 typedef typename base_type::key_const_reference key_const_reference;
76 typedef size_type metadata_type;
77 typedef Node_CItr node_const_iterator;
78 typedef Node_Itr node_iterator;
79 typedef typename node_const_iterator::value_type const_iterator;
80 typedef typename node_iterator::value_type iterator;
106 typedef typename base_type::const_reference const_reference;
109 typedef typename base_type::const_pointer const_pointer;
111 typedef typename _Alloc::template rebind<metadata_type>::other __rebind_m;
114 typedef typename __rebind_m::const_reference metadata_const_reference;
117 typedef typename __rebind_m::reference metadata_reference;
120 virtual node_const_iterator
121 node_begin()
const = 0;
124 virtual node_iterator
128 virtual node_const_iterator
129 node_end()
const = 0;
132 virtual node_iterator
143 operator()(node_iterator, node_const_iterator)
const;
151 #undef PB_DS_CLASS_T_DEC
152 #undef PB_DS_CLASS_C_DEC
153 #undef PB_DS_BRANCH_POLICY_BASE
Primary template, base class for branch structure policies.
void operator()(node_iterator, node_const_iterator) const
Updates the rank of a node through a node_iterator node_it; end_nd_it is the end node iterator...
const_iterator find_by_order(size_type) const
Finds an entry by __order. Returns a const_iterator to the entry with the __order order...
size_type order_of_key(key_const_reference) const
Returns the order of a key within a sequence. For exapmle, if r_key is the smallest key...
Functor updating ranks of entrees.