MLPACK
1.0.4
|
The trivially simple triangular kernel, defined by. More...
Public Member Functions | |
TriangularKernel (const double bandwidth=1.0) | |
Initialize the triangular kernel with the given bandwidth (default 1.0). | |
double | Bandwidth () const |
Get the bandwidth of the kernel. | |
double & | Bandwidth () |
Modify the bandwidth of the kernel. | |
template<typename Vec1Type , typename Vec2Type > | |
double | Evaluate (const Vec1Type &a, const Vec2Type &b) |
Evaluate the triangular kernel for the two given vectors. | |
Private Attributes | |
double | bandwidth |
The bandwidth of the kernel. |
The trivially simple triangular kernel, defined by.
where is the bandwidth of the kernel.
Definition at line 40 of file triangular_kernel.hpp.
mlpack::kernel::TriangularKernel::TriangularKernel | ( | const double | bandwidth = 1.0 | ) | [inline] |
Initialize the triangular kernel with the given bandwidth (default 1.0).
bandwidth | Bandwidth of the triangular kernel. |
Definition at line 48 of file triangular_kernel.hpp.
double mlpack::kernel::TriangularKernel::Bandwidth | ( | ) | const [inline] |
Get the bandwidth of the kernel.
Definition at line 64 of file triangular_kernel.hpp.
References bandwidth.
double& mlpack::kernel::TriangularKernel::Bandwidth | ( | ) | [inline] |
Modify the bandwidth of the kernel.
Definition at line 66 of file triangular_kernel.hpp.
References bandwidth.
double mlpack::kernel::TriangularKernel::Evaluate | ( | const Vec1Type & | a, |
const Vec2Type & | b | ||
) | [inline] |
Evaluate the triangular kernel for the two given vectors.
a | First vector. |
b | Second vector. |
Definition at line 57 of file triangular_kernel.hpp.
References bandwidth, and mlpack::metric::LMetric< Power, TakeRoot >::Evaluate().
double mlpack::kernel::TriangularKernel::bandwidth [private] |
The bandwidth of the kernel.
Definition at line 70 of file triangular_kernel.hpp.
Referenced by Bandwidth(), and Evaluate().