Public Member Functions | |
| SphericalKernel (double b) | |
| SphericalKernel () | |
| template<typename VecType > | |
| double | ConvolutionIntegral (const VecType &a, const VecType &b) |
| Obtains the convolution integral [integral K(||x-a||)K(||b-x||)dx] for the two vectors. | |
| double | Evaluate (double t) |
| template<typename VecType > | |
| double | Evaluate (const VecType &a, const VecType &b) |
| double | Normalizer (size_t dimension) |
Private Attributes | |
| double | bandwidth |
| double | bandwidthSquared |
Definition at line 32 of file spherical_kernel.hpp.
| mlpack::kernel::SphericalKernel::SphericalKernel | ( | ) | [inline] |
Definition at line 35 of file spherical_kernel.hpp.
| mlpack::kernel::SphericalKernel::SphericalKernel | ( | double | b | ) | [inline] |
Definition at line 38 of file spherical_kernel.hpp.
| double mlpack::kernel::SphericalKernel::ConvolutionIntegral | ( | const VecType & | a, | |
| const VecType & | b | |||
| ) | [inline] |
Obtains the convolution integral [integral K(||x-a||)K(||b-x||)dx] for the two vectors.
In this case, because our simple example kernel has no internal parameters, we can declare the function static. For a more complex example which cannot be declared static, see the GaussianKernel, which stores an internal parameter.
| VecType | Type of vector (arma::vec, arma::spvec should be expected). |
| a | First vector. | |
| b | Second vector. |
Definition at line 62 of file spherical_kernel.hpp.
References bandwidth, mlpack::metric::LMetric< Power, TakeRoot >::Evaluate(), mlpack::Log::Fatal, and Normalizer().
| double mlpack::kernel::SphericalKernel::Evaluate | ( | double | t | ) | [inline] |
Definition at line 93 of file spherical_kernel.hpp.
References bandwidth.
| double mlpack::kernel::SphericalKernel::Evaluate | ( | const VecType & | a, | |
| const VecType & | b | |||
| ) | [inline] |
Definition at line 43 of file spherical_kernel.hpp.
References bandwidthSquared, and mlpack::metric::LMetric< Power, TakeRoot >::Evaluate().
| double mlpack::kernel::SphericalKernel::Normalizer | ( | size_t | dimension | ) | [inline] |
Definition at line 88 of file spherical_kernel.hpp.
References bandwidth, and M_PI.
Referenced by ConvolutionIntegral().
double mlpack::kernel::SphericalKernel::bandwidth [private] |
Definition at line 99 of file spherical_kernel.hpp.
Referenced by ConvolutionIntegral(), Evaluate(), and Normalizer().
double mlpack::kernel::SphericalKernel::bandwidthSquared [private] |
Definition at line 100 of file spherical_kernel.hpp.
Referenced by Evaluate().
1.6.1