mln::util::fibonacci_heap< P, T > Class Template Reference
[Utilities]

Fibonacci heap. More...

#include <fibonacci_heap.hh>

Inheritance diagram for mln::util::fibonacci_heap< P, T >:

Inheritance graph

List of all members.

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.
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.


Detailed Description

template<typename P, typename T>
class mln::util::fibonacci_heap< P, T >

Fibonacci heap.

Constructor & Destructor Documentation

template<typename P , typename T >
mln::util::fibonacci_heap< P, T >::fibonacci_heap (  )  [inline]

Default constructor.

template<typename P , typename T >
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.


Member Function Documentation

template<typename P , typename T >
void mln::util::fibonacci_heap< P, T >::clear (  )  [inline]

Clear all elements in the heap and make the heap empty.

References mln::util::fibonacci_heap< P, T >::pop_front().

template<typename P , typename T >
const T & mln::util::fibonacci_heap< P, T >::front (  )  const [inline]

Return the minimum value in the heap.

template<typename P , typename T >
bool mln::util::fibonacci_heap< P, T >::is_empty (  )  const [inline]

template<typename P , typename T >
bool mln::util::fibonacci_heap< P, T >::is_valid (  )  const [inline]

return false if it is empty.

Referenced by mln::util::fibonacci_heap< P, T >::pop_front().

template<typename P , typename T >
unsigned mln::util::fibonacci_heap< P, T >::nelements (  )  const [inline]

Return the number of elements.

template<typename P , typename T >
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.

template<typename P , typename T >
T mln::util::fibonacci_heap< P, T >::pop_front (  )  [inline]

template<typename P , typename T >
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.

References mln::util::fibonacci_heap< P, T >::is_empty().

template<typename P , typename T >
void mln::util::fibonacci_heap< P, T >::push ( const P &  priority,
const T &  value 
) [inline]

Push a new element in the heap.

See also:
insert

Referenced by mln::util::fibonacci_heap< P, T >::pop_front().


Generated on Tue Jul 14 16:33:17 2009 for Milena (Olena) by  doxygen 1.5.9