mlpack
gitmaster

The standard Laplacian kernel. More...
Public Member Functions  
LaplacianKernel ()  
Default constructor; sets bandwidth to 1.0. More...  
LaplacianKernel (double bandwidth)  
Construct the Laplacian kernel with a custom bandwidth. More...  
double  Bandwidth () const 
Get the bandwidth. More...  
double &  Bandwidth () 
Modify the bandwidth. More...  
template < typename VecTypeA , typename VecTypeB >  
double  Evaluate (const VecTypeA &a, const VecTypeB &b) const 
Evaluation of the Laplacian kernel. More...  
double  Evaluate (const double t) const 
Evaluation of the Laplacian kernel given the distance between two points. More...  
double  Gradient (const double t) const 
Evaluation of the gradient of the Laplacian kernel given the distance between two points. More...  
template < typename Archive >  
void  serialize (Archive &ar, const unsigned int) 
Serialize the kernel. More...  
Detailed Description
The standard Laplacian kernel.
Given two vectors , , and a bandwidth (set in the constructor),
The implementation is all in the header file because it is so simple.
Definition at line 30 of file laplacian_kernel.hpp.
Constructor & Destructor Documentation
◆ LaplacianKernel() [1/2]

inline 
Default constructor; sets bandwidth to 1.0.
Definition at line 36 of file laplacian_kernel.hpp.
◆ LaplacianKernel() [2/2]

inline 
Construct the Laplacian kernel with a custom bandwidth.
 Parameters

bandwidth The bandwidth of the kernel ( ).
Definition at line 44 of file laplacian_kernel.hpp.
Member Function Documentation
◆ Bandwidth() [1/2]

inline 
Get the bandwidth.
Definition at line 95 of file laplacian_kernel.hpp.
◆ Bandwidth() [2/2]

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

inline 
Evaluation of the Laplacian kernel.
This could be generalized to use any distance metric, not the Euclidean distance, but for now, the Euclidean distance is used.
 Template Parameters

VecTypeA Type of first vector (likely arma::vec or arma::sp_vec). VecTypeB Type of second vector (arma::vec / arma::sp_vec).
 Parameters

a First vector. b Second vector.
 Returns
 K(a, b) using the bandwidth ( ) specified in the constructor.
Definition at line 61 of file laplacian_kernel.hpp.
References LMetric< TPower, TTakeRoot >::Evaluate().
◆ Evaluate() [2/2]

inline 
Evaluation of the Laplacian kernel given the distance between two points.
 Parameters

t The distance between the two points the kernel should be evaluated on.
 Returns
 K(t) using the bandwidth ( ) specified in the constructor.
Definition at line 75 of file laplacian_kernel.hpp.
◆ Gradient()

inline 
Evaluation of the gradient of the Laplacian kernel given the distance between two points.
 Parameters

t The distance between the two points the kernel should be evaluated on.
 Returns
 K(t) using the bandwidth ( ) specified in the constructor.
Definition at line 90 of file laplacian_kernel.hpp.
◆ serialize()

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