mlpack
Public Member Functions | List of all members
mlpack::kernel::SphericalKernel Class Reference

The spherical kernel, which is 1 when the distance between the two argument points is less than or equal to the bandwidth, or 0 otherwise. More...

#include <spherical_kernel.hpp>

Public Member Functions

 SphericalKernel (const double bandwidth=1.0)
 Construct the SphericalKernel with the given bandwidth.
 
template<typename VecTypeA , typename VecTypeB >
double Evaluate (const VecTypeA &a, const VecTypeB &b) const
 Evaluate the spherical kernel with the given two vectors. More...
 
template<typename VecTypeA , typename VecTypeB >
double ConvolutionIntegral (const VecTypeA &a, const VecTypeB &b) const
 Obtains the convolution integral [integral K(||x-a||)K(||b-x||)dx] for the two vectors. More...
 
double Normalizer (size_t dimension) const
 
double Evaluate (const double t) const
 Evaluate the kernel when only a distance is given, not two points. More...
 
double Gradient (double t)
 
template<typename Archive >
void serialize (Archive &ar, const uint32_t)
 Serialize the object.
 

Detailed Description

The spherical kernel, which is 1 when the distance between the two argument points is less than or equal to the bandwidth, or 0 otherwise.

Member Function Documentation

◆ ConvolutionIntegral()

template<typename VecTypeA , typename VecTypeB >
double mlpack::kernel::SphericalKernel::ConvolutionIntegral ( const VecTypeA &  a,
const VecTypeB &  b 
) const
inline

Obtains the convolution integral [integral K(||x-a||)K(||b-x||)dx] for the two vectors.

Template Parameters
VecTypeAType of first vector (arma::vec, arma::sp_vec should be expected).
VecTypeBType of second vector.
Parameters
aFirst vector.
bSecond vector.
Returns
The convolution integral value.

◆ Evaluate() [1/2]

template<typename VecTypeA , typename VecTypeB >
double mlpack::kernel::SphericalKernel::Evaluate ( const VecTypeA &  a,
const VecTypeB &  b 
) const
inline

Evaluate the spherical kernel with the given two vectors.

Template Parameters
VecTypeAType of first vector.
VecTypeBType of second vector.
Parameters
aFirst vector.
bSecond vector.
Returns
The kernel evaluation between the two vectors.

◆ Evaluate() [2/2]

double mlpack::kernel::SphericalKernel::Evaluate ( const double  t) const
inline

Evaluate the kernel when only a distance is given, not two points.

Parameters
tArgument to kernel.

The documentation for this class was generated from the following file: