\section{Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ Class Template Reference}
\label{classmlpack_1_1tree_1_1BinarySpaceTree}\index{Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$@{Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$}}


A binary space partitioning tree, such as a K\+D-\/tree or a ball tree.  


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \textbf{ Breadth\+First\+Dual\+Tree\+Traverser}
\item 
class \textbf{ Dual\+Tree\+Traverser}
\begin{DoxyCompactList}\small\item\em A dual-\/tree traverser for binary space trees; see dual\+\_\+tree\+\_\+traverser.\+hpp. \end{DoxyCompactList}\item 
class \textbf{ Single\+Tree\+Traverser}
\begin{DoxyCompactList}\small\item\em A single-\/tree traverser for binary space trees; see single\+\_\+tree\+\_\+traverser.\+hpp for implementation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef Mat\+Type\+::elem\+\_\+type \textbf{ Elem\+Type}
\begin{DoxyCompactList}\small\item\em The type of element held in Mat\+Type. \end{DoxyCompactList}\item 
typedef Mat\+Type \textbf{ Mat}
\begin{DoxyCompactList}\small\item\em So other classes can use Tree\+Type\+::\+Mat. \end{DoxyCompactList}\item 
typedef Split\+Type$<$ Bound\+Type$<$ Metric\+Type $>$, Mat\+Type $>$ \textbf{ Split}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Binary\+Space\+Tree} (const Mat\+Type \&data, const size\+\_\+t max\+Leaf\+Size=20)
\begin{DoxyCompactList}\small\item\em Construct this as the root node of a binary space tree using the given dataset. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} (const Mat\+Type \&data, std\+::vector$<$ size\+\_\+t $>$ \&old\+From\+New, const size\+\_\+t max\+Leaf\+Size=20)
\begin{DoxyCompactList}\small\item\em Construct this as the root node of a binary space tree using the given dataset. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} (const Mat\+Type \&data, std\+::vector$<$ size\+\_\+t $>$ \&old\+From\+New, std\+::vector$<$ size\+\_\+t $>$ \&new\+From\+Old, const size\+\_\+t max\+Leaf\+Size=20)
\begin{DoxyCompactList}\small\item\em Construct this as the root node of a binary space tree using the given dataset. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} (Mat\+Type \&\&data, const size\+\_\+t max\+Leaf\+Size=20)
\begin{DoxyCompactList}\small\item\em Construct this as the root node of a binary space tree using the given dataset. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} (Mat\+Type \&\&data, std\+::vector$<$ size\+\_\+t $>$ \&old\+From\+New, const size\+\_\+t max\+Leaf\+Size=20)
\begin{DoxyCompactList}\small\item\em Construct this as the root node of a binary space tree using the given dataset. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} (Mat\+Type \&\&data, std\+::vector$<$ size\+\_\+t $>$ \&old\+From\+New, std\+::vector$<$ size\+\_\+t $>$ \&new\+From\+Old, const size\+\_\+t max\+Leaf\+Size=20)
\begin{DoxyCompactList}\small\item\em Construct this as the root node of a binary space tree using the given dataset. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} (\textbf{ Binary\+Space\+Tree} $\ast$parent, const size\+\_\+t begin, const size\+\_\+t count, Split\+Type$<$ Bound\+Type$<$ Metric\+Type $>$, Mat\+Type $>$ \&splitter, const size\+\_\+t max\+Leaf\+Size=20)
\begin{DoxyCompactList}\small\item\em Construct this node as a child of the given parent, starting at column begin and using count points. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} (\textbf{ Binary\+Space\+Tree} $\ast$parent, const size\+\_\+t begin, const size\+\_\+t count, std\+::vector$<$ size\+\_\+t $>$ \&old\+From\+New, Split\+Type$<$ Bound\+Type$<$ Metric\+Type $>$, Mat\+Type $>$ \&splitter, const size\+\_\+t max\+Leaf\+Size=20)
\begin{DoxyCompactList}\small\item\em Construct this node as a child of the given parent, starting at column begin and using count points. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} (\textbf{ Binary\+Space\+Tree} $\ast$parent, const size\+\_\+t begin, const size\+\_\+t count, std\+::vector$<$ size\+\_\+t $>$ \&old\+From\+New, std\+::vector$<$ size\+\_\+t $>$ \&new\+From\+Old, Split\+Type$<$ Bound\+Type$<$ Metric\+Type $>$, Mat\+Type $>$ \&splitter, const size\+\_\+t max\+Leaf\+Size=20)
\begin{DoxyCompactList}\small\item\em Construct this node as a child of the given parent, starting at column begin and using count points. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} (const \textbf{ Binary\+Space\+Tree} \&other)
\begin{DoxyCompactList}\small\item\em Create a binary space tree by copying the other tree. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} (\textbf{ Binary\+Space\+Tree} \&\&other)
\begin{DoxyCompactList}\small\item\em Move constructor for a \doxyref{Binary\+Space\+Tree}{p.}{classmlpack_1_1tree_1_1BinarySpaceTree}; possess all the members of the given tree. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\\textbf{ Binary\+Space\+Tree} (Archive \&ar, const typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ Archive\+::is\+\_\+loading\+::value $>$ $\ast$=0)
\begin{DoxyCompactList}\small\item\em Initialize the tree from a \doxyref{boost\+::serialization}{p.}{namespaceboost_1_1serialization} archive. \end{DoxyCompactList}\item 
\textbf{ $\sim$\+Binary\+Space\+Tree} ()
\begin{DoxyCompactList}\small\item\em Deletes this node, deallocating the memory for the children and calling their destructors in turn. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Begin} () const
\begin{DoxyCompactList}\small\item\em Return the index of the beginning point of this subset. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Begin} ()
\begin{DoxyCompactList}\small\item\em Modify the index of the beginning point of this subset. \end{DoxyCompactList}\item 
const Bound\+Type$<$ Metric\+Type $>$ \& \textbf{ Bound} () const
\begin{DoxyCompactList}\small\item\em Return the bound object for this node. \end{DoxyCompactList}\item 
Bound\+Type$<$ Metric\+Type $>$ \& \textbf{ Bound} ()
\begin{DoxyCompactList}\small\item\em Return the bound object for this node. \end{DoxyCompactList}\item 
void \textbf{ Center} (arma\+::vec \&center) const
\begin{DoxyCompactList}\small\item\em Store the center of the bounding region in the given vector. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} \& \textbf{ Child} (const size\+\_\+t child) const
\begin{DoxyCompactList}\small\item\em Return the specified child (0 will be left, 1 will be right). \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} $\ast$\& \textbf{ Child\+Ptr} (const size\+\_\+t child)
\item 
size\+\_\+t \textbf{ Count} () const
\begin{DoxyCompactList}\small\item\em Return the number of points in this subset. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Count} ()
\begin{DoxyCompactList}\small\item\em Modify the number of points in this subset. \end{DoxyCompactList}\item 
const Mat\+Type \& \textbf{ Dataset} () const
\begin{DoxyCompactList}\small\item\em Get the dataset which the tree is built on. \end{DoxyCompactList}\item 
Mat\+Type \& \textbf{ Dataset} ()
\begin{DoxyCompactList}\small\item\em Modify the dataset which the tree is built on. Be careful! \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Descendant} (const size\+\_\+t index) const
\begin{DoxyCompactList}\small\item\em Return the index (with reference to the dataset) of a particular descendant of this node. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Furthest\+Descendant\+Distance} () const
\begin{DoxyCompactList}\small\item\em Return the furthest possible descendant distance. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Furthest\+Point\+Distance} () const
\begin{DoxyCompactList}\small\item\em Return the furthest distance to a point held in this node. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Vec\+Type $>$ }\\size\+\_\+t \textbf{ Get\+Furthest\+Child} (const Vec\+Type \&point, typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Vec\+Type $>$\+::value $>$ $\ast$=0)
\begin{DoxyCompactList}\small\item\em Return the index of the furthest child node to the given query point. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Get\+Furthest\+Child} (const \textbf{ Binary\+Space\+Tree} \&query\+Node)
\begin{DoxyCompactList}\small\item\em Return the index of the furthest child node to the given query node. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Vec\+Type $>$ }\\size\+\_\+t \textbf{ Get\+Nearest\+Child} (const Vec\+Type \&point, typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Vec\+Type $>$\+::value $>$ $\ast$=0)
\begin{DoxyCompactList}\small\item\em Return the index of the nearest child node to the given query point. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Get\+Nearest\+Child} (const \textbf{ Binary\+Space\+Tree} \&query\+Node)
\begin{DoxyCompactList}\small\item\em Return the index of the nearest child node to the given query node. \end{DoxyCompactList}\item 
bool \textbf{ Is\+Leaf} () const
\begin{DoxyCompactList}\small\item\em Return whether or not this node is a leaf (true if it has no children). \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} $\ast$ \textbf{ Left} () const
\begin{DoxyCompactList}\small\item\em Gets the left child of this node. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} $\ast$\& \textbf{ Left} ()
\begin{DoxyCompactList}\small\item\em Modify the left child of this node. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Max\+Distance} (const \textbf{ Binary\+Space\+Tree} \&other) const
\begin{DoxyCompactList}\small\item\em Return the maximum distance to another node. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Vec\+Type $>$ }\\\textbf{ Elem\+Type} \textbf{ Max\+Distance} (const Vec\+Type \&point, typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Vec\+Type $>$\+::value $>$ $\ast$=0) const
\begin{DoxyCompactList}\small\item\em Return the maximum distance to another point. \end{DoxyCompactList}\item 
Metric\+Type \textbf{ Metric} () const
\begin{DoxyCompactList}\small\item\em Get the metric that the tree uses. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Min\+Distance} (const \textbf{ Binary\+Space\+Tree} \&other) const
\begin{DoxyCompactList}\small\item\em Return the minimum distance to another node. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Vec\+Type $>$ }\\\textbf{ Elem\+Type} \textbf{ Min\+Distance} (const Vec\+Type \&point, typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Vec\+Type $>$\+::value $>$ $\ast$=0) const
\begin{DoxyCompactList}\small\item\em Return the minimum distance to another point. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Minimum\+Bound\+Distance} () const
\begin{DoxyCompactList}\small\item\em Return the minimum distance from the center of the node to any bound edge. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Num\+Children} () const
\begin{DoxyCompactList}\small\item\em Return the number of children in this node. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Num\+Descendants} () const
\begin{DoxyCompactList}\small\item\em Return the number of descendants of this node. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Num\+Points} () const
\begin{DoxyCompactList}\small\item\em Return the number of points in this node (0 if not a leaf). \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} \& \textbf{ operator=} (const \textbf{ Binary\+Space\+Tree} \&other)
\begin{DoxyCompactList}\small\item\em Copy the given Binary\+Sace\+Tree. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} \& \textbf{ operator=} (\textbf{ Binary\+Space\+Tree} \&\&other)
\begin{DoxyCompactList}\small\item\em Take ownership of the given \doxyref{Binary\+Space\+Tree}{p.}{classmlpack_1_1tree_1_1BinarySpaceTree}. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} $\ast$ \textbf{ Parent} () const
\begin{DoxyCompactList}\small\item\em Gets the parent of this node. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} $\ast$\& \textbf{ Parent} ()
\begin{DoxyCompactList}\small\item\em Modify the parent of this node. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Parent\+Distance} () const
\begin{DoxyCompactList}\small\item\em Return the distance from the center of this node to the center of the parent node. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \& \textbf{ Parent\+Distance} ()
\begin{DoxyCompactList}\small\item\em Modify the distance from the center of this node to the center of the parent node. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Point} (const size\+\_\+t index) const
\begin{DoxyCompactList}\small\item\em Return the index (with reference to the dataset) of a particular point in this node. \end{DoxyCompactList}\item 
\textbf{ math\+::\+Range\+Type}$<$ \textbf{ Elem\+Type} $>$ \textbf{ Range\+Distance} (const \textbf{ Binary\+Space\+Tree} \&other) const
\begin{DoxyCompactList}\small\item\em Return the minimum and maximum distance to another node. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Vec\+Type $>$ }\\\textbf{ math\+::\+Range\+Type}$<$ \textbf{ Elem\+Type} $>$ \textbf{ Range\+Distance} (const Vec\+Type \&point, typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Vec\+Type $>$\+::value $>$ $\ast$=0) const
\begin{DoxyCompactList}\small\item\em Return the minimum and maximum distance to another point. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} $\ast$ \textbf{ Right} () const
\begin{DoxyCompactList}\small\item\em Gets the right child of this node. \end{DoxyCompactList}\item 
\textbf{ Binary\+Space\+Tree} $\ast$\& \textbf{ Right} ()
\begin{DoxyCompactList}\small\item\em Modify the right child of this node. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&ar, const unsigned int version)
\begin{DoxyCompactList}\small\item\em Serialize the tree. \end{DoxyCompactList}\item 
const Statistic\+Type \& \textbf{ Stat} () const
\begin{DoxyCompactList}\small\item\em Return the statistic object for this node. \end{DoxyCompactList}\item 
Statistic\+Type \& \textbf{ Stat} ()
\begin{DoxyCompactList}\small\item\em Return the statistic object for this node. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Binary\+Space\+Tree} ()
\begin{DoxyCompactList}\small\item\em A default constructor. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Metric\+Type, typename Statistic\+Type = Empty\+Statistic, typename Mat\+Type = arma\+::mat, template$<$ typename Bound\+Metric\+Type, typename... $>$ class Bound\+Type = bound\+::\+H\+Rect\+Bound, template$<$ typename Split\+Bound\+Type, typename Split\+Mat\+Type $>$ class Split\+Type = Midpoint\+Split$>$\newline
class mlpack\+::tree\+::\+Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$}

A binary space partitioning tree, such as a K\+D-\/tree or a ball tree. 

Once the bound and type of dataset is defined, the tree will construct itself. Call the constructor with the dataset to build the tree on, and the entire tree will be built.

This particular tree does not allow growth, so you cannot add or delete nodes from it. If you need to add or delete a node, the better procedure is to rebuild the tree entirely.

This tree does take one runtime parameter in the constructor, which is the max leaf size to be used.


\begin{DoxyTemplParams}{Template Parameters}
{\em Metric\+Type} & The metric used for tree-\/building. The Bound\+Type may place restrictions on the metrics that can be used. \\
\hline
{\em Statistic\+Type} & Extra data contained in the node. See \doxyref{statistic.\+hpp}{p.}{statistic_8hpp} for the necessary skeleton interface. \\
\hline
{\em Mat\+Type} & The dataset class. \\
\hline
{\em Bound\+Type} & The bound used for each node. H\+Rect\+Bound, the default, requires that an L\+Metric$<$$>$ is used for Metric\+Type (so, Euclidean\+Distance, Manhattan\+Distance, etc.). \\
\hline
{\em Split\+Type} & The class that partitions the dataset/points at a particular node into two parts. Its definition decides the way this split is done. \\
\hline
\end{DoxyTemplParams}


Definition at line 54 of file binary\+\_\+space\+\_\+tree.\+hpp.



\subsection{Member Typedef Documentation}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a227d0c7e23e98fcd6c81ecab357a791f}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Elem\+Type@{Elem\+Type}}
\index{Elem\+Type@{Elem\+Type}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Elem\+Type}
{\footnotesize\ttfamily typedef Mat\+Type\+::elem\+\_\+type \textbf{ Elem\+Type}}



The type of element held in Mat\+Type. 



Definition at line 60 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a57758caa2e58c3fe05d1284eeabae523}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Mat@{Mat}}
\index{Mat@{Mat}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Mat}
{\footnotesize\ttfamily typedef Mat\+Type \textbf{ Mat}}



So other classes can use Tree\+Type\+::\+Mat. 



Definition at line 58 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a2fbe69d8cb6be0a0735b5df955708ade}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Split@{Split}}
\index{Split@{Split}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Split}
{\footnotesize\ttfamily typedef Split\+Type$<$Bound\+Type$<$Metric\+Type$>$, Mat\+Type$>$ \textbf{ Split}}



Definition at line 62 of file binary\+\_\+space\+\_\+tree.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a360d6a8e92c66e9c2d985b528071e93e}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [1/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{data,  }\item[{const size\+\_\+t}]{max\+Leaf\+Size = {\ttfamily 20} }\end{DoxyParamCaption})}



Construct this as the root node of a binary space tree using the given dataset. 

This will copy the input matrix; if you don\textquotesingle{}t want this, consider using the constructor that takes an rvalue reference and use std\+::move().


\begin{DoxyParams}{Parameters}
{\em data} & Dataset to create tree from. This will be copied! \\
\hline
{\em max\+Leaf\+Size} & Size of each leaf in the tree. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a38fc3cb2dd94cbd130f0444b3b06355b}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [2/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{data,  }\item[{std\+::vector$<$ size\+\_\+t $>$ \&}]{old\+From\+New,  }\item[{const size\+\_\+t}]{max\+Leaf\+Size = {\ttfamily 20} }\end{DoxyParamCaption})}



Construct this as the root node of a binary space tree using the given dataset. 

This will copy the input matrix and modify its ordering; a mapping of the old point indices to the new point indices is filled. If you don\textquotesingle{}t want the matrix to be copied, consider using the constructor that takes an rvalue reference and use std\+::move().


\begin{DoxyParams}{Parameters}
{\em data} & Dataset to create tree from. This will be copied! \\
\hline
{\em old\+From\+New} & Vector which will be filled with the old positions for each new point. \\
\hline
{\em max\+Leaf\+Size} & Size of each leaf in the tree. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a842ae235a817cfb9c7a5a456e7d78292}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [3/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{data,  }\item[{std\+::vector$<$ size\+\_\+t $>$ \&}]{old\+From\+New,  }\item[{std\+::vector$<$ size\+\_\+t $>$ \&}]{new\+From\+Old,  }\item[{const size\+\_\+t}]{max\+Leaf\+Size = {\ttfamily 20} }\end{DoxyParamCaption})}



Construct this as the root node of a binary space tree using the given dataset. 

This will copy the input matrix and modify its ordering; a mapping of the old point indices to the new point indices is filled, as well as a mapping of the new point indices to the old point indices. If you don\textquotesingle{}t want the matrix to be copied, consider using the constructor that takes an rvalue reference and use std\+::move().


\begin{DoxyParams}{Parameters}
{\em data} & Dataset to create tree from. This will be copied! \\
\hline
{\em old\+From\+New} & Vector which will be filled with the old positions for each new point. \\
\hline
{\em new\+From\+Old} & Vector which will be filled with the new positions for each old point. \\
\hline
{\em max\+Leaf\+Size} & Size of each leaf in the tree. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a49ee8af5482a265fe2b7edc8bb3efdce}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [4/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}\item[{Mat\+Type \&\&}]{data,  }\item[{const size\+\_\+t}]{max\+Leaf\+Size = {\ttfamily 20} }\end{DoxyParamCaption})}



Construct this as the root node of a binary space tree using the given dataset. 

This will take ownership of the data matrix; if you don\textquotesingle{}t want this, consider using the constructor that takes a const reference to a dataset.


\begin{DoxyParams}{Parameters}
{\em data} & Dataset to create tree from. \\
\hline
{\em max\+Leaf\+Size} & Size of each leaf in the tree. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a3753895793f9161d2793fd7b326b821d}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [5/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}\item[{Mat\+Type \&\&}]{data,  }\item[{std\+::vector$<$ size\+\_\+t $>$ \&}]{old\+From\+New,  }\item[{const size\+\_\+t}]{max\+Leaf\+Size = {\ttfamily 20} }\end{DoxyParamCaption})}



Construct this as the root node of a binary space tree using the given dataset. 

This will take ownership of the data matrix; a mapping of the old point indices to the new point indices is filled. If you don\textquotesingle{}t want the matrix to have its ownership taken, consider using the constructor that takes a const reference to a dataset.


\begin{DoxyParams}{Parameters}
{\em data} & Dataset to create tree from. \\
\hline
{\em old\+From\+New} & Vector which will be filled with the old positions for each new point. \\
\hline
{\em max\+Leaf\+Size} & Size of each leaf in the tree. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_abb64c00419354018fa1cd0ceb4f2eee5}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [6/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}\item[{Mat\+Type \&\&}]{data,  }\item[{std\+::vector$<$ size\+\_\+t $>$ \&}]{old\+From\+New,  }\item[{std\+::vector$<$ size\+\_\+t $>$ \&}]{new\+From\+Old,  }\item[{const size\+\_\+t}]{max\+Leaf\+Size = {\ttfamily 20} }\end{DoxyParamCaption})}



Construct this as the root node of a binary space tree using the given dataset. 

This will take ownership of the data matrix; a mapping of the old point indices to the new point indices is filled, as well as a mapping of the new point indices to the old point indices. If you don\textquotesingle{}t want the matrix to have its ownership taken, consider using the constructor that takes a const reference to a dataset.


\begin{DoxyParams}{Parameters}
{\em data} & Dataset to create tree from. \\
\hline
{\em old\+From\+New} & Vector which will be filled with the old positions for each new point. \\
\hline
{\em new\+From\+Old} & Vector which will be filled with the new positions for each old point. \\
\hline
{\em max\+Leaf\+Size} & Size of each leaf in the tree. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a820092388341845e2a8927478215e476}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [7/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}\item[{\textbf{ Binary\+Space\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ $\ast$}]{parent,  }\item[{const size\+\_\+t}]{begin,  }\item[{const size\+\_\+t}]{count,  }\item[{Split\+Type$<$ Bound\+Type$<$ Metric\+Type $>$, Mat\+Type $>$ \&}]{splitter,  }\item[{const size\+\_\+t}]{max\+Leaf\+Size = {\ttfamily 20} }\end{DoxyParamCaption})}



Construct this node as a child of the given parent, starting at column begin and using count points. 

The ordering of that subset of points in the parent\textquotesingle{}s data matrix will be modified! This is used for recursive tree-\/building by the other constructors which don\textquotesingle{}t specify point indices.


\begin{DoxyParams}{Parameters}
{\em parent} & Parent of this node. Its dataset will be modified! \\
\hline
{\em begin} & Index of point to start tree construction with. \\
\hline
{\em count} & Number of points to use to construct tree. \\
\hline
{\em splitter} & Instantiated node splitter object. \\
\hline
{\em max\+Leaf\+Size} & Size of each leaf in the tree. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_ae79c1b69a1dc4ac4d654c43e0d1a1981}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [8/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}\item[{\textbf{ Binary\+Space\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ $\ast$}]{parent,  }\item[{const size\+\_\+t}]{begin,  }\item[{const size\+\_\+t}]{count,  }\item[{std\+::vector$<$ size\+\_\+t $>$ \&}]{old\+From\+New,  }\item[{Split\+Type$<$ Bound\+Type$<$ Metric\+Type $>$, Mat\+Type $>$ \&}]{splitter,  }\item[{const size\+\_\+t}]{max\+Leaf\+Size = {\ttfamily 20} }\end{DoxyParamCaption})}



Construct this node as a child of the given parent, starting at column begin and using count points. 

The ordering of that subset of points in the parent\textquotesingle{}s data matrix will be modified! This is used for recursive tree-\/building by the other constructors which don\textquotesingle{}t specify point indices.

A mapping of the old point indices to the new point indices is filled, but it is expected that the vector is already allocated with size greater than or equal to (begin + count), and if that is not true, invalid memory reads (and writes) will occur.


\begin{DoxyParams}{Parameters}
{\em parent} & Parent of this node. Its dataset will be modified! \\
\hline
{\em begin} & Index of point to start tree construction with. \\
\hline
{\em count} & Number of points to use to construct tree. \\
\hline
{\em old\+From\+New} & Vector which will be filled with the old positions for each new point. \\
\hline
{\em splitter} & Instantiated node splitter object. \\
\hline
{\em max\+Leaf\+Size} & Size of each leaf in the tree. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_aae1fbad0d2639fb7bd63aac6b6a998f1}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [9/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}\item[{\textbf{ Binary\+Space\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ $\ast$}]{parent,  }\item[{const size\+\_\+t}]{begin,  }\item[{const size\+\_\+t}]{count,  }\item[{std\+::vector$<$ size\+\_\+t $>$ \&}]{old\+From\+New,  }\item[{std\+::vector$<$ size\+\_\+t $>$ \&}]{new\+From\+Old,  }\item[{Split\+Type$<$ Bound\+Type$<$ Metric\+Type $>$, Mat\+Type $>$ \&}]{splitter,  }\item[{const size\+\_\+t}]{max\+Leaf\+Size = {\ttfamily 20} }\end{DoxyParamCaption})}



Construct this node as a child of the given parent, starting at column begin and using count points. 

The ordering of that subset of points in the parent\textquotesingle{}s data matrix will be modified! This is used for recursive tree-\/building by the other constructors which don\textquotesingle{}t specify point indices.

A mapping of the old point indices to the new point indices is filled, as well as a mapping of the new point indices to the old point indices. It is expected that the vector is already allocated with size greater than or equal to (begin\+\_\+in + count\+\_\+in), and if that is not true, invalid memory reads (and writes) will occur.


\begin{DoxyParams}{Parameters}
{\em parent} & Parent of this node. Its dataset will be modified! \\
\hline
{\em begin} & Index of point to start tree construction with. \\
\hline
{\em count} & Number of points to use to construct tree. \\
\hline
{\em old\+From\+New} & Vector which will be filled with the old positions for each new point. \\
\hline
{\em new\+From\+Old} & Vector which will be filled with the new positions for each old point. \\
\hline
{\em splitter} & Splitter matrix to use. \\
\hline
{\em max\+Leaf\+Size} & Size of each leaf in the tree. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a32dee7101946c7d2393cc13c8d65899f}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [10/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}\item[{const \textbf{ Binary\+Space\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ \&}]{other }\end{DoxyParamCaption})}



Create a binary space tree by copying the other tree. 

Be careful! This can take a long time and use a lot of memory.


\begin{DoxyParams}{Parameters}
{\em other} & Tree to be copied. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a50dd4753fb64883537125f80f5dfc273}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [11/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}\item[{\textbf{ Binary\+Space\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ \&\&}]{other }\end{DoxyParamCaption})}



Move constructor for a \doxyref{Binary\+Space\+Tree}{p.}{classmlpack_1_1tree_1_1BinarySpaceTree}; possess all the members of the given tree. 

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a012eae1d64ece9c625e0259f387d5a74}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [12/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ Archive\+::is\+\_\+loading\+::value $>$ $\ast$}]{ = {\ttfamily 0} }\end{DoxyParamCaption})}



Initialize the tree from a \doxyref{boost\+::serialization}{p.}{namespaceboost_1_1serialization} archive. 


\begin{DoxyParams}{Parameters}
{\em ar} & Archive to load tree from. Must be an iarchive, not an oarchive. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_ae07a273ce37bd373995e13b3ef276265}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!````~Binary\+Space\+Tree@{$\sim$\+Binary\+Space\+Tree}}
\index{````~Binary\+Space\+Tree@{$\sim$\+Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{$\sim$\+Binary\+Space\+Tree()}
{\footnotesize\ttfamily $\sim$\textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Deletes this node, deallocating the memory for the children and calling their destructors in turn. 

This will invalidate any pointers or references to any nodes which are children of this one. \mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_ae287bd32ba0f337878b2d1b52e550281}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Binary\+Space\+Tree@{Binary\+Space\+Tree}}
\index{Binary\+Space\+Tree@{Binary\+Space\+Tree}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Binary\+Space\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [13/13]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



A default constructor. 

This is meant to only be used with \doxyref{boost\+::serialization}{p.}{namespaceboost_1_1serialization}, which is allowed with the friend declaration below. This does not return a valid tree! The method must be protected, so that the serialization shim can work with the default constructor. 

Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Center().



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_ac50a3a009687e641fd8249e011f628d4}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Begin@{Begin}}
\index{Begin@{Begin}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Begin()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Begin (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the index of the beginning point of this subset. 



Definition at line 498 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a49cdbf8b1b2899522cd80f4cbff40b69}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Begin@{Begin}}
\index{Begin@{Begin}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Begin()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Begin (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the index of the beginning point of this subset. 



Definition at line 500 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_ae995f23d597849b8b3fa165765921914}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Bound@{Bound}}
\index{Bound@{Bound}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Bound()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const Bound\+Type$<$Metric\+Type$>$\& Bound (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the bound object for this node. 



Definition at line 319 of file binary\+\_\+space\+\_\+tree.\+hpp.



Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Max\+Distance(), Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Min\+Distance(), and Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Range\+Distance().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a1023b24dcb81cc1769a8698d0ac8b7ed}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Bound@{Bound}}
\index{Bound@{Bound}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Bound()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Bound\+Type$<$Metric\+Type$>$\& Bound (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Return the bound object for this node. 



Definition at line 321 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_aa800439660375c0253008cafa648da78}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Center@{Center}}
\index{Center@{Center}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Center()}
{\footnotesize\ttfamily void Center (\begin{DoxyParamCaption}\item[{arma\+::vec \&}]{center }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Store the center of the bounding region in the given vector. 



Definition at line 508 of file binary\+\_\+space\+\_\+tree.\+hpp.



References Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Binary\+Space\+Tree().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a2cf9f074d6e3c683213f5f17acfbc6f7}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Child@{Child}}
\index{Child@{Child}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Child()}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree}\& Child (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{child }\end{DoxyParamCaption}) const}



Return the specified child (0 will be left, 1 will be right). 

If the index is greater than 1, this will return the right child.


\begin{DoxyParams}{Parameters}
{\em child} & Index of child to return. \\
\hline
\end{DoxyParams}


Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Parent\+Distance().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_acb373eeb13db5a753ec52ea56ec5a9cd}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Child\+Ptr@{Child\+Ptr}}
\index{Child\+Ptr@{Child\+Ptr}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Child\+Ptr()}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree}$\ast$\& Child\+Ptr (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{child }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Definition at line 420 of file binary\+\_\+space\+\_\+tree.\+hpp.



References Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Descendant(), Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Num\+Descendants(), Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Num\+Points(), and Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Point().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_ab30fd361b8bee994ff8ed9fbb6fae845}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Count@{Count}}
\index{Count@{Count}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Count()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Count (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the number of points in this subset. 



Definition at line 503 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a5a132e068ab206a014b986ff71c3442d}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Count@{Count}}
\index{Count@{Count}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Count()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Count (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the number of points in this subset. 



Definition at line 505 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a4c3764c98d5804083a9ec2c867eb9366}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Dataset@{Dataset}}
\index{Dataset@{Dataset}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Dataset()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const Mat\+Type\& Dataset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the dataset which the tree is built on. 



Definition at line 347 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_abb34576c3ddb31987f1dda9c33e6476f}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Dataset@{Dataset}}
\index{Dataset@{Dataset}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Dataset()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Mat\+Type\& Dataset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the dataset which the tree is built on. Be careful! 



Definition at line 349 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_aa732ea3eeb38529c549fd4d15d8655be}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Descendant@{Descendant}}
\index{Descendant@{Descendant}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Descendant()}
{\footnotesize\ttfamily size\+\_\+t Descendant (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{index }\end{DoxyParamCaption}) const}



Return the index (with reference to the dataset) of a particular descendant of this node. 

The index should be greater than zero but less than the number of descendants.


\begin{DoxyParams}{Parameters}
{\em index} & Index of the descendant. \\
\hline
\end{DoxyParams}


Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Child\+Ptr().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_adc597088eadfcfa3060336d0484ab573}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Furthest\+Descendant\+Distance@{Furthest\+Descendant\+Distance}}
\index{Furthest\+Descendant\+Distance@{Furthest\+Descendant\+Distance}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Furthest\+Descendant\+Distance()}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Furthest\+Descendant\+Distance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Return the furthest possible descendant distance. 

This returns the maximum distance from the centroid to the edge of the bound and not the empirical quantity which is the actual furthest descendant distance. So the actual furthest descendant distance may be less than what this method returns (but it will never be greater than this). 

Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Metric().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_acbe82a6439f71405b5801ca7d941cbfb}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Furthest\+Point\+Distance@{Furthest\+Point\+Distance}}
\index{Furthest\+Point\+Distance@{Furthest\+Point\+Distance}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Furthest\+Point\+Distance()}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Furthest\+Point\+Distance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Return the furthest distance to a point held in this node. 

If this is not a leaf node, then the distance is 0 because the node holds no points. 

Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Metric().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a0257281722537c7916db7763623f67f7}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Get\+Furthest\+Child@{Get\+Furthest\+Child}}
\index{Get\+Furthest\+Child@{Get\+Furthest\+Child}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Get\+Furthest\+Child()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Get\+Furthest\+Child (\begin{DoxyParamCaption}\item[{const Vec\+Type \&}]{point,  }\item[{typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Vec\+Type $>$\+::value $>$ $\ast$}]{ = {\ttfamily 0} }\end{DoxyParamCaption})}



Return the index of the furthest child node to the given query point. 

If this is a leaf node, it will return \doxyref{Num\+Children()}{p.}{classmlpack_1_1tree_1_1BinarySpaceTree_a1f7ec083be66d58a3e02e12956bf005e} (invalid index). 

Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Metric().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a03c2b878b5dd46d80b333542f97bd86d}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Get\+Furthest\+Child@{Get\+Furthest\+Child}}
\index{Get\+Furthest\+Child@{Get\+Furthest\+Child}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Get\+Furthest\+Child()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t Get\+Furthest\+Child (\begin{DoxyParamCaption}\item[{const \textbf{ Binary\+Space\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ \&}]{query\+Node }\end{DoxyParamCaption})}



Return the index of the furthest child node to the given query node. 

If it can\textquotesingle{}t decide, it will return \doxyref{Num\+Children()}{p.}{classmlpack_1_1tree_1_1BinarySpaceTree_a1f7ec083be66d58a3e02e12956bf005e} (invalid index). \mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a19b9a5fd41d8e192b62effb1445bd410}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Get\+Nearest\+Child@{Get\+Nearest\+Child}}
\index{Get\+Nearest\+Child@{Get\+Nearest\+Child}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Get\+Nearest\+Child()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Get\+Nearest\+Child (\begin{DoxyParamCaption}\item[{const Vec\+Type \&}]{point,  }\item[{typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Vec\+Type $>$\+::value $>$ $\ast$}]{ = {\ttfamily 0} }\end{DoxyParamCaption})}



Return the index of the nearest child node to the given query point. 

If this is a leaf node, it will return \doxyref{Num\+Children()}{p.}{classmlpack_1_1tree_1_1BinarySpaceTree_a1f7ec083be66d58a3e02e12956bf005e} (invalid index). 

Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Metric().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a45f18fdc176329c127d97aa7d08d4b7a}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Get\+Nearest\+Child@{Get\+Nearest\+Child}}
\index{Get\+Nearest\+Child@{Get\+Nearest\+Child}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Get\+Nearest\+Child()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t Get\+Nearest\+Child (\begin{DoxyParamCaption}\item[{const \textbf{ Binary\+Space\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ \&}]{query\+Node }\end{DoxyParamCaption})}



Return the index of the nearest child node to the given query node. 

If it can\textquotesingle{}t decide, it will return \doxyref{Num\+Children()}{p.}{classmlpack_1_1tree_1_1BinarySpaceTree_a1f7ec083be66d58a3e02e12956bf005e} (invalid index). \mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_aa0f4813924e6cdee43b45050bb947abe}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Is\+Leaf@{Is\+Leaf}}
\index{Is\+Leaf@{Is\+Leaf}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Is\+Leaf()}
{\footnotesize\ttfamily bool Is\+Leaf (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Return whether or not this node is a leaf (true if it has no children). 



Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Stat().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a3085061e078694745cf2f59a77f982c3}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Left@{Left}}
\index{Left@{Left}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Left()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree}$\ast$ Left (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Gets the left child of this node. 



Definition at line 332 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a5ddd6024d9d85e1e0d7e59b8533897a7}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Left@{Left}}
\index{Left@{Left}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Left()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree}$\ast$\& Left (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the left child of this node. 



Definition at line 334 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a29d3f7fc53a6113f14949dc05d747992}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Max\+Distance@{Max\+Distance}}
\index{Max\+Distance@{Max\+Distance}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Max\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Max\+Distance (\begin{DoxyParamCaption}\item[{const \textbf{ Binary\+Space\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ \&}]{other }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the maximum distance to another node. 



Definition at line 459 of file binary\+\_\+space\+\_\+tree.\+hpp.



References Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Bound().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_ae764d88483236cc470f5abe0273df4c5}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Max\+Distance@{Max\+Distance}}
\index{Max\+Distance@{Max\+Distance}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Max\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Max\+Distance (\begin{DoxyParamCaption}\item[{const Vec\+Type \&}]{point,  }\item[{typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Vec\+Type $>$\+::value $>$ $\ast$}]{ = {\ttfamily 0} }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the maximum distance to another point. 



Definition at line 481 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_ab7cdd810a507e4a0aa262ea0fa8a322c}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Metric@{Metric}}
\index{Metric@{Metric}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Metric()}
{\footnotesize\ttfamily Metric\+Type Metric (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the metric that the tree uses. 



Definition at line 352 of file binary\+\_\+space\+\_\+tree.\+hpp.



References Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Furthest\+Descendant\+Distance(), Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Furthest\+Point\+Distance(), Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Get\+Furthest\+Child(), Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Get\+Nearest\+Child(), Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Minimum\+Bound\+Distance(), and Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Num\+Children().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a080f6b6c8d4336ff1ead4f0d0f6a0cb5}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Min\+Distance@{Min\+Distance}}
\index{Min\+Distance@{Min\+Distance}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Min\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Min\+Distance (\begin{DoxyParamCaption}\item[{const \textbf{ Binary\+Space\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ \&}]{other }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the minimum distance to another node. 



Definition at line 453 of file binary\+\_\+space\+\_\+tree.\+hpp.



References Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Bound().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a73bf99a433e88a31d98b46bf4c0da147}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Min\+Distance@{Min\+Distance}}
\index{Min\+Distance@{Min\+Distance}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Min\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Min\+Distance (\begin{DoxyParamCaption}\item[{const Vec\+Type \&}]{point,  }\item[{typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Vec\+Type $>$\+::value $>$ $\ast$}]{ = {\ttfamily 0} }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the minimum distance to another point. 



Definition at line 472 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a20a4e92da6066eb335a576b7f9cd0415}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Minimum\+Bound\+Distance@{Minimum\+Bound\+Distance}}
\index{Minimum\+Bound\+Distance@{Minimum\+Bound\+Distance}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Minimum\+Bound\+Distance()}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Minimum\+Bound\+Distance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Return the minimum distance from the center of the node to any bound edge. 



Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Metric().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a1f7ec083be66d58a3e02e12956bf005e}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Num\+Children@{Num\+Children}}
\index{Num\+Children@{Num\+Children}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Num\+Children()}
{\footnotesize\ttfamily size\+\_\+t Num\+Children (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Return the number of children in this node. 



Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Metric().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a2a85eb34222f1fc073940e8c89274e81}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Num\+Descendants@{Num\+Descendants}}
\index{Num\+Descendants@{Num\+Descendants}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Num\+Descendants()}
{\footnotesize\ttfamily size\+\_\+t Num\+Descendants (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Return the number of descendants of this node. 

For a non-\/leaf in a binary space tree, this is the number of points at the descendant leaves. For a leaf, this is the number of points in the leaf. 

Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Child\+Ptr().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a352077c26368da0ee570c0b7f062b1e3}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Num\+Points@{Num\+Points}}
\index{Num\+Points@{Num\+Points}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Num\+Points()}
{\footnotesize\ttfamily size\+\_\+t Num\+Points (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Return the number of points in this node (0 if not a leaf). 



Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Child\+Ptr().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a11d6befceee3f4a7cda868bfeb3bf8f9}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!operator=@{operator=}}
\index{operator=@{operator=}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{operator=()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree}\& operator= (\begin{DoxyParamCaption}\item[{const \textbf{ Binary\+Space\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ \&}]{other }\end{DoxyParamCaption})}



Copy the given Binary\+Sace\+Tree. 


\begin{DoxyParams}{Parameters}
{\em other} & The tree to be copied. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_ace087a2c1ab4214c229b36edd4444ea7}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!operator=@{operator=}}
\index{operator=@{operator=}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{operator=()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree}\& operator= (\begin{DoxyParamCaption}\item[{\textbf{ Binary\+Space\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ \&\&}]{other }\end{DoxyParamCaption})}



Take ownership of the given \doxyref{Binary\+Space\+Tree}{p.}{classmlpack_1_1tree_1_1BinarySpaceTree}. 


\begin{DoxyParams}{Parameters}
{\em other} & The tree to take ownership of. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_abe2ac60bc77d318c2dba58b43f18a245}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Parent@{Parent}}
\index{Parent@{Parent}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Parent()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree}$\ast$ Parent (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Gets the parent of this node. 



Definition at line 342 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a632e02a7a7f3eda4fe6d4fa5bc69b832}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Parent@{Parent}}
\index{Parent@{Parent}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Parent()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree}$\ast$\& Parent (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the parent of this node. 



Definition at line 344 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_af44ed4e7bfea088689caed082da67e17}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Parent\+Distance@{Parent\+Distance}}
\index{Parent\+Distance@{Parent\+Distance}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Parent\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Parent\+Distance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the distance from the center of this node to the center of the parent node. 



Definition at line 407 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_aa22ead21ac809efb970b90ec014dc318}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Parent\+Distance@{Parent\+Distance}}
\index{Parent\+Distance@{Parent\+Distance}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Parent\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type}\& Parent\+Distance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the distance from the center of this node to the center of the parent node. 



Definition at line 410 of file binary\+\_\+space\+\_\+tree.\+hpp.



References Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Child().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a559eede5ea60f68634f8e7e72c3c68d2}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Point@{Point}}
\index{Point@{Point}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Point()}
{\footnotesize\ttfamily size\+\_\+t Point (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{index }\end{DoxyParamCaption}) const}



Return the index (with reference to the dataset) of a particular point in this node. 

This will happily return invalid indices if the given index is greater than the number of points in this node (obtained with \doxyref{Num\+Points()}{p.}{classmlpack_1_1tree_1_1BinarySpaceTree_a352077c26368da0ee570c0b7f062b1e3}) -- be careful.


\begin{DoxyParams}{Parameters}
{\em index} & Index of point for which a dataset index is wanted. \\
\hline
\end{DoxyParams}


Referenced by Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Child\+Ptr().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a186a488e372175c6f8499115c9add8b4}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Range\+Distance@{Range\+Distance}}
\index{Range\+Distance@{Range\+Distance}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Range\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ math\+::\+Range\+Type}$<$\textbf{ Elem\+Type}$>$ Range\+Distance (\begin{DoxyParamCaption}\item[{const \textbf{ Binary\+Space\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$ \&}]{other }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the minimum and maximum distance to another node. 



Definition at line 465 of file binary\+\_\+space\+\_\+tree.\+hpp.



References Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Bound().

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a60a550bf46aa1d7b858134ce41fd5a3a}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Range\+Distance@{Range\+Distance}}
\index{Range\+Distance@{Range\+Distance}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Range\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ math\+::\+Range\+Type}$<$\textbf{ Elem\+Type}$>$ Range\+Distance (\begin{DoxyParamCaption}\item[{const Vec\+Type \&}]{point,  }\item[{typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Vec\+Type $>$\+::value $>$ $\ast$}]{ = {\ttfamily 0} }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the minimum and maximum distance to another point. 



Definition at line 491 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_aaa38cf098e44114fc6e70da0f9ef57e0}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Right@{Right}}
\index{Right@{Right}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Right()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree}$\ast$ Right (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Gets the right child of this node. 



Definition at line 337 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a6c50c4ae4876df5d346da693c37ae02f}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Right@{Right}}
\index{Right@{Right}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Right()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Binary\+Space\+Tree}$\ast$\& Right (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the right child of this node. 



Definition at line 339 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_a68e832cb064e3b7ca978d8e5911cf700}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{serialize()}
{\footnotesize\ttfamily void serialize (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const unsigned int}]{version }\end{DoxyParamCaption})}



Serialize the tree. 

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_ad8b29c84ac793742cd15834f9f4c4f31}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Stat@{Stat}}
\index{Stat@{Stat}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Stat()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const Statistic\+Type\& Stat (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the statistic object for this node. 



Definition at line 324 of file binary\+\_\+space\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1BinarySpaceTree_aac2d3c104b89109f3df4a9a8cad244da}} 
\index{mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}!Stat@{Stat}}
\index{Stat@{Stat}!mlpack\+::tree\+::\+Binary\+Space\+Tree@{mlpack\+::tree\+::\+Binary\+Space\+Tree}}
\subsubsection{Stat()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Statistic\+Type\& Stat (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Return the statistic object for this node. 



Definition at line 326 of file binary\+\_\+space\+\_\+tree.\+hpp.



References Binary\+Space\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Bound\+Type, Split\+Type $>$\+::\+Is\+Leaf().



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{ binary\+\_\+space\+\_\+tree.\+hpp}\end{DoxyCompactItemize}
