\section{Kill\+Empty\+Clusters Class Reference}
\label{classmlpack_1_1kmeans_1_1KillEmptyClusters}\index{Kill\+Empty\+Clusters@{Kill\+Empty\+Clusters}}


Policy which allows K-\/\+Means to \char`\"{}kill\char`\"{} empty clusters without any error being reported.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Kill\+Empty\+Clusters} ()
\begin{DoxyCompactList}\small\item\em Default constructor required by Empty\+Cluster\+Policy policy. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the empty cluster policy (nothing to do). \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Metric\+Type , typename Mat\+Type $>$ }\\static \textbf{ force\+\_\+inline} void \textbf{ Empty\+Cluster} (const Mat\+Type \&, const size\+\_\+t empty\+Cluster, const arma\+::mat \&, arma\+::mat \&new\+Centroids, arma\+::\+Col$<$ size\+\_\+t $>$ \&cluster\+Counts, Metric\+Type \&, const size\+\_\+t)
\begin{DoxyCompactList}\small\item\em This function sets an empty cluster found during k-\/means to all D\+B\+L\+\_\+\+M\+AX (i.\+e. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Policy which allows K-\/\+Means to \char`\"{}kill\char`\"{} empty clusters without any error being reported. 

This means the centroids will be filled with D\+B\+L\+\_\+\+M\+AX. 

Definition at line 25 of file kill\+\_\+empty\+\_\+clusters.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1kmeans_1_1KillEmptyClusters_a976b2a96b31812e9196befc20944bbde}} 
\index{mlpack\+::kmeans\+::\+Kill\+Empty\+Clusters@{mlpack\+::kmeans\+::\+Kill\+Empty\+Clusters}!Kill\+Empty\+Clusters@{Kill\+Empty\+Clusters}}
\index{Kill\+Empty\+Clusters@{Kill\+Empty\+Clusters}!mlpack\+::kmeans\+::\+Kill\+Empty\+Clusters@{mlpack\+::kmeans\+::\+Kill\+Empty\+Clusters}}
\subsubsection{Kill\+Empty\+Clusters()}
{\footnotesize\ttfamily \textbf{ Kill\+Empty\+Clusters} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Default constructor required by Empty\+Cluster\+Policy policy. 



Definition at line 29 of file kill\+\_\+empty\+\_\+clusters.\+hpp.



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1kmeans_1_1KillEmptyClusters_a6defec50bcff52fb5d9fcc6da5d683f4}} 
\index{mlpack\+::kmeans\+::\+Kill\+Empty\+Clusters@{mlpack\+::kmeans\+::\+Kill\+Empty\+Clusters}!Empty\+Cluster@{Empty\+Cluster}}
\index{Empty\+Cluster@{Empty\+Cluster}!mlpack\+::kmeans\+::\+Kill\+Empty\+Clusters@{mlpack\+::kmeans\+::\+Kill\+Empty\+Clusters}}
\subsubsection{Empty\+Cluster()}
{\footnotesize\ttfamily static \textbf{ force\+\_\+inline} void Empty\+Cluster (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{,  }\item[{const size\+\_\+t}]{empty\+Cluster,  }\item[{const arma\+::mat \&}]{,  }\item[{arma\+::mat \&}]{new\+Centroids,  }\item[{arma\+::\+Col$<$ size\+\_\+t $>$ \&}]{cluster\+Counts,  }\item[{Metric\+Type \&}]{,  }\item[{const size\+\_\+t}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



This function sets an empty cluster found during k-\/means to all D\+B\+L\+\_\+\+M\+AX (i.\+e. 

an invalid \char`\"{}dead\char`\"{} cluster).


\begin{DoxyTemplParams}{Template Parameters}
{\em Mat\+Type} & Type of data (arma\+::mat or arma\+::spmat). \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em $\ast$} & (data) Dataset on which clustering is being performed. \\
\hline
{\em empty\+Cluster} & Index of cluster which is empty. \\
\hline
{\em $\ast$} & (old\+Centroids) Centroids of each cluster (one per column) at the start of the iteration. \\
\hline
{\em new\+Centroids} & Centroids of each cluster (one per column) at the end of the iteration. \\
\hline
{\em cluster\+Counts} & Number of points in each cluster. \\
\hline
{\em $\ast$} & (metric) The Metric to use. \\
\hline
{\em $\ast$} & (iteration) Number of iteration.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Number of points changed (0). 
\end{DoxyReturn}


Definition at line 49 of file kill\+\_\+empty\+\_\+clusters.\+hpp.

\mbox{\label{classmlpack_1_1kmeans_1_1KillEmptyClusters_aa5b3dd8336182f751ebec27167c22415}} 
\index{mlpack\+::kmeans\+::\+Kill\+Empty\+Clusters@{mlpack\+::kmeans\+::\+Kill\+Empty\+Clusters}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::kmeans\+::\+Kill\+Empty\+Clusters@{mlpack\+::kmeans\+::\+Kill\+Empty\+Clusters}}
\subsubsection{serialize()}
{\footnotesize\ttfamily void serialize (\begin{DoxyParamCaption}\item[{Archive \&}]{,  }\item[{const unsigned}]{int }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Serialize the empty cluster policy (nothing to do). 



Definition at line 68 of file kill\+\_\+empty\+\_\+clusters.\+hpp.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/git/src/mlpack/methods/kmeans/\textbf{ kill\+\_\+empty\+\_\+clusters.\+hpp}\end{DoxyCompactItemize}
