\hypertarget{a00058}{
\section{mln::accu::count\_\-adjacent\_\-vertices$<$ F, S $>$ Struct Template Reference}
\label{d7/df7/a00058}\index{mln::accu::count\_\-adjacent\_\-vertices@{mln::accu::count\_\-adjacent\_\-vertices}}
}


\hyperlink{a00026}{Accumulator} class counting the number of vertices adjacent to a set of mln::p\_\-edges\_\-psite (i.e., a set of edges).  




{\ttfamily \#include $<$count\_\-adjacent\_\-vertices.hh$>$}



Inherits base$<$ unsigned, count\_\-adjacent\_\-vertices$<$ F, S $>$ $>$.

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{a00058_aa970ac7feda5d6544f005fe4215bbc44}{is\_\-valid} () const 
\begin{DoxyCompactList}\small\item\em Return whether this accu can return a result. \item\end{DoxyCompactList}\item 
void \hyperlink{a00026_a745794a4ef16926d3c09ebbaa8b6b557}{take\_\-as\_\-init} (const T \&t)
\begin{DoxyCompactList}\small\item\em Take as initialization the value {\ttfamily t}. \item\end{DoxyCompactList}\item 
void \hyperlink{a00026_a138e094daa1a85f345bbdfd852c9fc67}{take\_\-n\_\-times} (unsigned n, const T \&t)
\begin{DoxyCompactList}\small\item\em Take {\ttfamily n} times the value {\ttfamily t}. \item\end{DoxyCompactList}\item 
unsigned \hyperlink{a00058_ad313b27b79253228890d32776e36f08e}{to\_\-result} () const 
\begin{DoxyCompactList}\small\item\em Get the value of the accumulator. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
void \hyperlink{a00058_a2b75a2bbfddaff3b186a648dbcf050e7}{init} ()
\begin{DoxyCompactList}\small\item\em Manipulators. \item\end{DoxyCompactList}\item 
void \hyperlink{a00058_a367d33b38c7f19239096335117ecaf0b}{set\_\-value} (unsigned c)
\begin{DoxyCompactList}\small\item\em Force the value of the counter to {\itshape c\/}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}


\subsection{Detailed Description}
\subsubsection*{template$<$typename F, typename S$>$ struct mln::accu::count\_\-adjacent\_\-vertices$<$ F, S $>$}

\hyperlink{a00026}{Accumulator} class counting the number of vertices adjacent to a set of mln::p\_\-edges\_\-psite (i.e., a set of edges). The type to be count is \hyperlink{a00408}{mln::util::pix}$<$ pw::image$<$F, S$>$ $>$ where {\ttfamily F} and {\ttfamily S} are the parameters of this class.

This accumulator is used by mln::closing\_\-area\_\-on\_\-vertices and mln::opening\_\-area\_\-on\_\-vertices. 

Definition at line 58 of file accu/count\_\-adjacent\_\-vertices.hh.



\subsection{Member Function Documentation}
\hypertarget{a00058_a2b75a2bbfddaff3b186a648dbcf050e7}{
\index{mln::accu::count\_\-adjacent\_\-vertices@{mln::accu::count\_\-adjacent\_\-vertices}!init@{init}}
\index{init@{init}!mln::accu::count_adjacent_vertices@{mln::accu::count\_\-adjacent\_\-vertices}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename F , typename S $>$ void {\bf mln::accu::count\_\-adjacent\_\-vertices}$<$ F, S $>$::init (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df7/a00058_a2b75a2bbfddaff3b186a648dbcf050e7}


Manipulators. 



Definition at line 123 of file accu/count\_\-adjacent\_\-vertices.hh.

\hypertarget{a00058_aa970ac7feda5d6544f005fe4215bbc44}{
\index{mln::accu::count\_\-adjacent\_\-vertices@{mln::accu::count\_\-adjacent\_\-vertices}!is\_\-valid@{is\_\-valid}}
\index{is\_\-valid@{is\_\-valid}!mln::accu::count_adjacent_vertices@{mln::accu::count\_\-adjacent\_\-vertices}}
\subsubsection[{is\_\-valid}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename F , typename S $>$ bool {\bf mln::accu::count\_\-adjacent\_\-vertices}$<$ F, S $>$::is\_\-valid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df7/a00058_aa970ac7feda5d6544f005fe4215bbc44}


Return whether this accu can return a result. 



Definition at line 177 of file accu/count\_\-adjacent\_\-vertices.hh.

\hypertarget{a00058_a367d33b38c7f19239096335117ecaf0b}{
\index{mln::accu::count\_\-adjacent\_\-vertices@{mln::accu::count\_\-adjacent\_\-vertices}!set\_\-value@{set\_\-value}}
\index{set\_\-value@{set\_\-value}!mln::accu::count_adjacent_vertices@{mln::accu::count\_\-adjacent\_\-vertices}}
\subsubsection[{set\_\-value}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename F , typename S $>$ void {\bf mln::accu::count\_\-adjacent\_\-vertices}$<$ F, S $>$::set\_\-value (
\begin{DoxyParamCaption}
\item[{unsigned}]{ c}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df7/a00058_a367d33b38c7f19239096335117ecaf0b}


Force the value of the counter to {\itshape c\/}. 



Definition at line 159 of file accu/count\_\-adjacent\_\-vertices.hh.

\hypertarget{a00026_a745794a4ef16926d3c09ebbaa8b6b557}{
\index{mln::accu::count\_\-adjacent\_\-vertices@{mln::accu::count\_\-adjacent\_\-vertices}!take\_\-as\_\-init@{take\_\-as\_\-init}}
\index{take\_\-as\_\-init@{take\_\-as\_\-init}!mln::accu::count_adjacent_vertices@{mln::accu::count\_\-adjacent\_\-vertices}}
\subsubsection[{take\_\-as\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf mln::Accumulator}$<$ {\bf count\_\-adjacent\_\-vertices}$<$ F, S $>$  $>$::take\_\-as\_\-init (
\begin{DoxyParamCaption}
\item[{const T \&}]{ t}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{d6/d5b/a00026_a745794a4ef16926d3c09ebbaa8b6b557}


Take as initialization the value {\ttfamily t}. 

Dev note: this is a final method; override if needed by take\_\-as\_\-init\_\- (ending with '\_\-'). \hypertarget{a00026_a138e094daa1a85f345bbdfd852c9fc67}{
\index{mln::accu::count\_\-adjacent\_\-vertices@{mln::accu::count\_\-adjacent\_\-vertices}!take\_\-n\_\-times@{take\_\-n\_\-times}}
\index{take\_\-n\_\-times@{take\_\-n\_\-times}!mln::accu::count_adjacent_vertices@{mln::accu::count\_\-adjacent\_\-vertices}}
\subsubsection[{take\_\-n\_\-times}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf mln::Accumulator}$<$ {\bf count\_\-adjacent\_\-vertices}$<$ F, S $>$  $>$::take\_\-n\_\-times (
\begin{DoxyParamCaption}
\item[{unsigned}]{ n, }
\item[{const T \&}]{ t}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inherited\mbox{]}}}}
\label{d6/d5b/a00026_a138e094daa1a85f345bbdfd852c9fc67}


Take {\ttfamily n} times the value {\ttfamily t}. 

Dev note: this is a final method; override if needed by take\_\-as\_\-init\_\- (ending with '\_\-'). \hypertarget{a00058_ad313b27b79253228890d32776e36f08e}{
\index{mln::accu::count\_\-adjacent\_\-vertices@{mln::accu::count\_\-adjacent\_\-vertices}!to\_\-result@{to\_\-result}}
\index{to\_\-result@{to\_\-result}!mln::accu::count_adjacent_vertices@{mln::accu::count\_\-adjacent\_\-vertices}}
\subsubsection[{to\_\-result}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename F , typename S $>$ unsigned {\bf mln::accu::count\_\-adjacent\_\-vertices}$<$ F, S $>$::to\_\-result (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df7/a00058_ad313b27b79253228890d32776e36f08e}


Get the value of the accumulator. 



Definition at line 151 of file accu/count\_\-adjacent\_\-vertices.hh.

