#include <fibonacci_heap.hh>
Public Member Functions | |
void | clear () |
Clear all elements in the heap and make the heap empty. | |
fibonacci_heap (const fibonacci_heap< P, T > &node) | |
Copy constructor Be ware that once this heap is constructed, the argument node is cleared and all its elements are part of this new heap. | |
fibonacci_heap () | |
Default constructor. | |
const T & | front () const |
Return the minimum value in the heap. | |
bool | is_empty () const |
Is it empty? | |
bool | is_valid () const |
return false if it is empty. | |
unsigned | nelements () const |
Return the number of elements. | |
fibonacci_heap< P, T > & | operator= (fibonacci_heap< P, T > &rhs) |
Assignment operator. | |
T | pop_front () |
Return and remove the minimum value in the heap. | |
void | push (fibonacci_heap< P, T > &other_heap) |
Take other_heap's elements and insert them in this heap. | |
void | push (const P &priority, const T &value) |
Push a new element in the heap. |
Definition at line 117 of file fibonacci_heap.hh.
mln::util::fibonacci_heap< P, T >::fibonacci_heap | ( | ) | [inline] |
mln::util::fibonacci_heap< P, T >::fibonacci_heap | ( | const fibonacci_heap< P, T > & | node | ) | [inline] |
Copy constructor Be ware that once this heap is constructed, the argument node
is cleared and all its elements are part of this new heap.
Definition at line 480 of file fibonacci_heap.hh.
References mln::util::fibonacci_heap< P, T >::min_root, mln::util::fibonacci_heap< P, T >::num_marked_nodes, mln::util::fibonacci_heap< P, T >::num_nodes, and mln::util::fibonacci_heap< P, T >::num_trees.
void mln::util::fibonacci_heap< P, T >::clear | ( | ) | [inline] |
Clear all elements in the heap and make the heap empty.
Definition at line 723 of file fibonacci_heap.hh.
References mln::util::fibonacci_heap< P, T >::pop_front().
const T & mln::util::fibonacci_heap< P, T >::front | ( | ) | const [inline] |
bool mln::util::fibonacci_heap< P, T >::is_empty | ( | ) | const [inline] |
Is it empty?
Definition at line 705 of file fibonacci_heap.hh.
Referenced by mln::util::fibonacci_heap< P, T >::pop_front(), and mln::util::fibonacci_heap< P, T >::push().
bool mln::util::fibonacci_heap< P, T >::is_valid | ( | ) | const [inline] |
return false if it is empty.
Definition at line 714 of file fibonacci_heap.hh.
Referenced by mln::util::fibonacci_heap< P, T >::pop_front().
unsigned mln::util::fibonacci_heap< P, T >::nelements | ( | ) | const [inline] |
fibonacci_heap< P, T > & mln::util::fibonacci_heap< P, T >::operator= | ( | fibonacci_heap< P, T > & | rhs | ) | [inline] |
Assignment operator.
Be ware that this operator do *not* copy the data from rhs
to this heap. It moves all elements which means that afterwards, rhs
is is cleared and all its elements are part of this new heap.
Definition at line 754 of file fibonacci_heap.hh.
References mln::util::fibonacci_heap< P, T >::min_root, mln::util::fibonacci_heap< P, T >::num_marked_nodes, mln::util::fibonacci_heap< P, T >::num_nodes, and mln::util::fibonacci_heap< P, T >::num_trees.
T mln::util::fibonacci_heap< P, T >::pop_front | ( | ) | [inline] |
Return and remove the minimum value in the heap.
Definition at line 578 of file fibonacci_heap.hh.
References mln::util::fibonacci_heap< P, T >::is_empty(), mln::util::fibonacci_heap< P, T >::is_valid(), mln::util::fibonacci_heap< P, T >::min_root, and mln::util::fibonacci_heap< P, T >::push().
Referenced by mln::util::fibonacci_heap< P, T >::clear().
void mln::util::fibonacci_heap< P, T >::push | ( | fibonacci_heap< P, T > & | other_heap | ) | [inline] |
Take other_heap's
elements and insert them in this heap.
After this call other_heap
is cleared.
Definition at line 520 of file fibonacci_heap.hh.
References mln::util::fibonacci_heap< P, T >::is_empty(), mln::util::fibonacci_heap< P, T >::min_root, mln::util::fibonacci_heap< P, T >::num_marked_nodes, mln::util::fibonacci_heap< P, T >::num_nodes, and mln::util::fibonacci_heap< P, T >::num_trees.
void mln::util::fibonacci_heap< P, T >::push | ( | const P & | priority, | |
const T & | value | |||
) | [inline] |
Push a new element in the heap.
Definition at line 508 of file fibonacci_heap.hh.
Referenced by mln::util::fibonacci_heap< P, T >::pop_front().