PLearn 0.1
|
returns exp(-phi*(sum_i[abs(x1_i - x2_i)])) More...
#include <LaplacianKernel.h>
Public Member Functions | |
LaplacianKernel () | |
LaplacianKernel (real the_phi) | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual LaplacianKernel * | deepCopy (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 PPath & | declaringFile () |
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 |
returns exp(-phi*(sum_i[abs(x1_i - x2_i)]))
Definition at line 54 of file LaplacianKernel.h.
typedef Kernel PLearn::LaplacianKernel::inherited [private] |
Reimplemented from PLearn::Kernel.
Definition at line 56 of file LaplacianKernel.h.
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) {}
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.
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.
{ declareOption(ol, "phi", &LaplacianKernel::phi, OptionBase::buildoption, "TODO: Some comments"); inherited::declareOptions(ol); }
static const PPath& PLearn::LaplacianKernel::declaringFile | ( | ) | [inline, static] |
LaplacianKernel * PLearn::LaplacianKernel::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::Kernel.
Definition at line 49 of file LaplacianKernel.cc.
** 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); }
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.
Reimplemented from PLearn::Kernel.
Definition at line 67 of file LaplacianKernel.h.
real PLearn::LaplacianKernel::phi [protected] |
Definition at line 59 of file LaplacianKernel.h.
Referenced by declareOptions().