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...

Public Member Functions

 SphericalKernel (const double bandwidth=1.0)
 Construct the SphericalKernel with the given bandwidth. 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...

 
template
<
typename
VecTypeA
,
typename
VecTypeB
>
double Evaluate (const VecTypeA &a, const VecTypeB &b) const
 Evaluate the spherical kernel with the given two vectors. More...

 
double Evaluate (const double t) const
 Evaluate the kernel when only a distance is given, not two points. More...

 
double Gradient (double t)
 
double Normalizer (size_t dimension) const
 
template
<
typename
Archive
>
void serialize (Archive &ar, const unsigned int)
 Serialize the object. More...

 

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.

Definition at line 23 of file spherical_kernel.hpp.

Constructor & Destructor Documentation

◆ SphericalKernel()

SphericalKernel ( const double  bandwidth = 1.0)
inline

Construct the SphericalKernel with the given bandwidth.

Definition at line 29 of file spherical_kernel.hpp.

Member Function Documentation

◆ ConvolutionIntegral()

double 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.

Definition at line 62 of file spherical_kernel.hpp.

References LMetric< TPower, TTakeRoot >::Evaluate(), Log::Fatal, and SphericalKernel::Normalizer().

◆ Evaluate() [1/2]

double 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.

Definition at line 44 of file spherical_kernel.hpp.

References LMetric< TPower, TTakeRoot >::Evaluate().

◆ Evaluate() [2/2]

double Evaluate ( const double  t) const
inline

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

Parameters
tArgument to kernel.

Definition at line 99 of file spherical_kernel.hpp.

◆ Gradient()

double Gradient ( double  t)
inline

Definition at line 103 of file spherical_kernel.hpp.

◆ Normalizer()

double Normalizer ( size_t  dimension) const
inline

Definition at line 88 of file spherical_kernel.hpp.

References M_PI.

Referenced by SphericalKernel::ConvolutionIntegral().

◆ serialize()

void serialize ( Archive &  ar,
const unsigned  int 
)
inline

Serialize the object.

Definition at line 110 of file spherical_kernel.hpp.


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