strumpack::kernel Namespace Reference

Classes

class  ANOVAKernel
 ANOVA kernel. More...
 
class  DenseKernel
 Arbitrary dense matrix, with underlying geometry. More...
 
class  GaussKernel
 Gaussian or radial basis function kernel. More...
 
class  Kernel
 Representation of a kernel matrix. More...
 
class  LaplaceKernel
 Laplace kernel. More...
 

Enumerations

enum class  KernelType { DENSE , GAUSS , LAPLACE , ANOVA }
 

Functions

std::string get_name (KernelType k)
 
KernelType kernel_type (const std::string &k)
 
template<typename scalar_t >
std::unique_ptr< Kernel< scalar_t > > create_kernel (KernelType k, DenseMatrix< scalar_t > &data, scalar_t h, scalar_t lambda, int p=1)
 

Detailed Description

Defines simple kernel matrix definitions and kernel regression.

Enumeration Type Documentation

◆ KernelType

enum class strumpack::kernel::KernelType
strong

Enumeration of Kernel types.

Enumerator
DENSE 

Arbitrary dense matrix

GAUSS 

Gauss or radial basis function kernel

LAPLACE 

Laplace kernel

ANOVA 

ANOVA kernel

Function Documentation

◆ create_kernel()

template<typename scalar_t >
std::unique_ptr< Kernel< scalar_t > > strumpack::kernel::create_kernel ( KernelType  k,
DenseMatrix< scalar_t > &  data,
scalar_t  h,
scalar_t  lambda,
int  p = 1 
)

Creates a unique_ptr to a Kernel object, which can be GaussKernel, LaplaceKernel, ... .

Template Parameters
scalar_tthe scalar type to represent the kernel.
Parameters
kType of kernel
argsarguments to be passed through to the constructor of the actual kernel (fi, data, h, lambda for GaussKernel)
Returns
unique_ptr to a kernel

◆ get_name()

std::string strumpack::kernel::get_name ( KernelType  k)
inline

Return a string with the name of the kernel type.

◆ kernel_type()

KernelType strumpack::kernel::kernel_type ( const std::string &  k)
inline

Return a KernelType enum from a string. If the string is not recognized, a warning is printed and the GAUSS kernel type is returned.