\section{Spherical\+Kernel Class Reference}
\label{classmlpack_1_1kernel_1_1SphericalKernel}\index{Spherical\+Kernel@{Spherical\+Kernel}}


The spherical kernel, which is 1 when the distance between the two argument points is less than or equal to the bandwidth, or 0 otherwise.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Spherical\+Kernel} (const double bandwidth=1.\+0)
\begin{DoxyCompactList}\small\item\em Construct the \doxyref{Spherical\+Kernel}{p.}{classmlpack_1_1kernel_1_1SphericalKernel} with the given bandwidth. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Vec\+TypeA , typename Vec\+TypeB $>$ }\\double \textbf{ Convolution\+Integral} (const Vec\+TypeA \&a, const Vec\+TypeB \&b) const
\begin{DoxyCompactList}\small\item\em Obtains the convolution integral [integral K($\vert$$\vert$x-\/a$\vert$$\vert$)K($\vert$$\vert$b-\/x$\vert$$\vert$)dx] for the two vectors. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Vec\+TypeA , typename Vec\+TypeB $>$ }\\double \textbf{ Evaluate} (const Vec\+TypeA \&a, const Vec\+TypeB \&b) const
\begin{DoxyCompactList}\small\item\em Evaluate the spherical kernel with the given two vectors. \end{DoxyCompactList}\item 
double \textbf{ Evaluate} (const double t) const
\begin{DoxyCompactList}\small\item\em Evaluate the kernel when only a distance is given, not two points. \end{DoxyCompactList}\item 
double \textbf{ Gradient} (double t)
\item 
double \textbf{ Normalizer} (size\+\_\+t dimension) const
\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&ar, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the object. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
The spherical kernel, which is 1 when the distance between the two argument points is less than or equal to the bandwidth, or 0 otherwise. 

Definition at line 23 of file spherical\+\_\+kernel.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1kernel_1_1SphericalKernel_af1adb8ad3b56cf32b9800d2d842d3c8d}} 
\index{mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}!Spherical\+Kernel@{Spherical\+Kernel}}
\index{Spherical\+Kernel@{Spherical\+Kernel}!mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}}
\subsubsection{Spherical\+Kernel()}
{\footnotesize\ttfamily \textbf{ Spherical\+Kernel} (\begin{DoxyParamCaption}\item[{const double}]{bandwidth = {\ttfamily 1.0} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Construct the \doxyref{Spherical\+Kernel}{p.}{classmlpack_1_1kernel_1_1SphericalKernel} with the given bandwidth. 



Definition at line 29 of file spherical\+\_\+kernel.\+hpp.



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1kernel_1_1SphericalKernel_a9bcc650e49c4b0578d4eb5a62810622a}} 
\index{mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}!Convolution\+Integral@{Convolution\+Integral}}
\index{Convolution\+Integral@{Convolution\+Integral}!mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}}
\subsubsection{Convolution\+Integral()}
{\footnotesize\ttfamily double Convolution\+Integral (\begin{DoxyParamCaption}\item[{const Vec\+TypeA \&}]{a,  }\item[{const Vec\+TypeB \&}]{b }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Obtains the convolution integral [integral K($\vert$$\vert$x-\/a$\vert$$\vert$)K($\vert$$\vert$b-\/x$\vert$$\vert$)dx] for the two vectors. 


\begin{DoxyTemplParams}{Template Parameters}
{\em Vec\+TypeA} & Type of first vector (arma\+::vec, arma\+::sp\+\_\+vec should be expected). \\
\hline
{\em Vec\+TypeB} & Type of second vector. \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em a} & First vector. \\
\hline
{\em b} & Second vector. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the convolution integral value. 
\end{DoxyReturn}


Definition at line 62 of file spherical\+\_\+kernel.\+hpp.



References L\+Metric$<$ T\+Power, T\+Take\+Root $>$\+::\+Evaluate(), Log\+::\+Fatal, and Spherical\+Kernel\+::\+Normalizer().

\mbox{\label{classmlpack_1_1kernel_1_1SphericalKernel_a84c3aeba25ea7703bd2d4f85a54301da}} 
\index{mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}!Evaluate@{Evaluate}}
\index{Evaluate@{Evaluate}!mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}}
\subsubsection{Evaluate()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily double Evaluate (\begin{DoxyParamCaption}\item[{const Vec\+TypeA \&}]{a,  }\item[{const Vec\+TypeB \&}]{b }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Evaluate the spherical kernel with the given two vectors. 


\begin{DoxyTemplParams}{Template Parameters}
{\em Vec\+TypeA} & Type of first vector. \\
\hline
{\em Vec\+TypeB} & Type of second vector. \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em a} & First vector. \\
\hline
{\em b} & Second vector. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The kernel evaluation between the two vectors. 
\end{DoxyReturn}


Definition at line 44 of file spherical\+\_\+kernel.\+hpp.



References L\+Metric$<$ T\+Power, T\+Take\+Root $>$\+::\+Evaluate().

\mbox{\label{classmlpack_1_1kernel_1_1SphericalKernel_a031ed73efe13c6e6bc805006bd249238}} 
\index{mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}!Evaluate@{Evaluate}}
\index{Evaluate@{Evaluate}!mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}}
\subsubsection{Evaluate()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily double Evaluate (\begin{DoxyParamCaption}\item[{const double}]{t }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Evaluate the kernel when only a distance is given, not two points. 


\begin{DoxyParams}{Parameters}
{\em t} & Argument to kernel. \\
\hline
\end{DoxyParams}


Definition at line 99 of file spherical\+\_\+kernel.\+hpp.

\mbox{\label{classmlpack_1_1kernel_1_1SphericalKernel_af4d3d89832c78fff51f19ae81c720011}} 
\index{mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}!Gradient@{Gradient}}
\index{Gradient@{Gradient}!mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}}
\subsubsection{Gradient()}
{\footnotesize\ttfamily double Gradient (\begin{DoxyParamCaption}\item[{double}]{t }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Definition at line 103 of file spherical\+\_\+kernel.\+hpp.

\mbox{\label{classmlpack_1_1kernel_1_1SphericalKernel_a945f6339551eba9cf1164a84899a5427}} 
\index{mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}!Normalizer@{Normalizer}}
\index{Normalizer@{Normalizer}!mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}}
\subsubsection{Normalizer()}
{\footnotesize\ttfamily double Normalizer (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{dimension }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Definition at line 88 of file spherical\+\_\+kernel.\+hpp.



References M\+\_\+\+PI.



Referenced by Spherical\+Kernel\+::\+Convolution\+Integral().

\mbox{\label{classmlpack_1_1kernel_1_1SphericalKernel_af0dd9205158ccf7bcfcd8ff81f79c927}} 
\index{mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::kernel\+::\+Spherical\+Kernel@{mlpack\+::kernel\+::\+Spherical\+Kernel}}
\subsubsection{serialize()}
{\footnotesize\ttfamily void serialize (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const unsigned}]{int }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Serialize the object. 



Definition at line 110 of file spherical\+\_\+kernel.\+hpp.



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.\+0/src/mlpack/core/kernels/\textbf{ spherical\+\_\+kernel.\+hpp}\end{DoxyCompactItemize}
