PLearn 0.1
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | Protected Attributes | Private Types
PLearn::LaplacianKernel Class Reference

returns exp(-phi*(sum_i[abs(x1_i - x2_i)])) More...

#include <LaplacianKernel.h>

Inheritance diagram for PLearn::LaplacianKernel:
Inheritance graph
[legend]
Collaboration diagram for PLearn::LaplacianKernel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LaplacianKernel ()
 LaplacianKernel (real the_phi)
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual LaplacianKerneldeepCopy (CopiesMap &copies) const
virtual real evaluate (const Vec &x1, const Vec &x2) const
 ** Subclasses must override this method **

Static Public Member Functions

static string _classname_ ()
static OptionList_getOptionList_ ()
static RemoteMethodMap_getRemoteMethodMap_ ()
static Object_new_instance_for_typemap_ ()
static bool _isa_ (const Object *o)
static void _static_initialize_ ()
static const PPathdeclaringFile ()

Static Public Attributes

static StaticInitializer _static_initializer_

Static Protected Member Functions

static void declareOptions (OptionList &ol)
 recognized option is "phi"

Protected Attributes

real phi

Private Types

typedef Kernel inherited

Detailed Description

returns exp(-phi*(sum_i[abs(x1_i - x2_i)]))

Definition at line 54 of file LaplacianKernel.h.


Member Typedef Documentation

Reimplemented from PLearn::Kernel.

Definition at line 56 of file LaplacianKernel.h.


Constructor & Destructor Documentation

PLearn::LaplacianKernel::LaplacianKernel ( ) [inline]

Definition at line 61 of file LaplacianKernel.h.

        : phi() {}
PLearn::LaplacianKernel::LaplacianKernel ( real  the_phi) [inline]

Definition at line 63 of file LaplacianKernel.h.

        : phi(the_phi)
    {}

Member Function Documentation

string PLearn::LaplacianKernel::_classname_ ( ) [static]

Reimplemented from PLearn::Kernel.

Definition at line 49 of file LaplacianKernel.cc.

OptionList & PLearn::LaplacianKernel::_getOptionList_ ( ) [static]

Reimplemented from PLearn::Kernel.

Definition at line 49 of file LaplacianKernel.cc.

RemoteMethodMap & PLearn::LaplacianKernel::_getRemoteMethodMap_ ( ) [static]

Reimplemented from PLearn::Kernel.

Definition at line 49 of file LaplacianKernel.cc.

bool PLearn::LaplacianKernel::_isa_ ( const Object o) [static]

Reimplemented from PLearn::Kernel.

Definition at line 49 of file LaplacianKernel.cc.

Object * PLearn::LaplacianKernel::_new_instance_for_typemap_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 49 of file LaplacianKernel.cc.

StaticInitializer LaplacianKernel::_static_initializer_ & PLearn::LaplacianKernel::_static_initialize_ ( ) [static]

Reimplemented from PLearn::Kernel.

Definition at line 49 of file LaplacianKernel.cc.

string PLearn::LaplacianKernel::classname ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file LaplacianKernel.cc.

void PLearn::LaplacianKernel::declareOptions ( OptionList ol) [static, protected]

recognized option is "phi"

Reimplemented from PLearn::Kernel.

Definition at line 67 of file LaplacianKernel.cc.

References PLearn::OptionBase::buildoption, PLearn::declareOption(), and phi.

Here is the call graph for this function:

static const PPath& PLearn::LaplacianKernel::declaringFile ( ) [inline, static]

Reimplemented from PLearn::Kernel.

Definition at line 67 of file LaplacianKernel.h.

:
LaplacianKernel * PLearn::LaplacianKernel::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::Kernel.

Definition at line 49 of file LaplacianKernel.cc.

real PLearn::LaplacianKernel::evaluate ( const Vec x1,
const Vec x2 
) const [virtual]

** Subclasses must override this method **

returns K(x1,x2)

Implements PLearn::Kernel.

Definition at line 51 of file LaplacianKernel.cc.

References PLearn::TVec< T >::data(), PLearn::exp(), i, PLearn::TVec< T >::length(), n, and PLERROR.

{ 
#ifdef BOUNDCHECK
    if(x1.length()!=x2.length())
        PLERROR("IN LaplacianKernel::evaluate x1 and x2 must have the same length");
#endif

    real summ = 0.0;
    real* v1=x1.data();
    real* v2=x2.data();
    int n=x1.length();
    for(int i=0; i<n; i++)
        summ += fabs(v1[i]-v2[i]);
    return exp(-phi*summ);
}

Here is the call graph for this function:

OptionList & PLearn::LaplacianKernel::getOptionList ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file LaplacianKernel.cc.

OptionMap & PLearn::LaplacianKernel::getOptionMap ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file LaplacianKernel.cc.

RemoteMethodMap & PLearn::LaplacianKernel::getRemoteMethodMap ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file LaplacianKernel.cc.


Member Data Documentation

Reimplemented from PLearn::Kernel.

Definition at line 67 of file LaplacianKernel.h.

Definition at line 59 of file LaplacianKernel.h.

Referenced by declareOptions().


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