Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::KernelVMatrix Class Reference

#include <KernelVMatrix.h>

Inheritance diagram for PLearn::KernelVMatrix:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KernelVMatrix (VMat data1, VMat data2, Ker the_ker)
virtual real get (int i, int j) const
 returns element (i,j)

virtual void getSubRow (int i, int j, Vec v) const
 fills v with the subrow i lying between columns j (inclusive) and j+v.length() (exclusive)

 KernelVMatrix ()
 KernelVMatrix (VMat data1, VMat data2, Ker the_ker)
 PLEARN_DECLARE_OBJECT (KernelVMatrix)
virtual void build ()
 Should call simply inherited::build(), then this class's build_().

virtual real get (int i, int j) const
 returns element (i,j)

virtual void getSubRow (int i, int j, Vec v) const
 fills v with the subrow i lying between columns j (inclusive) and j+v.length() (exclusive)


Static Public Member Functions

void declareOptions (OptionList &ol)
 redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down)


Protected Attributes

VMat d1
 KernelVMatrix() : d1(), d2(), ker(), input1(), input2() {}.

VMat d2
Ker ker
Vec input1
Vec input2

Private Types

typedef VMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.


Detailed Description

This VMat is built from 2 other (possibly identical) VMats and a Kernel K. The resulting VMat takes every sample (x_i,y_i)

Definition at line 62 of file ker/KernelVMatrix.h.


Member Typedef Documentation

typedef VMatrix PLearn::KernelVMatrix::inherited [private]
 

Reimplemented from PLearn::VMatrix.

Definition at line 65 of file vmat/KernelVMatrix.h.


Constructor & Destructor Documentation

PLearn::KernelVMatrix::KernelVMatrix VMat  data1,
VMat  data2,
Ker  the_ker
 

Definition at line 61 of file ker/KernelVMatrix.cc.

PLearn::KernelVMatrix::KernelVMatrix  ) 
 

Definition at line 63 of file vmat/KernelVMatrix.cc.

PLearn::KernelVMatrix::KernelVMatrix VMat  data1,
VMat  data2,
Ker  the_ker
 


Member Function Documentation

void PLearn::KernelVMatrix::build  )  [virtual]
 

Should call simply inherited::build(), then this class's build_().

This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.

Reimplemented from PLearn::VMatrix.

Definition at line 74 of file vmat/KernelVMatrix.cc.

References build_().

void PLearn::KernelVMatrix::build_  )  [private]
 

This does the actual building.

Reimplemented from PLearn::VMatrix.

Definition at line 81 of file vmat/KernelVMatrix.cc.

References d1, d2, input1, input2, PLearn::TVec< T >::resize(), and PLearn::VMat::width().

Referenced by build().

void PLearn::KernelVMatrix::declareOptions OptionList ol  )  [static]
 

redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down)

ex: static void declareOptions(OptionList& ol) { declareOption(ol, "inputsize", &MyObject::inputsize_, OptionBase::buildoption, "the size of the input\n it must be provided"); declareOption(ol, "weights", &MyObject::weights, OptionBase::learntoption, "the learnt model weights"); inherited::declareOptions(ol); }

Reimplemented from PLearn::VMatrix.

Definition at line 90 of file vmat/KernelVMatrix.cc.

References PLearn::declareOption(), and PLearn::OptionList.

virtual real PLearn::KernelVMatrix::get int  i,
int  j
const [virtual]
 

returns element (i,j)

Reimplemented from PLearn::VMatrix.

real PLearn::KernelVMatrix::get int  i,
int  j
const [virtual]
 

returns element (i,j)

Reimplemented from PLearn::VMatrix.

Definition at line 81 of file ker/KernelVMatrix.cc.

References d1, d2, input1, input2, ker, PLearn::VMatrix::length(), PLERROR, and PLearn::VMatrix::width().

virtual void PLearn::KernelVMatrix::getSubRow int  i,
int  j,
Vec  v
const [virtual]
 

fills v with the subrow i lying between columns j (inclusive) and j+v.length() (exclusive)

Reimplemented from PLearn::VMatrix.

void PLearn::KernelVMatrix::getSubRow int  i,
int  j,
Vec  v
const [virtual]
 

fills v with the subrow i lying between columns j (inclusive) and j+v.length() (exclusive)

Reimplemented from PLearn::VMatrix.

Definition at line 94 of file ker/KernelVMatrix.cc.

References d1, d2, input1, input2, ker, PLearn::TVec< T >::length(), PLearn::VMatrix::length(), PLERROR, and PLearn::VMatrix::width().

PLearn::KernelVMatrix::PLEARN_DECLARE_OBJECT KernelVMatrix   ) 
 


Member Data Documentation

VMat PLearn::KernelVMatrix::d1 [protected]
 

KernelVMatrix() : d1(), d2(), ker(), input1(), input2() {}.

Definition at line 69 of file vmat/KernelVMatrix.h.

Referenced by build_(), get(), and getSubRow().

VMat PLearn::KernelVMatrix::d2 [protected]
 

Definition at line 70 of file vmat/KernelVMatrix.h.

Referenced by build_(), get(), and getSubRow().

Vec PLearn::KernelVMatrix::input1 [protected]
 

Definition at line 73 of file vmat/KernelVMatrix.h.

Referenced by build_(), get(), and getSubRow().

Vec PLearn::KernelVMatrix::input2 [protected]
 

Definition at line 74 of file vmat/KernelVMatrix.h.

Referenced by build_(), get(), and getSubRow().

Ker PLearn::KernelVMatrix::ker [protected]
 

Definition at line 71 of file vmat/KernelVMatrix.h.

Referenced by get(), and getSubRow().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:23:30 2004 for PLearn by doxygen 1.3.7