\section{Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ Class Template Reference}
\label{classmlpack_1_1tree_1_1CoverTree}\index{Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$@{Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$}}


A cover tree is a tree specifically designed to speed up nearest-\/neighbor computation in high-\/dimensional spaces.  


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \textbf{ Dual\+Tree\+Traverser}
\begin{DoxyCompactList}\small\item\em A dual-\/tree cover tree traverser; see dual\+\_\+tree\+\_\+traverser.\+hpp. \end{DoxyCompactList}\item 
class \textbf{ Single\+Tree\+Traverser}
\begin{DoxyCompactList}\small\item\em A single-\/tree cover tree traverser; see single\+\_\+tree\+\_\+traverser.\+hpp for implementation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Rule\+Type $>$ }\\using \textbf{ Breadth\+First\+Dual\+Tree\+Traverser} = \textbf{ Dual\+Tree\+Traverser}$<$ Rule\+Type $>$
\item 
typedef Mat\+Type\+::elem\+\_\+type \textbf{ Elem\+Type}
\begin{DoxyCompactList}\small\item\em The type held by the matrix type. \end{DoxyCompactList}\item 
typedef Mat\+Type \textbf{ Mat}
\begin{DoxyCompactList}\small\item\em So that other classes can access the matrix type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Cover\+Tree} (const Mat\+Type \&dataset, const \textbf{ Elem\+Type} base=2.\+0, Metric\+Type $\ast$metric=N\+U\+LL)
\begin{DoxyCompactList}\small\item\em Create the cover tree with the given dataset and given base. \end{DoxyCompactList}\item 
\textbf{ Cover\+Tree} (const Mat\+Type \&dataset, Metric\+Type \&metric, const \textbf{ Elem\+Type} base=2.\+0)
\begin{DoxyCompactList}\small\item\em Create the cover tree with the given dataset and the given instantiated metric. \end{DoxyCompactList}\item 
\textbf{ Cover\+Tree} (Mat\+Type \&\&dataset, const \textbf{ Elem\+Type} base=2.\+0)
\begin{DoxyCompactList}\small\item\em Create the cover tree with the given dataset, taking ownership of the dataset. \end{DoxyCompactList}\item 
\textbf{ Cover\+Tree} (Mat\+Type \&\&dataset, Metric\+Type \&metric, const \textbf{ Elem\+Type} base=2.\+0)
\begin{DoxyCompactList}\small\item\em Create the cover tree with the given dataset and the given instantiated metric, taking ownership of the dataset. \end{DoxyCompactList}\item 
\textbf{ Cover\+Tree} (const Mat\+Type \&dataset, const \textbf{ Elem\+Type} base, const size\+\_\+t point\+Index, const int scale, \textbf{ Cover\+Tree} $\ast$parent, const \textbf{ Elem\+Type} parent\+Distance, arma\+::\+Col$<$ size\+\_\+t $>$ \&indices, arma\+::vec \&distances, size\+\_\+t near\+Set\+Size, size\+\_\+t \&far\+Set\+Size, size\+\_\+t \&used\+Set\+Size, Metric\+Type \&metric=N\+U\+LL)
\begin{DoxyCompactList}\small\item\em Construct a child cover tree node. \end{DoxyCompactList}\item 
\textbf{ Cover\+Tree} (const Mat\+Type \&dataset, const \textbf{ Elem\+Type} base, const size\+\_\+t point\+Index, const int scale, \textbf{ Cover\+Tree} $\ast$parent, const \textbf{ Elem\+Type} parent\+Distance, const \textbf{ Elem\+Type} furthest\+Descendant\+Distance, Metric\+Type $\ast$metric=N\+U\+LL)
\begin{DoxyCompactList}\small\item\em Manually construct a cover tree node; no tree assembly is done in this constructor, and children must be added manually (use \doxyref{Children()}{p.}{classmlpack_1_1tree_1_1CoverTree_a90f33ff64c79eae26cecb0da580edff5}). \end{DoxyCompactList}\item 
\textbf{ Cover\+Tree} (const \textbf{ Cover\+Tree} \&other)
\begin{DoxyCompactList}\small\item\em Create a cover tree from another tree. \end{DoxyCompactList}\item 
\textbf{ Cover\+Tree} (\textbf{ Cover\+Tree} \&\&other)
\begin{DoxyCompactList}\small\item\em Move constructor for a Cover Tree, possess all the members of the given tree. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\\textbf{ Cover\+Tree} (Archive \&ar, const typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ Archive\+::is\+\_\+loading\+::value $>$ $\ast$=0)
\begin{DoxyCompactList}\small\item\em Create a cover tree from a \doxyref{boost\+::serialization}{p.}{namespaceboost_1_1serialization} archive. \end{DoxyCompactList}\item 
\textbf{ $\sim$\+Cover\+Tree} ()
\begin{DoxyCompactList}\small\item\em Delete this cover tree node and its children. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Base} () const
\begin{DoxyCompactList}\small\item\em Get the base. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \& \textbf{ Base} ()
\begin{DoxyCompactList}\small\item\em Modify the base; don\textquotesingle{}t do this, you\textquotesingle{}ll break everything. \end{DoxyCompactList}\item 
void \textbf{ Center} (arma\+::vec \&center) const
\begin{DoxyCompactList}\small\item\em Get the center of the node and store it in the given vector. \end{DoxyCompactList}\item 
const \textbf{ Cover\+Tree} \& \textbf{ Child} (const size\+\_\+t index) const
\begin{DoxyCompactList}\small\item\em Get a particular child node. \end{DoxyCompactList}\item 
\textbf{ Cover\+Tree} \& \textbf{ Child} (const size\+\_\+t index)
\begin{DoxyCompactList}\small\item\em Modify a particular child node. \end{DoxyCompactList}\item 
\textbf{ Cover\+Tree} $\ast$\& \textbf{ Child\+Ptr} (const size\+\_\+t index)
\item 
const std\+::vector$<$ \textbf{ Cover\+Tree} $\ast$ $>$ \& \textbf{ Children} () const
\begin{DoxyCompactList}\small\item\em Get the children. \end{DoxyCompactList}\item 
std\+::vector$<$ \textbf{ Cover\+Tree} $\ast$ $>$ \& \textbf{ Children} ()
\begin{DoxyCompactList}\small\item\em Modify the children manually (maybe not a great idea). \end{DoxyCompactList}\item 
const Mat\+Type \& \textbf{ Dataset} () const
\begin{DoxyCompactList}\small\item\em Get a reference to the dataset. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Descendant} (const size\+\_\+t index) const
\begin{DoxyCompactList}\small\item\em Get the index of a particular descendant point. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Distance\+Comps} () const
\item 
size\+\_\+t \& \textbf{ Distance\+Comps} ()
\item 
\textbf{ Elem\+Type} \textbf{ Furthest\+Descendant\+Distance} () const
\begin{DoxyCompactList}\small\item\em Get the distance from the center of the node to the furthest descendant. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \& \textbf{ Furthest\+Descendant\+Distance} ()
\begin{DoxyCompactList}\small\item\em Modify the distance from the center of the node to the furthest descendant. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Furthest\+Point\+Distance} () const
\begin{DoxyCompactList}\small\item\em Get the distance to the furthest point. This is always 0 for cover trees. \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{ Cover\+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{ Cover\+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
\item 
\textbf{ Elem\+Type} \textbf{ Max\+Distance} (const \textbf{ Cover\+Tree} \&other) const
\begin{DoxyCompactList}\small\item\em Return the maximum distance to another node. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Max\+Distance} (const \textbf{ Cover\+Tree} \&other, const \textbf{ Elem\+Type} distance) const
\begin{DoxyCompactList}\small\item\em Return the maximum distance to another node given that the point-\/to-\/point distance has already been calculated. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Max\+Distance} (const arma\+::vec \&other) const
\begin{DoxyCompactList}\small\item\em Return the maximum distance to another point. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Max\+Distance} (const arma\+::vec \&other, const \textbf{ Elem\+Type} distance) const
\begin{DoxyCompactList}\small\item\em Return the maximum distance to another point given that the distance from the center to the point has already been calculated. \end{DoxyCompactList}\item 
Metric\+Type \& \textbf{ Metric} () const
\begin{DoxyCompactList}\small\item\em Get the instantiated metric. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Min\+Distance} (const \textbf{ Cover\+Tree} \&other) const
\begin{DoxyCompactList}\small\item\em Return the minimum distance to another node. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Min\+Distance} (const \textbf{ Cover\+Tree} \&other, const \textbf{ Elem\+Type} distance) const
\begin{DoxyCompactList}\small\item\em Return the minimum distance to another node given that the point-\/to-\/point distance has already been calculated. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Min\+Distance} (const arma\+::vec \&other) const
\begin{DoxyCompactList}\small\item\em Return the minimum distance to another point. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Min\+Distance} (const arma\+::vec \&other, const \textbf{ Elem\+Type} distance) const
\begin{DoxyCompactList}\small\item\em Return the minimum distance to another point given that the distance from the center to the point has already been calculated. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Minimum\+Bound\+Distance} () const
\begin{DoxyCompactList}\small\item\em Get the minimum distance from the center to any bound edge (this is the same as furthest\+Descendant\+Distance). \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Num\+Children} () const
\begin{DoxyCompactList}\small\item\em Get the number of children. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Num\+Descendants} () const
\begin{DoxyCompactList}\small\item\em Get the number of descendant points. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Num\+Points} () const
\item 
\textbf{ Cover\+Tree} \& \textbf{ operator=} (const \textbf{ Cover\+Tree} \&other)
\begin{DoxyCompactList}\small\item\em Copy the given Cover Tree. \end{DoxyCompactList}\item 
\textbf{ Cover\+Tree} \& \textbf{ operator=} (\textbf{ Cover\+Tree} \&\&other)
\begin{DoxyCompactList}\small\item\em Take ownership of the given Cover Tree. \end{DoxyCompactList}\item 
\textbf{ Cover\+Tree} $\ast$ \textbf{ Parent} () const
\begin{DoxyCompactList}\small\item\em Get the parent node. \end{DoxyCompactList}\item 
\textbf{ Cover\+Tree} $\ast$\& \textbf{ Parent} ()
\begin{DoxyCompactList}\small\item\em Modify the parent node. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Parent\+Distance} () const
\begin{DoxyCompactList}\small\item\em Get the distance to the parent. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \& \textbf{ Parent\+Distance} ()
\begin{DoxyCompactList}\small\item\em Modify the distance to the parent. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Point} () const
\begin{DoxyCompactList}\small\item\em Get the index of the point which this node represents. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Point} (const size\+\_\+t) const
\begin{DoxyCompactList}\small\item\em For compatibility with other trees; the argument is ignored. \end{DoxyCompactList}\item 
\textbf{ math\+::\+Range\+Type}$<$ \textbf{ Elem\+Type} $>$ \textbf{ Range\+Distance} (const \textbf{ Cover\+Tree} \&other) const
\begin{DoxyCompactList}\small\item\em Return the minimum and maximum distance to another node. \end{DoxyCompactList}\item 
\textbf{ math\+::\+Range\+Type}$<$ \textbf{ Elem\+Type} $>$ \textbf{ Range\+Distance} (const \textbf{ Cover\+Tree} \&other, const \textbf{ Elem\+Type} distance) const
\begin{DoxyCompactList}\small\item\em Return the minimum and maximum distance to another node given that the point-\/to-\/point distance has already been calculated. \end{DoxyCompactList}\item 
\textbf{ math\+::\+Range\+Type}$<$ \textbf{ Elem\+Type} $>$ \textbf{ Range\+Distance} (const arma\+::vec \&other) const
\begin{DoxyCompactList}\small\item\em Return the minimum and maximum distance to another point. \end{DoxyCompactList}\item 
\textbf{ math\+::\+Range\+Type}$<$ \textbf{ Elem\+Type} $>$ \textbf{ Range\+Distance} (const arma\+::vec \&other, const \textbf{ Elem\+Type} distance) const
\begin{DoxyCompactList}\small\item\em Return the minimum and maximum distance to another point given that the point-\/to-\/point distance has already been calculated. \end{DoxyCompactList}\item 
int \textbf{ Scale} () const
\begin{DoxyCompactList}\small\item\em Get the scale of this node. \end{DoxyCompactList}\item 
int \& \textbf{ Scale} ()
\begin{DoxyCompactList}\small\item\em Modify the scale of this node. Be careful... \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&ar, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the tree. \end{DoxyCompactList}\item 
const Statistic\+Type \& \textbf{ Stat} () const
\begin{DoxyCompactList}\small\item\em Get the statistic for this node. \end{DoxyCompactList}\item 
Statistic\+Type \& \textbf{ Stat} ()
\begin{DoxyCompactList}\small\item\em Modify the statistic for this node. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Cover\+Tree} ()
\begin{DoxyCompactList}\small\item\em A default constructor. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Metric\+Type = metric\+::\+L\+Metric$<$2, true$>$, typename Statistic\+Type = Empty\+Statistic, typename Mat\+Type = arma\+::mat, typename Root\+Point\+Policy = First\+Point\+Is\+Root$>$\newline
class mlpack\+::tree\+::\+Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$}

A cover tree is a tree specifically designed to speed up nearest-\/neighbor computation in high-\/dimensional spaces. 

Each non-\/leaf node references a point and has a nonzero number of children, including a \char`\"{}self-\/child\char`\"{} which references the same point. A leaf node represents only one point.

The tree can be thought of as a hierarchy with the root node at the top level and the leaf nodes at the bottom level. Each level in the tree has an assigned \textquotesingle{}scale\textquotesingle{} i. The tree follows these two invariants\+:


\begin{DoxyItemize}
\item nesting\+: the level C\+\_\+i is a subset of the level C\+\_\+\{i -\/ 1\}.
\item covering\+: all node in level C\+\_\+\{i -\/ 1\} have at least one node in the level C\+\_\+i with distance less than or equal to b$^\wedge$i (exactly one of these is a parent of the point in level C\+\_\+\{i -\/ 1\}.
\end{DoxyItemize}

Note that in the cover tree paper, there is a third invariant (the \textquotesingle{}separation invariant\textquotesingle{}), but that does not apply to our implementation, because we have relaxed the invariant.

The value \textquotesingle{}b\textquotesingle{} refers to the base, which is a parameter of the tree. These three properties make the cover tree very good for fast, high-\/dimensional nearest-\/neighbor search.

The theoretical structure of the tree contains many \textquotesingle{}implicit\textquotesingle{} nodes which only have a \char`\"{}self-\/child\char`\"{} (a child referencing the same point, but at a lower scale level). This practical implementation only constructs explicit nodes -- non-\/leaf nodes with more than one child. A leaf node has no children, and its scale level is I\+N\+T\+\_\+\+M\+IN.

For more information on cover trees, see


\begin{DoxyCode}
@inproceedings\{
  author = \{Beygelzimer, Alina and Kakade, Sham and Langford, John\},
  title = \{Cover trees \textcolor{keywordflow}{for} nearest neighbor\},
  booktitle = \{Proceedings of the 23rd International Conference on Machine
    Learning\},
  series = \{ICML \textcolor{stringliteral}{'06\},}
\textcolor{stringliteral}{  year = \{2006\},}
\textcolor{stringliteral}{  pages = \{97--104]}
\textcolor{stringliteral}{\}}
\end{DoxyCode}


For information on runtime bounds of the nearest-\/neighbor computation using cover trees, see the following paper, presented at N\+I\+PS 2009\+:


\begin{DoxyCode}
@inproceedings\{
  author = \{Ram, P., and Lee, D., and March, W.B., and Gray, A.G.\},
  title = \{Linear-time Algorithms \textcolor{keywordflow}{for} Pairwise Statistical Problems\},
  booktitle = \{Advances in Neural Information Processing Systems 22\},
  editor = \{Y. Bengio and D. Schuurmans and J. Lafferty and C.K.I. Williams
    and A. Culotta\},
  pages = \{1527--1535\},
  year = \{2009\}
\}
\end{DoxyCode}


The \doxyref{Cover\+Tree}{p.}{classmlpack_1_1tree_1_1CoverTree} class offers three template parameters; a custom metric type can be used with Metric\+Type (this class defaults to the L2-\/squared metric). The root node\textquotesingle{}s point can be chosen with the Root\+Point\+Policy; by default, the \doxyref{First\+Point\+Is\+Root}{p.}{classmlpack_1_1tree_1_1FirstPointIsRoot} policy is used, meaning the first point in the dataset is used. The Statistic\+Type policy allows you to define statistics which can be gathered during the creation of the tree.


\begin{DoxyTemplParams}{Template Parameters}
{\em Metric\+Type} & Metric type to use during tree construction. \\
\hline
{\em Root\+Point\+Policy} & Determines which point to use as the root node. \\
\hline
{\em Statistic\+Type} & Statistic to be used during tree creation. \\
\hline
{\em Mat\+Type} & Type of matrix to build the tree on (generally mat or sp\+\_\+mat). \\
\hline
\end{DoxyTemplParams}


Definition at line 99 of file cover\+\_\+tree.\+hpp.



\subsection{Member Typedef Documentation}
\mbox{\label{classmlpack_1_1tree_1_1CoverTree_aac99a3dcf43d40656d7043cab1693311}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Breadth\+First\+Dual\+Tree\+Traverser@{Breadth\+First\+Dual\+Tree\+Traverser}}
\index{Breadth\+First\+Dual\+Tree\+Traverser@{Breadth\+First\+Dual\+Tree\+Traverser}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Breadth\+First\+Dual\+Tree\+Traverser}
{\footnotesize\ttfamily using \textbf{ Breadth\+First\+Dual\+Tree\+Traverser} =  \textbf{ Dual\+Tree\+Traverser}$<$Rule\+Type$>$}



Definition at line 280 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a227d0c7e23e98fcd6c81ecab357a791f}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Elem\+Type@{Elem\+Type}}
\index{Elem\+Type@{Elem\+Type}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Elem\+Type}
{\footnotesize\ttfamily typedef Mat\+Type\+::elem\+\_\+type \textbf{ Elem\+Type}}



The type held by the matrix type. 



Definition at line 105 of file cover\+\_\+tree.\+hpp.

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



So that other classes can access the matrix type. 



Definition at line 103 of file cover\+\_\+tree.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a3f43b81626f944c2ef781042e52c1750}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Cover\+Tree@{Cover\+Tree}}
\index{Cover\+Tree@{Cover\+Tree}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Cover\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [1/10]}}
{\footnotesize\ttfamily \textbf{ Cover\+Tree} (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{dataset,  }\item[{const \textbf{ Elem\+Type}}]{base = {\ttfamily 2.0},  }\item[{Metric\+Type $\ast$}]{metric = {\ttfamily NULL} }\end{DoxyParamCaption})}



Create the cover tree with the given dataset and given base. 

The dataset will not be modified during the building procedure (unlike \doxyref{Binary\+Space\+Tree}{p.}{classmlpack_1_1tree_1_1BinarySpaceTree}).

The last argument will be removed in mlpack 1.\+1.\+0 (see \#274 and \#273).


\begin{DoxyParams}{Parameters}
{\em dataset} & Reference to the dataset to build a tree on. \\
\hline
{\em base} & Base to use during tree building (default 2.\+0). \\
\hline
{\em metric} & Metric to use (default N\+U\+LL). \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a11c6565c66e76da821210ecc040959ea}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Cover\+Tree@{Cover\+Tree}}
\index{Cover\+Tree@{Cover\+Tree}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Cover\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [2/10]}}
{\footnotesize\ttfamily \textbf{ Cover\+Tree} (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{dataset,  }\item[{Metric\+Type \&}]{metric,  }\item[{const \textbf{ Elem\+Type}}]{base = {\ttfamily 2.0} }\end{DoxyParamCaption})}



Create the cover tree with the given dataset and the given instantiated metric. 

Optionally, set the base. The dataset will not be modified during the building procedure (unlike \doxyref{Binary\+Space\+Tree}{p.}{classmlpack_1_1tree_1_1BinarySpaceTree}).


\begin{DoxyParams}{Parameters}
{\em dataset} & Reference to the dataset to build a tree on. \\
\hline
{\em metric} & Instantiated metric to use during tree building. \\
\hline
{\em base} & Base to use during tree building (default 2.\+0). \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1CoverTree_ab0073539371ad10a42720fa2d29f67aa}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Cover\+Tree@{Cover\+Tree}}
\index{Cover\+Tree@{Cover\+Tree}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Cover\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [3/10]}}
{\footnotesize\ttfamily \textbf{ Cover\+Tree} (\begin{DoxyParamCaption}\item[{Mat\+Type \&\&}]{dataset,  }\item[{const \textbf{ Elem\+Type}}]{base = {\ttfamily 2.0} }\end{DoxyParamCaption})}



Create the cover tree with the given dataset, taking ownership of the dataset. 

Optionally, set the base.


\begin{DoxyParams}{Parameters}
{\em dataset} & Reference to the dataset to build a tree on. \\
\hline
{\em base} & Base to use during tree building (default 2.\+0). \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1CoverTree_aacb7278d9ace042e3484c12f0a82e4a3}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Cover\+Tree@{Cover\+Tree}}
\index{Cover\+Tree@{Cover\+Tree}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Cover\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [4/10]}}
{\footnotesize\ttfamily \textbf{ Cover\+Tree} (\begin{DoxyParamCaption}\item[{Mat\+Type \&\&}]{dataset,  }\item[{Metric\+Type \&}]{metric,  }\item[{const \textbf{ Elem\+Type}}]{base = {\ttfamily 2.0} }\end{DoxyParamCaption})}



Create the cover tree with the given dataset and the given instantiated metric, taking ownership of the dataset. 

Optionally, set the base.


\begin{DoxyParams}{Parameters}
{\em dataset} & Reference to the dataset to build a tree on. \\
\hline
{\em metric} & Instantiated metric to use during tree building. \\
\hline
{\em base} & Base to use during tree building (default 2.\+0). \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a2386b0029af0f79ba6b7990b72760bab}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Cover\+Tree@{Cover\+Tree}}
\index{Cover\+Tree@{Cover\+Tree}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Cover\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [5/10]}}
{\footnotesize\ttfamily \textbf{ Cover\+Tree} (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{dataset,  }\item[{const \textbf{ Elem\+Type}}]{base,  }\item[{const size\+\_\+t}]{point\+Index,  }\item[{const int}]{scale,  }\item[{\textbf{ Cover\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ $\ast$}]{parent,  }\item[{const \textbf{ Elem\+Type}}]{parent\+Distance,  }\item[{arma\+::\+Col$<$ size\+\_\+t $>$ \&}]{indices,  }\item[{arma\+::vec \&}]{distances,  }\item[{size\+\_\+t}]{near\+Set\+Size,  }\item[{size\+\_\+t \&}]{far\+Set\+Size,  }\item[{size\+\_\+t \&}]{used\+Set\+Size,  }\item[{Metric\+Type \&}]{metric = {\ttfamily NULL} }\end{DoxyParamCaption})}



Construct a child cover tree node. 

This constructor is not meant to be used externally, but it could be used to insert another node into a tree. This procedure uses only one vector for the near set, the far set, and the used set (this is to prevent unnecessary memory allocation in recursive calls to this constructor). Therefore, the size of the near set, far set, and used set must be passed in. The near set will be entirely used up, and some of the far set may be used. The value of used\+Set\+Size will be set to the number of points used in the construction of this node, and the value of far\+Set\+Size will be modified to reflect the number of points in the far set {\itshape after} the construction of this node.

If you are calling this manually, be careful that the given scale is as small as possible, or you may be creating an implicit node in your tree.


\begin{DoxyParams}{Parameters}
{\em dataset} & Reference to the dataset to build a tree on. \\
\hline
{\em base} & Base to use during tree building. \\
\hline
{\em point\+Index} & Index of the point this node references. \\
\hline
{\em scale} & Scale of this level in the tree. \\
\hline
{\em parent} & Parent of this node (N\+U\+LL indicates no parent). \\
\hline
{\em parent\+Distance} & Distance to the parent node. \\
\hline
{\em indices} & Array of indices, ordered [ near\+Set $\vert$ far\+Set $\vert$ used\+Set ]; will be modified to [ far\+Set $\vert$ used\+Set ]. \\
\hline
{\em distances} & Array of distances, ordered the same way as the indices. These represent the distances between the point specified by point\+Index and each point in the indices array. \\
\hline
{\em near\+Set\+Size} & Size of the near set; if 0, this will be a leaf. \\
\hline
{\em far\+Set\+Size} & Size of the far set; may be modified (if this node uses any points in the far set). \\
\hline
{\em used\+Set\+Size} & The number of points used will be added to this number. \\
\hline
{\em metric} & Metric to use (default N\+U\+LL). \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a5d63518e019d8907dc87f51eccad0075}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Cover\+Tree@{Cover\+Tree}}
\index{Cover\+Tree@{Cover\+Tree}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Cover\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [6/10]}}
{\footnotesize\ttfamily \textbf{ Cover\+Tree} (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{dataset,  }\item[{const \textbf{ Elem\+Type}}]{base,  }\item[{const size\+\_\+t}]{point\+Index,  }\item[{const int}]{scale,  }\item[{\textbf{ Cover\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ $\ast$}]{parent,  }\item[{const \textbf{ Elem\+Type}}]{parent\+Distance,  }\item[{const \textbf{ Elem\+Type}}]{furthest\+Descendant\+Distance,  }\item[{Metric\+Type $\ast$}]{metric = {\ttfamily NULL} }\end{DoxyParamCaption})}



Manually construct a cover tree node; no tree assembly is done in this constructor, and children must be added manually (use \doxyref{Children()}{p.}{classmlpack_1_1tree_1_1CoverTree_a90f33ff64c79eae26cecb0da580edff5}). 

This constructor is useful when the tree is being \char`\"{}imported\char`\"{} into the \doxyref{Cover\+Tree}{p.}{classmlpack_1_1tree_1_1CoverTree} class after being created in some other manner.


\begin{DoxyParams}{Parameters}
{\em dataset} & Reference to the dataset this node is a part of. \\
\hline
{\em base} & Base that was used for tree building. \\
\hline
{\em point\+Index} & Index of the point in the dataset which this node refers to. \\
\hline
{\em scale} & Scale of this node\textquotesingle{}s level in the tree. \\
\hline
{\em parent} & Parent node (N\+U\+LL indicates no parent). \\
\hline
{\em parent\+Distance} & Distance to parent node point. \\
\hline
{\em furthest\+Descendant\+Distance} & Distance to furthest descendant point. \\
\hline
{\em metric} & Instantiated metric (optional). \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a3777403406c60ded153be4d63064a543}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Cover\+Tree@{Cover\+Tree}}
\index{Cover\+Tree@{Cover\+Tree}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Cover\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [7/10]}}
{\footnotesize\ttfamily \textbf{ Cover\+Tree} (\begin{DoxyParamCaption}\item[{const \textbf{ Cover\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ \&}]{other }\end{DoxyParamCaption})}



Create a cover tree from another tree. 

Be careful! This may use a lot of memory and take a lot of time. This will also make a copy of the dataset.


\begin{DoxyParams}{Parameters}
{\em other} & Cover tree to copy from. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1CoverTree_abd036d5c6e4ed6f889f1771bfc9b5b54}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Cover\+Tree@{Cover\+Tree}}
\index{Cover\+Tree@{Cover\+Tree}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Cover\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [8/10]}}
{\footnotesize\ttfamily \textbf{ Cover\+Tree} (\begin{DoxyParamCaption}\item[{\textbf{ Cover\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ \&\&}]{other }\end{DoxyParamCaption})}



Move constructor for a Cover Tree, possess all the members of the given tree. 


\begin{DoxyParams}{Parameters}
{\em other} & Cover Tree to move. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a3f5c94e77c06b38cc056c8bf315d892c}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Cover\+Tree@{Cover\+Tree}}
\index{Cover\+Tree@{Cover\+Tree}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Cover\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [9/10]}}
{\footnotesize\ttfamily \textbf{ Cover\+Tree} (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ Archive\+::is\+\_\+loading\+::value $>$ $\ast$}]{ = {\ttfamily 0} }\end{DoxyParamCaption})}



Create a cover tree from a \doxyref{boost\+::serialization}{p.}{namespaceboost_1_1serialization} archive. 

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_addb637c59f0e955dd9dd5bcd683fa686}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!````~Cover\+Tree@{$\sim$\+Cover\+Tree}}
\index{````~Cover\+Tree@{$\sim$\+Cover\+Tree}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{$\sim$\+Cover\+Tree()}
{\footnotesize\ttfamily $\sim$\textbf{ Cover\+Tree} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Delete this cover tree node and its children. 

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a6691991a6b8cd438a03368dc3c5f4b95}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Cover\+Tree@{Cover\+Tree}}
\index{Cover\+Tree@{Cover\+Tree}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Cover\+Tree()\hspace{0.1cm}{\footnotesize\ttfamily [10/10]}}
{\footnotesize\ttfamily \textbf{ Cover\+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! This method must be protected, so that the serialization shim can work with the default constructor. 

Referenced by Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Metric().



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a51045cdd7ef57652ef25ff6deffe493a}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Base@{Base}}
\index{Base@{Base}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Base()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Base (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the base. 



Definition at line 320 of file cover\+\_\+tree.\+hpp.

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



Modify the base; don\textquotesingle{}t do this, you\textquotesingle{}ll break everything. 



Definition at line 322 of file cover\+\_\+tree.\+hpp.

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



Get the center of the node and store it in the given vector. 



Definition at line 428 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_adb93f04eb20ed732ec48b6e07128186b}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Child@{Child}}
\index{Child@{Child}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Child()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const \textbf{ Cover\+Tree}\& Child (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{index }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get a particular child node. 



Definition at line 294 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_afa7a363aeb37212be36fc9f66506ccc7}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Child@{Child}}
\index{Child@{Child}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Child()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Cover\+Tree}\& Child (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{index }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify a particular child node. 



Definition at line 296 of file cover\+\_\+tree.\+hpp.

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



Definition at line 298 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_ac581755aea3bdeaa509dda3ae36d83ba}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Children@{Children}}
\index{Children@{Children}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Children()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const std\+::vector$<$\textbf{ Cover\+Tree}$\ast$$>$\& Children (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the children. 



Definition at line 304 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a90f33ff64c79eae26cecb0da580edff5}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Children@{Children}}
\index{Children@{Children}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Children()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily std\+::vector$<$\textbf{ Cover\+Tree}$\ast$$>$\& Children (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the children manually (maybe not a great idea). 



Definition at line 306 of file cover\+\_\+tree.\+hpp.



References Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Descendant(), and Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Num\+Descendants().

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a4c3764c98d5804083a9ec2c867eb9366}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Dataset@{Dataset}}
\index{Dataset@{Dataset}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Dataset()}
{\footnotesize\ttfamily const Mat\+Type\& Dataset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get a reference to the dataset. 



Definition at line 283 of file cover\+\_\+tree.\+hpp.

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



Get the index of a particular descendant point. 



Referenced by Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Children().

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



Definition at line 571 of file cover\+\_\+tree.\+hpp.

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



Definition at line 572 of file cover\+\_\+tree.\+hpp.

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



Get the distance from the center of the node to the furthest descendant. 



Definition at line 417 of file cover\+\_\+tree.\+hpp.

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



Modify the distance from the center of the node to the furthest descendant. 



Definition at line 421 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_acbe82a6439f71405b5801ca7d941cbfb}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Furthest\+Point\+Distance@{Furthest\+Point\+Distance}}
\index{Furthest\+Point\+Distance@{Furthest\+Point\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Furthest\+Point\+Distance()}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Furthest\+Point\+Distance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the distance to the furthest point. This is always 0 for cover trees. 



Definition at line 414 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a0257281722537c7916db7763623f67f7}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Get\+Furthest\+Child@{Get\+Furthest\+Child}}
\index{Get\+Furthest\+Child@{Get\+Furthest\+Child}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+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_1CoverTree_a1f7ec083be66d58a3e02e12956bf005e} (invalid index). 

Referenced by Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Stat().

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_ac33b5915ee9d32fbeef8e3237cc5e4a5}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Get\+Furthest\+Child@{Get\+Furthest\+Child}}
\index{Get\+Furthest\+Child@{Get\+Furthest\+Child}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Get\+Furthest\+Child()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t Get\+Furthest\+Child (\begin{DoxyParamCaption}\item[{const \textbf{ Cover\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ \&}]{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_1CoverTree_a1f7ec083be66d58a3e02e12956bf005e} (invalid index). \mbox{\label{classmlpack_1_1tree_1_1CoverTree_a19b9a5fd41d8e192b62effb1445bd410}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Get\+Nearest\+Child@{Get\+Nearest\+Child}}
\index{Get\+Nearest\+Child@{Get\+Nearest\+Child}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+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_1CoverTree_a1f7ec083be66d58a3e02e12956bf005e} (invalid index). 

Referenced by Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Stat().

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_ab1ce3c7e531dcea920aa3fc88cb79f4a}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Get\+Nearest\+Child@{Get\+Nearest\+Child}}
\index{Get\+Nearest\+Child@{Get\+Nearest\+Child}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Get\+Nearest\+Child()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t Get\+Nearest\+Child (\begin{DoxyParamCaption}\item[{const \textbf{ Cover\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ \&}]{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_1CoverTree_a1f7ec083be66d58a3e02e12956bf005e} (invalid index). \mbox{\label{classmlpack_1_1tree_1_1CoverTree_aa0f4813924e6cdee43b45050bb947abe}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Is\+Leaf@{Is\+Leaf}}
\index{Is\+Leaf@{Is\+Leaf}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Is\+Leaf()}
{\footnotesize\ttfamily bool Is\+Leaf (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Definition at line 290 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a03a85c9b3e3967ac6ff9107fc9fe8c60}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Max\+Distance@{Max\+Distance}}
\index{Max\+Distance@{Max\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Max\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Max\+Distance (\begin{DoxyParamCaption}\item[{const \textbf{ Cover\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ \&}]{other }\end{DoxyParamCaption}) const}



Return the maximum distance to another node. 



Referenced by Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Stat().

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a97a2a15f4c4e0e0de51d90117dca6cb7}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Max\+Distance@{Max\+Distance}}
\index{Max\+Distance@{Max\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Max\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Max\+Distance (\begin{DoxyParamCaption}\item[{const \textbf{ Cover\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ \&}]{other,  }\item[{const \textbf{ Elem\+Type}}]{distance }\end{DoxyParamCaption}) const}



Return the maximum distance to another node given that the point-\/to-\/point distance has already been calculated. 

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a88dfc32f4c701197670b839b02181f60}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Max\+Distance@{Max\+Distance}}
\index{Max\+Distance@{Max\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Max\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Max\+Distance (\begin{DoxyParamCaption}\item[{const arma\+::vec \&}]{other }\end{DoxyParamCaption}) const}



Return the maximum distance to another point. 

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a079e3ebb15f63b1d94661f9e87e39dd2}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Max\+Distance@{Max\+Distance}}
\index{Max\+Distance@{Max\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Max\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Max\+Distance (\begin{DoxyParamCaption}\item[{const arma\+::vec \&}]{other,  }\item[{const \textbf{ Elem\+Type}}]{distance }\end{DoxyParamCaption}) const}



Return the maximum distance to another point given that the distance from the center to the point has already been calculated. 

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



Get the instantiated metric. 



Definition at line 434 of file cover\+\_\+tree.\+hpp.



References Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Cover\+Tree().

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a9d7c3fc69a509a305d08e1f3250002de}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Min\+Distance@{Min\+Distance}}
\index{Min\+Distance@{Min\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Min\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Min\+Distance (\begin{DoxyParamCaption}\item[{const \textbf{ Cover\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ \&}]{other }\end{DoxyParamCaption}) const}



Return the minimum distance to another node. 



Referenced by Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Stat().

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a5696d6c26ff7adbafbf2400c61e9c5b3}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Min\+Distance@{Min\+Distance}}
\index{Min\+Distance@{Min\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Min\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Min\+Distance (\begin{DoxyParamCaption}\item[{const \textbf{ Cover\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ \&}]{other,  }\item[{const \textbf{ Elem\+Type}}]{distance }\end{DoxyParamCaption}) const}



Return the minimum distance to another node given that the point-\/to-\/point distance has already been calculated. 

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a9bc4caf2b12327ccf0572bb2d47a69b4}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Min\+Distance@{Min\+Distance}}
\index{Min\+Distance@{Min\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Min\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Min\+Distance (\begin{DoxyParamCaption}\item[{const arma\+::vec \&}]{other }\end{DoxyParamCaption}) const}



Return the minimum distance to another point. 

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a15f02ed8d02d6f56ad62673e3b192ed3}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Min\+Distance@{Min\+Distance}}
\index{Min\+Distance@{Min\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Min\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Min\+Distance (\begin{DoxyParamCaption}\item[{const arma\+::vec \&}]{other,  }\item[{const \textbf{ Elem\+Type}}]{distance }\end{DoxyParamCaption}) const}



Return the minimum distance to another point given that the distance from the center to the point has already been calculated. 

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a20a4e92da6066eb335a576b7f9cd0415}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Minimum\+Bound\+Distance@{Minimum\+Bound\+Distance}}
\index{Minimum\+Bound\+Distance@{Minimum\+Bound\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Minimum\+Bound\+Distance()}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Minimum\+Bound\+Distance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the minimum distance from the center to any bound edge (this is the same as furthest\+Descendant\+Distance). 



Definition at line 425 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a1f7ec083be66d58a3e02e12956bf005e}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Num\+Children@{Num\+Children}}
\index{Num\+Children@{Num\+Children}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Num\+Children()}
{\footnotesize\ttfamily size\+\_\+t Num\+Children (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the number of children. 



Definition at line 301 of file cover\+\_\+tree.\+hpp.

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



Get the number of descendant points. 



Referenced by Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Children().

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a352077c26368da0ee570c0b7f062b1e3}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Num\+Points@{Num\+Points}}
\index{Num\+Points@{Num\+Points}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Num\+Points()}
{\footnotesize\ttfamily size\+\_\+t Num\+Points (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Definition at line 291 of file cover\+\_\+tree.\+hpp.

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



Copy the given Cover Tree. 


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



Take ownership of the given Cover Tree. 


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



Get the parent node. 



Definition at line 404 of file cover\+\_\+tree.\+hpp.

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



Modify the parent node. 



Definition at line 406 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_af44ed4e7bfea088689caed082da67e17}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Parent\+Distance@{Parent\+Distance}}
\index{Parent\+Distance@{Parent\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+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]}}



Get the distance to the parent. 



Definition at line 409 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_aa22ead21ac809efb970b90ec014dc318}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Parent\+Distance@{Parent\+Distance}}
\index{Parent\+Distance@{Parent\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+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 to the parent. 



Definition at line 411 of file cover\+\_\+tree.\+hpp.

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



Get the index of the point which this node represents. 



Definition at line 286 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_ae2cd8fc8591e2d7c222f120bb35abd1a}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Point@{Point}}
\index{Point@{Point}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Point()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t Point (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



For compatibility with other trees; the argument is ignored. 



Definition at line 288 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a79946ce2f635d5731b5558ad4e8410cf}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Range\+Distance@{Range\+Distance}}
\index{Range\+Distance@{Range\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Range\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily \textbf{ math\+::\+Range\+Type}$<$\textbf{ Elem\+Type}$>$ Range\+Distance (\begin{DoxyParamCaption}\item[{const \textbf{ Cover\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ \&}]{other }\end{DoxyParamCaption}) const}



Return the minimum and maximum distance to another node. 



Referenced by Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Stat().

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_ab4dabd8a1ef126a8fbeba28466db4a12}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Range\+Distance@{Range\+Distance}}
\index{Range\+Distance@{Range\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Range\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \textbf{ math\+::\+Range\+Type}$<$\textbf{ Elem\+Type}$>$ Range\+Distance (\begin{DoxyParamCaption}\item[{const \textbf{ Cover\+Tree}$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$ \&}]{other,  }\item[{const \textbf{ Elem\+Type}}]{distance }\end{DoxyParamCaption}) const}



Return the minimum and maximum distance to another node given that the point-\/to-\/point distance has already been calculated. 

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_adad110287e2b644778a7c572a21144ed}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Range\+Distance@{Range\+Distance}}
\index{Range\+Distance@{Range\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Range\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \textbf{ math\+::\+Range\+Type}$<$\textbf{ Elem\+Type}$>$ Range\+Distance (\begin{DoxyParamCaption}\item[{const arma\+::vec \&}]{other }\end{DoxyParamCaption}) const}



Return the minimum and maximum distance to another point. 

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a326e0150de98039e6b9db9a89adc4275}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Range\+Distance@{Range\+Distance}}
\index{Range\+Distance@{Range\+Distance}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Range\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \textbf{ math\+::\+Range\+Type}$<$\textbf{ Elem\+Type}$>$ Range\+Distance (\begin{DoxyParamCaption}\item[{const arma\+::vec \&}]{other,  }\item[{const \textbf{ Elem\+Type}}]{distance }\end{DoxyParamCaption}) const}



Return the minimum and maximum distance to another point given that the point-\/to-\/point distance has already been calculated. 

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a8dd9a9752971834a6c42ec7e45b71c84}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Scale@{Scale}}
\index{Scale@{Scale}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Scale()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily int Scale (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the scale of this node. 



Definition at line 315 of file cover\+\_\+tree.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_a1bbfde922cf6700d130c5be70a5d7dd4}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Scale@{Scale}}
\index{Scale@{Scale}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}}
\subsubsection{Scale()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily int\& Scale (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the scale of this node. Be careful... 



Definition at line 317 of file cover\+\_\+tree.\+hpp.

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



Serialize the tree. 

\mbox{\label{classmlpack_1_1tree_1_1CoverTree_ad8b29c84ac793742cd15834f9f4c4f31}} 
\index{mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+Tree}!Stat@{Stat}}
\index{Stat@{Stat}!mlpack\+::tree\+::\+Cover\+Tree@{mlpack\+::tree\+::\+Cover\+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]}}



Get the statistic for this node. 



Definition at line 325 of file cover\+\_\+tree.\+hpp.

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



Modify the statistic for this node. 



Definition at line 327 of file cover\+\_\+tree.\+hpp.



References Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Get\+Furthest\+Child(), Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Get\+Nearest\+Child(), Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Max\+Distance(), Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Min\+Distance(), and Cover\+Tree$<$ Metric\+Type, Statistic\+Type, Mat\+Type, Root\+Point\+Policy $>$\+::\+Range\+Distance().



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/cover\+\_\+tree/\textbf{ cover\+\_\+tree.\+hpp}\end{DoxyCompactItemize}
