GClasses
GClasses::GKernel Class Referenceabstract

Detailed Description

The base class for kernel functions. Classes which implement this must provide an "apply" method that applies the kernel to two vectors. Kernels may be combined together to form a more complex kernel, to which the kernel trick will still apply.

#include <GKernelTrick.h>

Inheritance diagram for GClasses::GKernel:
GClasses::GKernelAdd GClasses::GKernelChiSquared GClasses::GKernelExp GClasses::GKernelGaussianRBF GClasses::GKernelIdentity GClasses::GKernelMultiply GClasses::GKernelNormalize GClasses::GKernelPolynomial GClasses::GKernelPow GClasses::GKernelScale GClasses::GKernelTranslate

Public Member Functions

 GKernel ()
 
virtual ~GKernel ()
 
virtual double apply (const GVec &pA, const GVec &pB)=0
 Applies the kernel to the two specified vectors. More...
 
virtual const char * name () const =0
 Returns the name of this kernel. More...
 
virtual GDomNodeserialize (GDom *pDoc)=0
 Marshalls this object into a DOM. More...
 

Static Public Member Functions

static GKerneldeserialize (GDomNode *pNode)
 Deserializes a kernel object. More...
 
static GKernelkernelComplex1 ()
 Returns a complex kernel made by combining several other kernels. This might be used to exercise kernel functionality or to test non-linear metrics. The caller is responsible to delete the object this returns. More...
 

Protected Member Functions

GDomNodemakeBaseNode (GDom *pDoc) const
 Helper method used by the serialize methods in child classes. More...
 

Constructor & Destructor Documentation

GClasses::GKernel::GKernel ( )
inline
virtual GClasses::GKernel::~GKernel ( )
inlinevirtual

Member Function Documentation

static GKernel* GClasses::GKernel::deserialize ( GDomNode pNode)
static

Deserializes a kernel object.

static GKernel* GClasses::GKernel::kernelComplex1 ( )
static

Returns a complex kernel made by combining several other kernels. This might be used to exercise kernel functionality or to test non-linear metrics. The caller is responsible to delete the object this returns.

GDomNode* GClasses::GKernel::makeBaseNode ( GDom pDoc) const
protected

Helper method used by the serialize methods in child classes.