12 #ifndef MLPACK_CORE_KERNELS_LAPLACIAN_KERNEL_HPP
13 #define MLPACK_CORE_KERNELS_LAPLACIAN_KERNEL_HPP
60 template<
typename VecTypeA,
typename VecTypeB>
61 double Evaluate(
const VecTypeA& a,
const VecTypeB& b)
const
78 return exp(-t / bandwidth);
91 return exp(-t / bandwidth) / -bandwidth;
100 template<
typename Archive>
103 ar & BOOST_SERIALIZATION_NVP(bandwidth);
This is a template class that can provide information about various kernels.
double Gradient(const double t) const
Evaluation of the gradient of the Laplacian kernel given the distance between two points...
The core includes that mlpack expects; standard C++ includes and Armadillo.
double Evaluate(const VecTypeA &a, const VecTypeB &b) const
Evaluation of the Laplacian kernel.
static VecTypeA::elem_type Evaluate(const VecTypeA &a, const VecTypeB &b)
Computes the distance between two points.
double & Bandwidth()
Modify the bandwidth.
LaplacianKernel()
Default constructor; sets bandwidth to 1.0.
double Evaluate(const double t) const
Evaluation of the Laplacian kernel given the distance between two points.
LaplacianKernel(double bandwidth)
Construct the Laplacian kernel with a custom bandwidth.
The standard Laplacian kernel.
static const bool IsNormalized
If true, then the kernel is normalized: K(x, x) = K(y, y) = 1 for all x.
double Bandwidth() const
Get the bandwidth.
void serialize(Archive &ar, const unsigned int)
Serialize the kernel.
static const bool UsesSquaredDistance
If true, then the kernel include a squared distance, ||x - y||^2 .