\section{Max\+Iteration\+Termination Class Reference}
\label{classmlpack_1_1amf_1_1MaxIterationTermination}\index{Max\+Iteration\+Termination@{Max\+Iteration\+Termination}}


This termination policy only terminates when the maximum number of iterations has been reached.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Max\+Iteration\+Termination} (const size\+\_\+t max\+Iterations)
\begin{DoxyCompactList}\small\item\em Construct the termination policy with the given number of iterations allowed (default 1000). \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Index} ()
\begin{DoxyCompactList}\small\item\em Return something similar to the residue, which in this case is just the number of iterations left, since we don\textquotesingle{}t have access to anything else. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Mat\+Type $>$ }\\void \textbf{ Initialize} (const Mat\+Type \&)
\begin{DoxyCompactList}\small\item\em Initialize for the given matrix V (there is nothing to do). \end{DoxyCompactList}\item 
bool \textbf{ Is\+Converged} (const arma\+::mat \&, const arma\+::mat \&)
\begin{DoxyCompactList}\small\item\em Check if convergence has occurred. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Iteration} () const
\begin{DoxyCompactList}\small\item\em Get the current iteration. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Iteration} ()
\begin{DoxyCompactList}\small\item\em Modify the current iteration. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Max\+Iterations} () const
\begin{DoxyCompactList}\small\item\em Get the maximum number of iterations. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Max\+Iterations} ()
\begin{DoxyCompactList}\small\item\em Modify the maximum number of iterations. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This termination policy only terminates when the maximum number of iterations has been reached. 

Definition at line 23 of file max\+\_\+iteration\+\_\+termination.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1amf_1_1MaxIterationTermination_a98cfff3b4dc8dcf4679050651517114b}} 
\index{mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}!Max\+Iteration\+Termination@{Max\+Iteration\+Termination}}
\index{Max\+Iteration\+Termination@{Max\+Iteration\+Termination}!mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}}
\subsubsection{Max\+Iteration\+Termination()}
{\footnotesize\ttfamily \textbf{ Max\+Iteration\+Termination} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{max\+Iterations }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Construct the termination policy with the given number of iterations allowed (default 1000). 

If max\+Iterations is 0, then termination will never occur.


\begin{DoxyParams}{Parameters}
{\em max\+Iterations} & Maximum number of allowed iterations. \\
\hline
\end{DoxyParams}


Definition at line 33 of file max\+\_\+iteration\+\_\+termination.\+hpp.



References Log\+::\+Warn.



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1amf_1_1MaxIterationTermination_af9bd9c065fa0b8e0da8c57b0ab46b870}} 
\index{mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}!Index@{Index}}
\index{Index@{Index}!mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}}
\subsubsection{Index()}
{\footnotesize\ttfamily size\+\_\+t Index (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Return something similar to the residue, which in this case is just the number of iterations left, since we don\textquotesingle{}t have access to anything else. 



Definition at line 60 of file max\+\_\+iteration\+\_\+termination.\+hpp.

\mbox{\label{classmlpack_1_1amf_1_1MaxIterationTermination_a24e5b85350a8b4b867486aa24334fa35}} 
\index{mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}!Initialize@{Initialize}}
\index{Initialize@{Initialize}!mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}}
\subsubsection{Initialize()}
{\footnotesize\ttfamily void Initialize (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Initialize for the given matrix V (there is nothing to do). 



Definition at line 47 of file max\+\_\+iteration\+\_\+termination.\+hpp.

\mbox{\label{classmlpack_1_1amf_1_1MaxIterationTermination_a1541d81ce59ddf02e5a970de45e01ecf}} 
\index{mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}!Is\+Converged@{Is\+Converged}}
\index{Is\+Converged@{Is\+Converged}!mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}}
\subsubsection{Is\+Converged()}
{\footnotesize\ttfamily bool Is\+Converged (\begin{DoxyParamCaption}\item[{const arma\+::mat \&}]{,  }\item[{const arma\+::mat \&}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Check if convergence has occurred. 



Definition at line 52 of file max\+\_\+iteration\+\_\+termination.\+hpp.

\mbox{\label{classmlpack_1_1amf_1_1MaxIterationTermination_a8d03065ad6cf9b1807c9deb70ed63185}} 
\index{mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}!Iteration@{Iteration}}
\index{Iteration@{Iteration}!mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}}
\subsubsection{Iteration()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Iteration (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the current iteration. 



Definition at line 66 of file max\+\_\+iteration\+\_\+termination.\+hpp.

\mbox{\label{classmlpack_1_1amf_1_1MaxIterationTermination_af74970d9e7d271359c2423a3f786853b}} 
\index{mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}!Iteration@{Iteration}}
\index{Iteration@{Iteration}!mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}}
\subsubsection{Iteration()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Iteration (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the current iteration. 



Definition at line 68 of file max\+\_\+iteration\+\_\+termination.\+hpp.

\mbox{\label{classmlpack_1_1amf_1_1MaxIterationTermination_a420770944a5b0c7a852c4ec372c4a2d1}} 
\index{mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}!Max\+Iterations@{Max\+Iterations}}
\index{Max\+Iterations@{Max\+Iterations}!mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}}
\subsubsection{Max\+Iterations()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Max\+Iterations (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the maximum number of iterations. 



Definition at line 71 of file max\+\_\+iteration\+\_\+termination.\+hpp.

\mbox{\label{classmlpack_1_1amf_1_1MaxIterationTermination_acda675ab4ab86b95c92bc33bc391a61b}} 
\index{mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}!Max\+Iterations@{Max\+Iterations}}
\index{Max\+Iterations@{Max\+Iterations}!mlpack\+::amf\+::\+Max\+Iteration\+Termination@{mlpack\+::amf\+::\+Max\+Iteration\+Termination}}
\subsubsection{Max\+Iterations()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Max\+Iterations (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the maximum number of iterations. 



Definition at line 73 of file max\+\_\+iteration\+\_\+termination.\+hpp.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/3.\+3.\+2/src/mlpack/methods/amf/termination\+\_\+policies/\textbf{ max\+\_\+iteration\+\_\+termination.\+hpp}\end{DoxyCompactItemize}
