#include <fibheap.H>
Public Member Functions | |
FibHeap (void) | |
~FibHeap (void) | |
void | clear (void) |
void | init (void) |
void | insert (const Data &d) |
void | push (const Data &d) |
const Data & | get_min (void) const |
const Data & | top (void) const |
void | delete_min (void) |
void | pop (void) |
size_type | size (void) const |
bool | empty (void) const |
void | change (const Data &old_data, const Data &new_data) |
void | remove (const Data &d) |
void | dump (std::ofstream &f) |
void | dump_tree (std::ofstream &f) |
Private Member Functions | |
const FibNode< Data > * | next (const FibNode< Data > *act, const bool down=true) const |
const FibNode< Data > * | search (const Data &d) const |
void | remove_son (FibNode< Data > *const n) |
void | remove_left (FibNode< Data > *const n) |
void | remove_all (void) |
void | move_up (FibNode< Data > *const n) |
Private Attributes | |
FibNode< Data > * | min |
size_type | heapsize |
Definition at line 120 of file fibheap.H.
Definition at line 160 of file fibheap.H.
References FibHeap< Data >::init().
const FibNode< Data > * FibHeap< Data >::next | ( | const FibNode< Data > * | act, | |
const bool | down = true | |||
) | const [inline, private] |
Definition at line 367 of file fibheap.H.
References FibNode< Data >::father, FibNode< Data >::left, FibHeap< Data >::min, and FibNode< Data >::son.
Referenced by FibHeap< Data >::delete_min(), FibHeap< Data >::dump(), FibHeap< Data >::dump_tree(), and FibHeap< Data >::search().
const FibNode< Data > * FibHeap< Data >::search | ( | const Data & | d | ) | const [inline, private] |
Definition at line 328 of file fibheap.H.
References FibNode< Data >::data, FibHeap< Data >::min, and FibHeap< Data >::next().
Referenced by FibHeap< Data >::change(), and FibHeap< Data >::remove().
void FibHeap< Data >::remove_son | ( | FibNode< Data > *const | n | ) | [inline, private] |
Definition at line 466 of file fibheap.H.
References FibHeap< Data >::heapsize, FibNode< Data >::left, CPool< FibNode< Data > >::release_node(), FibHeap< Data >::remove_left(), and FibNode< Data >::son.
Referenced by FibHeap< Data >::remove_all(), and FibHeap< Data >::remove_left().
void FibHeap< Data >::remove_left | ( | FibNode< Data > *const | n | ) | [inline, private] |
Definition at line 481 of file fibheap.H.
References FibNode< Data >::father, FibHeap< Data >::heapsize, FibNode< Data >::left, FibHeap< Data >::min, CPool< FibNode< Data > >::release_node(), FibHeap< Data >::remove_son(), and FibNode< Data >::son.
Referenced by FibHeap< Data >::remove_all(), and FibHeap< Data >::remove_son().
void FibHeap< Data >::remove_all | ( | void | ) | [inline, private] |
Definition at line 501 of file fibheap.H.
References FibHeap< Data >::heapsize, FibHeap< Data >::min, CPool< FibNode< Data > >::release_node(), FibHeap< Data >::remove_left(), and FibHeap< Data >::remove_son().
Referenced by FibHeap< Data >::init().
Definition at line 340 of file fibheap.H.
References FibNode< Data >::father, FibNode< Data >::left, FibNode< Data >::mark, FibHeap< Data >::min, FibNode< Data >::rank, FibNode< Data >::right, and FibNode< Data >::son.
Referenced by FibHeap< Data >::change(), and FibHeap< Data >::remove().
void FibHeap< Data >::clear | ( | void | ) | [inline] |
Definition at line 166 of file fibheap.H.
References FibHeap< Data >::init().
void FibHeap< Data >::init | ( | void | ) | [inline] |
Definition at line 154 of file fibheap.H.
References FibHeap< Data >::remove_all().
Referenced by FibHeap< Data >::clear(), and FibHeap< Data >::~FibHeap().
void FibHeap< Data >::insert | ( | const Data & | d | ) | [inline] |
Definition at line 172 of file fibheap.H.
References FibNode< Data >::data, FibNode< Data >::father, FibHeap< Data >::heapsize, FibNode< Data >::left, FibNode< Data >::mark, FibHeap< Data >::min, CPool< FibNode< Data > >::new_node(), FibNode< Data >::rank, FibNode< Data >::right, and FibNode< Data >::son.
Referenced by FibHeap< Data >::change(), and FibHeap< Data >::push().
void FibHeap< Data >::push | ( | const Data & | d | ) | [inline] |
Definition at line 139 of file fibheap.H.
References FibHeap< Data >::insert().
const Data& FibHeap< Data >::get_min | ( | void | ) | const [inline] |
const Data& FibHeap< Data >::top | ( | void | ) | const [inline] |
void FibHeap< Data >::delete_min | ( | void | ) | [inline] |
Definition at line 194 of file fibheap.H.
References FibNode< Data >::data, FibNode< Data >::father, FibHeap< Data >::heapsize, FibNode< Data >::left, FibNode< Data >::mark, FibHeap< Data >::min, FibHeap< Data >::next(), FibNode< Data >::rank, CPool< FibNode< Data > >::release_node(), FibNode< Data >::right, and FibNode< Data >::son.
Referenced by FibHeap< Data >::pop(), and FibHeap< Data >::remove().
void FibHeap< Data >::pop | ( | void | ) | [inline] |
Definition at line 143 of file fibheap.H.
References FibHeap< Data >::delete_min().
bool FibHeap< Data >::empty | ( | void | ) | const [inline] |
void FibHeap< Data >::change | ( | const Data & | old_data, | |
const Data & | new_data | |||
) | [inline] |
Definition at line 295 of file fibheap.H.
References FibNode< Data >::data, FibNode< Data >::father, FibHeap< Data >::insert(), FibHeap< Data >::min, FibHeap< Data >::move_up(), and FibHeap< Data >::search().
void FibHeap< Data >::remove | ( | const Data & | d | ) | [inline] |
Definition at line 316 of file fibheap.H.
References FibHeap< Data >::delete_min(), FibNode< Data >::father, FibHeap< Data >::min, FibHeap< Data >::move_up(), and FibHeap< Data >::search().
void FibHeap< Data >::dump | ( | std::ofstream & | f | ) | [inline] |
Definition at line 385 of file fibheap.H.
References FibNode< Data >::data, std::endl(), FibNode< Data >::father, FibNode< Data >::left, FibHeap< Data >::min, FibHeap< Data >::next(), FibNode< Data >::right, and FibNode< Data >::son.
void FibHeap< Data >::dump_tree | ( | std::ofstream & | f | ) | [inline] |
Definition at line 436 of file fibheap.H.
References FibNode< Data >::data, std::endl(), FibNode< Data >::father, FibHeap< Data >::min, and FibHeap< Data >::next().
Definition at line 123 of file fibheap.H.
Referenced by FibHeap< Data >::change(), FibHeap< Data >::delete_min(), FibHeap< Data >::dump(), FibHeap< Data >::dump_tree(), FibHeap< Data >::get_min(), FibHeap< Data >::insert(), FibHeap< Data >::move_up(), FibHeap< Data >::next(), FibHeap< Data >::remove(), FibHeap< Data >::remove_all(), FibHeap< Data >::remove_left(), FibHeap< Data >::search(), and FibHeap< Data >::top().
Definition at line 124 of file fibheap.H.
Referenced by FibHeap< Data >::delete_min(), FibHeap< Data >::empty(), FibHeap< Data >::insert(), FibHeap< Data >::remove_all(), FibHeap< Data >::remove_left(), FibHeap< Data >::remove_son(), and FibHeap< Data >::size().