41 #ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_HPP 42 #define PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_HPP 54 #ifdef PB_DS_LC_NS_HEAP_TRACE_ 64 #define PB_DS_CLASS_T_DEC \ 65 template<typename Value_Type, typename Cmp_Fn, typename Node_Metadata, \ 66 typename _Alloc, bool Single_Link_Roots> 68 #define PB_DS_CLASS_C_DEC \ 69 left_child_next_sibling_heap<Value_Type, Cmp_Fn, Node_Metadata, \ 70 _Alloc, Single_Link_Roots> 72 #define PB_DS_CLASS_T_DEC \ 73 template<typename Value_Type, typename Cmp_Fn, typename Node_Metadata, \ 76 #define PB_DS_CLASS_C_DEC \ 77 left_child_next_sibling_heap<Value_Type, Cmp_Fn, Node_Metadata, _Alloc> 81 template<
typename Value_Type,
83 typename Node_Metadata,
86 ,
bool Single_Link_Roots>
94 typename _Alloc::template rebind<
99 typedef typename node_allocator::value_type node;
100 typedef typename node_allocator::pointer node_pointer;
101 typedef typename node_allocator::const_pointer node_const_pointer;
102 typedef Node_Metadata node_metadata;
110 simple_value = is_simple<Value_Type>::value
113 typedef integral_constant<int, simple_value> no_throw_copies_t;
114 typedef typename _Alloc::template rebind<Value_Type> __rebind_v;
117 typedef typename _Alloc::size_type size_type;
118 typedef typename _Alloc::difference_type difference_type;
119 typedef Value_Type value_type;
121 typedef typename __rebind_v::other::pointer pointer;
122 typedef typename __rebind_v::other::const_pointer const_pointer;
123 typedef typename __rebind_v::other::reference reference;
124 typedef typename __rebind_v::other::const_reference const_reference;
135 typedef Cmp_Fn cmp_fn;
136 typedef _Alloc allocator_type;
143 swap(PB_DS_CLASS_C_DEC&);
165 inline const_iterator
171 inline const_iterator
177 #ifdef PB_DS_LC_NS_HEAP_TRACE_ 184 get_new_node_for_insert(const_reference);
187 make_child_of(node_pointer, node_pointer);
192 inline static node_pointer
193 parent(node_pointer);
196 swap_with_parent(node_pointer, node_pointer);
199 bubble_to_top(node_pointer);
202 actual_erase_node(node_pointer);
205 clear_imp(node_pointer);
210 template<
typename Pred>
214 #ifdef _GLIBCXX_DEBUG 216 assert_valid(
const char*,
int)
const;
219 assert_node_consistent(node_const_pointer,
bool,
const char*,
int)
const;
222 size_under_node(node_const_pointer);
225 degree(node_const_pointer);
228 #ifdef PB_DS_LC_NS_HEAP_TRACE_ 230 trace_node(node_const_pointer, size_type);
234 #ifdef _GLIBCXX_DEBUG 236 assert_iterators(
const char*,
int)
const;
239 assert_size(
const char*,
int)
const;
242 size_from_node(node_const_pointer);
246 recursive_copy_node(node_const_pointer);
249 get_new_node_for_insert(const_reference, false_type);
252 get_new_node_for_insert(const_reference, true_type);
254 #ifdef PB_DS_LC_NS_HEAP_TRACE_ 255 template<
typename Metadata_>
257 trace_node_metadata(node_const_pointer, type_to_type<Metadata_>);
260 trace_node_metadata(node_const_pointer, type_to_type<null_type>);
263 static node_allocator s_node_allocator;
264 static no_throw_copies_t s_no_throw_copies_ind;
267 node_pointer m_p_root;
280 #undef PB_DS_CLASS_C_DEC 281 #undef PB_DS_CLASS_T_DEC GNU extensions for policy-based data structures for public use.
Const point-type iterator.
Conditional deallocate constructor argument.
Struct holding two objects of arbitrary type.
Base class for a basic heap.
Const point-type iterator.