\section{Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$ Class Template Reference}
\label{classmlpack_1_1bound_1_1BallBound}\index{Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$@{Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$}}


Ball bound encloses a set of points at a specific distance (radius) from a specific point (center).  


\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef Vec\+Type\+::elem\+\_\+type \textbf{ Elem\+Type}
\begin{DoxyCompactList}\small\item\em The underlying data type. \end{DoxyCompactList}\item 
typedef Vec\+Type \textbf{ Vec}
\begin{DoxyCompactList}\small\item\em A public version of the vector type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Ball\+Bound} ()
\begin{DoxyCompactList}\small\item\em Empty Constructor. \end{DoxyCompactList}\item 
\textbf{ Ball\+Bound} (const size\+\_\+t dimension)
\begin{DoxyCompactList}\small\item\em Create the ball bound with the specified dimensionality. \end{DoxyCompactList}\item 
\textbf{ Ball\+Bound} (const \textbf{ Elem\+Type} radius, const Vec\+Type \&center)
\begin{DoxyCompactList}\small\item\em Create the ball bound with the specified radius and center. \end{DoxyCompactList}\item 
\textbf{ Ball\+Bound} (const \textbf{ Ball\+Bound} \&other)
\begin{DoxyCompactList}\small\item\em Copy constructor. To prevent memory leaks. \end{DoxyCompactList}\item 
\textbf{ Ball\+Bound} (\textbf{ Ball\+Bound} \&\&other)
\begin{DoxyCompactList}\small\item\em Move constructor\+: take possession of another bound. \end{DoxyCompactList}\item 
\textbf{ $\sim$\+Ball\+Bound} ()
\begin{DoxyCompactList}\small\item\em Destructor to release allocated memory. \end{DoxyCompactList}\item 
const Vec\+Type \& \textbf{ Center} () const
\begin{DoxyCompactList}\small\item\em Get the center point of the ball. \end{DoxyCompactList}\item 
Vec\+Type \& \textbf{ Center} ()
\begin{DoxyCompactList}\small\item\em Modify the center point of the ball. \end{DoxyCompactList}\item 
void \textbf{ Center} (Vec\+Type \&center) const
\begin{DoxyCompactList}\small\item\em Place the center of \doxyref{Ball\+Bound}{p.}{classmlpack_1_1bound_1_1BallBound} into the given vector. \end{DoxyCompactList}\item 
bool \textbf{ Contains} (const Vec\+Type \&point) const
\begin{DoxyCompactList}\small\item\em Determines if a point is within this bound. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Diameter} () const
\begin{DoxyCompactList}\small\item\em Returns the diameter of the ballbound. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Dim} () const
\begin{DoxyCompactList}\small\item\em Get the dimensionality of the ball. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Other\+Vec\+Type $>$ }\\\textbf{ Elem\+Type} \textbf{ Max\+Distance} (const Other\+Vec\+Type \&point, typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Other\+Vec\+Type $>$\+::value $>$ $\ast$=0) const
\begin{DoxyCompactList}\small\item\em Computes maximum distance. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Max\+Distance} (const \textbf{ Ball\+Bound} \&other) const
\begin{DoxyCompactList}\small\item\em Computes maximum distance. \end{DoxyCompactList}\item 
const Metric\+Type \& \textbf{ Metric} () const
\begin{DoxyCompactList}\small\item\em Returns the distance metric used in this bound. \end{DoxyCompactList}\item 
Metric\+Type \& \textbf{ Metric} ()
\begin{DoxyCompactList}\small\item\em Modify the distance metric used in this bound. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Other\+Vec\+Type $>$ }\\\textbf{ Elem\+Type} \textbf{ Min\+Distance} (const Other\+Vec\+Type \&point, typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Other\+Vec\+Type $>$\+::value $>$ $\ast$=0) const
\begin{DoxyCompactList}\small\item\em Calculates minimum bound-\/to-\/point squared distance. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Min\+Distance} (const \textbf{ Ball\+Bound} \&other) const
\begin{DoxyCompactList}\small\item\em Calculates minimum bound-\/to-\/bound squared distance. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Min\+Width} () const
\begin{DoxyCompactList}\small\item\em Get the minimum width of the bound (this is same as the diameter). \end{DoxyCompactList}\item 
\textbf{ Ball\+Bound} \& \textbf{ operator=} (const \textbf{ Ball\+Bound} \&other)
\begin{DoxyCompactList}\small\item\em For the same reason as the copy constructor\+: to prevent memory leaks. \end{DoxyCompactList}\item 
\textbf{ math\+::\+Range\+Type}$<$ \textbf{ Elem\+Type} $>$ \textbf{ operator[$\,$]} (const size\+\_\+t i) const
\begin{DoxyCompactList}\small\item\em Get the range in a certain dimension. \end{DoxyCompactList}\item 
const \textbf{ Ball\+Bound} \& \textbf{ operator$\vert$=} (const \textbf{ Ball\+Bound} \&other)
\begin{DoxyCompactList}\small\item\em Expand the bound to include the given node. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Mat\+Type $>$ }\\const \textbf{ Ball\+Bound} \& \textbf{ operator$\vert$=} (const Mat\+Type \&data)
\begin{DoxyCompactList}\small\item\em Expand the bound to include the given point. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \textbf{ Radius} () const
\begin{DoxyCompactList}\small\item\em Get the radius of the ball. \end{DoxyCompactList}\item 
\textbf{ Elem\+Type} \& \textbf{ Radius} ()
\begin{DoxyCompactList}\small\item\em Modify the radius of the ball. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Other\+Vec\+Type $>$ }\\\textbf{ math\+::\+Range\+Type}$<$ \textbf{ Elem\+Type} $>$ \textbf{ Range\+Distance} (const Other\+Vec\+Type \&other, typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Other\+Vec\+Type $>$\+::value $>$ $\ast$=0) const
\begin{DoxyCompactList}\small\item\em Calculates minimum and maximum bound-\/to-\/point distance. \end{DoxyCompactList}\item 
\textbf{ math\+::\+Range\+Type}$<$ \textbf{ Elem\+Type} $>$ \textbf{ Range\+Distance} (const \textbf{ Ball\+Bound} \&other) const
\begin{DoxyCompactList}\small\item\em Calculates minimum and maximum bound-\/to-\/bound distance. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&ar, const unsigned int version)
\begin{DoxyCompactList}\small\item\em Serialize the bound. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Metric\+Type = metric\+::\+L\+Metric$<$2, true$>$, typename Vec\+Type = arma\+::vec$>$\newline
class mlpack\+::bound\+::\+Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$}

Ball bound encloses a set of points at a specific distance (radius) from a specific point (center). 

Metric\+Type is the custom metric type that defaults to the Euclidean (L2) distance.


\begin{DoxyTemplParams}{Template Parameters}
{\em Metric\+Type} & metric type used in the distance measure. \\
\hline
{\em Vec\+Type} & Type of vector (arma\+::vec or arma\+::sp\+\_\+vec or similar). \\
\hline
\end{DoxyTemplParams}


Definition at line 32 of file ballbound.\+hpp.



\subsection{Member Typedef Documentation}
\mbox{\label{classmlpack_1_1bound_1_1BallBound_ac8b1d992927eeff7a18d2eb7165bcff5}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Elem\+Type@{Elem\+Type}}
\index{Elem\+Type@{Elem\+Type}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Elem\+Type}
{\footnotesize\ttfamily typedef Vec\+Type\+::elem\+\_\+type \textbf{ Elem\+Type}}



The underlying data type. 



Definition at line 36 of file ballbound.\+hpp.

\mbox{\label{classmlpack_1_1bound_1_1BallBound_afcd9d92578cb7caf312034b874dd303b}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Vec@{Vec}}
\index{Vec@{Vec}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Vec}
{\footnotesize\ttfamily typedef Vec\+Type \textbf{ Vec}}



A public version of the vector type. 



Definition at line 38 of file ballbound.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1bound_1_1BallBound_a6ef3402f4c1e43281f79b7b4f485cc85}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Ball\+Bound@{Ball\+Bound}}
\index{Ball\+Bound@{Ball\+Bound}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Ball\+Bound()\hspace{0.1cm}{\footnotesize\ttfamily [1/5]}}
{\footnotesize\ttfamily \textbf{ Ball\+Bound} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Empty Constructor. 

\mbox{\label{classmlpack_1_1bound_1_1BallBound_aa8738c26376098ecacb2ed387653a736}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Ball\+Bound@{Ball\+Bound}}
\index{Ball\+Bound@{Ball\+Bound}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Ball\+Bound()\hspace{0.1cm}{\footnotesize\ttfamily [2/5]}}
{\footnotesize\ttfamily \textbf{ Ball\+Bound} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{dimension }\end{DoxyParamCaption})}



Create the ball bound with the specified dimensionality. 


\begin{DoxyParams}{Parameters}
{\em dimension} & Dimensionality of ball bound. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1bound_1_1BallBound_af9a9e9cf6a4247b875b161932b28588c}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Ball\+Bound@{Ball\+Bound}}
\index{Ball\+Bound@{Ball\+Bound}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Ball\+Bound()\hspace{0.1cm}{\footnotesize\ttfamily [3/5]}}
{\footnotesize\ttfamily \textbf{ Ball\+Bound} (\begin{DoxyParamCaption}\item[{const \textbf{ Elem\+Type}}]{radius,  }\item[{const Vec\+Type \&}]{center }\end{DoxyParamCaption})}



Create the ball bound with the specified radius and center. 


\begin{DoxyParams}{Parameters}
{\em radius} & Radius of ball bound. \\
\hline
{\em center} & Center of ball bound. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1bound_1_1BallBound_a4a6b9f2a2e420f74ec63134c0300a031}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Ball\+Bound@{Ball\+Bound}}
\index{Ball\+Bound@{Ball\+Bound}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Ball\+Bound()\hspace{0.1cm}{\footnotesize\ttfamily [4/5]}}
{\footnotesize\ttfamily \textbf{ Ball\+Bound} (\begin{DoxyParamCaption}\item[{const \textbf{ Ball\+Bound}$<$ Metric\+Type, Vec\+Type $>$ \&}]{other }\end{DoxyParamCaption})}



Copy constructor. To prevent memory leaks. 

\mbox{\label{classmlpack_1_1bound_1_1BallBound_a8f0115d7119bc55e54451658d7780da7}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Ball\+Bound@{Ball\+Bound}}
\index{Ball\+Bound@{Ball\+Bound}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Ball\+Bound()\hspace{0.1cm}{\footnotesize\ttfamily [5/5]}}
{\footnotesize\ttfamily \textbf{ Ball\+Bound} (\begin{DoxyParamCaption}\item[{\textbf{ Ball\+Bound}$<$ Metric\+Type, Vec\+Type $>$ \&\&}]{other }\end{DoxyParamCaption})}



Move constructor\+: take possession of another bound. 

\mbox{\label{classmlpack_1_1bound_1_1BallBound_a186cc3e1901316bbef5575aa64ff3770}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!````~Ball\+Bound@{$\sim$\+Ball\+Bound}}
\index{````~Ball\+Bound@{$\sim$\+Ball\+Bound}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{$\sim$\+Ball\+Bound()}
{\footnotesize\ttfamily $\sim$\textbf{ Ball\+Bound} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Destructor to release allocated memory. 



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1bound_1_1BallBound_ac7a8ddea0150e52b0bc6d369ed5a5be3}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Center@{Center}}
\index{Center@{Center}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Center()\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily const Vec\+Type\& Center (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the center point of the ball. 



Definition at line 93 of file ballbound.\+hpp.



Referenced by Proj\+Vector\+::\+Project().

\mbox{\label{classmlpack_1_1bound_1_1BallBound_aac93f77d9e2bea78e968bc287bddec90}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Center@{Center}}
\index{Center@{Center}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Center()\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily Vec\+Type\& Center (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the center point of the ball. 



Definition at line 95 of file ballbound.\+hpp.

\mbox{\label{classmlpack_1_1bound_1_1BallBound_a7b62091b9c9066c30d27695bcf6a1688}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Center@{Center}}
\index{Center@{Center}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Center()\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily void Center (\begin{DoxyParamCaption}\item[{Vec\+Type \&}]{center }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Place the center of \doxyref{Ball\+Bound}{p.}{classmlpack_1_1bound_1_1BallBound} into the given vector. 


\begin{DoxyParams}{Parameters}
{\em center} & Vector which the centroid will be written to. \\
\hline
\end{DoxyParams}


Definition at line 121 of file ballbound.\+hpp.



References Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::\+Max\+Distance(), Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::\+Min\+Distance(), Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::operator$\vert$=(), and Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::\+Range\+Distance().

\mbox{\label{classmlpack_1_1bound_1_1BallBound_a8bb86454bb4ed601ca09eefd7e46b0cc}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Contains@{Contains}}
\index{Contains@{Contains}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Contains()}
{\footnotesize\ttfamily bool Contains (\begin{DoxyParamCaption}\item[{const Vec\+Type \&}]{point }\end{DoxyParamCaption}) const}



Determines if a point is within this bound. 


\begin{DoxyParams}{Parameters}
{\em point} & Point to check the condition. \\
\hline
\end{DoxyParams}


Referenced by Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::\+Min\+Width().

\mbox{\label{classmlpack_1_1bound_1_1BallBound_a60e7246d34103909f688395e35869b39}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Diameter@{Diameter}}
\index{Diameter@{Diameter}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Diameter()}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Diameter (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the diameter of the ballbound. 



Definition at line 197 of file ballbound.\+hpp.

\mbox{\label{classmlpack_1_1bound_1_1BallBound_a7993a4f36c530e03b78b28b5f53bb286}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Dim@{Dim}}
\index{Dim@{Dim}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Dim()}
{\footnotesize\ttfamily size\+\_\+t Dim (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the dimensionality of the ball. 



Definition at line 98 of file ballbound.\+hpp.

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



Computes maximum distance. 


\begin{DoxyParams}{Parameters}
{\em point} & Point to which the maximum distance is requested. \\
\hline
\end{DoxyParams}


Referenced by Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::\+Center().

\mbox{\label{classmlpack_1_1bound_1_1BallBound_ad754afc8e0d1f9e5a0a4812bd301e0fa}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Max\+Distance@{Max\+Distance}}
\index{Max\+Distance@{Max\+Distance}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Max\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Max\+Distance (\begin{DoxyParamCaption}\item[{const \textbf{ Ball\+Bound}$<$ Metric\+Type, Vec\+Type $>$ \&}]{other }\end{DoxyParamCaption}) const}



Computes maximum distance. 


\begin{DoxyParams}{Parameters}
{\em other} & Bound to which the maximum distance is requested. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1bound_1_1BallBound_aac4d643c62af7d9cc2a072aea10d2b32}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Metric@{Metric}}
\index{Metric@{Metric}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Metric()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const Metric\+Type\& Metric (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the distance metric used in this bound. 



Definition at line 200 of file ballbound.\+hpp.

\mbox{\label{classmlpack_1_1bound_1_1BallBound_acc71d930ed90e73b2bc0c360835c5371}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Metric@{Metric}}
\index{Metric@{Metric}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Metric()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Metric\+Type\& Metric (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the distance metric used in this bound. 



Definition at line 202 of file ballbound.\+hpp.



References Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::serialize().

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



Calculates minimum bound-\/to-\/point squared distance. 


\begin{DoxyParams}{Parameters}
{\em point} & Point to which the minimum distance is requested. \\
\hline
\end{DoxyParams}


Referenced by Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::\+Center().

\mbox{\label{classmlpack_1_1bound_1_1BallBound_a1532258f4abf77694500a314b7f127d4}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Min\+Distance@{Min\+Distance}}
\index{Min\+Distance@{Min\+Distance}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Min\+Distance()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Min\+Distance (\begin{DoxyParamCaption}\item[{const \textbf{ Ball\+Bound}$<$ Metric\+Type, Vec\+Type $>$ \&}]{other }\end{DoxyParamCaption}) const}



Calculates minimum bound-\/to-\/bound squared distance. 


\begin{DoxyParams}{Parameters}
{\em other} & Bound to which the minimum distance is requested. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1bound_1_1BallBound_ab8478ff52c4d4d5e7fa6311fa39abb76}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Min\+Width@{Min\+Width}}
\index{Min\+Width@{Min\+Width}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Min\+Width()}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Min\+Width (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the minimum width of the bound (this is same as the diameter). 

For ball bounds, width along all dimensions remain same. 

Definition at line 104 of file ballbound.\+hpp.



References Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::\+Contains(), and Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::operator[$\,$]().

\mbox{\label{classmlpack_1_1bound_1_1BallBound_a4909ad7e2739e309a7fbdec0892a4ab9}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!operator=@{operator=}}
\index{operator=@{operator=}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{operator=()}
{\footnotesize\ttfamily \textbf{ Ball\+Bound}\& operator= (\begin{DoxyParamCaption}\item[{const \textbf{ Ball\+Bound}$<$ Metric\+Type, Vec\+Type $>$ \&}]{other }\end{DoxyParamCaption})}



For the same reason as the copy constructor\+: to prevent memory leaks. 

\mbox{\label{classmlpack_1_1bound_1_1BallBound_aa79d855354bde98b4e84e3d49c4d02fa}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!operator[]@{operator[]}}
\index{operator[]@{operator[]}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{operator[]()}
{\footnotesize\ttfamily \textbf{ math\+::\+Range\+Type}$<$\textbf{ Elem\+Type}$>$ operator[$\,$] (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{i }\end{DoxyParamCaption}) const}



Get the range in a certain dimension. 



Referenced by Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::\+Min\+Width().

\mbox{\label{classmlpack_1_1bound_1_1BallBound_a5f8d8da836f83d7434b87c689bc28890}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!operator\texttt{"|}=@{operator\texttt{"|}=}}
\index{operator\texttt{"|}=@{operator\texttt{"|}=}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{operator\texttt{"|}=()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily const \textbf{ Ball\+Bound}\& operator$\vert$= (\begin{DoxyParamCaption}\item[{const \textbf{ Ball\+Bound}$<$ Metric\+Type, Vec\+Type $>$ \&}]{other }\end{DoxyParamCaption})}



Expand the bound to include the given node. 



Referenced by Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::\+Center().

\mbox{\label{classmlpack_1_1bound_1_1BallBound_ada31a74c98ffb5d13b14c156ac200383}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!operator\texttt{"|}=@{operator\texttt{"|}=}}
\index{operator\texttt{"|}=@{operator\texttt{"|}=}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{operator\texttt{"|}=()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily const \textbf{ Ball\+Bound}\& operator$\vert$= (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{data }\end{DoxyParamCaption})}



Expand the bound to include the given point. 

The centroid is recalculated to be the center of all of the given points.


\begin{DoxyTemplParams}{Template Parameters}
{\em Mat\+Type} & Type of matrix; could be arma\+::mat, arma\+::spmat, or a vector. \\
\hline
{\em data} & Data points to add. \\
\hline
\end{DoxyTemplParams}
\mbox{\label{classmlpack_1_1bound_1_1BallBound_a01502ca0f18e366f6758b0cc8756dedf}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Radius@{Radius}}
\index{Radius@{Radius}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Radius()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type} Radius (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the radius of the ball. 



Definition at line 88 of file ballbound.\+hpp.



Referenced by Proj\+Vector\+::\+Project().

\mbox{\label{classmlpack_1_1bound_1_1BallBound_ad2f286cc3e4260a624e5d890d0d2a377}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Radius@{Radius}}
\index{Radius@{Radius}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{Radius()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Elem\+Type}\& Radius (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the radius of the ball. 



Definition at line 90 of file ballbound.\+hpp.

\mbox{\label{classmlpack_1_1bound_1_1BallBound_ae224b832c3cfe544e4c06361a5e44c3a}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Range\+Distance@{Range\+Distance}}
\index{Range\+Distance@{Range\+Distance}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\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 Other\+Vec\+Type \&}]{other,  }\item[{typename \textbf{ std\+::enable\+\_\+if\+\_\+t}$<$ \textbf{ Is\+Vector}$<$ Other\+Vec\+Type $>$\+::value $>$ $\ast$}]{ = {\ttfamily 0} }\end{DoxyParamCaption}) const}



Calculates minimum and maximum bound-\/to-\/point distance. 


\begin{DoxyParams}{Parameters}
{\em point} & Point to which the minimum and maximum distances are requested. \\
\hline
\end{DoxyParams}


Referenced by Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::\+Center().

\mbox{\label{classmlpack_1_1bound_1_1BallBound_a27d48f29287942881ddc462cd508d86c}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!Range\+Distance@{Range\+Distance}}
\index{Range\+Distance@{Range\+Distance}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\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 \textbf{ Ball\+Bound}$<$ Metric\+Type, Vec\+Type $>$ \&}]{other }\end{DoxyParamCaption}) const}



Calculates minimum and maximum bound-\/to-\/bound distance. 

Example\+: bound1.\+Min\+Distance\+Sq(other) for minimum distance.


\begin{DoxyParams}{Parameters}
{\em other} & Bound to which the minimum and maximum distances are requested. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1bound_1_1BallBound_a68e832cb064e3b7ca978d8e5911cf700}} 
\index{mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::bound\+::\+Ball\+Bound@{mlpack\+::bound\+::\+Ball\+Bound}}
\subsubsection{serialize()}
{\footnotesize\ttfamily void serialize (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const unsigned int}]{version }\end{DoxyParamCaption})}



Serialize the bound. 



Referenced by Ball\+Bound$<$ Metric\+Type, Vec\+Type $>$\+::\+Metric().



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/3.\+3.\+1/src/mlpack/core/tree/\textbf{ ballbound.\+hpp}\end{DoxyCompactItemize}
