\section{Laplacian\+Kernel Class Reference}
\label{classmlpack_1_1kernel_1_1LaplacianKernel}\index{Laplacian\+Kernel@{Laplacian\+Kernel}}


The standard Laplacian kernel.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Laplacian\+Kernel} ()
\begin{DoxyCompactList}\small\item\em Default constructor; sets bandwidth to 1.\+0. \end{DoxyCompactList}\item 
\textbf{ Laplacian\+Kernel} (double bandwidth)
\begin{DoxyCompactList}\small\item\em Construct the Laplacian kernel with a custom bandwidth. \end{DoxyCompactList}\item 
double \textbf{ Bandwidth} () const
\begin{DoxyCompactList}\small\item\em Get the bandwidth. \end{DoxyCompactList}\item 
double \& \textbf{ Bandwidth} ()
\begin{DoxyCompactList}\small\item\em Modify the bandwidth. \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 Evaluation of the Laplacian kernel. \end{DoxyCompactList}\item 
double \textbf{ Evaluate} (const double t) const
\begin{DoxyCompactList}\small\item\em Evaluation of the Laplacian kernel given the distance between two points. \end{DoxyCompactList}\item 
double \textbf{ Gradient} (const double t) const
\begin{DoxyCompactList}\small\item\em Evaluation of the gradient of the Laplacian kernel given the distance between two points. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&ar, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the kernel. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
The standard Laplacian kernel. 

Given two vectors $ x $, $ y $, and a bandwidth $ \mu $ (set in the constructor),

\[ K(x, y) = \exp(-\frac{|| x - y ||}{\mu}). \]

The implementation is all in the header file because it is so simple. 

Definition at line 30 of file laplacian\+\_\+kernel.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1kernel_1_1LaplacianKernel_a8bfe7f6ab7ae7fc69ef672bd2a8caec8}} 
\index{mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+Kernel}!Laplacian\+Kernel@{Laplacian\+Kernel}}
\index{Laplacian\+Kernel@{Laplacian\+Kernel}!mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+Kernel}}
\subsubsection{Laplacian\+Kernel()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Laplacian\+Kernel} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Default constructor; sets bandwidth to 1.\+0. 



Definition at line 36 of file laplacian\+\_\+kernel.\+hpp.

\mbox{\label{classmlpack_1_1kernel_1_1LaplacianKernel_adad3af357ff4d5ea13e7a146437bde42}} 
\index{mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+Kernel}!Laplacian\+Kernel@{Laplacian\+Kernel}}
\index{Laplacian\+Kernel@{Laplacian\+Kernel}!mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+Kernel}}
\subsubsection{Laplacian\+Kernel()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Laplacian\+Kernel} (\begin{DoxyParamCaption}\item[{double}]{bandwidth }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Construct the Laplacian kernel with a custom bandwidth. 


\begin{DoxyParams}{Parameters}
{\em bandwidth} & The bandwidth of the kernel ( $\mu$). \\
\hline
\end{DoxyParams}


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



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1kernel_1_1LaplacianKernel_ae9cbd816179d6c36036139ccc8fea8c8}} 
\index{mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+Kernel}!Bandwidth@{Bandwidth}}
\index{Bandwidth@{Bandwidth}!mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+Kernel}}
\subsubsection{Bandwidth()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily double Bandwidth (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the bandwidth. 



Definition at line 95 of file laplacian\+\_\+kernel.\+hpp.

\mbox{\label{classmlpack_1_1kernel_1_1LaplacianKernel_a202e9a76b6f5f948e98e68a374ae8ea4}} 
\index{mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+Kernel}!Bandwidth@{Bandwidth}}
\index{Bandwidth@{Bandwidth}!mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+Kernel}}
\subsubsection{Bandwidth()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily double\& Bandwidth (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the bandwidth. 



Definition at line 97 of file laplacian\+\_\+kernel.\+hpp.

\mbox{\label{classmlpack_1_1kernel_1_1LaplacianKernel_a84c3aeba25ea7703bd2d4f85a54301da}} 
\index{mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+Kernel}!Evaluate@{Evaluate}}
\index{Evaluate@{Evaluate}!mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+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]}}



Evaluation of the Laplacian kernel. 

This could be generalized to use any distance metric, not the Euclidean distance, but for now, the Euclidean distance is used.


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

\begin{DoxyParams}{Parameters}
{\em a} & First vector. \\
\hline
{\em b} & Second vector. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
K(a, b) using the bandwidth ( $\mu$) specified in the constructor. 
\end{DoxyReturn}


Definition at line 61 of file laplacian\+\_\+kernel.\+hpp.



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

\mbox{\label{classmlpack_1_1kernel_1_1LaplacianKernel_a031ed73efe13c6e6bc805006bd249238}} 
\index{mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+Kernel}!Evaluate@{Evaluate}}
\index{Evaluate@{Evaluate}!mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+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]}}



Evaluation of the Laplacian kernel given the distance between two points. 


\begin{DoxyParams}{Parameters}
{\em t} & The distance between the two points the kernel should be evaluated on. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
K(t) using the bandwidth ( $\mu$) specified in the constructor. 
\end{DoxyReturn}


Definition at line 75 of file laplacian\+\_\+kernel.\+hpp.

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



Evaluation of the gradient of the Laplacian kernel given the distance between two points. 


\begin{DoxyParams}{Parameters}
{\em t} & The distance between the two points the kernel should be evaluated on. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
K(t) using the bandwidth ( $\mu$) specified in the constructor. 
\end{DoxyReturn}


Definition at line 90 of file laplacian\+\_\+kernel.\+hpp.

\mbox{\label{classmlpack_1_1kernel_1_1LaplacianKernel_af0dd9205158ccf7bcfcd8ff81f79c927}} 
\index{mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+Kernel}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::kernel\+::\+Laplacian\+Kernel@{mlpack\+::kernel\+::\+Laplacian\+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 kernel. 



Definition at line 101 of file laplacian\+\_\+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{ laplacian\+\_\+kernel.\+hpp}\end{DoxyCompactItemize}
