mlpack
1.0.12
|
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). More... | |
double | Bandwidth () const |
Get the bandwidth of the kernel. More... | |
double & | Bandwidth () |
Modify the bandwidth of the kernel. More... | |
template<typename Vec1Type , typename Vec2Type > | |
double | Evaluate (const Vec1Type &a, const Vec2Type &b) const |
Evaluate the triangular kernel for the two given vectors. More... | |
double | Evaluate (const double distance) const |
Evaluate the triangular kernel given that the distance between the two points is known. More... | |
std::string | ToString () const |
Return a string representation of the kernel. More... | |
Private Attributes | |
double | bandwidth |
The bandwidth of the kernel. More... | |
The trivially simple triangular kernel, defined by.
where is the bandwidth of the kernel.
Definition at line 32 of file triangular_kernel.hpp.
|
inline |
Initialize the triangular kernel with the given bandwidth (default 1.0).
bandwidth | Bandwidth of the triangular kernel. |
Definition at line 40 of file triangular_kernel.hpp.
|
inline |
Get the bandwidth of the kernel.
Definition at line 67 of file triangular_kernel.hpp.
References bandwidth.
|
inline |
Modify the bandwidth of the kernel.
Definition at line 69 of file triangular_kernel.hpp.
References bandwidth.
|
inline |
Evaluate the triangular kernel for the two given vectors.
a | First vector. |
b | Second vector. |
Definition at line 49 of file triangular_kernel.hpp.
References bandwidth, and mlpack::metric::LMetric< Power, TakeRoot >::Evaluate().
|
inline |
Evaluate the triangular kernel given that the distance between the two points is known.
distance | The distance between the two points. |
Definition at line 61 of file triangular_kernel.hpp.
References bandwidth.
|
inline |
Return a string representation of the kernel.
Definition at line 72 of file triangular_kernel.hpp.
References bandwidth.
|
private |
The bandwidth of the kernel.
Definition at line 82 of file triangular_kernel.hpp.
Referenced by Bandwidth(), Evaluate(), and ToString().