41 #ifndef PB_DS_THIN_HEAP_HPP
42 #define PB_DS_THIN_HEAP_HPP
54 #define PB_DS_CLASS_T_DEC \
55 template<typename Value_Type, typename Cmp_Fn, typename _Alloc>
57 #define PB_DS_CLASS_C_DEC \
58 thin_heap<Value_Type, Cmp_Fn, _Alloc>
61 #define PB_DS_BASE_T_P \
62 <Value_Type, Cmp_Fn, typename _Alloc::size_type, _Alloc, true>
64 #define PB_DS_BASE_T_P \
65 <Value_Type, Cmp_Fn, typename _Alloc::size_type, _Alloc>
76 template<
typename Value_Type,
typename Cmp_Fn,
typename _Alloc>
81 typedef typename _Alloc::template rebind<Value_Type>::other
__rebind_a;
85 typedef typename base_type::node
node;
96 typedef typename __rebind_a::pointer
pointer;
125 template<
typename Pred>
129 template<
typename Pred>
148 template<
typename It>
152 #ifdef _GLIBCXX_DEBUG
154 assert_valid(
const char*,
int)
const;
157 assert_max(
const char*,
int)
const;
160 #ifdef PB_DS_THIN_HEAP_TRACE_
228 #ifdef _GLIBCXX_DEBUG
233 assert_aux_null(
const char*,
int)
const;
300 #define PB_DS_ASSERT_NODE_CONSISTENT(_Node, _Bool) \
301 _GLIBCXX_DEBUG_ONLY(assert_node_consistent(_Node, _Bool, \
302 __FILE__, __LINE__);)
304 #define PB_DS_ASSERT_AUX_NULL(X) \
305 _GLIBCXX_DEBUG_ONLY(X.assert_aux_null(__FILE__, __LINE__);)
315 #undef PB_DS_ASSERT_AUX_NULL
316 #undef PB_DS_ASSERT_NODE_CONSISTENT
317 #undef PB_DS_CLASS_C_DEC
318 #undef PB_DS_CLASS_T_DEC
319 #undef PB_DS_BASE_T_P
_Alloc::template rebind< Value_Type >::other __rebind_a
Definition: thin_heap_.hpp:81
Cmp_Fn cmp_fn
Definition: thin_heap_.hpp:91
base_type::node node
Definition: thin_heap_.hpp:85
Value_Type value_type
Definition: thin_heap_.hpp:90
node_pointer m_a_aux[max_rank]
Definition: thin_heap_.hpp:237
void fix_sibling_rank_1_unmarked(node_pointer)
void modify(point_iterator, const_reference)
static const std::size_t g_a_rank_bounds[num_distinct_rank_bounds]
Definition: thin_heap_.hpp:246
_Alloc::difference_type difference_type
Definition: thin_heap_.hpp:94
void split(Pred, PB_DS_CLASS_C_DEC &)
void update_max(node_pointer)
base_type::const_iterator const_iterator
Definition: thin_heap_.hpp:104
Base class for a basic heap.
Definition: left_child_next_sibling_heap_.hpp:90
void make_child_of(node_pointer, node_pointer)
base_type::node_const_pointer node_const_pointer
Definition: thin_heap_.hpp:87
void fix_sibling_general_unmarked(node_pointer)
void copy_from_range(It, It)
Definition: thin_heap_.hpp:77
void fix_sibling_rank_1_marked(node_pointer)
left_child_next_sibling_heap PB_DS_BASE_T_P base_type
Definition: thin_heap_.hpp:82
void make_root_and_link(node_pointer)
void fix_child(node_pointer)
_Alloc allocator_type
Definition: thin_heap_.hpp:92
static void make_root(node_pointer)
base_type::node_pointer node_pointer
Definition: thin_heap_.hpp:86
Definition: thin_heap_.hpp:168
#define PB_DS_BASE_T_P
Definition: thin_heap_.hpp:64
base_type::point_const_iterator point_const_iterator
Definition: thin_heap_.hpp:102
base_type::point_iterator point_iterator
Definition: thin_heap_.hpp:101
#define PB_DS_CLASS_C_DEC
Definition: thin_heap_.hpp:57
base_type::iterator iterator
Definition: thin_heap_.hpp:103
__rebind_a::const_reference const_reference
Definition: thin_heap_.hpp:99
__rebind_a::const_pointer const_pointer
Definition: thin_heap_.hpp:97
__SIZE_TYPE__ size_t
Definition: stddef.h:212
void erase(point_iterator)
point_iterator push(const_reference)
void swap(PB_DS_CLASS_C_DEC &)
void fix_sibling_general_marked(node_pointer)
const_reference top() const
_Alloc::size_type size_type
Definition: thin_heap_.hpp:93
Definition: thin_heap_.hpp:242
void join(PB_DS_CLASS_C_DEC &)
__rebind_a::pointer pointer
Definition: thin_heap_.hpp:96
node_pointer m_p_max
Definition: thin_heap_.hpp:236
void add_to_aux(node_pointer)
void fix_root(node_pointer)
void remove_node(node_pointer)
__rebind_a::reference reference
Definition: thin_heap_.hpp:98