mlpack
3.1.1
src
mlpack
core
kernels
linear_kernel.hpp
Go to the documentation of this file.
1
14
#ifndef MLPACK_CORE_KERNELS_LINEAR_KERNEL_HPP
15
#define MLPACK_CORE_KERNELS_LINEAR_KERNEL_HPP
16
17
#include <
mlpack/prereqs.hpp
>
18
19
namespace
mlpack
{
20
namespace
kernel {
21
32
class
LinearKernel
33
{
34
public
:
39
LinearKernel
() { }
40
52
template
<
typename
VecTypeA,
typename
VecTypeB>
53
static
double
Evaluate
(
const
VecTypeA& a,
const
VecTypeB& b)
54
{
55
return
arma::dot(a, b);
56
}
57
59
template
<
typename
Archive>
60
void
serialize
(Archive&
/* ar */
,
const
unsigned
int
/* version */
) { }
61
};
62
63
}
// namespace kernel
64
}
// namespace mlpack
65
66
#endif
prereqs.hpp
mlpack
@serialization.hpp
Definition:
add_to_po.hpp:21
mlpack::kernel::LinearKernel::serialize
void serialize(Archive &, const unsigned int)
Serialize the kernel (it has no members... do nothing).
Definition:
linear_kernel.hpp:60
mlpack::kernel::LinearKernel::Evaluate
static double Evaluate(const VecTypeA &a, const VecTypeB &b)
Simple evaluation of the dot product.
Definition:
linear_kernel.hpp:53
mlpack::kernel::LinearKernel
The simple linear kernel (dot product).
Definition:
linear_kernel.hpp:32
mlpack::kernel::LinearKernel::LinearKernel
LinearKernel()
This constructor does nothing; the linear kernel has no parameters to store.
Definition:
linear_kernel.hpp:39
Generated by
1.8.17