$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::util::fibonacci_heap< P, T > Class Template Reference

#include <mln/util/fibonacci_heap.hh>

Public Member Functions

 fibonacci_heap ()
 fibonacci_heap (const fibonacci_heap< P, T > &node)
 ~fibonacci_heap ()
void clear ()
const Tfront () const
bool is_empty () const
bool is_valid () const
unsigned nelements () const
fibonacci_heap< P, T > & operator= (fibonacci_heap< P, T > &rhs)
T pop_front ()
std::ostream & print_ (std::ostream &ostr, internal::fibonacci_heap_node< P, T > *tree=0, internal::fibonacci_heap_node< P, T > *parent=0) const
void push (const P &priority, const T &value)
void push (fibonacci_heap< P, T > &other_heap)

Public Types

typedef Object< void > category
typedef T element
typedef fibonacci_heap< P, Texact_t

Detailed Description

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

Fibonacci heap.

Definition at line 117 of file fibonacci_heap.hh.

Constructor & Destructor Documentation

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

Default constructor.

template<typename P, typename T>
mln::util::fibonacci_heap< P, T >::fibonacci_heap ( const fibonacci_heap< P, T > &  node)

Copy constructor.

Beware that once this heap is constructed, the argument node is cleared and all its elements are part of this new heap.

template<typename P, typename T>
mln::util::fibonacci_heap< P, T >::~fibonacci_heap ( )

Member Function Documentation

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

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

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

Return the minimum value in the heap.

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

Is it empty?

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

return false if it is empty.

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

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)

Assignment operator.

Beware that this operator does not copy 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 ( )

Return and remove the minimum value in the heap.

template<typename P, typename T>
std::ostream& mln::util::fibonacci_heap< P, T >::print_ ( std::ostream &  ostr,
internal::fibonacci_heap_node< P, T > *  tree = 0,
internal::fibonacci_heap_node< P, T > *  parent = 0 
) const
template<typename P, typename T>
void mln::util::fibonacci_heap< P, T >::push ( const P &  priority,
const T value 
)

Push a new element in the heap.

See Also
insert
template<typename P, typename T>
void mln::util::fibonacci_heap< P, T >::push ( fibonacci_heap< P, T > &  other_heap)

Take other_heap's elements and insert them in this heap.

After this call other_heap is cleared.

Member Typedef Documentation

typedef Object<void> mln::Object< fibonacci_heap< P, T > >::category
inherited

Definition at line 106 of file object.hh.

template<typename P, typename T>
typedef T mln::util::fibonacci_heap< P, T >::element

Definition at line 121 of file fibonacci_heap.hh.

typedef fibonacci_heap< P, T > mln::Object< fibonacci_heap< P, T > >::exact_t
inherited

Definition at line 105 of file object.hh.