Public Member Functions | Protected Member Functions | Protected Attributes

CConstKernel Class Reference


Detailed Description

The Constant Kernel returns a constant for all elements.

A ``kernel'' that simply returns a single constant, i.e. $k({\bf x}, {\bf x'})= c$

Definition at line 27 of file ConstKernel.h.

Inheritance diagram for CConstKernel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CConstKernel ()
 CConstKernel (float64_t c)
 CConstKernel (CFeatures *l, CFeatures *r, float64_t c)
virtual ~CConstKernel ()
virtual bool init (CFeatures *l, CFeatures *r)
virtual EKernelType get_kernel_type ()
virtual EFeatureType get_feature_type ()
virtual EFeatureClass get_feature_class ()
virtual const char * get_name () const

Protected Member Functions

virtual float64_t compute (int32_t row, int32_t col)

Protected Attributes

float64_t const_value

Constructor & Destructor Documentation

CConstKernel ( void   ) 

default constructor

Definition at line 21 of file ConstKernel.cpp.

CConstKernel ( float64_t  c  ) 

constructor

Parameters:
c constant c

Definition at line 27 of file ConstKernel.cpp.

CConstKernel ( CFeatures l,
CFeatures r,
float64_t  c 
)

constructor

Parameters:
l features of left-hand side
r features of right-hand side
c constant c

Definition at line 34 of file ConstKernel.cpp.

~CConstKernel (  )  [virtual]

Definition at line 42 of file ConstKernel.cpp.


Member Function Documentation

virtual float64_t compute ( int32_t  row,
int32_t  col 
) [protected, virtual]

compute kernel function for features a and b

Parameters:
row dummy row
col dummy col
Returns:
computed kernel function (const value)

Implements CKernel.

Definition at line 94 of file ConstKernel.h.

virtual EFeatureClass get_feature_class (  )  [virtual]

return feature class the kernel can deal with

Returns:
feature class ANY

Implements CKernel.

Definition at line 76 of file ConstKernel.h.

virtual EFeatureType get_feature_type (  )  [virtual]

return feature type the kernel can deal with

Returns:
feature type ANY

Implements CKernel.

Definition at line 67 of file ConstKernel.h.

virtual EKernelType get_kernel_type (  )  [virtual]

return what type of kernel we are

Returns:
kernel type CONST

Implements CKernel.

Definition at line 61 of file ConstKernel.h.

virtual const char* get_name ( void   )  const [virtual]

return the kernel's name

Returns:
name Const

Implements CSGObject.

Definition at line 85 of file ConstKernel.h.

bool init ( CFeatures l,
CFeatures r 
) [virtual]

initialize kernel

Parameters:
l features of left-hand side
r features of right-hand side
Returns:
if initializing was successful

Reimplemented from CKernel.

Definition at line 46 of file ConstKernel.cpp.


Member Data Documentation

float64_t const_value [protected]

const value

Definition at line 104 of file ConstKernel.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation