\hypertarget{a00126}{
\section{mln::accu::stat::var$<$ T $>$ Struct Template Reference}
\label{d7/d12/a00126}\index{mln::accu::stat::var@{mln::accu::stat::var}}
}


Var accumulator class.  




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



Inherits base$<$ algebra::mat$<$ T::dim, T::dim, float $>$, var$<$ T $>$ $>$.

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef algebra::vec$<$ dim, float $>$ \hyperlink{a00126_a5e0a3201641734ff0a5ad0eeb1ce202f}{mean\_\-t}
\begin{DoxyCompactList}\small\item\em Type equipment. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{a00126_a0e63cd54f3c867a49b0d88de86916198}{is\_\-valid} () const 
\begin{DoxyCompactList}\small\item\em Check whether this accu returns a valid result. \item\end{DoxyCompactList}\item 
\hyperlink{a00126_a5e0a3201641734ff0a5ad0eeb1ce202f}{mean\_\-t} \hyperlink{a00126_a88889f138f5e73aabd497ae797b53889}{mean} () const 
\begin{DoxyCompactList}\small\item\em Get the mean vector. \item\end{DoxyCompactList}\item 
unsigned \hyperlink{a00126_a7cd91d22d03ee045cdf4b9bb47aed778}{n\_\-items} () const 
\begin{DoxyCompactList}\small\item\em Get the number of items. \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 
result \hyperlink{a00126_a98612191853aa60ecec6f77856d4efec}{to\_\-result} () const 
\begin{DoxyCompactList}\small\item\em Get the accumulator result (the var value). \item\end{DoxyCompactList}\item 
result \hyperlink{a00126_aba510715b14c591cddbc1f905efa9a77}{variance} () const 
\begin{DoxyCompactList}\small\item\em Get the variance matrix. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
void \hyperlink{a00126_a54780af1c21973d607e657074cc5afaf}{init} ()
\begin{DoxyCompactList}\small\item\em Manipulators. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}


\subsection{Detailed Description}
\subsubsection*{template$<$typename T$>$ struct mln::accu::stat::var$<$ T $>$}

Var accumulator class. Parameter {\ttfamily T} is the type of vectors 

Definition at line 58 of file accu/stat/var.hh.



\subsection{Member Typedef Documentation}
\hypertarget{a00126_a5e0a3201641734ff0a5ad0eeb1ce202f}{
\index{mln::accu::stat::var@{mln::accu::stat::var}!mean\_\-t@{mean\_\-t}}
\index{mean\_\-t@{mean\_\-t}!mln::accu::stat::var@{mln::accu::stat::var}}
\subsubsection[{mean\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T$>$ typedef algebra::vec$<$dim,float$>$ {\bf mln::accu::stat::var}$<$ T $>$::{\bf mean\_\-t}}}
\label{d7/d12/a00126_a5e0a3201641734ff0a5ad0eeb1ce202f}


Type equipment. 



Definition at line 88 of file accu/stat/var.hh.



\subsection{Member Function Documentation}
\hypertarget{a00126_a54780af1c21973d607e657074cc5afaf}{
\index{mln::accu::stat::var@{mln::accu::stat::var}!init@{init}}
\index{init@{init}!mln::accu::stat::var@{mln::accu::stat::var}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ void {\bf mln::accu::stat::var}$<$ T $>$::init (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/d12/a00126_a54780af1c21973d607e657074cc5afaf}


Manipulators. 



Definition at line 118 of file accu/stat/var.hh.

\hypertarget{a00126_a0e63cd54f3c867a49b0d88de86916198}{
\index{mln::accu::stat::var@{mln::accu::stat::var}!is\_\-valid@{is\_\-valid}}
\index{is\_\-valid@{is\_\-valid}!mln::accu::stat::var@{mln::accu::stat::var}}
\subsubsection[{is\_\-valid}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ bool {\bf mln::accu::stat::var}$<$ T $>$::is\_\-valid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/d12/a00126_a0e63cd54f3c867a49b0d88de86916198}


Check whether this accu returns a valid result. 



Definition at line 213 of file accu/stat/var.hh.

\hypertarget{a00126_a88889f138f5e73aabd497ae797b53889}{
\index{mln::accu::stat::var@{mln::accu::stat::var}!mean@{mean}}
\index{mean@{mean}!mln::accu::stat::var@{mln::accu::stat::var}}
\subsubsection[{mean}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf var}$<$ T $>$::{\bf mean\_\-t} {\bf mln::accu::stat::var}$<$ T $>$::{\bf mean} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/d12/a00126_a88889f138f5e73aabd497ae797b53889}


Get the mean vector. 



Definition at line 200 of file accu/stat/var.hh.



References mln::literal::zero.

\hypertarget{a00126_a7cd91d22d03ee045cdf4b9bb47aed778}{
\index{mln::accu::stat::var@{mln::accu::stat::var}!n\_\-items@{n\_\-items}}
\index{n\_\-items@{n\_\-items}!mln::accu::stat::var@{mln::accu::stat::var}}
\subsubsection[{n\_\-items}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ unsigned {\bf mln::accu::stat::var}$<$ T $>$::n\_\-items (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/d12/a00126_a7cd91d22d03ee045cdf4b9bb47aed778}


Get the number of items. 



Definition at line 192 of file accu/stat/var.hh.

\hypertarget{a00026_a745794a4ef16926d3c09ebbaa8b6b557}{
\index{mln::accu::stat::var@{mln::accu::stat::var}!take\_\-as\_\-init@{take\_\-as\_\-init}}
\index{take\_\-as\_\-init@{take\_\-as\_\-init}!mln::accu::stat::var@{mln::accu::stat::var}}
\subsubsection[{take\_\-as\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf mln::Accumulator}$<$ {\bf var}$<$ T $>$  $>$::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::stat::var@{mln::accu::stat::var}!take\_\-n\_\-times@{take\_\-n\_\-times}}
\index{take\_\-n\_\-times@{take\_\-n\_\-times}!mln::accu::stat::var@{mln::accu::stat::var}}
\subsubsection[{take\_\-n\_\-times}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf mln::Accumulator}$<$ {\bf var}$<$ T $>$  $>$::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{a00126_a98612191853aa60ecec6f77856d4efec}{
\index{mln::accu::stat::var@{mln::accu::stat::var}!to\_\-result@{to\_\-result}}
\index{to\_\-result@{to\_\-result}!mln::accu::stat::var@{mln::accu::stat::var}}
\subsubsection[{to\_\-result}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf var}$<$ T $>$::result {\bf mln::accu::stat::var}$<$ T $>$::to\_\-result (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/d12/a00126_a98612191853aa60ecec6f77856d4efec}


Get the accumulator result (the var value). 



Definition at line 168 of file accu/stat/var.hh.



References mln::literal::zero.

\hypertarget{a00126_aba510715b14c591cddbc1f905efa9a77}{
\index{mln::accu::stat::var@{mln::accu::stat::var}!variance@{variance}}
\index{variance@{variance}!mln::accu::stat::var@{mln::accu::stat::var}}
\subsubsection[{variance}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf var}$<$ T $>$::result {\bf mln::accu::stat::var}$<$ T $>$::{\bf variance} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/d12/a00126_aba510715b14c591cddbc1f905efa9a77}


Get the variance matrix. 



Definition at line 184 of file accu/stat/var.hh.

