\hypertarget{a00289}{
\section{mln::morpho::attribute::card$<$ I $>$ Class Template Reference}
\label{d4/d66/a00289}\index{mln::morpho::attribute::card@{mln::morpho::attribute::card}}
}


Cardinality accumulator class.  




{\ttfamily \#include $<$card.hh$>$}



Inherits base$<$ unsigned, card$<$ I $>$ $>$.

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{a00289_ae33d80fc4017cd52ac0a7f396a4d18b4}{is\_\-valid} () const 
\begin{DoxyCompactList}\small\item\em Check whether this accu is able to 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{a00289_a57e8183dae11c09f0e0b7404f4d95678}{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{a00289_a1041d72bcd8b9a4571b1df5b7ea7ea8d}{init} ()
\begin{DoxyCompactList}\small\item\em Manipulators. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}


\subsection{Detailed Description}
\subsubsection*{template$<$typename I$>$ class mln::morpho::attribute::card$<$ I $>$}

Cardinality accumulator class. 

Definition at line 80 of file morpho/attribute/card.hh.



\subsection{Member Function Documentation}
\hypertarget{a00289_a1041d72bcd8b9a4571b1df5b7ea7ea8d}{
\index{mln::morpho::attribute::card@{mln::morpho::attribute::card}!init@{init}}
\index{init@{init}!mln::morpho::attribute::card@{mln::morpho::attribute::card}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ void {\bf mln::morpho::attribute::card}$<$ I $>$::init (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d4/d66/a00289_a1041d72bcd8b9a4571b1df5b7ea7ea8d}


Manipulators. 



Definition at line 128 of file morpho/attribute/card.hh.

\hypertarget{a00289_ae33d80fc4017cd52ac0a7f396a4d18b4}{
\index{mln::morpho::attribute::card@{mln::morpho::attribute::card}!is\_\-valid@{is\_\-valid}}
\index{is\_\-valid@{is\_\-valid}!mln::morpho::attribute::card@{mln::morpho::attribute::card}}
\subsubsection[{is\_\-valid}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ bool {\bf mln::morpho::attribute::card}$<$ I $>$::is\_\-valid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d4/d66/a00289_ae33d80fc4017cd52ac0a7f396a4d18b4}


Check whether this accu is able to return a result. 

Always true here. 

Definition at line 197 of file morpho/attribute/card.hh.

\hypertarget{a00026_a745794a4ef16926d3c09ebbaa8b6b557}{
\index{mln::morpho::attribute::card@{mln::morpho::attribute::card}!take\_\-as\_\-init@{take\_\-as\_\-init}}
\index{take\_\-as\_\-init@{take\_\-as\_\-init}!mln::morpho::attribute::card@{mln::morpho::attribute::card}}
\subsubsection[{take\_\-as\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf mln::Accumulator}$<$ {\bf card}$<$ I $>$  $>$::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::morpho::attribute::card@{mln::morpho::attribute::card}!take\_\-n\_\-times@{take\_\-n\_\-times}}
\index{take\_\-n\_\-times@{take\_\-n\_\-times}!mln::morpho::attribute::card@{mln::morpho::attribute::card}}
\subsubsection[{take\_\-n\_\-times}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf mln::Accumulator}$<$ {\bf card}$<$ I $>$  $>$::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{a00289_a57e8183dae11c09f0e0b7404f4d95678}{
\index{mln::morpho::attribute::card@{mln::morpho::attribute::card}!to\_\-result@{to\_\-result}}
\index{to\_\-result@{to\_\-result}!mln::morpho::attribute::card@{mln::morpho::attribute::card}}
\subsubsection[{to\_\-result}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ unsigned {\bf mln::morpho::attribute::card}$<$ I $>$::to\_\-result (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d4/d66/a00289_a57e8183dae11c09f0e0b7404f4d95678}


Get the value of the accumulator. 



Definition at line 189 of file morpho/attribute/card.hh.

