The Distance kernel takes a distance as input.
It turns a distance into something kernel like by computing
Definition at line 33 of file DistanceKernel.h.
Public Member Functions | |
CDistanceKernel () | |
CDistanceKernel (int32_t cache, float64_t width, CDistance *dist) | |
CDistanceKernel (CFeatures *l, CFeatures *r, float64_t width, CDistance *dist) | |
virtual | ~CDistanceKernel () |
virtual bool | init (CFeatures *l, CFeatures *r) |
virtual void | register_params () |
virtual EKernelType | get_kernel_type () |
virtual EFeatureType | get_feature_type () |
virtual EFeatureClass | get_feature_class () |
virtual const char * | get_name () const |
virtual void | set_width (float64_t w) |
virtual float64_t | get_width () const |
Protected Member Functions | |
float64_t | compute (int32_t idx_a, int32_t idx_b) |
Protected Attributes | |
CDistance * | distance |
float64_t | width |
CDistanceKernel | ( | ) |
default constructor
Definition at line 20 of file DistanceKernel.cpp.
CDistanceKernel | ( | int32_t | cache, | |
float64_t | width, | |||
CDistance * | dist | |||
) |
constructor
cache | cache size | |
width | width | |
dist | distance |
Definition at line 26 of file DistanceKernel.cpp.
CDistanceKernel | ( | CFeatures * | l, | |
CFeatures * | r, | |||
float64_t | width, | |||
CDistance * | dist | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side | |
width | width | |
dist | distance |
Definition at line 35 of file DistanceKernel.cpp.
~CDistanceKernel | ( | ) | [virtual] |
Definition at line 46 of file DistanceKernel.cpp.
float64_t compute | ( | int32_t | idx_a, | |
int32_t | idx_b | |||
) | [protected, virtual] |
compute kernel function for features a and b idx_{a,b} denote the index of the feature vectors in the corresponding feature object
idx_a | index a | |
idx_b | index b |
Implements CKernel.
Reimplemented in CBesselKernel.
Definition at line 62 of file DistanceKernel.cpp.
virtual EFeatureClass get_feature_class | ( | ) | [virtual] |
return feature class the kernel can deal with
Implements CKernel.
Reimplemented in CBesselKernel.
Definition at line 87 of file DistanceKernel.h.
virtual EFeatureType get_feature_type | ( | ) | [virtual] |
return feature type the kernel can deal with
Implements CKernel.
Reimplemented in CBesselKernel.
Definition at line 81 of file DistanceKernel.h.
virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are
Implements CKernel.
Reimplemented in CBesselKernel.
Definition at line 76 of file DistanceKernel.h.
virtual const char* get_name | ( | ) | const [virtual] |
return the kernel's name
Implements CSGObject.
Reimplemented in CBesselKernel.
Definition at line 93 of file DistanceKernel.h.
virtual float64_t get_width | ( | ) | const [virtual] |
return the kernel's width
Reimplemented in CBesselKernel.
Definition at line 108 of file DistanceKernel.h.
initialize kernel
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CKernel.
Reimplemented in CBesselKernel.
Definition at line 54 of file DistanceKernel.cpp.
void register_params | ( | ) | [virtual] |
register the parameters (serialization support)
Reimplemented from CKernel.
Definition at line 68 of file DistanceKernel.cpp.
virtual void set_width | ( | float64_t | w | ) | [virtual] |
set the kernel's width
w | kernel width |
Reimplemented in CBesselKernel.
Definition at line 99 of file DistanceKernel.h.
distance
Definition at line 126 of file DistanceKernel.h.
width
Definition at line 128 of file DistanceKernel.h.