\section{R\+A\+Model$<$ Sort\+Policy $>$ Class Template Reference}
\label{classmlpack_1_1neighbor_1_1RAModel}\index{R\+A\+Model$<$ Sort\+Policy $>$@{R\+A\+Model$<$ Sort\+Policy $>$}}


The \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel} class provides an abstraction for the \doxyref{R\+A\+Search}{p.}{classmlpack_1_1neighbor_1_1RASearch} class, abstracting away the Tree\+Type parameter and allowing it to be specified at runtime in this class.  


\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ Tree\+Types} \{ \newline
\textbf{ K\+D\+\_\+\+T\+R\+EE}, 
\newline
\textbf{ C\+O\+V\+E\+R\+\_\+\+T\+R\+EE}, 
\newline
\textbf{ R\+\_\+\+T\+R\+EE}, 
\newline
\textbf{ R\+\_\+\+S\+T\+A\+R\+\_\+\+T\+R\+EE}, 
\newline
\textbf{ X\+\_\+\+T\+R\+EE}, 
\newline
\textbf{ H\+I\+L\+B\+E\+R\+T\+\_\+\+R\+\_\+\+T\+R\+EE}, 
\newline
\textbf{ R\+\_\+\+P\+L\+U\+S\+\_\+\+T\+R\+EE}, 
\newline
\textbf{ R\+\_\+\+P\+L\+U\+S\+\_\+\+P\+L\+U\+S\+\_\+\+T\+R\+EE}, 
\newline
\textbf{ U\+B\+\_\+\+T\+R\+EE}, 
\newline
\textbf{ O\+C\+T\+R\+EE}
 \}\begin{DoxyCompactList}\small\item\em The list of tree types we can use with \doxyref{R\+A\+Search}{p.}{classmlpack_1_1neighbor_1_1RASearch}. \end{DoxyCompactList}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ R\+A\+Model} (\textbf{ Tree\+Types} tree\+Type=Tree\+Types\+::\+K\+D\+\_\+\+T\+R\+EE, bool random\+Basis=false)
\begin{DoxyCompactList}\small\item\em Initialize the \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel} with the given type and whether or not a random basis should be used. \end{DoxyCompactList}\item 
\textbf{ R\+A\+Model} (const \textbf{ R\+A\+Model} \&other)
\begin{DoxyCompactList}\small\item\em Copy the given \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel}. \end{DoxyCompactList}\item 
\textbf{ R\+A\+Model} (\textbf{ R\+A\+Model} \&\&other)
\begin{DoxyCompactList}\small\item\em Take ownership of the given \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel}. \end{DoxyCompactList}\item 
\textbf{ $\sim$\+R\+A\+Model} ()
\begin{DoxyCompactList}\small\item\em Clean memory, if necessary. \end{DoxyCompactList}\item 
double \textbf{ Alpha} () const
\begin{DoxyCompactList}\small\item\em Get the desired success probability. \end{DoxyCompactList}\item 
double \& \textbf{ Alpha} ()
\begin{DoxyCompactList}\small\item\em Modify the desired success probability. \end{DoxyCompactList}\item 
void \textbf{ Build\+Model} (arma\+::mat \&\&reference\+Set, const size\+\_\+t leaf\+Size, const bool naive, const bool single\+Mode)
\begin{DoxyCompactList}\small\item\em Build the reference tree. \end{DoxyCompactList}\item 
const arma\+::mat \& \textbf{ Dataset} () const
\begin{DoxyCompactList}\small\item\em Expose the dataset. \end{DoxyCompactList}\item 
bool \textbf{ First\+Leaf\+Exact} () const
\begin{DoxyCompactList}\small\item\em Get whether or not we traverse to the first leaf without approximation. \end{DoxyCompactList}\item 
bool \& \textbf{ First\+Leaf\+Exact} ()
\begin{DoxyCompactList}\small\item\em Modify whether or not we traverse to the first leaf without approximation. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Leaf\+Size} () const
\begin{DoxyCompactList}\small\item\em Get the leaf size (only relevant when the kd-\/tree is used). \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Leaf\+Size} ()
\begin{DoxyCompactList}\small\item\em Modify the leaf size (only relevant when the kd-\/tree is used). \end{DoxyCompactList}\item 
bool \textbf{ Naive} () const
\begin{DoxyCompactList}\small\item\em Get whether or not naive search is being used. \end{DoxyCompactList}\item 
bool \& \textbf{ Naive} ()
\begin{DoxyCompactList}\small\item\em Modify whether or not naive search is being used. \end{DoxyCompactList}\item 
\textbf{ R\+A\+Model} \& \textbf{ operator=} (const \textbf{ R\+A\+Model} \&other)
\begin{DoxyCompactList}\small\item\em Copy the given \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel}. \end{DoxyCompactList}\item 
\textbf{ R\+A\+Model} \& \textbf{ operator=} (\textbf{ R\+A\+Model} \&\&other)
\begin{DoxyCompactList}\small\item\em Take ownership of the given \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel}. \end{DoxyCompactList}\item 
bool \textbf{ Random\+Basis} () const
\begin{DoxyCompactList}\small\item\em Get whether or not a random basis is being used. \end{DoxyCompactList}\item 
bool \& \textbf{ Random\+Basis} ()
\begin{DoxyCompactList}\small\item\em Modify whether or not a random basis is being used. \end{DoxyCompactList}\item 
bool \textbf{ Sample\+At\+Leaves} () const
\begin{DoxyCompactList}\small\item\em Get whether or not sampling is done at the leaves. \end{DoxyCompactList}\item 
bool \& \textbf{ Sample\+At\+Leaves} ()
\begin{DoxyCompactList}\small\item\em Modify whether or not sampling is done at the leaves. \end{DoxyCompactList}\item 
void \textbf{ Search} (arma\+::mat \&\&query\+Set, const size\+\_\+t k, arma\+::\+Mat$<$ size\+\_\+t $>$ \&neighbors, arma\+::mat \&distances)
\begin{DoxyCompactList}\small\item\em Perform rank-\/approximate neighbor search, taking ownership of the query set. \end{DoxyCompactList}\item 
void \textbf{ Search} (const size\+\_\+t k, arma\+::\+Mat$<$ size\+\_\+t $>$ \&neighbors, arma\+::mat \&distances)
\begin{DoxyCompactList}\small\item\em Perform rank-\/approximate neighbor search, using the reference set as the query set. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&ar, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the model. \end{DoxyCompactList}\item 
bool \textbf{ Single\+Mode} () const
\begin{DoxyCompactList}\small\item\em Get whether or not single-\/tree search is being used. \end{DoxyCompactList}\item 
bool \& \textbf{ Single\+Mode} ()
\begin{DoxyCompactList}\small\item\em Modify whether or not single-\/tree search is being used. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Single\+Sample\+Limit} () const
\begin{DoxyCompactList}\small\item\em Get the limit on the size of a node that can be approximated. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Single\+Sample\+Limit} ()
\begin{DoxyCompactList}\small\item\em Modify the limit on the size of a node that can be approximation. \end{DoxyCompactList}\item 
double \textbf{ Tau} () const
\begin{DoxyCompactList}\small\item\em Get the rank-\/approximation in percentile of the data. \end{DoxyCompactList}\item 
double \& \textbf{ Tau} ()
\begin{DoxyCompactList}\small\item\em Modify the rank-\/approximation in percentile of the data. \end{DoxyCompactList}\item 
std\+::string \textbf{ Tree\+Name} () const
\begin{DoxyCompactList}\small\item\em Get the name of the tree type. \end{DoxyCompactList}\item 
\textbf{ Tree\+Types} \textbf{ Tree\+Type} () const
\begin{DoxyCompactList}\small\item\em Get the type of tree being used. \end{DoxyCompactList}\item 
\textbf{ Tree\+Types} \& \textbf{ Tree\+Type} ()
\begin{DoxyCompactList}\small\item\em Modify the type of tree being used. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Sort\+Policy$>$\newline
class mlpack\+::neighbor\+::\+R\+A\+Model$<$ Sort\+Policy $>$}

The \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel} class provides an abstraction for the \doxyref{R\+A\+Search}{p.}{classmlpack_1_1neighbor_1_1RASearch} class, abstracting away the Tree\+Type parameter and allowing it to be specified at runtime in this class. 

This class is written for the sake of the \textquotesingle{}allkrann\textquotesingle{} program, but is not necessarily restricted to that use.


\begin{DoxyParams}{Parameters}
{\em Sort\+Policy} & Sorting policy for neighbor searching (see \doxyref{R\+A\+Search}{p.}{classmlpack_1_1neighbor_1_1RASearch}). \\
\hline
\end{DoxyParams}


Definition at line 271 of file ra\+\_\+model.\+hpp.



\subsection{Member Enumeration Documentation}
\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a6597b8539c6114170dc185d332ba4c8d}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Tree\+Types@{Tree\+Types}}
\index{Tree\+Types@{Tree\+Types}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Tree\+Types}
{\footnotesize\ttfamily enum \textbf{ Tree\+Types}}



The list of tree types we can use with \doxyref{R\+A\+Search}{p.}{classmlpack_1_1neighbor_1_1RASearch}. 

Does not include ball trees; see \#338. \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{K\+D\+\_\+\+T\+R\+EE@{K\+D\+\_\+\+T\+R\+EE}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!K\+D\+\_\+\+T\+R\+EE@{K\+D\+\_\+\+T\+R\+EE}}}\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a6597b8539c6114170dc185d332ba4c8daa688e9cd1158916bc183aa517724568c}} 
K\+D\+\_\+\+T\+R\+EE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{C\+O\+V\+E\+R\+\_\+\+T\+R\+EE@{C\+O\+V\+E\+R\+\_\+\+T\+R\+EE}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!C\+O\+V\+E\+R\+\_\+\+T\+R\+EE@{C\+O\+V\+E\+R\+\_\+\+T\+R\+EE}}}\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a6597b8539c6114170dc185d332ba4c8da92f172b47c8ae18ed401f8bf9f5ecad3}} 
C\+O\+V\+E\+R\+\_\+\+T\+R\+EE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{R\+\_\+\+T\+R\+EE@{R\+\_\+\+T\+R\+EE}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!R\+\_\+\+T\+R\+EE@{R\+\_\+\+T\+R\+EE}}}\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a6597b8539c6114170dc185d332ba4c8da2a93dc779a94d5f09b72ffbdc5ac9cd9}} 
R\+\_\+\+T\+R\+EE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{R\+\_\+\+S\+T\+A\+R\+\_\+\+T\+R\+EE@{R\+\_\+\+S\+T\+A\+R\+\_\+\+T\+R\+EE}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!R\+\_\+\+S\+T\+A\+R\+\_\+\+T\+R\+EE@{R\+\_\+\+S\+T\+A\+R\+\_\+\+T\+R\+EE}}}\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a6597b8539c6114170dc185d332ba4c8dae5b37a52c347bc7ef3d23fde0941d27b}} 
R\+\_\+\+S\+T\+A\+R\+\_\+\+T\+R\+EE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{X\+\_\+\+T\+R\+EE@{X\+\_\+\+T\+R\+EE}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!X\+\_\+\+T\+R\+EE@{X\+\_\+\+T\+R\+EE}}}\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a6597b8539c6114170dc185d332ba4c8da6560e35678b39452afce0f0fcc7f6059}} 
X\+\_\+\+T\+R\+EE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{H\+I\+L\+B\+E\+R\+T\+\_\+\+R\+\_\+\+T\+R\+EE@{H\+I\+L\+B\+E\+R\+T\+\_\+\+R\+\_\+\+T\+R\+EE}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!H\+I\+L\+B\+E\+R\+T\+\_\+\+R\+\_\+\+T\+R\+EE@{H\+I\+L\+B\+E\+R\+T\+\_\+\+R\+\_\+\+T\+R\+EE}}}\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a6597b8539c6114170dc185d332ba4c8da470c5bcf4135483a37e9a87f061e1c5c}} 
H\+I\+L\+B\+E\+R\+T\+\_\+\+R\+\_\+\+T\+R\+EE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{R\+\_\+\+P\+L\+U\+S\+\_\+\+T\+R\+EE@{R\+\_\+\+P\+L\+U\+S\+\_\+\+T\+R\+EE}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!R\+\_\+\+P\+L\+U\+S\+\_\+\+T\+R\+EE@{R\+\_\+\+P\+L\+U\+S\+\_\+\+T\+R\+EE}}}\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a6597b8539c6114170dc185d332ba4c8da4e91a297c1504b34ca1a9cdcd6ba22ff}} 
R\+\_\+\+P\+L\+U\+S\+\_\+\+T\+R\+EE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{R\+\_\+\+P\+L\+U\+S\+\_\+\+P\+L\+U\+S\+\_\+\+T\+R\+EE@{R\+\_\+\+P\+L\+U\+S\+\_\+\+P\+L\+U\+S\+\_\+\+T\+R\+EE}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!R\+\_\+\+P\+L\+U\+S\+\_\+\+P\+L\+U\+S\+\_\+\+T\+R\+EE@{R\+\_\+\+P\+L\+U\+S\+\_\+\+P\+L\+U\+S\+\_\+\+T\+R\+EE}}}\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a6597b8539c6114170dc185d332ba4c8da1208f6f2a7b337e4edbd02a8de98d3f5}} 
R\+\_\+\+P\+L\+U\+S\+\_\+\+P\+L\+U\+S\+\_\+\+T\+R\+EE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{U\+B\+\_\+\+T\+R\+EE@{U\+B\+\_\+\+T\+R\+EE}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!U\+B\+\_\+\+T\+R\+EE@{U\+B\+\_\+\+T\+R\+EE}}}\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a6597b8539c6114170dc185d332ba4c8dae36341db74fc7194b238cf7c528a7fbc}} 
U\+B\+\_\+\+T\+R\+EE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{O\+C\+T\+R\+EE@{O\+C\+T\+R\+EE}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!O\+C\+T\+R\+EE@{O\+C\+T\+R\+EE}}}\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a6597b8539c6114170dc185d332ba4c8daabefbb1ea7a801b1b00c9b0709dcec50}} 
O\+C\+T\+R\+EE&\\
\hline

\end{DoxyEnumFields}


Definition at line 278 of file ra\+\_\+model.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_aa46e3dcacefb0a08694fb0521c2d05b3}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!R\+A\+Model@{R\+A\+Model}}
\index{R\+A\+Model@{R\+A\+Model}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{R\+A\+Model()\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \textbf{ R\+A\+Model} (\begin{DoxyParamCaption}\item[{\textbf{ Tree\+Types}}]{tree\+Type = {\ttfamily TreeTypes\+:\+:KD\+\_\+TREE},  }\item[{bool}]{random\+Basis = {\ttfamily false} }\end{DoxyParamCaption})}



Initialize the \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel} with the given type and whether or not a random basis should be used. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a8ef591cea1595a3b3ddd49c91bd9c6ed}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!R\+A\+Model@{R\+A\+Model}}
\index{R\+A\+Model@{R\+A\+Model}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{R\+A\+Model()\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \textbf{ R\+A\+Model} (\begin{DoxyParamCaption}\item[{const \textbf{ R\+A\+Model}$<$ Sort\+Policy $>$ \&}]{other }\end{DoxyParamCaption})}



Copy the given \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel}. 


\begin{DoxyParams}{Parameters}
{\em other} & \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel} to copy. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a26c8c355e98626832fb83d58fd47e79b}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!R\+A\+Model@{R\+A\+Model}}
\index{R\+A\+Model@{R\+A\+Model}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{R\+A\+Model()\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \textbf{ R\+A\+Model} (\begin{DoxyParamCaption}\item[{\textbf{ R\+A\+Model}$<$ Sort\+Policy $>$ \&\&}]{other }\end{DoxyParamCaption})}



Take ownership of the given \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel}. 


\begin{DoxyParams}{Parameters}
{\em other} & \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel} to take ownership of. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a86741564b1d28a800d1c52993f36b8b6}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!````~R\+A\+Model@{$\sim$\+R\+A\+Model}}
\index{````~R\+A\+Model@{$\sim$\+R\+A\+Model}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{$\sim$\+R\+A\+Model()}
{\footnotesize\ttfamily $\sim$\textbf{ R\+A\+Model} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Clean memory, if necessary. 



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a500ecd077d5cc5fdbf6ceb095d8de9e1}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Alpha@{Alpha}}
\index{Alpha@{Alpha}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Alpha()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily double Alpha (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get the desired success probability. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_acbb0e4747a3a307bee88bad71e5eeaf1}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Alpha@{Alpha}}
\index{Alpha@{Alpha}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Alpha()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily double\& Alpha (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Modify the desired success probability. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a394d212c5373090724aaea3ba24b482e}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Build\+Model@{Build\+Model}}
\index{Build\+Model@{Build\+Model}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Build\+Model()}
{\footnotesize\ttfamily void Build\+Model (\begin{DoxyParamCaption}\item[{arma\+::mat \&\&}]{reference\+Set,  }\item[{const size\+\_\+t}]{leaf\+Size,  }\item[{const bool}]{naive,  }\item[{const bool}]{single\+Mode }\end{DoxyParamCaption})}



Build the reference tree. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_aff320b9a86b77a150e630c01d5888273}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Dataset@{Dataset}}
\index{Dataset@{Dataset}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Dataset()}
{\footnotesize\ttfamily const arma\+::mat\& Dataset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Expose the dataset. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a17ec6e467897eb8aee3b519e0758e77d}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!First\+Leaf\+Exact@{First\+Leaf\+Exact}}
\index{First\+Leaf\+Exact@{First\+Leaf\+Exact}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{First\+Leaf\+Exact()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily bool First\+Leaf\+Exact (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get whether or not we traverse to the first leaf without approximation. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_aca2eb648feb965d3bcb0b0b73f8b2b0f}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!First\+Leaf\+Exact@{First\+Leaf\+Exact}}
\index{First\+Leaf\+Exact@{First\+Leaf\+Exact}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{First\+Leaf\+Exact()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily bool\& First\+Leaf\+Exact (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Modify whether or not we traverse to the first leaf without approximation. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_ab81b93ebb200783ca4c5747f31889fa0}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Leaf\+Size@{Leaf\+Size}}
\index{Leaf\+Size@{Leaf\+Size}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Leaf\+Size()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Leaf\+Size (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get the leaf size (only relevant when the kd-\/tree is used). 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a0966773f5b7ef0c324ed40b1cf4b94d1}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Leaf\+Size@{Leaf\+Size}}
\index{Leaf\+Size@{Leaf\+Size}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Leaf\+Size()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Leaf\+Size (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Modify the leaf size (only relevant when the kd-\/tree is used). 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a343230e7d7344e3f7d5f5f2eb89cf2c5}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Naive@{Naive}}
\index{Naive@{Naive}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Naive()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily bool Naive (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get whether or not naive search is being used. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_af7d397adca3f411b4e2d2f977b280ce6}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Naive@{Naive}}
\index{Naive@{Naive}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Naive()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily bool\& Naive (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Modify whether or not naive search is being used. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_af3824273bd64946059c529f5c7ecb846}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!operator=@{operator=}}
\index{operator=@{operator=}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{operator=()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ R\+A\+Model}\& operator= (\begin{DoxyParamCaption}\item[{const \textbf{ R\+A\+Model}$<$ Sort\+Policy $>$ \&}]{other }\end{DoxyParamCaption})}



Copy the given \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel}. 


\begin{DoxyParams}{Parameters}
{\em other} & \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel} to copy. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a9a431b4c5f393618c059481e1dc15db3}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!operator=@{operator=}}
\index{operator=@{operator=}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{operator=()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ R\+A\+Model}\& operator= (\begin{DoxyParamCaption}\item[{\textbf{ R\+A\+Model}$<$ Sort\+Policy $>$ \&\&}]{other }\end{DoxyParamCaption})}



Take ownership of the given \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel}. 


\begin{DoxyParams}{Parameters}
{\em other} & \doxyref{R\+A\+Model}{p.}{classmlpack_1_1neighbor_1_1RAModel} to take ownership of. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_ae3053ad1e3b42eb1ae4105aecd060cf6}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Random\+Basis@{Random\+Basis}}
\index{Random\+Basis@{Random\+Basis}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Random\+Basis()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily bool Random\+Basis (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get whether or not a random basis is being used. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a8111114602e748b38c0875f82f323544}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Random\+Basis@{Random\+Basis}}
\index{Random\+Basis@{Random\+Basis}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Random\+Basis()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily bool\& Random\+Basis (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Modify whether or not a random basis is being used. 

Be sure to rebuild the model using \doxyref{Build\+Model()}{p.}{classmlpack_1_1neighbor_1_1RAModel_a394d212c5373090724aaea3ba24b482e}. \mbox{\label{classmlpack_1_1neighbor_1_1RAModel_aa9dd91d6b96e1d0b343c3cec27372036}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Sample\+At\+Leaves@{Sample\+At\+Leaves}}
\index{Sample\+At\+Leaves@{Sample\+At\+Leaves}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Sample\+At\+Leaves()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily bool Sample\+At\+Leaves (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get whether or not sampling is done at the leaves. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a9f6d54dd0424f827becc2e2e9969b1bb}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Sample\+At\+Leaves@{Sample\+At\+Leaves}}
\index{Sample\+At\+Leaves@{Sample\+At\+Leaves}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Sample\+At\+Leaves()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily bool\& Sample\+At\+Leaves (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Modify whether or not sampling is done at the leaves. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_af621a93ffd3ff29728b4f4d2380ccfd5}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Search@{Search}}
\index{Search@{Search}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Search()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Search (\begin{DoxyParamCaption}\item[{arma\+::mat \&\&}]{query\+Set,  }\item[{const size\+\_\+t}]{k,  }\item[{arma\+::\+Mat$<$ size\+\_\+t $>$ \&}]{neighbors,  }\item[{arma\+::mat \&}]{distances }\end{DoxyParamCaption})}



Perform rank-\/approximate neighbor search, taking ownership of the query set. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a619c7d4931e628a0c199159c57b34cbd}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Search@{Search}}
\index{Search@{Search}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Search()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Search (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{k,  }\item[{arma\+::\+Mat$<$ size\+\_\+t $>$ \&}]{neighbors,  }\item[{arma\+::mat \&}]{distances }\end{DoxyParamCaption})}



Perform rank-\/approximate neighbor search, using the reference set as the query set. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_af0dd9205158ccf7bcfcd8ff81f79c927}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{serialize()}
{\footnotesize\ttfamily void serialize (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const unsigned}]{int }\end{DoxyParamCaption})}



Serialize the model. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a7477b3e8499a6158bbe177e7f30d4947}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Single\+Mode@{Single\+Mode}}
\index{Single\+Mode@{Single\+Mode}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Single\+Mode()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily bool Single\+Mode (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get whether or not single-\/tree search is being used. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_adadacd63ddeadf138d834b1fdc632773}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Single\+Mode@{Single\+Mode}}
\index{Single\+Mode@{Single\+Mode}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Single\+Mode()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily bool\& Single\+Mode (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Modify whether or not single-\/tree search is being used. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a3a2580f686a9de3078e499b1280e2a9f}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Single\+Sample\+Limit@{Single\+Sample\+Limit}}
\index{Single\+Sample\+Limit@{Single\+Sample\+Limit}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Single\+Sample\+Limit()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Single\+Sample\+Limit (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get the limit on the size of a node that can be approximated. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_ae78a7b8e9c96a2dbf646a27efee047b1}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Single\+Sample\+Limit@{Single\+Sample\+Limit}}
\index{Single\+Sample\+Limit@{Single\+Sample\+Limit}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Single\+Sample\+Limit()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Single\+Sample\+Limit (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Modify the limit on the size of a node that can be approximation. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a4a4b0fafde4cc4c856a53025dc8c4c21}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Tau@{Tau}}
\index{Tau@{Tau}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Tau()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily double Tau (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get the rank-\/approximation in percentile of the data. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_ad522d61ed716a322376adea25ebdbc90}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Tau@{Tau}}
\index{Tau@{Tau}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Tau()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily double\& Tau (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Modify the rank-\/approximation in percentile of the data. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a98cbe53c61f1681514056f78a89a57b8}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Tree\+Name@{Tree\+Name}}
\index{Tree\+Name@{Tree\+Name}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Tree\+Name()}
{\footnotesize\ttfamily std\+::string Tree\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get the name of the tree type. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_adb3d0b75d7754ec6741d890232576ffc}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Tree\+Type@{Tree\+Type}}
\index{Tree\+Type@{Tree\+Type}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Tree\+Type()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Tree\+Types} Tree\+Type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get the type of tree being used. 

\mbox{\label{classmlpack_1_1neighbor_1_1RAModel_a56b0460c7769ea1ef9d8314026ef36c6}} 
\index{mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}!Tree\+Type@{Tree\+Type}}
\index{Tree\+Type@{Tree\+Type}!mlpack\+::neighbor\+::\+R\+A\+Model@{mlpack\+::neighbor\+::\+R\+A\+Model}}
\subsubsection{Tree\+Type()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Tree\+Types}\& Tree\+Type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Modify the type of tree being used. 



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/rann/\textbf{ ra\+\_\+model.\+hpp}\end{DoxyCompactItemize}
