\section{Linear\+Kernel Class Reference}
\label{classmlpack_1_1kernel_1_1LinearKernel}\index{Linear\+Kernel@{Linear\+Kernel}}


The simple linear kernel (dot product).  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Linear\+Kernel} ()
\begin{DoxyCompactList}\small\item\em This constructor does nothing; the linear kernel has no parameters to store. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the kernel (it has no members... do nothing). \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Vec\+TypeA , typename Vec\+TypeB $>$ }\\static double \textbf{ Evaluate} (const Vec\+TypeA \&a, const Vec\+TypeB \&b)
\begin{DoxyCompactList}\small\item\em Simple evaluation of the dot product. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
The simple linear kernel (dot product). 

For any two vectors $ x $ and $ y $,

\[ K(x, y) = x^T y \]

This kernel has no parameters and therefore the evaluation can be static. 

Definition at line 32 of file linear\+\_\+kernel.\+hpp.



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



This constructor does nothing; the linear kernel has no parameters to store. 



Definition at line 39 of file linear\+\_\+kernel.\+hpp.



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



Simple evaluation of the dot product. 

This evaluation uses Armadillo\textquotesingle{}s dot() function.


\begin{DoxyTemplParams}{Template Parameters}
{\em Vec\+TypeA} & Type of first vector (should be 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). 
\end{DoxyReturn}


Definition at line 53 of file linear\+\_\+kernel.\+hpp.

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



Serialize the kernel (it has no members... do nothing). 



Definition at line 60 of file linear\+\_\+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-\/git/src/mlpack/core/kernels/\textbf{ linear\+\_\+kernel.\+hpp}\end{DoxyCompactItemize}
