\hypertarget{a00316}{
\section{mln::p\_\-priority$<$ P, Q $>$ Class Template Reference}
\label{d3/db8/a00316}\index{mln::p\_\-priority@{mln::p\_\-priority}}
}


Priority queue.  




{\ttfamily \#include $<$p\_\-priority.hh$>$}



Inherits site\_\-set\_\-base\_\-$<$ Q::site, p\_\-priority$<$ P, Q $>$ $>$.

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef p\_\-double\_\-piter$<$ \hyperlink{a00316}{self\_\-}, mln\_\-fwd\_\-eiter(\hyperlink{a00409}{util::set}$<$ P $>$), typename Q::bkd\_\-piter $>$ \hyperlink{a00316_a3e7c47f46cce897a20080ac69b6aa021}{bkd\_\-piter}
\begin{DoxyCompactList}\small\item\em Backward \hyperlink{a00345}{Site\_\-Iterator} associated type. \item\end{DoxyCompactList}\item 
typedef Q::element \hyperlink{a00316_a3ae95465c0ee218a5f9f6b41fe36c57d}{element}
\begin{DoxyCompactList}\small\item\em Element associated type. \item\end{DoxyCompactList}\item 
typedef p\_\-double\_\-piter$<$ \hyperlink{a00316}{self\_\-}, mln\_\-bkd\_\-eiter(\hyperlink{a00409}{util::set}$<$ P $>$), typename Q::fwd\_\-piter $>$ \hyperlink{a00316_a94803c2967277ba5d531da331f625235}{fwd\_\-piter}
\begin{DoxyCompactList}\small\item\em Forward \hyperlink{a00345}{Site\_\-Iterator} associated type. \item\end{DoxyCompactList}\item 
typedef std::pair$<$ P, \hyperlink{a00316_a3ae95465c0ee218a5f9f6b41fe36c57d}{element} $>$ \hyperlink{a00316_ac95ff2459e415191cbb9b29105216687}{i\_\-element}
\begin{DoxyCompactList}\small\item\em Insertion element associated type. \item\end{DoxyCompactList}\item 
typedef \hyperlink{a00316_a94803c2967277ba5d531da331f625235}{fwd\_\-piter} \hyperlink{a00316_a13f29e74ace93c771e396911cb7aa7bb}{piter}
\begin{DoxyCompactList}\small\item\em \hyperlink{a00345}{Site\_\-Iterator} associated type. \item\end{DoxyCompactList}\item 
typedef p\_\-double\_\-psite$<$ \hyperlink{a00316}{self\_\-}, Q $>$ \hyperlink{a00316_a5004d91fbdea878c9873e4ba70ed0220}{psite}
\begin{DoxyCompactList}\small\item\em Psite associated type. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{a00316_a0dc8841057486d2073ccecdf0c80623c}{clear} ()
\begin{DoxyCompactList}\small\item\em Clear the queue. \item\end{DoxyCompactList}\item 
bool \hyperlink{a00316_ae896e4923dff60469d08860603616cee}{exists\_\-priority} (const P \&priority) const 
\begin{DoxyCompactList}\small\item\em Test if the {\ttfamily priority} exists. \item\end{DoxyCompactList}\item 
const Q::element \& \hyperlink{a00316_a50b76958b6b7411a574c686a347f6c7f}{front} () const 
\begin{DoxyCompactList}\small\item\em Give an element with highest priority. \item\end{DoxyCompactList}\item 
bool \hyperlink{a00316_a9bd5544ba7e183c24e36cd7238396778}{has} (const \hyperlink{a00316_a5004d91fbdea878c9873e4ba70ed0220}{psite} \&) const 
\begin{DoxyCompactList}\small\item\em Test is the psite {\ttfamily p} belongs to this site set. \item\end{DoxyCompactList}\item 
const P \hyperlink{a00316_ae387bfb3e9591cab93a082bc93cf77af}{highest\_\-priority} () const 
\begin{DoxyCompactList}\small\item\em Give the highest priority. \item\end{DoxyCompactList}\item 
void \hyperlink{a00316_a25c8e71003867b674c2acbeea33835d8}{insert} (const \hyperlink{a00316_ac95ff2459e415191cbb9b29105216687}{i\_\-element} \&p\_\-e)
\begin{DoxyCompactList}\small\item\em Insert a pair {\ttfamily p\_\-e} (priority p, element e). \item\end{DoxyCompactList}\item 
void \hyperlink{a00316_ae9905085a65c7126dce77686ce12e4eb}{insert} (const \hyperlink{a00316}{p\_\-priority}$<$ P, Q $>$ \&other)
\begin{DoxyCompactList}\small\item\em Insert elements from another priority queue. \item\end{DoxyCompactList}\item 
bool \hyperlink{a00316_a3f2877928015d5bbfe035aba6359cfbf}{is\_\-valid} () const 
\begin{DoxyCompactList}\small\item\em Test this set validity so returns always true. \item\end{DoxyCompactList}\item 
const P \hyperlink{a00316_add76877e6b0fcfa5187f69724346f166}{lowest\_\-priority} () const 
\begin{DoxyCompactList}\small\item\em Give the lowest priority. \item\end{DoxyCompactList}\item 
std::size\_\-t \hyperlink{a00316_ae04e4d15fb8663299517d7b3ec9154c1}{memory\_\-size} () const 
\begin{DoxyCompactList}\small\item\em Return the size of this site set in memory. \item\end{DoxyCompactList}\item 
unsigned \hyperlink{a00316_ae7c949c7ee985d05f7829402ba83a292}{nsites} () const 
\begin{DoxyCompactList}\small\item\em Give the number of sites. \item\end{DoxyCompactList}\item 
const Q \& \hyperlink{a00316_afc223819cf277286c0c412fa3c2a6f5d}{operator()} (const P \&priority) const 
\begin{DoxyCompactList}\small\item\em Give the queue with the priority {\ttfamily priority}. \item\end{DoxyCompactList}\item 
\hyperlink{a00316_a1972100d38b182095f702454e12a4578}{p\_\-priority} ()
\begin{DoxyCompactList}\small\item\em Constructor. \item\end{DoxyCompactList}\item 
void \hyperlink{a00316_adf72919496b95f3898e312f974e40cd3}{pop} ()
\begin{DoxyCompactList}\small\item\em Pop (remove) from the queue an element with highest priority. \item\end{DoxyCompactList}\item 
Q::element \hyperlink{a00316_a40f7b674752550c2cb334bcf326344fb}{pop\_\-front} ()
\begin{DoxyCompactList}\small\item\em Return an element with highest priority and remove it from the set. \item\end{DoxyCompactList}\item 
const \hyperlink{a00409}{util::set}$<$ P $>$ \& \hyperlink{a00316_af2aeaa608f0cf9027d749cb749428739}{priorities} () const 
\begin{DoxyCompactList}\small\item\em Give the set of priorities. \item\end{DoxyCompactList}\item 
void \hyperlink{a00316_a9a89e1405d11aff9a89a9ebba1d22f12}{push} (const P \&priority, const \hyperlink{a00316_a3ae95465c0ee218a5f9f6b41fe36c57d}{element} \&e)
\begin{DoxyCompactList}\small\item\em Push in the queue with {\ttfamily priority} the element {\ttfamily e}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename P, typename Q$>$ class mln::p\_\-priority$<$ P, Q $>$}

Priority queue. The parameter {\ttfamily P} is the type of the priorities (for instance unsigned).

The parameter {\ttfamily Q} is a type of queue (for instance p\_\-queue$<$point2d$>$). 

Definition at line 76 of file p\_\-priority.hh.



\subsection{Member Typedef Documentation}
\hypertarget{a00316_a3e7c47f46cce897a20080ac69b6aa021}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!bkd\_\-piter@{bkd\_\-piter}}
\index{bkd\_\-piter@{bkd\_\-piter}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{bkd\_\-piter}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P, typename Q$>$ typedef p\_\-double\_\-piter$<$ {\bf self\_\-}, mln\_\-fwd\_\-eiter({\bf util::set}$<$P$>$), typename Q ::{\bf bkd\_\-piter} $>$ {\bf mln::p\_\-priority}$<$ P, Q $>$::{\bf bkd\_\-piter}}}
\label{d3/db8/a00316_a3e7c47f46cce897a20080ac69b6aa021}


Backward \hyperlink{a00345}{Site\_\-Iterator} associated type. 



Definition at line 98 of file p\_\-priority.hh.

\hypertarget{a00316_a3ae95465c0ee218a5f9f6b41fe36c57d}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!element@{element}}
\index{element@{element}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{element}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P, typename Q$>$ typedef Q ::{\bf element} {\bf mln::p\_\-priority}$<$ P, Q $>$::{\bf element}}}
\label{d3/db8/a00316_a3ae95465c0ee218a5f9f6b41fe36c57d}


Element associated type. 



Definition at line 84 of file p\_\-priority.hh.

\hypertarget{a00316_a94803c2967277ba5d531da331f625235}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!fwd\_\-piter@{fwd\_\-piter}}
\index{fwd\_\-piter@{fwd\_\-piter}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{fwd\_\-piter}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P, typename Q$>$ typedef p\_\-double\_\-piter$<$ {\bf self\_\-}, mln\_\-bkd\_\-eiter({\bf util::set}$<$P$>$), typename Q ::{\bf fwd\_\-piter} $>$ {\bf mln::p\_\-priority}$<$ P, Q $>$::{\bf fwd\_\-piter}}}
\label{d3/db8/a00316_a94803c2967277ba5d531da331f625235}


Forward \hyperlink{a00345}{Site\_\-Iterator} associated type. 



Definition at line 93 of file p\_\-priority.hh.

\hypertarget{a00316_ac95ff2459e415191cbb9b29105216687}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!i\_\-element@{i\_\-element}}
\index{i\_\-element@{i\_\-element}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{i\_\-element}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P, typename Q$>$ typedef std::pair$<$P, {\bf element}$>$ {\bf mln::p\_\-priority}$<$ P, Q $>$::{\bf i\_\-element}}}
\label{d3/db8/a00316_ac95ff2459e415191cbb9b29105216687}


Insertion element associated type. 



Definition at line 121 of file p\_\-priority.hh.

\hypertarget{a00316_a13f29e74ace93c771e396911cb7aa7bb}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!piter@{piter}}
\index{piter@{piter}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{piter}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P, typename Q$>$ typedef {\bf fwd\_\-piter} {\bf mln::p\_\-priority}$<$ P, Q $>$::{\bf piter}}}
\label{d3/db8/a00316_a13f29e74ace93c771e396911cb7aa7bb}


\hyperlink{a00345}{Site\_\-Iterator} associated type. 



Definition at line 101 of file p\_\-priority.hh.

\hypertarget{a00316_a5004d91fbdea878c9873e4ba70ed0220}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!psite@{psite}}
\index{psite@{psite}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{psite}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P, typename Q$>$ typedef p\_\-double\_\-psite$<${\bf self\_\-}, Q$>$ {\bf mln::p\_\-priority}$<$ P, Q $>$::{\bf psite}}}
\label{d3/db8/a00316_a5004d91fbdea878c9873e4ba70ed0220}


Psite associated type. 



Definition at line 88 of file p\_\-priority.hh.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{a00316_a1972100d38b182095f702454e12a4578}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!p\_\-priority@{p\_\-priority}}
\index{p\_\-priority@{p\_\-priority}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{p\_\-priority}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ {\bf mln::p\_\-priority}$<$ P, Q $>$::{\bf p\_\-priority} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_a1972100d38b182095f702454e12a4578}


Constructor. 



Definition at line 202 of file p\_\-priority.hh.



\subsection{Member Function Documentation}
\hypertarget{a00316_a0dc8841057486d2073ccecdf0c80623c}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!clear@{clear}}
\index{clear@{clear}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{clear}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ void {\bf mln::p\_\-priority}$<$ P, Q $>$::clear (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_a0dc8841057486d2073ccecdf0c80623c}


Clear the queue. 



Definition at line 316 of file p\_\-priority.hh.

\hypertarget{a00316_ae896e4923dff60469d08860603616cee}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!exists\_\-priority@{exists\_\-priority}}
\index{exists\_\-priority@{exists\_\-priority}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{exists\_\-priority}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ bool {\bf mln::p\_\-priority}$<$ P, Q $>$::exists\_\-priority (
\begin{DoxyParamCaption}
\item[{const P \&}]{ priority}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_ae896e4923dff60469d08860603616cee}


Test if the {\ttfamily priority} exists. 



Definition at line 366 of file p\_\-priority.hh.



Referenced by mln::p\_\-priority$<$ P, Q $>$::operator()().

\hypertarget{a00316_a50b76958b6b7411a574c686a347f6c7f}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!front@{front}}
\index{front@{front}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{front}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ const Q::element \& {\bf mln::p\_\-priority}$<$ P, Q $>$::front (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_a50b76958b6b7411a574c686a347f6c7f}


Give an element with highest priority. 

If several elements have this priority, the least recently inserted is chosen. \begin{DoxyPrecond}{Precondition}
! is\_\-empty() 
\end{DoxyPrecond}


Definition at line 294 of file p\_\-priority.hh.



References mln::p\_\-priority$<$ P, Q $>$::highest\_\-priority().



Referenced by mln::morpho::meyer\_\-wst(), and mln::morpho::watershed::topological().

\hypertarget{a00316_a9bd5544ba7e183c24e36cd7238396778}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!has@{has}}
\index{has@{has}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{has}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ bool {\bf mln::p\_\-priority}$<$ P, Q $>$::has (
\begin{DoxyParamCaption}
\item[{const {\bf psite} \&}]{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_a9bd5544ba7e183c24e36cd7238396778}


Test is the psite {\ttfamily p} belongs to this site set. 



Definition at line 211 of file p\_\-priority.hh.

\hypertarget{a00316_ae387bfb3e9591cab93a082bc93cf77af}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!highest\_\-priority@{highest\_\-priority}}
\index{highest\_\-priority@{highest\_\-priority}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{highest\_\-priority}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ const P {\bf mln::p\_\-priority}$<$ P, Q $>$::highest\_\-priority (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_ae387bfb3e9591cab93a082bc93cf77af}


Give the highest priority. 

\begin{DoxyPrecond}{Precondition}
! is\_\-empty() 
\end{DoxyPrecond}


Definition at line 375 of file p\_\-priority.hh.



Referenced by mln::p\_\-priority$<$ P, Q $>$::front(), and mln::p\_\-priority$<$ P, Q $>$::pop().

\hypertarget{a00316_a25c8e71003867b674c2acbeea33835d8}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!insert@{insert}}
\index{insert@{insert}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{insert}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ void {\bf mln::p\_\-priority}$<$ P, Q $>$::insert (
\begin{DoxyParamCaption}
\item[{const {\bf i\_\-element} \&}]{ p\_\-e}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_a25c8e71003867b674c2acbeea33835d8}


Insert a pair {\ttfamily p\_\-e} (priority p, element e). 



Definition at line 251 of file p\_\-priority.hh.



References mln::p\_\-priority$<$ P, Q $>$::push().

\hypertarget{a00316_ae9905085a65c7126dce77686ce12e4eb}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!insert@{insert}}
\index{insert@{insert}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{insert}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ void {\bf mln::p\_\-priority}$<$ P, Q $>$::insert (
\begin{DoxyParamCaption}
\item[{const {\bf p\_\-priority}$<$ P, Q $>$ \&}]{ other}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_ae9905085a65c7126dce77686ce12e4eb}


Insert elements from another priority queue. 



Definition at line 259 of file p\_\-priority.hh.

\hypertarget{a00316_a3f2877928015d5bbfe035aba6359cfbf}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!is\_\-valid@{is\_\-valid}}
\index{is\_\-valid@{is\_\-valid}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{is\_\-valid}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ bool {\bf mln::p\_\-priority}$<$ P, Q $>$::is\_\-valid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_a3f2877928015d5bbfe035aba6359cfbf}


Test this set validity so returns always true. 



Definition at line 221 of file p\_\-priority.hh.

\hypertarget{a00316_add76877e6b0fcfa5187f69724346f166}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!lowest\_\-priority@{lowest\_\-priority}}
\index{lowest\_\-priority@{lowest\_\-priority}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{lowest\_\-priority}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ const P {\bf mln::p\_\-priority}$<$ P, Q $>$::lowest\_\-priority (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_add76877e6b0fcfa5187f69724346f166}


Give the lowest priority. 

\begin{DoxyPrecond}{Precondition}
! is\_\-empty() 
\end{DoxyPrecond}


Definition at line 384 of file p\_\-priority.hh.

\hypertarget{a00316_ae04e4d15fb8663299517d7b3ec9154c1}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!memory\_\-size@{memory\_\-size}}
\index{memory\_\-size@{memory\_\-size}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{memory\_\-size}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ std::size\_\-t {\bf mln::p\_\-priority}$<$ P, Q $>$::memory\_\-size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_ae04e4d15fb8663299517d7b3ec9154c1}


Return the size of this site set in memory. 



Definition at line 328 of file p\_\-priority.hh.

\hypertarget{a00316_ae7c949c7ee985d05f7829402ba83a292}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!nsites@{nsites}}
\index{nsites@{nsites}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{nsites}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ unsigned {\bf mln::p\_\-priority}$<$ P, Q $>$::nsites (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_ae7c949c7ee985d05f7829402ba83a292}


Give the number of sites. 



Definition at line 230 of file p\_\-priority.hh.



Referenced by mln::p\_\-priority$<$ P, Q $>$::operator()().

\hypertarget{a00316_afc223819cf277286c0c412fa3c2a6f5d}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!operator()@{operator()}}
\index{operator()@{operator()}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{operator()}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ const Q \& {\bf mln::p\_\-priority}$<$ P, Q $>$::operator() (
\begin{DoxyParamCaption}
\item[{const P \&}]{ priority}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_afc223819cf277286c0c412fa3c2a6f5d}


Give the queue with the priority {\ttfamily priority}. 

This method always works: if the priority is not in this set, an empty queue is returned. 

Definition at line 341 of file p\_\-priority.hh.



References mln::p\_\-priority$<$ P, Q $>$::exists\_\-priority(), and mln::p\_\-priority$<$ P, Q $>$::nsites().

\hypertarget{a00316_adf72919496b95f3898e312f974e40cd3}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!pop@{pop}}
\index{pop@{pop}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{pop}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ void {\bf mln::p\_\-priority}$<$ P, Q $>$::pop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_adf72919496b95f3898e312f974e40cd3}


Pop (remove) from the queue an element with highest priority. 

If several elements have this priority, the least recently inserted is chosen. \begin{DoxyPrecond}{Precondition}
! is\_\-empty() 
\end{DoxyPrecond}


Definition at line 277 of file p\_\-priority.hh.



References mln::p\_\-priority$<$ P, Q $>$::highest\_\-priority().



Referenced by mln::morpho::meyer\_\-wst(), and mln::morpho::watershed::topological().

\hypertarget{a00316_a40f7b674752550c2cb334bcf326344fb}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!pop\_\-front@{pop\_\-front}}
\index{pop\_\-front@{pop\_\-front}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{pop\_\-front}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ Q::element {\bf mln::p\_\-priority}$<$ P, Q $>$::pop\_\-front (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_a40f7b674752550c2cb334bcf326344fb}


Return an element with highest priority and remove it from the set. 

If several elements have this priority, the least recently inserted is chosen. \begin{DoxyPrecond}{Precondition}
! is\_\-empty() 
\end{DoxyPrecond}


Definition at line 304 of file p\_\-priority.hh.

\hypertarget{a00316_af2aeaa608f0cf9027d749cb749428739}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!priorities@{priorities}}
\index{priorities@{priorities}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{priorities}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ const {\bf util::set}$<$ P $>$ \& {\bf mln::p\_\-priority}$<$ P, Q $>$::priorities (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_af2aeaa608f0cf9027d749cb749428739}


Give the set of priorities. 



Definition at line 357 of file p\_\-priority.hh.

\hypertarget{a00316_a9a89e1405d11aff9a89a9ebba1d22f12}{
\index{mln::p\_\-priority@{mln::p\_\-priority}!push@{push}}
\index{push@{push}!mln::p_priority@{mln::p\_\-priority}}
\subsubsection[{push}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename Q $>$ void {\bf mln::p\_\-priority}$<$ P, Q $>$::push (
\begin{DoxyParamCaption}
\item[{const P \&}]{ priority, }
\item[{const {\bf element} \&}]{ e}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d3/db8/a00316_a9a89e1405d11aff9a89a9ebba1d22f12}


Push in the queue with {\ttfamily priority} the element {\ttfamily e}. 



Definition at line 239 of file p\_\-priority.hh.



Referenced by mln::p\_\-priority$<$ P, Q $>$::insert(), mln::morpho::meyer\_\-wst(), and mln::morpho::watershed::topological().

