mlpack
master

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 VecTypeA , typename VecTypeB >  
double  Evaluate (const VecTypeA &a, const VecTypeB &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...  
double  Gradient (const double distance) const 
Evaluate the gradient of triangular kernel given that the distance between the two points is known. More...  
template < typename Archive >  
void  serialize (Archive &ar, const unsigned int) 
Serialize the kernel. More...  
Detailed Description
The trivially simple triangular kernel, defined by.
where is the bandwidth of the kernel.
Definition at line 30 of file triangular_kernel.hpp.
Constructor & Destructor Documentation
◆ TriangularKernel()

inline 
Initialize the triangular kernel with the given bandwidth (default 1.0).
 Parameters

bandwidth Bandwidth of the triangular kernel.
Definition at line 38 of file triangular_kernel.hpp.
Member Function Documentation
◆ Bandwidth() [1/2]

inline 
Get the bandwidth of the kernel.
Definition at line 90 of file triangular_kernel.hpp.
◆ Bandwidth() [2/2]

inline 
Modify the bandwidth of the kernel.
Definition at line 92 of file triangular_kernel.hpp.
◆ Evaluate() [1/2]

inline 
Evaluate the triangular kernel for the two given vectors.
 Template Parameters

VecTypeA Type of first vector. VecTypeB Type of second vector.
 Parameters

a First vector. b Second vector.
Definition at line 49 of file triangular_kernel.hpp.
References LMetric< TPower, TTakeRoot >::Evaluate().
◆ Evaluate() [2/2]

inline 
Evaluate the triangular kernel given that the distance between the two points is known.
 Parameters

distance The distance between the two points.
Definition at line 61 of file triangular_kernel.hpp.
◆ Gradient()

inline 
Evaluate the gradient of triangular kernel given that the distance between the two points is known.
 Parameters

distance The distance between the two points.
Definition at line 73 of file triangular_kernel.hpp.
◆ serialize()

inline 
Serialize the kernel.
Definition at line 96 of file triangular_kernel.hpp.
The documentation for this class was generated from the following file:
 src/mlpack/core/kernels/triangular_kernel.hpp
Generated by 1.8.13