\section{R\+P\+Tree\+Mean\+Split$<$ Bound\+Type, Mat\+Type $>$ Class Template Reference}
\label{classmlpack_1_1tree_1_1RPTreeMeanSplit}\index{R\+P\+Tree\+Mean\+Split$<$ Bound\+Type, Mat\+Type $>$@{R\+P\+Tree\+Mean\+Split$<$ Bound\+Type, Mat\+Type $>$}}


This class splits a binary space tree.  


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ Split\+Info}
\begin{DoxyCompactList}\small\item\em An information about the partition. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef Mat\+Type\+::elem\+\_\+type \textbf{ Elem\+Type}
\begin{DoxyCompactList}\small\item\em The element type held by the matrix type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Vec\+Type $>$ }\\static bool \textbf{ Assign\+To\+Left\+Node} (const Vec\+Type \&point, const \textbf{ Split\+Info} \&split\+Info)
\begin{DoxyCompactList}\small\item\em Indicates that a point should be assigned to the left subtree. \end{DoxyCompactList}\item 
static size\+\_\+t \textbf{ Perform\+Split} (Mat\+Type \&data, const size\+\_\+t begin, const size\+\_\+t count, const \textbf{ Split\+Info} \&split\+Info)
\begin{DoxyCompactList}\small\item\em Perform the split process according to the information about the split. \end{DoxyCompactList}\item 
static size\+\_\+t \textbf{ Perform\+Split} (Mat\+Type \&data, const size\+\_\+t begin, const size\+\_\+t count, const \textbf{ Split\+Info} \&split\+Info, std\+::vector$<$ size\+\_\+t $>$ \&old\+From\+New)
\begin{DoxyCompactList}\small\item\em Perform the split process according to the information about the split and return the list of changed indices. \end{DoxyCompactList}\item 
static bool \textbf{ Split\+Node} (const Bound\+Type \&, Mat\+Type \&data, const size\+\_\+t begin, const size\+\_\+t count, \textbf{ Split\+Info} \&split\+Info)
\begin{DoxyCompactList}\small\item\em Split the node according to the mean value in the dimension with maximum width. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Bound\+Type, typename Mat\+Type = arma\+::mat$>$\newline
class mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split$<$ Bound\+Type, Mat\+Type $>$}

This class splits a binary space tree. 

This class provides two different kinds of split. The mean split (i.\+e. all points are split by the median of their distance to the mean point) is performed if the average distance between points multiplied by a constant is greater than the diameter of the node. Otherwise, the median split (i.\+e. the node is split by a random hyperplane) is performed. 

Definition at line 33 of file rp\+\_\+tree\+\_\+mean\+\_\+split.\+hpp.



\subsection{Member Typedef Documentation}
\mbox{\label{classmlpack_1_1tree_1_1RPTreeMeanSplit_a227d0c7e23e98fcd6c81ecab357a791f}} 
\index{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split@{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split}!Elem\+Type@{Elem\+Type}}
\index{Elem\+Type@{Elem\+Type}!mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split@{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split}}
\subsubsection{Elem\+Type}
{\footnotesize\ttfamily typedef Mat\+Type\+::elem\+\_\+type \textbf{ Elem\+Type}}



The element type held by the matrix type. 



Definition at line 37 of file rp\+\_\+tree\+\_\+mean\+\_\+split.\+hpp.



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1tree_1_1RPTreeMeanSplit_af0fc61f469596cb8796d1966564ecbcb}} 
\index{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split@{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split}!Assign\+To\+Left\+Node@{Assign\+To\+Left\+Node}}
\index{Assign\+To\+Left\+Node@{Assign\+To\+Left\+Node}!mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split@{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split}}
\subsubsection{Assign\+To\+Left\+Node()}
{\footnotesize\ttfamily static bool Assign\+To\+Left\+Node (\begin{DoxyParamCaption}\item[{const Vec\+Type \&}]{point,  }\item[{const \textbf{ Split\+Info} \&}]{split\+Info }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Indicates that a point should be assigned to the left subtree. 


\begin{DoxyParams}{Parameters}
{\em point} & The point that is being assigned. \\
\hline
{\em split\+Info} & An information about the split. \\
\hline
\end{DoxyParams}


Definition at line 123 of file rp\+\_\+tree\+\_\+mean\+\_\+split.\+hpp.



References R\+P\+Tree\+Mean\+Split$<$ Bound\+Type, Mat\+Type $>$\+::\+Split\+Info\+::direction, R\+P\+Tree\+Mean\+Split$<$ Bound\+Type, Mat\+Type $>$\+::\+Split\+Info\+::mean, R\+P\+Tree\+Mean\+Split$<$ Bound\+Type, Mat\+Type $>$\+::\+Split\+Info\+::mean\+Split, and R\+P\+Tree\+Mean\+Split$<$ Bound\+Type, Mat\+Type $>$\+::\+Split\+Info\+::split\+Val.

\mbox{\label{classmlpack_1_1tree_1_1RPTreeMeanSplit_aace8240352cb3ea61c975987b91a80a6}} 
\index{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split@{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split}!Perform\+Split@{Perform\+Split}}
\index{Perform\+Split@{Perform\+Split}!mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split@{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split}}
\subsubsection{Perform\+Split()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily static size\+\_\+t Perform\+Split (\begin{DoxyParamCaption}\item[{Mat\+Type \&}]{data,  }\item[{const size\+\_\+t}]{begin,  }\item[{const size\+\_\+t}]{count,  }\item[{const \textbf{ Split\+Info} \&}]{split\+Info }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Perform the split process according to the information about the split. 

This will order the dataset such that points that belong to the left subtree are on the left of the split column, and points from the right subtree are on the right side of the split column.


\begin{DoxyParams}{Parameters}
{\em data} & The dataset used by the binary space tree. \\
\hline
{\em begin} & Index of the starting point in the dataset that belongs to this node. \\
\hline
{\em count} & Number of points in this node. \\
\hline
{\em split\+Info} & The information about the split. \\
\hline
\end{DoxyParams}


Definition at line 82 of file rp\+\_\+tree\+\_\+mean\+\_\+split.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1RPTreeMeanSplit_af99e13e8418a8bb6b602435fbd7e4e64}} 
\index{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split@{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split}!Perform\+Split@{Perform\+Split}}
\index{Perform\+Split@{Perform\+Split}!mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split@{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split}}
\subsubsection{Perform\+Split()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily static size\+\_\+t Perform\+Split (\begin{DoxyParamCaption}\item[{Mat\+Type \&}]{data,  }\item[{const size\+\_\+t}]{begin,  }\item[{const size\+\_\+t}]{count,  }\item[{const \textbf{ Split\+Info} \&}]{split\+Info,  }\item[{std\+::vector$<$ size\+\_\+t $>$ \&}]{old\+From\+New }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Perform the split process according to the information about the split and return the list of changed indices. 

This will order the dataset such that points that belong to the left subtree are on the left of the split column, and points from the right subtree are on the right side of the split column.


\begin{DoxyParams}{Parameters}
{\em data} & The dataset used by the binary space tree. \\
\hline
{\em begin} & Index of the starting point in the dataset that belongs to this node. \\
\hline
{\em count} & Number of points in this node. \\
\hline
{\em split\+Info} & The information about the split. \\
\hline
{\em old\+From\+New} & Vector which will be filled with the old positions for each new point. \\
\hline
\end{DoxyParams}


Definition at line 106 of file rp\+\_\+tree\+\_\+mean\+\_\+split.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1RPTreeMeanSplit_a563632ed24c69523f20a12d9a28eaeaa}} 
\index{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split@{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split}!Split\+Node@{Split\+Node}}
\index{Split\+Node@{Split\+Node}!mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split@{mlpack\+::tree\+::\+R\+P\+Tree\+Mean\+Split}}
\subsubsection{Split\+Node()}
{\footnotesize\ttfamily static bool Split\+Node (\begin{DoxyParamCaption}\item[{const Bound\+Type \&}]{,  }\item[{Mat\+Type \&}]{data,  }\item[{const size\+\_\+t}]{begin,  }\item[{const size\+\_\+t}]{count,  }\item[{\textbf{ Split\+Info} \&}]{split\+Info }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Split the node according to the mean value in the dimension with maximum width. 


\begin{DoxyParams}{Parameters}
{\em $\ast$} & (bound) The bound used for this node. \\
\hline
{\em data} & The dataset used by the binary space tree. \\
\hline
{\em begin} & Index of the starting point in the dataset that belongs to this node. \\
\hline
{\em count} & Number of points in this node. \\
\hline
{\em split\+Info} & An information about the split. This information contains the direction and the value. \\
\hline
\end{DoxyParams}


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/core/tree/binary\+\_\+space\+\_\+tree/\textbf{ rp\+\_\+tree\+\_\+mean\+\_\+split.\+hpp}\end{DoxyCompactItemize}
