\hypertarget{a00395}{
\section{mln::util::fibonacci\_\-heap$<$ P, T $>$ Class Template Reference}
\label{db/dbc/a00395}\index{mln::util::fibonacci\_\-heap@{mln::util::fibonacci\_\-heap}}
}


Fibonacci heap.  




{\ttfamily \#include $<$fibonacci\_\-heap.hh$>$}



Inheritance diagram for mln::util::fibonacci\_\-heap$<$ P, T $>$:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=316pt]{d9/d0c/a03992}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{a00395_abfa9dcff359f9e06945197478984696b}{clear} ()
\begin{DoxyCompactList}\small\item\em Clear all elements in the heap and make the heap empty. \item\end{DoxyCompactList}\item 
\hyperlink{a00395_ae5d5d16221ed6a722c3b4171a78adc50}{fibonacci\_\-heap} ()
\begin{DoxyCompactList}\small\item\em Default constructor. \item\end{DoxyCompactList}\item 
\hyperlink{a00395_ae582eddc97e64505a09abb269868807a}{fibonacci\_\-heap} (const \hyperlink{a00395}{fibonacci\_\-heap}$<$ P, T $>$ \&\hyperlink{a00404}{node})
\begin{DoxyCompactList}\small\item\em Copy constructor Be ware that once this heap is constructed, the argument {\ttfamily node} is cleared and all its elements are part of this new heap. \item\end{DoxyCompactList}\item 
const T \& \hyperlink{a00395_a7e96c2e02a0af619d824ced8c39c73e1}{front} () const 
\begin{DoxyCompactList}\small\item\em Return the minimum value in the heap. \item\end{DoxyCompactList}\item 
bool \hyperlink{a00395_a49c6a143a9a9c38cf31ae3529b3545b7}{is\_\-empty} () const 
\begin{DoxyCompactList}\small\item\em Is it empty? \item\end{DoxyCompactList}\item 
bool \hyperlink{a00395_a321a1431741af0988d4ae00a3b243762}{is\_\-valid} () const 
\begin{DoxyCompactList}\small\item\em return false if it is empty. \item\end{DoxyCompactList}\item 
unsigned \hyperlink{a00395_a35b38e30c5b3f7764916568df71d3285}{nelements} () const 
\begin{DoxyCompactList}\small\item\em Return the number of elements. \item\end{DoxyCompactList}\item 
\hyperlink{a00395}{fibonacci\_\-heap}$<$ P, T $>$ \& \hyperlink{a00395_a018fbeb23f6e29ff256efeea70f60b65}{operator=} (\hyperlink{a00395}{fibonacci\_\-heap}$<$ P, T $>$ \&rhs)
\begin{DoxyCompactList}\small\item\em Assignment operator. \item\end{DoxyCompactList}\item 
T \hyperlink{a00395_a57114bc737e812989b4f8dabf90f1fa4}{pop\_\-front} ()
\begin{DoxyCompactList}\small\item\em Return and remove the minimum value in the heap. \item\end{DoxyCompactList}\item 
void \hyperlink{a00395_a753213d6ff16d5b8d9577b838ac756eb}{push} (const P \&priority, const T \&value)
\begin{DoxyCompactList}\small\item\em Push a new element in the heap. \item\end{DoxyCompactList}\item 
void \hyperlink{a00395_af03fac8e8ed6d8de6f4a317068c8e3d1}{push} (\hyperlink{a00395}{fibonacci\_\-heap}$<$ P, T $>$ \&other\_\-heap)
\begin{DoxyCompactList}\small\item\em Take {\ttfamily other\_\-heap's} elements and insert them in this heap. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename P, typename T$>$ class mln::util::fibonacci\_\-heap$<$ P, T $>$}

Fibonacci heap. 

Definition at line 117 of file fibonacci\_\-heap.hh.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{a00395_ae5d5d16221ed6a722c3b4171a78adc50}{
\index{mln::util::fibonacci\_\-heap@{mln::util::fibonacci\_\-heap}!fibonacci\_\-heap@{fibonacci\_\-heap}}
\index{fibonacci\_\-heap@{fibonacci\_\-heap}!mln::util::fibonacci_heap@{mln::util::fibonacci\_\-heap}}
\subsubsection[{fibonacci\_\-heap}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename T $>$ {\bf mln::util::fibonacci\_\-heap}$<$ P, T $>$::{\bf fibonacci\_\-heap} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{db/dbc/a00395_ae5d5d16221ed6a722c3b4171a78adc50}


Default constructor. 



Definition at line 472 of file fibonacci\_\-heap.hh.

\hypertarget{a00395_ae582eddc97e64505a09abb269868807a}{
\index{mln::util::fibonacci\_\-heap@{mln::util::fibonacci\_\-heap}!fibonacci\_\-heap@{fibonacci\_\-heap}}
\index{fibonacci\_\-heap@{fibonacci\_\-heap}!mln::util::fibonacci_heap@{mln::util::fibonacci\_\-heap}}
\subsubsection[{fibonacci\_\-heap}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename T $>$ {\bf mln::util::fibonacci\_\-heap}$<$ P, T $>$::{\bf fibonacci\_\-heap} (
\begin{DoxyParamCaption}
\item[{const {\bf fibonacci\_\-heap}$<$ P, T $>$ \&}]{ node}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{db/dbc/a00395_ae582eddc97e64505a09abb269868807a}


Copy constructor Be ware that once this heap is constructed, the argument {\ttfamily node} is cleared and all its elements are part of this new heap. 



Definition at line 480 of file fibonacci\_\-heap.hh.



\subsection{Member Function Documentation}
\hypertarget{a00395_abfa9dcff359f9e06945197478984696b}{
\index{mln::util::fibonacci\_\-heap@{mln::util::fibonacci\_\-heap}!clear@{clear}}
\index{clear@{clear}!mln::util::fibonacci_heap@{mln::util::fibonacci\_\-heap}}
\subsubsection[{clear}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename T $>$ void {\bf mln::util::fibonacci\_\-heap}$<$ P, T $>$::clear (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{db/dbc/a00395_abfa9dcff359f9e06945197478984696b}


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

\hypertarget{a00395_a7e96c2e02a0af619d824ced8c39c73e1}{
\index{mln::util::fibonacci\_\-heap@{mln::util::fibonacci\_\-heap}!front@{front}}
\index{front@{front}!mln::util::fibonacci_heap@{mln::util::fibonacci\_\-heap}}
\subsubsection[{front}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename T $>$ const T \& {\bf mln::util::fibonacci\_\-heap}$<$ P, T $>$::front (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{db/dbc/a00395_a7e96c2e02a0af619d824ced8c39c73e1}


Return the minimum value in the heap. 



Definition at line 569 of file fibonacci\_\-heap.hh.

\hypertarget{a00395_a49c6a143a9a9c38cf31ae3529b3545b7}{
\index{mln::util::fibonacci\_\-heap@{mln::util::fibonacci\_\-heap}!is\_\-empty@{is\_\-empty}}
\index{is\_\-empty@{is\_\-empty}!mln::util::fibonacci_heap@{mln::util::fibonacci\_\-heap}}
\subsubsection[{is\_\-empty}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename T $>$ bool {\bf mln::util::fibonacci\_\-heap}$<$ P, T $>$::is\_\-empty (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{db/dbc/a00395_a49c6a143a9a9c38cf31ae3529b3545b7}


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

\hypertarget{a00395_a321a1431741af0988d4ae00a3b243762}{
\index{mln::util::fibonacci\_\-heap@{mln::util::fibonacci\_\-heap}!is\_\-valid@{is\_\-valid}}
\index{is\_\-valid@{is\_\-valid}!mln::util::fibonacci_heap@{mln::util::fibonacci\_\-heap}}
\subsubsection[{is\_\-valid}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename T $>$ bool {\bf mln::util::fibonacci\_\-heap}$<$ P, T $>$::is\_\-valid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{db/dbc/a00395_a321a1431741af0988d4ae00a3b243762}


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

\hypertarget{a00395_a35b38e30c5b3f7764916568df71d3285}{
\index{mln::util::fibonacci\_\-heap@{mln::util::fibonacci\_\-heap}!nelements@{nelements}}
\index{nelements@{nelements}!mln::util::fibonacci_heap@{mln::util::fibonacci\_\-heap}}
\subsubsection[{nelements}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename T $>$ unsigned {\bf mln::util::fibonacci\_\-heap}$<$ P, T $>$::nelements (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{db/dbc/a00395_a35b38e30c5b3f7764916568df71d3285}


Return the number of elements. 



Definition at line 745 of file fibonacci\_\-heap.hh.

\hypertarget{a00395_a018fbeb23f6e29ff256efeea70f60b65}{
\index{mln::util::fibonacci\_\-heap@{mln::util::fibonacci\_\-heap}!operator=@{operator=}}
\index{operator=@{operator=}!mln::util::fibonacci_heap@{mln::util::fibonacci\_\-heap}}
\subsubsection[{operator=}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename T $>$ {\bf fibonacci\_\-heap}$<$ P, T $>$ \& {\bf mln::util::fibonacci\_\-heap}$<$ P, T $>$::operator= (
\begin{DoxyParamCaption}
\item[{{\bf fibonacci\_\-heap}$<$ P, T $>$ \&}]{ rhs}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{db/dbc/a00395_a018fbeb23f6e29ff256efeea70f60b65}


Assignment operator. 

Be ware that this operator do $\ast$not$\ast$ copy the data from {\ttfamily rhs} to this heap. It moves all elements which means that afterwards, {\ttfamily rhs} is is cleared and all its elements are part of this new heap. 

Definition at line 754 of file fibonacci\_\-heap.hh.

\hypertarget{a00395_a57114bc737e812989b4f8dabf90f1fa4}{
\index{mln::util::fibonacci\_\-heap@{mln::util::fibonacci\_\-heap}!pop\_\-front@{pop\_\-front}}
\index{pop\_\-front@{pop\_\-front}!mln::util::fibonacci_heap@{mln::util::fibonacci\_\-heap}}
\subsubsection[{pop\_\-front}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename T $>$ T {\bf mln::util::fibonacci\_\-heap}$<$ P, T $>$::pop\_\-front (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{db/dbc/a00395_a57114bc737e812989b4f8dabf90f1fa4}


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(), and mln::util::fibonacci\_\-heap$<$ P, T $>$::push().



Referenced by mln::util::fibonacci\_\-heap$<$ P, T $>$::clear().

\hypertarget{a00395_a753213d6ff16d5b8d9577b838ac756eb}{
\index{mln::util::fibonacci\_\-heap@{mln::util::fibonacci\_\-heap}!push@{push}}
\index{push@{push}!mln::util::fibonacci_heap@{mln::util::fibonacci\_\-heap}}
\subsubsection[{push}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename T $>$ void {\bf mln::util::fibonacci\_\-heap}$<$ P, T $>$::push (
\begin{DoxyParamCaption}
\item[{const P \&}]{ priority, }
\item[{const T \&}]{ value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{db/dbc/a00395_a753213d6ff16d5b8d9577b838ac756eb}


Push a new element in the heap. 

\begin{DoxySeeAlso}{See also}
insert 
\end{DoxySeeAlso}


Definition at line 508 of file fibonacci\_\-heap.hh.



Referenced by mln::util::fibonacci\_\-heap$<$ P, T $>$::pop\_\-front().

\hypertarget{a00395_af03fac8e8ed6d8de6f4a317068c8e3d1}{
\index{mln::util::fibonacci\_\-heap@{mln::util::fibonacci\_\-heap}!push@{push}}
\index{push@{push}!mln::util::fibonacci_heap@{mln::util::fibonacci\_\-heap}}
\subsubsection[{push}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename T $>$ void {\bf mln::util::fibonacci\_\-heap}$<$ P, T $>$::push (
\begin{DoxyParamCaption}
\item[{{\bf fibonacci\_\-heap}$<$ P, T $>$ \&}]{ other\_\-heap}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{db/dbc/a00395_af03fac8e8ed6d8de6f4a317068c8e3d1}


Take {\ttfamily other\_\-heap's} elements and insert them in this heap. 

After this call {\ttfamily other\_\-heap} is cleared. 

Definition at line 520 of file fibonacci\_\-heap.hh.



References mln::util::fibonacci\_\-heap$<$ P, T $>$::is\_\-empty().

