MLPACK  1.0.11
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 
43 {
44  public:
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