|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
#include <archeap.H>
Public Types | |
| using | handle_type = typename Heap::handle_type |
Public Member Functions | |
| Distance & | get_distance () |
| Return the distance functor used to compare arcs in this heap. | |
| ArcFibonacciHeap (Distance __dist=Distance(), Access_Heap_Node acc=Access_Heap_Node()) | |
| Construct an empty Fibonacci arc heap with the given distance functor and heap-node access policy. | |
| ArcFibonacciHeap (const ArcFibonacciHeap &)=delete | |
| Copying is disabled (heap manages internal node memory) | |
| ArcFibonacciHeap & | operator= (const ArcFibonacciHeap &)=delete |
| ArcFibonacciHeap (ArcFibonacciHeap &&other) noexcept | |
| Move construction transfers ownership of heap nodes. | |
| ArcFibonacciHeap & | operator= (ArcFibonacciHeap &&other) noexcept |
| Move assignment transfers ownership of heap nodes. | |
| void | put_arc (typename GT::Arc *arc, typename GT::Node *tgt) |
| Insert or update an arc associated with a target node, keeping the smallest-distance arc per node in the heap. | |
| GT::Arc * | get_min_arc () |
| Extract the arc with minimum distance from the heap and clear its node-to-heap mapping. | |
| bool | is_empty () const noexcept |
| Return true if the heap is empty. | |
| void | empty () |
| Remove all heap nodes and delete their memory. | |
| void | clear () |
| Empties the container. | |
| ~ArcFibonacciHeap () | |
| Destructor. Clears all remaining heap nodes. | |
Private Types | |
| using | Compare = Distance_Compare< GT, Distance > |
| using | Heap = Fibonacci_Heap< typename GT::Arc *, Compare > |
Private Member Functions | |
| handle_type & | handle_ref (typename GT::Node *p) |
Private Attributes | |
| Distance | dist |
| Access_Heap_Node | access_node |
| Compare | dist_cmp |
| Heap | heap |
|
private |
| using ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::handle_type = typename Heap::handle_type |
|
private |
|
inline |
|
delete |
Copying is disabled (heap manages internal node memory)
|
inlinenoexcept |
|
inline |
Destructor. Clears all remaining heap nodes.
Definition at line 303 of file archeap.H.
References ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::empty().
|
inline |
Empties the container.
| none |
Definition at line 300 of file archeap.H.
References ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::empty().
|
inline |
Remove all heap nodes and delete their memory.
Definition at line 290 of file archeap.H.
References Aleph::Fibonacci_Heap< T, Compare >::clear(), and ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::heap.
Referenced by ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::~ArcFibonacciHeap(), and ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::clear().
|
inline |
Return the distance functor used to compare arcs in this heap.
Definition at line 205 of file archeap.H.
References ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::dist.
|
inline |
Extract the arc with minimum distance from the heap and clear its node-to-heap mapping.
Definition at line 263 of file archeap.H.
References ah_underflow_error_if, Aleph::divide_and_conquer_partition_dp(), Aleph::Fibonacci_Heap< T, Compare >::extract_min(), Aleph::Fibonacci_Heap< T, Compare >::get_min_node(), ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::handle_ref(), ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::heap, and Aleph::Fibonacci_Heap< T, Compare >::is_empty().
|
inlineprivate |
Definition at line 198 of file archeap.H.
References ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::access_node.
Referenced by ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::get_min_arc(), and ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::put_arc().
|
inlinenoexcept |
Return true if the heap is empty.
Definition at line 287 of file archeap.H.
References ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::heap, and Aleph::Fibonacci_Heap< T, Compare >::is_empty().
|
inlinenoexcept |
Move assignment transfers ownership of heap nodes.
Definition at line 227 of file archeap.H.
References ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::access_node, ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::dist, ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::dist_cmp, Aleph::divide_and_conquer_partition_dp(), and ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::heap.
|
delete |
|
inline |
Insert or update an arc associated with a target node, keeping the smallest-distance arc per node in the heap.
Definition at line 241 of file archeap.H.
References Aleph::Fibonacci_Heap< T, Compare >::decrease_key(), ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::dist_cmp, Aleph::divide_and_conquer_partition_dp(), ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::handle_ref(), ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::heap, and Aleph::Fibonacci_Heap< T, Compare >::insert().
|
private |
Definition at line 194 of file archeap.H.
Referenced by ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::handle_ref(), and ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::operator=().
|
private |
Definition at line 193 of file archeap.H.
Referenced by ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::get_distance(), and ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::operator=().
|
private |
Definition at line 195 of file archeap.H.
Referenced by ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::operator=(), and ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::put_arc().
|
private |
Definition at line 196 of file archeap.H.
Referenced by ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::empty(), ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::get_min_arc(), ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::is_empty(), ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::operator=(), and ArcFibonacciHeap< GT, Distance, Access_Heap_Node >::put_arc().