MLPACK
1.0.11
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
mlpack
core
kernels
linear_kernel.hpp
Go to the documentation of this file.
1
24
#ifndef __MLPACK_CORE_KERNELS_LINEAR_KERNEL_HPP
25
#define __MLPACK_CORE_KERNELS_LINEAR_KERNEL_HPP
26
27
#include <
mlpack/core.hpp
>
28
29
namespace
mlpack {
30
namespace
kernel {
31
42
class
LinearKernel
43
{
44
public
:
49
LinearKernel
() { }
50
60
template
<
typename
VecType>
61
static
double
Evaluate
(
const
VecType& a,
const
VecType& b)
62
{
63
return
arma::dot(a, b);
64
}
65
67
std::string
ToString
()
const
68
{
69
std::ostringstream convert;
70
convert <<
"LinearKernel ["
<<
this
<<
"]"
<< std::endl;
71
return
convert.str();
72
}
73
};
74
75
};
// namespace kernel
76
};
// namespace mlpack
77
78
#endif
Generated by
1.8.3.1